Interface MTCompleteSymbol

All Superinterfaces:
Comparable<MTNamedObject>, MTDataObject, MTHistoryEnabled, MTNamedObject, MTSymbol, MTSymbolHeader

public interface MTCompleteSymbol extends MTSymbol
Part of a MTCompleteModel, which can be obtained by calling loadCompleteModel() on a MTModelHeader. Note that the interface extends MTSymbol and that using the "find" methods in this interface will still access the database.
  • Method Details

    • getPluginData

      Object getPluginData(MTDataProvider provider)
      Returns the plugin data created for the symbol 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. This is automatically set to the object returned by the provider when the model is loaded, but the value can be overridden by the plugin at any time.
      Parameters:
      provider - The provider.
      data - The new data to store for the provider.
    • getDocuments

      List<MTDocument> getDocuments()
      Returns all documents connected to the symbol.
      Returns:
      All documents connected to the symbol.
      Since:
      3.0
    • getConnectedDocumentIDs

      default List<Document.DocumentID> getConnectedDocumentIDs()
    • findConnectedDocuments

      default List<Document> findConnectedDocuments()
      Finds the documents connected to the symbol as a read-only list.
    • getConnectedDocuments

      @Deprecated(forRemoval=true) default List<Document> getConnectedDocuments()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Renamed to findConnectedDocuments() since this now loads the documents from the source and thus entails a cost and should be run on a background thread.
    • getExtensionDocuments

      List<MTExtensionDocument> getExtensionDocuments(String provider)
      Returns the extension documents connected to the symbol.
      Parameters:
      provider - The provider to get documents for.
      Returns:
      The extension documents connected to the symbol.
      Since:
      3.0
    • getExtensionDocumentProviders

      Set<String> getExtensionDocumentProviders()
      Returns the available providers of extension documents for this symbol.
      Returns:
      A list of provider strings.
    • copy

      Copies this symbol and returns the result.

      NOTE: This method will not persist the symbol to storage. The returned value must be saved in a separate call. Implementations that create other persistable entities must however make sure that these are persisted asynchronously or persisted by the next call to #save(). Callers must thus always persist the returned value by calling save on the returned value, but should never have to figure out what other possible things that might need a #save(). NOTE: The copy will be a new, unique, copy of this symbol. It will not have the same identity in storage (new id, new uuid). This means that the returned value will NOT be equal to this. It is thus NOT a clone.
      Returns:
      a new unique copy of this symbol.
    • getEditState

      MTEditState getEditState()
      Returns the "editable" state of the symbol when it was loaded from storage. This might have changed since then.
      Returns:
      The "editable" state of the symbol.
      Since:
      3.3