Package se.conciliate.extensions.store
Interface MTDocumentHeader
- All Superinterfaces:
Comparable<MTNamedObject>
,MTNamedObject
- All Known Subinterfaces:
MTDocument
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 Summary
Modifier and TypeMethodDescriptioncreatePluginData
(MTDataProvider provider, String key) Creates a new plug-in data connected to this document.expand()
Returns aMTDocument
for this document.Finds all models that uses this document in the current workspace, as headers.Finds all models that uses this document in the current workspace.findPluginData
(MTDataProvider provider, String key) Finds plug-in data connected to this document.Finds all symbols that uses this document in the current workspace, as headers.Finds all symbols that uses this documentin the current workspace.Finds the document types for this document as headers.Finds the document types for this document.Returns the document content in the current language.getContent
(MTLanguageHeader language) Returns the document content in a given language.Returns what type of "document" this is.Returns the date when this document was created.getIcon()
Returns the document icon URL.Returns the date when this document was last changed.Returns the full name of the user that last modified the document.Returns the full name of the document owner.Returns a prefix used to identify this document.Returns the titles of all connected document types in the current language.boolean
Returns true if the file that this document points to will be copied when it is published.boolean
Checks if the document is editable by the user requesting it.boolean
Returns true if the prefix has been locked and cannot be modified.boolean
Returns true if this document is treated as an IFrame.boolean
Returns true if the document is translated in every language.boolean
isTranslated
(MTLanguage lang) Returns true if the document is marked as translated in the given language.void
remove()
Removes the document.void
void
setNewPluginRelations
(List<MTPluginDataOperations.Relation> relations) Methods inherited from interface se.conciliate.extensions.store.MTNamedObject
compareTo, getID, getParentRevisionID, getTitle, getTitle, getUUID
-
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
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
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
Returns true if the document is marked as translated in the given language. Iflang
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
Returns aMTDocument
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
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
Finds all models that uses this document in the current workspace.- Returns:
- A list of models.
- Throws:
MTAccessException
- Since:
- 3.0
-
findModelHeaders
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
Finds all symbols that uses this documentin the current workspace.- Returns:
- A list of symbols.
- Throws:
MTAccessException
- Since:
- 3.0
-
findSymbolHeaders
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
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. Ifnull
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
-
getNewPluginRelations
List<MTPluginDataOperations.Relation> getNewPluginRelations() -
setNewPluginRelations
-