Interface MTRepository

All Superinterfaces:
MTRepositoryHeader

public interface MTRepository extends MTRepositoryHeader
Full interface for repositories. A repository is a self-contained set of symbols, models and documents. They are used to separate information that does not interrelate, since no information is shared between repositories (except for users, which are not part of the data model).
Since:
3.0
  • Method Details

    • isLockedByAdmin

      boolean isLockedByAdmin()
      Checks if the repository has been locked by an administrator for maintenance. If this is the case no other users can open the repository.
      Returns:
      true if the repository has been locked, false otherwise.
      Since:
      3.0
    • setTitle

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

      void setCreationDate(Date date)
      Sets the creation date of the repository.
    • setColorScheme

      void setColorScheme(MTColorSchemeHeader colorScheme)
      Sets the color scheme of the repository.
      Parameters:
      colorScheme - The MTColorSchemeHeader to use.
      Since:
      3.0
    • setParentDirectory

      void setParentDirectory(MTDirectory directory)
      Sets the parent directory for the repository. If the directory does not exist, an exception is thrown.
      Parameters:
      directory - The MTDirectory to use.
      Since:
      3.0
    • setTemplate

      void setTemplate(boolean isTemplate)
      Sets whether this repository should act as a template or not.
      Parameters:
      isTemplate - true if this repository should be a template.
      Since:
      4.0
    • setStatus

      void setStatus(String status)
      Sets status for the repository.
      Parameters:
      status - status.
      Since:
      4.0
    • save

      void save() throws MTAccessException
      Saves changes to the repository.
      Throws:
      MTAccessException
      Since:
      3.0
    • remove

      void remove()
      Removes the repository completely.
    • getCurrentColorScheme

      MTColorScheme getCurrentColorScheme()
      Returns the currently used color scheme.
      Returns:
      The color scheme currently in use.
      Since:
      3.2
    • getPluginData

      Object getPluginData(MTDataProvider provider)
      Returns the plugin data created for the repository 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.
    • addUser

      void addUser(MTUser user)
      Adds a user to the repository.
    • removeUser

      void removeUser(MTUser user)
      Removes a user from the repository.
    • getModelCount

      Long getModelCount()
      Returns the number of models in the repository.
    • createAccessGroup

      MTAccessGroup createAccessGroup(MTGroup group)
    • createPermissionGroup

      MTPermissionGroup createPermissionGroup(MTGroup group)
    • isDraft

      boolean isDraft()
      Specified by:
      isDraft in interface MTRepositoryHeader