Class AbstractWorkspace

java.lang.Object
com.structurizr.AbstractWorkspace
All Implemented Interfaces:
PropertyHolder
Direct Known Subclasses:
Workspace

public abstract class AbstractWorkspace extends Object implements PropertyHolder
The superclass for regular and encrypted workspaces.
  • 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 String getName()
      Gets the name of this workspace.
      Returns:
      the name, as a String
    • setName

      public void setName(String name)
      Sets the name of this workspace.
      Parameters:
      name - the name, as a String
    • getDescription

      public String getDescription()
      Gets the description of this workspace.
      Returns:
      the description, as a String
    • setDescription

      public void setDescription(String description)
      Sets the description of this workspace.
      Parameters:
      description - the description, as a String
    • getVersion

      public String getVersion()
      Gets the version of this workspace.
      Returns:
      the version, as a String
    • setVersion

      public void setVersion(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 Long getRevision()
      Gets the revision number of this workspace.
      Returns:
      the revision number
    • setRevision

      public void setRevision(Long revision)
      Sets the revision number of this workspace.
      Parameters:
      revision - a number
    • getLastModifiedDate

      public Date getLastModifiedDate()
      Gets the last modified date of this workspace.
      Returns:
      a Date object
    • setLastModifiedDate

      public void setLastModifiedDate(Date lastModifiedDate)
      Sets the last modified date of this workspace.
      Parameters:
      lastModifiedDate - a Date object
    • getLastModifiedUser

      public 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(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 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(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 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(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

      public WorkspaceConfiguration getConfiguration()
      Gets the configuration associated with this workspace.
      Returns:
      a Configuration object
    • setConfiguration

      protected void setConfiguration(WorkspaceConfiguration configuration)
    • clearConfiguration

      public void clearConfiguration()
      Clears the configuration associated with this workspace.
    • getProperties

      public Map<String,String> getProperties()
      Gets the collection of name-value property pairs associated with this workspace, as a Map.
      Specified by:
      getProperties in interface PropertyHolder
      Returns:
      a Map (String, String) (empty if there are no properties)
    • addProperty

      public void addProperty(String name, String value)
      Adds a name-value pair property to this workspace.
      Specified by:
      addProperty in interface PropertyHolder
      Parameters:
      name - the name of the property
      value - the value of the property