Interface MTWorkspace

All Superinterfaces:
MTWorkspaceHeader

public interface MTWorkspace extends MTWorkspaceHeader
Full interface for workspaces. Workspaces are used for revision control. Each repository has one workspace by default. At any point in time this workspace can be turned into a "snapshot". When this is done all revisions of models and symbols in this workspace are locked and can no longer be edited. To be able to edit models and symbols again a new workspace is created from the snapshot, giving the users the possibility to create new revisions which can be edited. The snapshot still remains so that at any point in time you can login to a previous snapshot instead of an open workspace to see exactly how everything looked at that point in time.
Since:
3.0
  • Method Details

    • getParent

      MTWorkspaceHeader getParent()
      Returns the parent workspace.
      Returns:
      The workspace parent or null if the workspace is the root workspace.
      Since:
      3.0
    • getConfiguration

      String getConfiguration()
      Returns the configuration of the workspace as XML data.
      Returns:
      The configuration XML data or null if it is the default configuration.
      Since:
      3.0
    • setTitle

      void setTitle(String title)
      Sets the title of the workspace.
      Parameters:
      title - The new title.
      Since:
      3.0
    • setActive

      void setActive(boolean active)
      Sets the active flag for the workspace. The active workspaces are the ones shown by default in the workspace list. If there is only one active open workspace that one will be opened when double-clicking the repository.
      Parameters:
      active - The new value of the active flag.
    • setConfiguration

      void setConfiguration(String configuration)
      Sets the workspace configuration XML.
      Parameters:
      configuration - The new configuration XML.
    • createChild

      MTWorkspace createChild(String childTitle) throws IllegalStateException
      Synchronously creates a child workspace to this workspace, if this worksapce is locked. Otherwise, an IllegalStateException is thrown. The implicit user of this action must have the correct privilege, otherwise the result of the call is undefined (but a new workspace will not be created).
      Parameters:
      childTitle - The title of the new workspace.
      Throws:
      IllegalStateException
    • createSnapshot

      MTWorkspace createSnapshot(String snapshotTitle)
      Synchronously creates a snapshot of all locked models and objects in this workspace.
      Parameters:
      snapshotTitle - The title of the snapshot.
    • save

      void save() throws MTAccessException
      Saves changes to this workspace.
      Throws:
      MTAccessException
      Since:
      3.0
    • getPluginData

      Object getPluginData(MTDataProvider provider)
      Returns the plugin data created for the workspace by a given provider.
      Parameters:
      provider - The provider.
      Returns:
      The plugin data created by the provider.
    • setPluginData

      void setPluginData(MTDataProvider provider, Object data)
      Sets plugin data for a provider.
      Parameters:
      provider - The provider.
      data - The new data to store for the provider.