Package com.structurizr.documentation
Class StructurizrDocumentationTemplate
java.lang.Object
com.structurizr.documentation.DocumentationTemplate
com.structurizr.documentation.StructurizrDocumentationTemplate
public class StructurizrDocumentationTemplate extends DocumentationTemplate
A simple documentation template, based upon the "software guidebook" concept in Simon Brown's Software Architecture for Developers book, with the following sections:
- Context (1)
- Functional Overview (2)
- Quality Attributes (2)
- Constraints (2)
- Principles (2)
- Software Architecture (3)
- Containers (3)
- Components (3)
- Code (3)
- Data (3)
- Infrastructure Architecture (4)
- Deployment (4)
- Development Environment (4)
- Operation and Support (4)
- Decision Log (5)
The number in parentheses () represents the grouping, which is simply used to colour code section navigation buttons when rendered.
-
Constructor Summary
Constructors Constructor Description StructurizrDocumentationTemplate(Workspace workspace)
-
Method Summary
Modifier and Type Method Description Section
addCodeSection(Component component, Format format, java.lang.String content)
Adds a "Code" section relating to aComponent
.Section
addCodeSection(Component component, java.io.File... files)
Adds a "Code" section relating to aComponent
from one or more files.Section
addComponentsSection(Container container, Format format, java.lang.String content)
Adds a "Components" section relating to aContainer
.Section
addComponentsSection(Container container, java.io.File... files)
Adds a "Components" section relating to aContainer
from one or more files.Section
addConstraintsSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Constraints" section relating to aSoftwareSystem
.Section
addConstraintsSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Constraints" section relating to aSoftwareSystem
from one or more files.Section
addContainersSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Containers" section relating to aSoftwareSystem
.Section
addContainersSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Containers" section relating to aSoftwareSystem
from one or more files.Section
addContextSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Context" section relating to aSoftwareSystem
.Section
addContextSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Context" section relating to aSoftwareSystem
from one or more files.Section
addDataSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Data" section relating to aSoftwareSystem
.Section
addDataSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Data" section relating to aSoftwareSystem
from one or more files.Section
addDecisionLogSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Decision Log" section relating to aSoftwareSystem
.Section
addDecisionLogSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Decision Log" section relating to aSoftwareSystem
from one or more files.Section
addDeploymentSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Deployment" section relating to aSoftwareSystem
.Section
addDeploymentSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Deployment" section relating to aSoftwareSystem
from one or more files.Section
addDevelopmentEnvironmentSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Development Environment" section relating to aSoftwareSystem
.Section
addDevelopmentEnvironmentSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Development Environment" section relating to aSoftwareSystem
from one or more files.Section
addFunctionalOverviewSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Functional Overview" section relating to aSoftwareSystem
.Section
addFunctionalOverviewSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Functional Overview" section relating to aSoftwareSystem
from one or more files.Section
addInfrastructureArchitectureSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Infrastructure Architecture" section relating to aSoftwareSystem
.Section
addInfrastructureArchitectureSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds an "Infrastructure Architecture" section relating to aSoftwareSystem
from one or more files.Section
addOperationAndSupportSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Operation and Support" section relating to aSoftwareSystem
.Section
addOperationAndSupportSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds an "Operation and Support" section relating to aSoftwareSystem
from one or more files.Section
addPrinciplesSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Principles" section relating to aSoftwareSystem
.Section
addPrinciplesSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Principles" section relating to aSoftwareSystem
from one or more files.Section
addQualityAttributesSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Quality Attributes" section relating to aSoftwareSystem
.Section
addQualityAttributesSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Quality Attributes" section relating to aSoftwareSystem
from one or more files.Section
addSoftwareArchitectureSection(SoftwareSystem softwareSystem, Format format, java.lang.String content)
Adds a "Software Architecture" section relating to aSoftwareSystem
.Section
addSoftwareArchitectureSection(SoftwareSystem softwareSystem, java.io.File... files)
Adds a "Software Architecture" section relating to aSoftwareSystem
from one or more files.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
-
addContextSection
@Nonnull public Section addContextSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Context" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates to, or null if it relates to the whole workspacefiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addContextSection
@Nonnull public Section addContextSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Context" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addFunctionalOverviewSection
@Nonnull public Section addFunctionalOverviewSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Functional Overview" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addFunctionalOverviewSection
@Nonnull public Section addFunctionalOverviewSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Functional Overview" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addQualityAttributesSection
@Nonnull public Section addQualityAttributesSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Quality Attributes" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addQualityAttributesSection
@Nonnull public Section addQualityAttributesSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Quality Attributes" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addConstraintsSection
@Nonnull public Section addConstraintsSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Constraints" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addConstraintsSection
@Nonnull public Section addConstraintsSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Constraints" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addPrinciplesSection
@Nonnull public Section addPrinciplesSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Principles" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addPrinciplesSection
@Nonnull public Section addPrinciplesSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Principles" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addSoftwareArchitectureSection
@Nonnull public Section addSoftwareArchitectureSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Software Architecture" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addSoftwareArchitectureSection
@Nonnull public Section addSoftwareArchitectureSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Software Architecture" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addContainersSection
@Nonnull public Section addContainersSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Containers" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addContainersSection
@Nonnull public Section addContainersSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Containers" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addComponentsSection
@Nonnull public Section addComponentsSection(@Nullable Container container, java.io.File... files) throws java.io.IOExceptionAdds a "Components" section relating to aContainer
from one or more files. -
addComponentsSection
@Nonnull public Section addComponentsSection(@Nullable Container container, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Components" section relating to aContainer
. -
addCodeSection
@Nonnull public Section addCodeSection(@Nullable Component component, java.io.File... files) throws java.io.IOExceptionAdds a "Code" section relating to aComponent
from one or more files. -
addCodeSection
@Nonnull public Section addCodeSection(@Nullable Component component, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Code" section relating to aComponent
. -
addDataSection
@Nonnull public Section addDataSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Data" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addDataSection
@Nonnull public Section addDataSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Data" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addInfrastructureArchitectureSection
@Nonnull public Section addInfrastructureArchitectureSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds an "Infrastructure Architecture" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addInfrastructureArchitectureSection
@Nonnull public Section addInfrastructureArchitectureSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Infrastructure Architecture" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addDeploymentSection
@Nonnull public Section addDeploymentSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Deployment" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addDeploymentSection
@Nonnull public Section addDeploymentSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Deployment" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addDevelopmentEnvironmentSection
@Nonnull public Section addDevelopmentEnvironmentSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Development Environment" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addDevelopmentEnvironmentSection
@Nonnull public Section addDevelopmentEnvironmentSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Development Environment" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addOperationAndSupportSection
@Nonnull public Section addOperationAndSupportSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds an "Operation and Support" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addOperationAndSupportSection
@Nonnull public Section addOperationAndSupportSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Operation and Support" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
addDecisionLogSection
@Nonnull public Section addDecisionLogSection(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOExceptionAdds a "Decision Log" section relating to aSoftwareSystem
from one or more files.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates tofiles
- one or more File objects that point to the documentation content- Returns:
- a documentation
Section
- Throws:
java.io.IOException
- if there is an error reading the files
-
addDecisionLogSection
@Nonnull public Section addDecisionLogSection(@Nullable SoftwareSystem softwareSystem, @Nonnull Format format, @Nonnull java.lang.String content)Adds a "Decision Log" section relating to aSoftwareSystem
.- Parameters:
softwareSystem
- theSoftwareSystem
the documentation content relates toformat
- theFormat
of the documentation contentcontent
- a String containing the documentation content- Returns:
- a documentation
Section
-
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
-