Package com.structurizr.documentation
Class AutomaticDocumentationTemplate
java.lang.Object
com.structurizr.documentation.DocumentationTemplate
com.structurizr.documentation.AutomaticDocumentationTemplate
public class AutomaticDocumentationTemplate extends DocumentationTemplate
This template allows you to scan a given directory and automatically add all Markdown or AsciiDoc
files in that directory. Each file must represent a separate section, and the second level heading
("## Section Title" in Markdown and "== Section Title" in AsciiDoc) will be used as the section name.
-
Constructor Summary
Constructors Constructor Description AutomaticDocumentationTemplate(Workspace workspace)
-
Method Summary
Modifier and Type Method Description java.util.List<Section>
addSections(SoftwareSystem softwareSystem, java.io.File directory)
Adds all files in the specified directory, each in its own section, related to a software system.java.util.List<Section>
addSections(java.io.File directory)
Adds all files in the specified directory, each in its own section.protected TemplateMetadata
getMetadata()
Gets the metadata associated with this template.Methods inherited from class com.structurizr.documentation.DocumentationTemplate
addImage, addImages, addSection, addSection, addSection, addSection, addSection, addSection, addSection, addSection
-
Constructor Details
-
Method Details
-
addSections
Adds all files in the specified directory, each in its own section.- Parameters:
directory
- the directory to scan- Returns:
- a List of Section objects
- Throws:
java.io.IOException
- if there is an error reading the files in the directory
-
addSections
public java.util.List<Section> addSections(SoftwareSystem softwareSystem, java.io.File directory) throws java.io.IOExceptionAdds all files in the specified directory, each in its own section, related to a software system.- Parameters:
directory
- the directory to scansoftwareSystem
- the SoftwareSystem to associate the documentation with- Returns:
- a List of Section objects
- Throws:
java.io.IOException
- if there is an error reading the files in the directory
-
getMetadata
Description copied from class:DocumentationTemplate
Gets the metadata associated with this template.- Specified by:
getMetadata
in classDocumentationTemplate
- Returns:
- a TemplateMetadata object, or null if there is none
-