Package com.structurizr
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 Summary
Constructors Constructor Description Workspace(java.lang.String name, java.lang.String description)
Creates a new workspace. -
Method Summary
Modifier and Type Method Description int
countAndLogWarnings()
Counts and logs any warnings within the workspace (e.g.Documentation
getDocumentation()
Gets the documentation associated with this workspace.Model
getModel()
Gets the software architecture model.ViewSet
getViews()
Gets the set of views onto a software architecture model.void
hydrate()
Called when deserialising JSON, to re-create the object graph based upon element/relationship IDs.boolean
isEmpty()
Determines whether this model is empty.Methods inherited from class com.structurizr.AbstractWorkspace
addProperty, clearConfiguration, getConfiguration, getDescription, getId, getLastModifiedAgent, getLastModifiedDate, getLastModifiedUser, getName, getProperties, getRevision, getThumbnail, getVersion, setConfiguration, setDescription, setId, setLastModifiedAgent, setLastModifiedDate, setLastModifiedUser, setName, setRevision, setThumbnail, setVersion
-
Constructor Details
-
Workspace
public Workspace(java.lang.String name, java.lang.String description)Creates a new workspace.- Parameters:
name
- the name of the workspacedescription
- a short description
-
-
Method Details
-
getModel
Gets the software architecture model.- Returns:
- a Model instance
-
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
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
-