Package com.structurizr
Class AbstractWorkspace
java.lang.Object
com.structurizr.AbstractWorkspace
- Direct Known Subclasses:
Workspace
public abstract class AbstractWorkspace
extends java.lang.Object
The superclass for regular and encrypted workspaces.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractWorkspace()
-
Method Summary
Modifier and Type Method Description void
addProperty(java.lang.String name, java.lang.String value)
Adds a name-value pair property to this workspace.void
clearConfiguration()
Clears the configuration associated with this workspace.WorkspaceConfiguration
getConfiguration()
Gets the configuration associated with this workspace.java.lang.String
getDescription()
Gets the description of this workspace.long
getId()
Gets the ID of this workspace.java.lang.String
getLastModifiedAgent()
Gets the name of the agent that was used to last modify this workspace (e.g.java.util.Date
getLastModifiedDate()
Gets the last modified date of this workspace.java.lang.String
getLastModifiedUser()
Gets the name of the user who last modified this workspace (e.g.java.lang.String
getName()
Gets the name of this workspace.java.util.Map<java.lang.String,java.lang.String>
getProperties()
Gets the collection of name-value property pairs associated with this workspace, as a Map.java.lang.Long
getRevision()
Gets the revision number of this workspace.java.lang.String
getThumbnail()
Gets the thumbnail associated with this workspace.java.lang.String
getVersion()
Gets the version of this workspace.protected void
setConfiguration(WorkspaceConfiguration configuration)
void
setDescription(java.lang.String description)
Sets the description of this workspace.void
setId(long id)
Sets the ID of this workspace.void
setLastModifiedAgent(java.lang.String lastModifiedAgent)
Sets the name of the agent that was used to last modify this workspace (e.g.void
setLastModifiedDate(java.util.Date lastModifiedDate)
Sets the last modified date of this workspace.void
setLastModifiedUser(java.lang.String lastModifiedUser)
Sets the name of the user who last modified tihs workspace (e.g.void
setName(java.lang.String name)
Sets the name of this workspace.void
setRevision(java.lang.Long revision)
Sets the revision number of this workspace.void
setThumbnail(java.lang.String thumbnail)
Sets the thumbnail associated with this workspace.void
setVersion(java.lang.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
public java.lang.String getName()Gets the name of this workspace.- Returns:
- the name, as a String
-
setName
public void setName(java.lang.String name)Sets the name of this workspace.- Parameters:
name
- the name, as a String
-
getDescription
public java.lang.String getDescription()Gets the description of this workspace.- Returns:
- the description, as a String
-
setDescription
public void setDescription(java.lang.String description)Sets the description of this workspace.- Parameters:
description
- the description, as a String
-
getVersion
public java.lang.String getVersion()Gets the version of this workspace.- Returns:
- the version, as a String
-
setVersion
public void setVersion(java.lang.String version)Sets the version of this workspace.- Parameters:
version
- the version, as a String (e.g. 1.0.1, a git hash, etc).
-
getRevision
public java.lang.Long getRevision()Gets the revision number of this workspace.- Returns:
- the revision number
-
setRevision
public void setRevision(java.lang.Long revision)Sets the revision number of this workspace.- Parameters:
revision
- a number
-
getLastModifiedDate
public java.util.Date getLastModifiedDate()Gets the last modified date of this workspace.- Returns:
- a Date object
-
setLastModifiedDate
public void setLastModifiedDate(java.util.Date lastModifiedDate)Sets the last modified date of this workspace.- Parameters:
lastModifiedDate
- a Date object
-
getLastModifiedUser
public java.lang.String 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
public void setLastModifiedUser(java.lang.String lastModifiedUser)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
public java.lang.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
public void setLastModifiedAgent(java.lang.String lastModifiedAgent)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
public java.lang.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
public void setThumbnail(java.lang.String thumbnail)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
public java.util.Map<java.lang.String,java.lang.String> getProperties()Gets the collection of name-value property pairs associated with this workspace, as a Map.- Returns:
- a Map (String, String) (empty if there are no properties)
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)Adds a name-value pair property to this workspace.- Parameters:
name
- the name of the propertyvalue
- the value of the property
-