Class Configuration

java.lang.Object
com.structurizr.view.Configuration
All Implemented Interfaces:
PropertyHolder

public final class Configuration
extends java.lang.Object
implements PropertyHolder
Configuration associated with how information in the workspace is rendered.
  • Constructor Summary

    Constructors 
    Constructor Description
    Configuration()  
  • Method Summary

    Modifier and Type Method Description
    void addProperty​(java.lang.String name, java.lang.String value)
    Adds a name-value pair property to this workspace.
    void addTheme​(java.lang.String url)
    Adds a theme.
    void copyConfigurationFrom​(Configuration configuration)  
    Branding getBranding()
    Gets the Branding object associated with this workspace.
    java.lang.String getDefaultView()
    Gets the key of the view that should be shown by default.
    MetadataSymbols getMetadataSymbols()
    Gets the type of symbols to use when rendering metadata.
    java.util.Map<java.lang.String,​java.lang.String> getProperties()
    Gets the collection of name-value property pairs associated with this workspace, as a Map.
    Styles getStyles()
    Gets the styles associated with this set of views.
    Terminology getTerminology()
    Gets the Terminology object associated with this workspace.
    java.lang.String getTheme()
    Deprecated.
    java.lang.String[] getThemes()
    Gets the URLs of the themes used to render views.
    ViewSortOrder getViewSortOrder()
    Gets the sort order used when displaying the list of views.
    void setDefaultView​(View view)
    Sets the view that should be shown by default.
    void setMetadataSymbols​(MetadataSymbols metadataSymbols)
    Sets the type of symbols to use when rendering metadata.
    void setThemes​(java.lang.String... themes)
    Sets the themes used to render views.
    void setViewSortOrder​(ViewSortOrder viewSortOrder)
    Sets the sort order used when displaying the list of views.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getStyles

      public Styles getStyles()
      Gets the styles associated with this set of views.
      Returns:
      a Styles object
    • getTheme

      @Deprecated public java.lang.String getTheme()
      Deprecated.
    • getThemes

      public java.lang.String[] getThemes()
      Gets the URLs of the themes used to render views.
      Returns:
      an array of URLs
    • setThemes

      public void setThemes​(java.lang.String... themes)
      Sets the themes used to render views.
      Parameters:
      themes - an array of URLs
    • addTheme

      public void addTheme​(java.lang.String url)
      Adds a theme.
      Parameters:
      url - the URL of the theme to be added
    • getDefaultView

      public java.lang.String getDefaultView()
      Gets the key of the view that should be shown by default.
      Returns:
      the key, as a String (or null if not specified)
    • setDefaultView

      public void setDefaultView​(View view)
      Sets the view that should be shown by default.
      Parameters:
      view - a View object
    • copyConfigurationFrom

      public void copyConfigurationFrom​(Configuration configuration)
    • getBranding

      public Branding getBranding()
      Gets the Branding object associated with this workspace.
      Returns:
      a Branding object
    • getTerminology

      public Terminology getTerminology()
      Gets the Terminology object associated with this workspace.
      Returns:
      a Terminology object
    • getMetadataSymbols

      public MetadataSymbols getMetadataSymbols()
      Gets the type of symbols to use when rendering metadata.
      Returns:
      a MetadataSymbols enum value
    • setMetadataSymbols

      public void setMetadataSymbols​(MetadataSymbols metadataSymbols)
      Sets the type of symbols to use when rendering metadata.
      Parameters:
      metadataSymbols - a MetadataSymbols enum value
    • getViewSortOrder

      public ViewSortOrder getViewSortOrder()
      Gets the sort order used when displaying the list of views.
      Returns:
      a ViewSortOrder enum
    • setViewSortOrder

      public void setViewSortOrder​(ViewSortOrder viewSortOrder)
      Sets the sort order used when displaying the list of views.
      Parameters:
      viewSortOrder - a ViewSortOrder enum
    • getProperties

      public java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Gets the collection of name-value property pairs associated with this workspace, as a Map.
      Specified by:
      getProperties in interface PropertyHolder
      Returns:
      a Map (String, String) (empty if there are no properties)
    • addProperty

      public void addProperty​(java.lang.String name, java.lang.String value)
      Adds a name-value pair property to this workspace.
      Specified by:
      addProperty in interface PropertyHolder
      Parameters:
      name - the name of the property
      value - the value of the property