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 Details

  • Method Details

    • addContextSection

      @Nonnull public Section addContextSection​(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOException
      Adds a "Context" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to, or null if it relates to the whole workspace
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Functional Overview" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Quality Attributes" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Constraints" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Principles" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Software Architecture" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Containers" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Components" section relating to a Container from one or more files.
      Parameters:
      container - the Container the documentation content relates to
      files - 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
    • addComponentsSection

      @Nonnull public Section addComponentsSection​(@Nullable Container container, @Nonnull Format format, @Nonnull java.lang.String content)
      Adds a "Components" section relating to a Container.
      Parameters:
      container - the Container the documentation content relates to
      format - the Format of the documentation content
      content - a String containing the documentation content
      Returns:
      a documentation Section
    • addCodeSection

      @Nonnull public Section addCodeSection​(@Nullable Component component, java.io.File... files) throws java.io.IOException
      Adds a "Code" section relating to a Component from one or more files.
      Parameters:
      component - the Component the documentation content relates to
      files - 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
    • addCodeSection

      @Nonnull public Section addCodeSection​(@Nullable Component component, @Nonnull Format format, @Nonnull java.lang.String content)
      Adds a "Code" section relating to a Component.
      Parameters:
      component - the Component the documentation content relates to
      format - the Format of the documentation content
      content - a String containing the documentation content
      Returns:
      a documentation Section
    • addDataSection

      @Nonnull public Section addDataSection​(@Nullable SoftwareSystem softwareSystem, java.io.File... files) throws java.io.IOException
      Adds a "Data" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds an "Infrastructure Architecture" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Deployment" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Development Environment" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds an "Operation and Support" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - 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.IOException
      Adds a "Decision Log" section relating to a SoftwareSystem from one or more files.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      files - 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 a SoftwareSystem.
      Parameters:
      softwareSystem - the SoftwareSystem the documentation content relates to
      format - the Format of the documentation content
      content - a String containing the documentation content
      Returns:
      a documentation Section
    • getMetadata

      protected TemplateMetadata getMetadata()
      Description copied from class: DocumentationTemplate
      Gets the metadata associated with this template.
      Specified by:
      getMetadata in class DocumentationTemplate
      Returns:
      a TemplateMetadata object, or null if there is none