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 Details

  • Method Details

    • addSections

      public java.util.List<Section> addSections​(java.io.File directory) throws java.io.IOException
      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.IOException
      Adds all files in the specified directory, each in its own section, related to a software system.
      Parameters:
      directory - the directory to scan
      softwareSystem - 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

      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