Class Workspace

java.lang.Object
com.structurizr.AbstractWorkspace
com.structurizr.Workspace

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

    • Workspace

      public Workspace​(java.lang.String name, java.lang.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.
      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