Class Workspace

All Implemented Interfaces:
Documentable, PropertyHolder

public final class Workspace extends AbstractWorkspace implements Documentable
Represents a Structurizr workspace, which is a wrapper for a software architecture model, views and documentation.
  • Constructor Details

    • Workspace

      public Workspace(String name, String description)
      Creates a new workspace.
      Parameters:
      name - the name of the workspace
      description - a short description
  • Method Details

    • getModel

      public Model getModel()
      Gets the software architecture model.
      Returns:
      a Model instance
    • getViews

      public ViewSet getViews()
      Gets the set of views onto a software architecture model.
      Returns:
      a ViewSet instance
    • hydrate

      public void hydrate()
      Called when deserialising JSON, to re-create the object graph based upon element/relationship IDs.
    • getDocumentation

      public Documentation getDocumentation()
      Gets the documentation associated with this workspace.
      Specified by:
      getDocumentation in interface Documentable
      Returns:
      a Documentation object
    • isEmpty

      public boolean isEmpty()
      Determines whether this model is empty.
      Returns:
      true if the model has no elements, views or documentation; false otherwise
    • countAndLogWarnings

      public int countAndLogWarnings()
      Counts and logs any warnings within the workspace (e.g. missing element descriptions).
      Returns:
      the number of warnings