Interface MTSymbolStore


public interface MTSymbolStore
Utility methods for symbols.
Since:
3.0
  • Method Details

    • addMTSymbolStoreListener

      void addMTSymbolStoreListener(MTSymbolStoreListener l)
      Adds a symbol store listener that will be notified when a symbol is added, removed or changed through the store api.
      Parameters:
      l - a MTModelStoreListener
    • removeMTSymbolStoreListener

      void removeMTSymbolStoreListener(MTSymbolStoreListener l)
      Removes a symbol store listener.
      Parameters:
      l - The MTModelStoreListener to remove.
    • createSymbol

      MTSymbol createSymbol(SymbolVariant symbolVariant, String uuid, String title) throws MTAccessException
      Creates a new symbol, with default settings.
      Parameters:
      symbolVariant - The symbol variant to create.
      title - The title of the new symbol.
      Returns:
      A new MTSymbol.
      Throws:
      MTAccessException
      Since:
      3.0
    • findSymbols

      List<MTSymbol> findSymbols(List<Long> idList) throws MTAccessException
      Finds symbols in the current repository from a list of symbol ID:s. The symbols will be returned in the same order as the ID list. Symbols which the current user does not have read access to will be filtered out of the result.
      Parameters:
      idList - The ID:s of symbols to find.
      Returns:
      A list of symbols with the ID:s in idList.
      Throws:
      MTAccessException
      Since:
      3.0
    • findEntityProperties

      List<MTEntityProperty> findEntityProperties(List<Long> idList)
      Finds entity properties for symbols in information models.
      Parameters:
      idList - List of ID:s of entity property plugin data.
      Returns:
      A list of entity properties
    • findSymbol

      MTSymbol findSymbol(long id) throws MTAccessException
      Finds a symbol by ID.
      Parameters:
      id - The symbol ID.
      Returns:
      A symbol or null if no such model exists.
      Throws:
      MTAccessException
      Since:
      3.3
    • findSymbolHeaders

      List<MTSymbolHeader> findSymbolHeaders(List<Long> idList) throws MTAccessException
      Finds symbols in the current repository from a list of symbol ID:s, as headers. The symbols will be returned in the same order as the ID list. Symbols which the current user does not have read access to will be filtered out of the result.
      Parameters:
      idList - The ID:s of symbols to find.
      Returns:
      A list of symbols with the ID:s in idList.
      Throws:
      MTAccessException
      Since:
      3.0
    • batchLock

      void batchLock(Collection<? extends MTSymbolHeader> symbols) throws MTAccessException, MTRemoteChangeException
      Locks all supplied symbols and returns normally or locks no symbol and throws an exception. This is the preferred way to lock multiple symbols. Looping over a collection of symbols and invoking MTSymbolHeader.lock() is discourage since it is not possible to either lock all or none. This method is able to either lock all or none.
      Parameters:
      symbols - The symbols to lock.
      Throws:
      MTAccessException - If the current user lacks access rights to one of the supplied symbols.
      MTRemoteChangeException - If one of the supplied symbols has been locked by someone else or if one of the supplied symbols is out of date.
    • findRevisionLogEntries

      List<MTRevisionLogEntry> findRevisionLogEntries(String symbolUUID)
      Finds all entries made in the revision log for a symbol in the current repository. This includes entries for all revisions made of the symbol.
      Parameters:
      symbolUUID - The UUID of the symbol.
      Returns:
      All revision log entries for the symbol.
    • findAttributes

      Map<MTSymbol,List<MTAttribute>> findAttributes(Collection<MTSymbol> symbols, Collection<? extends MTAttributeTypeHeader> types)
      Finds all attributes for a collection of symbols.