Interface MTDocumentHeader

All Superinterfaces:
Comparable<MTNamedObject>, MTNamedObject
All Known Subinterfaces:
MTDocument

public interface MTDocumentHeader extends MTNamedObject
Header interface for documents. Each repository maintains a list of documents that can be connected to models and symbols. The same document can be used this way on multiple models and symbols. There are three different types of models: "FILE" - The document is located in a file on the local drive or a network drive. "URL" - The document is accessible by an URL. "MANAGED" - The documents content is stored directly in the database and edited in Modeling Tool.
Since:
3.0
  • Method Details

    • getPrefix

      String getPrefix()
      Returns a prefix used to identify this document. If used the prefix can be used for filtering/finding documents easier.
      Returns:
      A prefix or null.
    • isPrefixLocked

      boolean isPrefixLocked()
      Returns true if the prefix has been locked and cannot be modified.
    • getContentSource

      String getContentSource()
      Returns what type of "document" this is. If this returns "FILE" then getContent() will return a file path, if this returns "URL" then getContent() will return an URL and if this returns "MANAGED" then getContent() will return the document text.
      Returns:
      What type of document this is.
      Since:
      3.0
    • getContent

      String getContent()
      Returns the document content in the current language. If the documents source is of type "MANAGED" the content will be null if this document is a header.
      Returns:
      A path or URL if the content type is "FILE" or "URL", or HTML data if the content type is "MANAGED".
      Since:
      3.0
    • getContent

      String getContent(MTLanguageHeader language)
      Returns the document content in a given language. If the documents source is of type "MANAGED" the content will be null if this document is a header.
      Parameters:
      language - The language.
      Returns:
      A path or URL if the content type is "FILE" or "URL", or HTML data if the content type is "MANAGED".
      Since:
      3.0
    • isCopyOnPublish

      boolean isCopyOnPublish()
      Returns true if the file that this document points to will be copied when it is published. This is only relevant if isFile() == true.
      Returns:
      true if the file that this document points to will be copied when the document is published.
      Since:
      3.0
    • getOwnerName

      String getOwnerName()
      Returns the full name of the document owner.
      Returns:
      The owner name
      Since:
      3.0
    • getLastModifiedByName

      String getLastModifiedByName()
      Returns the full name of the user that last modified the document.
      Returns:
      The name of the user
      Since:
      3.0
    • getLastModified

      Date getLastModified()
      Returns the date when this document was last changed.
      Returns:
      the last modified date.
      Since:
      3.0
    • getCreated

      Date getCreated()
      Returns the date when this document was created.
      Returns:
      the creation date of the document.
      Since:
      3.0
    • getTypeTitles

      List<String> getTypeTitles()
      Returns the titles of all connected document types in the current language.
      Returns:
      A list of document type titles.
      Since:
      3.0
    • isEditable

      boolean isEditable()
      Checks if the document is editable by the user requesting it.
      Returns:
      true if the document is editable.
      Since:
      3.0
    • isTranslated

      boolean isTranslated()
      Returns true if the document is translated in every language.
      Returns:
      true if translated.
      Since:
      3.1
    • isTranslated

      boolean isTranslated(MTLanguage lang)
      Returns true if the document is marked as translated in the given language. If lang is the current default language true is always returned.
      Parameters:
      lang - the language to check for translation
      Returns:
      true if translated
      Since:
      3.1
    • getIcon

      URL getIcon()
      Returns the document icon URL.
      Returns:
      The icon URL of the document or null for the default document icon.
    • expand

      MTDocument expand() throws MTAccessException
      Returns a MTDocument for this document. Beware that this might require querying the storage layer for more data.
      Returns:
      A MTDocument representing this document.
      Throws:
      MTAccessException
      Since:
      3.0
    • remove

      void remove() throws MTAccessException
      Removes the document.
      Throws:
      MTAccessException
      Since:
      3.0
    • findTypes

      Finds the document types for this document.
      Returns:
      A list of document types.
      Throws:
      MTAccessException
      Since:
      3.0
    • findTypeHeaders

      Finds the document types for this document as headers.
      Returns:
      A list of document type headers.
      Throws:
      MTAccessException
      Since:
      3.0
    • findModels

      MTIterator<MTModel> findModels() throws MTAccessException
      Finds all models that uses this document in the current workspace.
      Returns:
      A list of models.
      Throws:
      MTAccessException
      Since:
      3.0
    • findModelHeaders

      MTIterator<MTModelHeader> findModelHeaders() throws MTAccessException
      Finds all models that uses this document in the current workspace, as headers.
      Returns:
      A list of models headers.
      Throws:
      MTAccessException
      Since:
      3.0
    • findSymbols

      MTIterator<MTSymbol> findSymbols() throws MTAccessException
      Finds all symbols that uses this documentin the current workspace.
      Returns:
      A list of symbols.
      Throws:
      MTAccessException
      Since:
      3.0
    • findSymbolHeaders

      MTIterator<MTSymbolHeader> findSymbolHeaders() throws MTAccessException
      Finds all symbols that uses this document in the current workspace, as headers.
      Returns:
      A list of symbol headers.
      Throws:
      MTAccessException
      Since:
      3.0
    • createPluginData

      MTPluginData createPluginData(MTDataProvider provider, String key)
      Creates a new plug-in data connected to this document.
      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 document.
      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
    • isShowInPanel

      boolean isShowInPanel()
      Returns true if this document is treated as an IFrame.
      Returns:
    • 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)