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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String name, String value) Adds a name-value pair property to this workspace.void
Clears the configuration associated with this workspace.Gets the configuration associated with this workspace.Gets the description of this workspace.long
getId()
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 void
setConfiguration
(WorkspaceConfiguration configuration) void
setDescription
(String description) Sets the description of this workspace.void
setId
(long id) Sets the ID of this workspace.void
setLastModifiedAgent
(String lastModifiedAgent) Sets the name of the agent that was used to last modify this workspace (e.g.void
setLastModifiedDate
(Date lastModifiedDate) Sets the last modified date of this workspace.void
setLastModifiedUser
(String lastModifiedUser) Sets the name of the user who last modified tihs workspace (e.g.void
Sets the name of this workspace.void
setRevision
(Long revision) Sets the revision number of this workspace.void
setThumbnail
(String thumbnail) Sets the thumbnail associated with this workspace.void
setVersion
(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:
getProperties
in interfacePropertyHolder
- Returns:
- a Map (String, String) (empty if there are no properties)
-
addProperty
Adds a name-value pair property to this workspace.- Specified by:
addProperty
in interfacePropertyHolder
- Parameters:
name
- the name of the propertyvalue
- the value of the property
-