Class C4PlantUMLWriter

    • Constructor Detail

      • C4PlantUMLWriter

        public C4PlantUMLWriter()
      • C4PlantUMLWriter

        public C4PlantUMLWriter​(C4PlantUMLWriter.Layout layout,
                                java.lang.String c4PlantUMLBaseUrl)
        Constructur providing a base url and a layout
        Parameters:
        layout - layout to use for each graph
        c4PlantUMLBaseUrl - base url of repository. The following GitHub url kinds are supported
        • raw content (i.e. "https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/")
        • Official repository name with branch or tag (i.e. "https://github.com/plantuml-stdlib/C4-PlantUML/tree/master")
        • Official repository name without branch. Master is assumed in that case (i.ie "https://github.com/plantuml-stdlib/C4-PlantUML/")
        See Also:
        inferC4PlantUMLLibraryFrom(java.lang.String)
      • C4PlantUMLWriter

        public C4PlantUMLWriter​(C4PlantUMLWriter.Layout layout,
                                java.util.Collection<java.lang.String> c4PlantUMLIncludes)
        Constructor providing the layout and the full list of includes to use
        Parameters:
        layout - layout to use for each graph
        c4PlantUMLIncludes - full list of C4PlantUML brushes. It should include C4.puml, C4_Context.puml, C4_Container.puml and C4_Component.puml.
    • Method Detail

      • inferC4PlantUMLLibraryFrom

        public static java.util.Collection<java.lang.String> inferC4PlantUMLLibraryFrom​(java.lang.String urlText)
      • writeContainerForSoftwareSystem

        protected void writeContainerForSoftwareSystem​(com.structurizr.view.ContainerView view,
                                                       java.io.Writer writer,
                                                       java.util.function.BiConsumer<com.structurizr.view.ContainerView,​java.io.Writer> packageContentWriter)
                                                throws java.io.IOException
        Overrides:
        writeContainerForSoftwareSystem in class BasicPlantUMLWriter
        Throws:
        java.io.IOException
      • writeContainerForContainer

        protected void writeContainerForContainer​(com.structurizr.view.ComponentView view,
                                                  java.io.Writer writer,
                                                  java.util.function.BiConsumer<com.structurizr.view.ComponentView,​java.io.Writer> packageContentWriter)
                                           throws java.io.IOException
        Overrides:
        writeContainerForContainer in class BasicPlantUMLWriter
        Throws:
        java.io.IOException
      • write

        protected void write​(com.structurizr.view.View view,
                             com.structurizr.model.Element element,
                             java.io.Writer writer,
                             int indent)
        We replace the write element method to use macros provided by C4-PlantUML
        Overrides:
        write in class BasicPlantUMLWriter
      • writeRelationship

        protected void writeRelationship​(com.structurizr.view.View view,
                                         com.structurizr.view.RelationshipView relationshipView,
                                         java.io.Writer writer)
        Overrides:
        writeRelationship in class BasicPlantUMLWriter