Class WorkspaceConfiguration

java.lang.Object
com.structurizr.configuration.WorkspaceConfiguration

public final class WorkspaceConfiguration extends Object
A wrapper for configuration options related to the workspace.
  • Method Details

    • getScope

      public WorkspaceScope getScope()
      Gets the scope of this workspace
      Returns:
      a WorkspaceScope enum, or null if undefined
    • setScope

      public void setScope(WorkspaceScope scope)
      Sets the workspace scope.
      Parameters:
      scope - a WorkspaceScope enum, or null if undefined
    • getVisibility

      public Visibility getVisibility()
      Gets the visibility of this workspace (private or public).
      Returns:
      a Visibility enum
    • setVisibility

      public void setVisibility(Visibility visibility)
      Sets the visibility of this workspace (private or public).
      Parameters:
      visibility - a Visibility enum, or null to indicate that no changes should be made
    • getUsers

      public Set<User> getUsers()
      Gets the set of users should have read-write or read-only access to the workspace.
      Returns:
      a Set of User objects (could be empty)
    • addUser

      public void addUser(User user)
      Adds a user.
      Parameters:
      user - a User object representing the username and role
    • addUser

      public void addUser(String username, Role role)
      Adds a user, with the specified username and role.
      Parameters:
      username - the username (e.g. an e-mail address)
      role - the user's role
    • clearUsers

      public void clearUsers()
      Clears all configured users.