Package com.structurizr
Class AbstractWorkspace
java.lang.Object
com.structurizr.AbstractWorkspace
- All Implemented Interfaces:
PropertyHolder
- Direct Known Subclasses:
Workspace
The superclass for regular and encrypted workspaces.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) Adds a name-value pair property to this workspace.voidClears the configuration associated with this workspace.Gets the configuration associated with this workspace.Gets the description of this workspace.longgetId()Gets the ID of this workspace.Gets the name of the agent that was used to last modify this workspace (e.g.Gets the last modified date of this workspace.Gets the name of the user who last modified this workspace (e.g.getName()Gets the name of this workspace.Gets the collection of name-value property pairs associated with this workspace, as a Map.Gets the revision number of this workspace.Gets the thumbnail associated with this workspace.Gets the version of this workspace.protected voidsetConfiguration(WorkspaceConfiguration configuration) voidsetDescription(String description) Sets the description of this workspace.voidsetId(long id) Sets the ID of this workspace.voidsetLastModifiedAgent(String lastModifiedAgent) Sets the name of the agent that was used to last modify this workspace (e.g.voidsetLastModifiedDate(Date lastModifiedDate) Sets the last modified date of this workspace.voidsetLastModifiedUser(String lastModifiedUser) Sets the name of the user who last modified tihs workspace (e.g.voidSets the name of this workspace.voidsetRevision(Long revision) Sets the revision number of this workspace.voidsetThumbnail(String thumbnail) Sets the thumbnail associated with this workspace.voidsetVersion(String version) Sets the version of this workspace.
-
Constructor Details
-
AbstractWorkspace
protected AbstractWorkspace()
-
-
Method Details
-
getId
public long getId()Gets the ID of this workspace.- Returns:
- the ID (a positive integer)
-
setId
public void setId(long id) Sets the ID of this workspace.- Parameters:
id- the ID (a positive integer)
-
getName
Gets the name of this workspace.- Returns:
- the name, as a String
-
setName
Sets the name of this workspace.- Parameters:
name- the name, as a String
-
getDescription
Gets the description of this workspace.- Returns:
- the description, as a String
-
setDescription
Sets the description of this workspace.- Parameters:
description- the description, as a String
-
getVersion
Gets the version of this workspace.- Returns:
- the version, as a String
-
setVersion
Sets the version of this workspace.- Parameters:
version- the version, as a String (e.g. 1.0.1, a git hash, etc).
-
getRevision
Gets the revision number of this workspace.- Returns:
- the revision number
-
setRevision
Sets the revision number of this workspace.- Parameters:
revision- a number
-
getLastModifiedDate
Gets the last modified date of this workspace.- Returns:
- a Date object
-
setLastModifiedDate
Sets the last modified date of this workspace.- Parameters:
lastModifiedDate- a Date object
-
getLastModifiedUser
Gets the name of the user who last modified this workspace (e.g. a username).- Returns:
- the last modified user, as a String
-
setLastModifiedUser
Sets the name of the user who last modified tihs workspace (e.g. a username).- Parameters:
lastModifiedUser- the last modified user, as a String
-
getLastModifiedAgent
Gets the name of the agent that was used to last modify this workspace (e.g. "Structurizr for Java").- Returns:
- the last modified agent, as a String
-
setLastModifiedAgent
Sets the name of the agent that was used to last modify this workspace (e.g. "Structurizr for Java").- Parameters:
lastModifiedAgent- the last modified user, as a String
-
getThumbnail
Gets the thumbnail associated with this workspace.- Returns:
- a Base64 encoded PNG file as a Data URI (data:image/png;base64) or null if there is no thumbnail
-
setThumbnail
Sets the thumbnail associated with this workspace.- Parameters:
thumbnail- a Base64 encoded PNG file as a Data URI (data:image/png;base64)
-
getConfiguration
Gets the configuration associated with this workspace.- Returns:
- a Configuration object
-
setConfiguration
-
clearConfiguration
public void clearConfiguration()Clears the configuration associated with this workspace. -
getProperties
Gets the collection of name-value property pairs associated with this workspace, as a Map.- Specified by:
getPropertiesin interfacePropertyHolder- Returns:
- a Map (String, String) (empty if there are no properties)
-
addProperty
Adds a name-value pair property to this workspace.- Specified by:
addPropertyin interfacePropertyHolder- Parameters:
name- the name of the propertyvalue- the value of the property
-