public class StandardDocumentationTemplate extends Object implements IDocumentationTemplate
IDocumentationTemplate.DocumentationSection, IDocumentationTemplate.DocumentationSectionEntry
Constructor and Description |
---|
StandardDocumentationTemplate(Locale locale) |
Modifier and Type | Method and Description |
---|---|
IDocumentationTemplate.DocumentationSection |
addDocumentationSection(String sectionId,
boolean isServiceSection,
Map<String,String> properties)
Adds a new section to the documentation.
|
void |
addServiceImage(String filePath,
String legend)
Used to notify the template that the given image should be viewed in the list of images of the service.
|
protected void |
copyServiceStaticFiles() |
void |
copyStaticFiles(String rootPath)
copies static files from the given path to the destination documentation directory.
|
protected void |
copyTemplateStaticFiles() |
boolean |
doesFileExist(String filePath)
Returns true if the file exists in the documentation directory.
|
void |
endServiceAndInterfacesDocumentation(String serviceId)
Identifies that service and interface documentation generation is complete.
|
void |
endServiceDocumentation(String serviceId)
Notifies the template that documentation of a new service ended.
|
void |
endServiceInterfaceDocumentation(String serviceInterfaceId)
Notifies that the documentation generation of service interface is complete.
|
void |
endServiceInterfacesDocumentation(String serviceId)
Notifies the template that documentation of service interfaces has ended.
|
protected void |
generateSectionsXml(StringBuilder xmlString,
List<IDocumentationTemplate.DocumentationSection> sections) |
static PortalFilePath |
getDocumentationRoot(Locale locale) |
IDocumentationTemplate.DocumentationSection |
getDocumentationSection(String sectionId,
boolean isServiceSection) |
void |
saveFile(InputStream stream,
String filePath)
Notifies the template that a new file was generated and should be saved in the given path within the documentation directory.
|
void |
setServiceDetailedDescription(String serviceDetailedDescription)
HTML description of the service.
|
void |
setServiceImage(String serviceImage)
Notifies the path to the service image and may be used for rendering documentation.
|
void |
setServiceInterfaceDetailedDescription(String detailedDescription)
Detailed description is assumed to be HTML format.
|
void |
setServiceInterfaceName(String name) |
void |
setServiceInterfaceSummary(String summary)
Summary is assumed to be simple text and not HTML.
|
void |
setServiceName(String serviceName)
Identifies the service name that may be used for generation.
|
void |
setServiceSummary(String serviceSummary)
Specifies the service summary to be displayed appropriately.
|
protected int |
simpleCopyStaticFiles(String rootPath) |
void |
startServiceAndInterfacesDocumentation(String serviceId)
Notifies the template that documentation of a new service and its interfaces has started.
|
void |
startServiceDocumentation(String serviceId)
Notifies the template that documentation of a new service started.
|
void |
startServiceInterfaceDocumentation(String serviceInterfaceId)
Notifies that the documentation generation of service interface is starting.
|
void |
startServiceInterfacesDocumentation(String serviceId)
Notifies the template that documentation of service interfaces has started.
|
public StandardDocumentationTemplate(Locale locale)
public void startServiceAndInterfacesDocumentation(String serviceId) throws PortalException
IDocumentationTemplate
startServiceAndInterfacesDocumentation
in interface IDocumentationTemplate
PortalException
public void copyStaticFiles(String rootPath) throws PortalException
IDocumentationTemplate
copyStaticFiles
in interface IDocumentationTemplate
rootPath
- origin path.PortalException
public static PortalFilePath getDocumentationRoot(Locale locale) throws PortalException
PortalException
protected int simpleCopyStaticFiles(String rootPath) throws PortalException
PortalException
protected void copyTemplateStaticFiles() throws PortalException
PortalException
protected void copyServiceStaticFiles() throws PortalException
PortalException
public void startServiceDocumentation(String serviceId)
IDocumentationTemplate
startServiceDocumentation
in interface IDocumentationTemplate
public void endServiceDocumentation(String serviceId)
IDocumentationTemplate
endServiceDocumentation
in interface IDocumentationTemplate
public void setServiceName(String serviceName)
IDocumentationTemplate
setServiceName
in interface IDocumentationTemplate
public void setServiceSummary(String serviceSummary)
IDocumentationTemplate
setServiceSummary
in interface IDocumentationTemplate
public void setServiceImage(String serviceImage)
IDocumentationTemplate
setServiceImage
in interface IDocumentationTemplate
public void setServiceDetailedDescription(String serviceDetailedDescription)
IDocumentationTemplate
setServiceDetailedDescription
in interface IDocumentationTemplate
public void startServiceInterfacesDocumentation(String serviceId)
IDocumentationTemplate
startServiceInterfacesDocumentation
in interface IDocumentationTemplate
public void startServiceInterfaceDocumentation(String serviceInterfaceId)
IDocumentationTemplate
startServiceInterfaceDocumentation
in interface IDocumentationTemplate
public void setServiceInterfaceName(String name)
setServiceInterfaceName
in interface IDocumentationTemplate
public void setServiceInterfaceSummary(String summary)
IDocumentationTemplate
setServiceInterfaceSummary
in interface IDocumentationTemplate
public void setServiceInterfaceDetailedDescription(String detailedDescription)
IDocumentationTemplate
setServiceInterfaceDetailedDescription
in interface IDocumentationTemplate
public void endServiceInterfaceDocumentation(String serviceInterfaceId) throws PortalException
IDocumentationTemplate
endServiceInterfaceDocumentation
in interface IDocumentationTemplate
PortalException
protected void generateSectionsXml(StringBuilder xmlString, List<IDocumentationTemplate.DocumentationSection> sections)
public void endServiceInterfacesDocumentation(String serviceId)
IDocumentationTemplate
endServiceInterfacesDocumentation
in interface IDocumentationTemplate
public void endServiceAndInterfacesDocumentation(String serviceId) throws PortalException
IDocumentationTemplate
endServiceAndInterfacesDocumentation
in interface IDocumentationTemplate
PortalException
public void addServiceImage(String filePath, String legend) throws PortalException
IDocumentationTemplate
addServiceImage
in interface IDocumentationTemplate
filePath
- relative path to the image.legend
- text that should be used to label the image.PortalException
public boolean doesFileExist(String filePath) throws PortalException
IDocumentationTemplate
doesFileExist
in interface IDocumentationTemplate
PortalException
public void saveFile(InputStream stream, String filePath) throws PortalException
IDocumentationTemplate
saveFile
in interface IDocumentationTemplate
stream
- input stream to the new file.filePath
- the destination path where the file should be saved in the documentation directory.PortalException
public IDocumentationTemplate.DocumentationSection addDocumentationSection(String sectionId, boolean isServiceSection, Map<String,String> properties) throws PortalException
IDocumentationTemplate
addDocumentationSection
in interface IDocumentationTemplate
sectionId
- identifier for the section.isServiceSection
- identifies if is a service section.properties
- proprties of the section that will be made available to the xls for rendering.PortalException
public IDocumentationTemplate.DocumentationSection getDocumentationSection(String sectionId, boolean isServiceSection) throws PortalException
getDocumentationSection
in interface IDocumentationTemplate
PortalException
Lumisportal 9.0.0.160603 - Copyright © 2006–2016 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.