Interface MTSymbolHeader

All Superinterfaces:
Comparable<MTNamedObject>, MTDataObject, MTNamedObject
All Known Subinterfaces:
MTCompleteSymbol, MTSymbol

public interface MTSymbolHeader extends MTDataObject
Header interface for symbols. A symbol could be for example a role, a process or an individual. Each symbol can be placed in one or more models where they are represented by vertices.
Since:
3.0
  • Field Details

    • LOCK_TIME_PERIOD

      static final int LOCK_TIME_PERIOD
      Number of seconds a lock will be in effect from the time of invocation of a locking method (lock()). This may change between versions of this package.
      See Also:
  • Method Details

    • getType

      SymbolType getType()
      Returns this symbols SymbolType, or null if no suitable type is found.
      Specified by:
      getType in interface MTDataObject
      Returns:
      this symbols SymbolType, or null if no suitable type is found.
    • getVariant

      SymbolVariant getVariant()
      Returns the visual variant of this symbol.
      Returns:
      the name of the visual variant of this symbol
      Since:
      3.2
    • getGroupTitle

      String getGroupTitle()
      Returns the name of the group.
      Returns:
      The group name
      Since:
      3.1
    • getRevision

      MTRevisionInfo getRevision()
      Returns the symbols revision info
      Returns:
      The symbols revision info.
      Since:
      4.3
    • expand

      MTSymbol expand() throws MTAccessException
      Returns a MTSymbol for this symbol. Beware that this might require querying the storage layer for more data.
      Returns:
      A MTSymbol representing this symbol.
      Throws:
      MTAccessException - If an MTAccessException occurs.
      Since:
      3.0
    • remove

      boolean remove() throws MTAccessException, MTRemoteChangeException
      Removes the symbol from the current workspace if it is not used in any of the workspaces models. If it is, either remove the models from the workspace or the vertices from the model before removing the symbol.
      Returns:
      A boolean.
      Throws:
      MTAccessException - If an MTAccessException occurs.
      MTRemoteChangeException - If an MTRemoteChangeException occurs.
      Since:
      3.0
    • restore

      default Long restore()
      If this symbol has previously been removed from the current workspace it will be restored.
      Returns:
      The id of the restored symbol or null if the symbol could not be restored.
    • lock

      Tries to acquire a temporary lock on this symbol. If aquired, the method returns normally, otherwise an MTRemoteChangeException is raised. An acquired lock will prevent other users from making changes to this symbol and in effect ensures that no MTRemoteChangeException occur on other calls while the lock is in effect. The lock will be in effect for at least LOCK_TIME_PERIOD seconds from the time of the call. If save is invoked and successfull within that time, the lock is automatically prolonged.

      NOTE:
      • This method may block for an unspecified amount of time.
      • Callers can not assume to have the lock for the specified time as counted from the return from this method, but from the invocation of this method!
      Throws:
      MTAccessException - if the current user lack access rights to this object.
      MTRemoteChangeException - if this symbol has changed since it was last fetched from storage or if someone else (other MTUser) currently holds the lock.
    • releaseLock

      void releaseLock()
      Immediately releases a lock on the symbol. If this method is not called the lock will be released when 5 minutes has passed from when it was required. If another user has the lock this method will have no effect.
    • getRawTitle

      String getRawTitle(MTLanguageHeader lang)
      Returns the raw title in the given language. An raw title may include special characters that are not included in #getTitle, such as the soft hyphen character. This method should be used to get the title including its "formatting hints".
      Parameters:
      lang - The language to get the title for.
      Returns:
      The raw, "unformatted", title of the symbol.
    • getRawTitle

      String getRawTitle()
      Returns the raw title. An raw title may include special characters that are not included in #getTitle, such as the soft hyphen character. This method should be used to get the title including its "formatting hints".
      Returns:
      The raw, "unformatted", title of the symbol.
    • findAttributes

      List<MTAttribute> findAttributes() throws MTAccessException
      Finds all attributes for this symbol.
      Returns:
      All attributes for this symbol.
      Throws:
      MTAccessException
      Since:
      5.0
    • findAttributeByType

      MTAttribute findAttributeByType(String typeUUID) throws MTAccessException
      Finds an attribute for this symbol, based on its attribute's type UUID.
      Returns:
      attribute for this symbol where the attribute has an attribute type with UUID 'uuid'.
      Throws:
      MTAccessException
      Since:
      5.0
    • findAttributeHeaders

      List<MTAttributeHeader> findAttributeHeaders() throws MTAccessException
      Finds all attributes for this symbol, as headers.
      Returns:
      All attributes for this symbol.
      Throws:
      MTAccessException
      Since:
      5.0
    • findBreakdowns

      List<MTModel> findBreakdowns() throws MTAccessException
      Finds all models that this symbol breaks down to in the current workspace.
      Returns:
      All models that this symbol breaks down to in the current workspace.
      Throws:
      MTAccessException
      Since:
      3.0
    • findBreakdownHeaders

      List<MTModelHeader> findBreakdownHeaders() throws MTAccessException
      Finds all models that this symbol breaks down to in the current workspace, as headers.
      Returns:
      All models that this symbol breaks down to in the current workspace.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocumentIDs

      List<Long> findDocumentIDs() throws MTAccessException
      Finds the ID:s of all documents connected to this symbol.
      Returns:
      The ID:s of all documents connected to this symbol.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocuments

      MTIterator<MTDocument> findDocuments() throws MTAccessException
      Finds all documents connected to this symbol.
      Returns:
      All documents connected to this symbol.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocumentHeaders

      MTIterator<MTDocumentHeader> findDocumentHeaders() throws MTAccessException
      Finds all documents connected to this symbol, as headers.
      Returns:
      All documents connected to this symbol.
      Throws:
      MTAccessException
      Since:
      3.0
    • findExtensionDocuments

      List<MTExtensionDocument> findExtensionDocuments(String provider) throws MTAccessException
      Finds all extension documents connected to this symbol.
      Parameters:
      provider - The provider to get documents for.
      Returns:
      All extension documents connected to this symbol.
      Throws:
      MTAccessException
      Since:
      3.0
    • findVertices

      MTIterator<MTVertex> findVertices() throws MTAccessException
      Finds all vertices displaying this symbol in the current workspace.
      Returns:
      All vertices displaying this symbol in the current workspace.
      Throws:
      MTAccessException
      Since:
      3.0
    • findVertexHeaders

      MTIterator<MTVertexHeader> findVertexHeaders() throws MTAccessException
      Finds all vertices displaying this symbol in the current workspace, as headers.
      Returns:
      All vertices displaying this symbol in the current workspace.
      Throws:
      MTAccessException
      Since:
      3.0
    • findParticipatesInModelIDs

      Map<Long,Boolean> findParticipatesInModelIDs() throws MTAccessException
      Finds the ID:s of all models that this symbol participates in in the current workspace. The values of the map are true if the model is set as the home model for the symbol.
      Throws:
      MTAccessException
    • findParticipatesInModels

      Map<MTModelHeader,Boolean> findParticipatesInModels() throws MTAccessException
      Finds headers of all models that this symbol participates in in the current workspace. The values of the map are true if the model is set as the home model for the symbol.
      Throws:
      MTAccessException
    • findEdgeIDs

      List<Long> findEdgeIDs() throws MTAccessException
      Finds the ID:s of all edges going to or from this symbol in the current workspace.
      Returns:
      The ID:s of all edges going to or from this symbol in the current workspace.
      Throws:
      MTAccessException
      Since:
      3.0
    • findResponsibleForDocumentIDs

      List<Long> findResponsibleForDocumentIDs() throws MTAccessException
      Finds the ID:s of all documents having this symbol set as responsible.
      Returns:
      The ID:s of all documents having this symbol set as responsible.
      Throws:
      MTAccessException
      Since:
      3.0
    • createPluginData

      MTPluginData createPluginData(MTDataProvider provider, String key)
      Creates a new plug-in data connected to this symbol.
      Parameters:
      key - The key to store the data under.
      Returns:
      A new plug-in data.
      Since:
      3.1
    • findPluginData

      Collection<MTPluginData> findPluginData(MTDataProvider provider, String key) throws MTAccessException
      Finds plug-in data connected to this symbol.
      Parameters:
      provider - The provider to find data for.
      key - The key for the data to find. If null all data for the provider will be returned.
      Returns:
      The resulting plug-in data
      Throws:
      MTAccessException
      Since:
      3.1
    • findRevisions

      List<MTRevisionInfo> findRevisions()
      Finds information about the revisions available of this model.
      Returns:
      A list of information about the different revisions made of this model.
      Since:
      3.3
    • load

      Loads the complete symbol with documents and descriptions.
      Returns:
      The complete loaded symbol.
      Throws:
      MTAccessException
      Since:
      3.3
    • getPluginDataBulkOperations

      MTPluginDataOperations getPluginDataBulkOperations()
    • getNewPluginData

      List<MTPluginDataOperations.Data> getNewPluginData()
    • setNewPluginData

      void setNewPluginData(List<MTPluginDataOperations.Data> data)
    • getNewPluginRelations

      List<MTPluginDataOperations.Relation> getNewPluginRelations()
    • setNewPluginRelations

      void setNewPluginRelations(List<MTPluginDataOperations.Relation> relations)