Package se.conciliate.extensions.store
Interface MTDocument
- All Superinterfaces:
Comparable<MTNamedObject>,MTDocumentHeader,MTHistoryEnabled,MTNamedObject
Full 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 TypeMethodDescriptionvoidAdds a document type to the types this document is connected to.booleanbooleanstatic Optional<MTDocument>Returns the user that created this document.Returns the document types for this document.getGroup()Returns the group of this document.Returns the last user that modified this document.getOwner()Returns the owner of this document.Returns "access control" permissions for this object.getPluginData(MTDataProvider provider) Returns the plugin data created for the document by a given provider.getProperty(String provider, String name) Returns a property value.getPropertyKeys(String provider) Returns the property names of all properties stored by a provider.Returns all providers that have stored properties.Returns the symbol designated as "responsible" for this document.booleanReturns true if there is plug-in data connected to the entity.voidRemoves a document type from the types this document is connected to.voidremoveProperty(String provider, String name) Removes a property.voidsave()Saves changes made to the document.voidsetContent(String content) Sets the documents content in the current language.voidsetContent(MTLanguageHeader language, String content) Sets the documents content in a given language.voidsetContentSource(String source) Sets the document source type.voidsetCopyOnPublish(boolean copyOnPublish) Sets the copy on publish flag.voidsetCreated(Date created) Sets the creation date of the document.voidsetCreatedBy(MTUserHeader user) Sets the creator of the document.voidsetGroup(MTPermissionGroup group) Sets the group of the document.voidSets the document icon URL.voidsetLastModified(Date lastModified) Overrides the last modified date of the list.voidSets the user that last modified the document.voidsetOwner(MTUserHeader owner) Sets the owner of the document.voidsetPluginData(MTDataProvider provider, Object data) Sets plugin data for a provider.voidSets a prefix used to identify this document.voidsetPrefixLocked(boolean locked) Locks the current prefix so it cannot be modified.voidsetProperty(String provider, String name, String value) Sets a property value.voidsetResponsible(MTSymbolHeader responsible) Sets the symbol designated as "responsible" for this document.voidsetShowInPanel(boolean showInPanel) voidSets the documents title in the current language.voidsetTitle(MTLanguageHeader language, String title) Sets the documents title in a given language.voidsetTranslated(MTLanguage lang, boolean translated) Marks this document as translated in the given language.Methods inherited from interface se.conciliate.extensions.store.MTDocumentHeader
createPluginData, expand, findModelHeaders, findModels, findPluginData, findSymbolHeaders, findSymbols, findTypeHeaders, findTypes, getContent, getContent, getContentSource, getCreated, getIcon, getLastModified, getLastModifiedByName, getNewPluginData, getNewPluginRelations, getOwnerName, getPluginDataBulkOperations, getPrefix, getTypeTitles, isCopyOnPublish, isEditable, isPrefixLocked, isShowInPanel, isTranslated, isTranslated, remove, setNewPluginData, setNewPluginRelationsMethods inherited from interface se.conciliate.extensions.store.MTHistoryEnabled
getHistory, getID, getUUIDMethods inherited from interface se.conciliate.extensions.store.MTNamedObject
compareTo, getID, getParentRevisionID, getTitle, getTitle, getUUID
-
Method Details
-
canUserRead
boolean canUserRead() -
canUserWrite
boolean canUserWrite() -
getPermissions
MTPermissions getPermissions()Returns "access control" permissions for this object.- Returns:
- permissions for object
-
getDocumentTypes
Collection<MTDocumentTypeHeader> getDocumentTypes()Returns the document types for this document.- Returns:
- The document types.
- Since:
- 3.1
-
getPluginData
Returns the plugin data created for the document by a given provider.- Parameters:
provider- The provider.- Returns:
- The plugin data created by the provider.
-
setPluginData
Sets plugin data for a provider.- Parameters:
provider- The provider.data- The new data to store for the provider.
-
getPropertyProviders
Returns all providers that have stored properties.- Returns:
- A set of provider ID:s
- Since:
- 3.0
-
getPropertyKeys
Returns the property names of all properties stored by a provider.- Parameters:
provider- The provider ID.- Returns:
- A set of property names.
-
getProperty
Returns a property value.- Parameters:
provider- The provider ID.name- The property name.- Returns:
- The property value or null.
- Since:
- 3.0
-
setProperty
Sets a property value.- Parameters:
provider- The ID of the provider setting this property.name- The property name.value- The new property value. Values longer than 255 characters will be truncated.- Since:
- 3.0
-
removeProperty
Removes a property.- Parameters:
provider- The ID of the provider setting this property.name- The property name.
-
setTitle
Sets the documents title in the current language.- Parameters:
title- The new title.- Since:
- 3.0
-
setTranslated
Marks this document as translated in the given language.- Since:
- 3.1
-
setTitle
Sets the documents title in a given language.- Parameters:
language- The language.title- The new title.- Since:
- 3.0
-
setContent
Sets the documents content in the current language.- Parameters:
content- The new content. This should be a path or URL if the content type is "FILE" or "URL", and HTML if the content type is "MANAGED".- Since:
- 3.0
-
setLastModified
Overrides the last modified date of the list.- Parameters:
lastModified- The new last modified date.
-
setContent
Sets the documents content in a given language.- Parameters:
language- The language.content- The new content. This should be a path or URL if the content type is "FILE" or "URL", and HTML if the content type is "MANAGED".- Since:
- 3.0
-
setContentSource
Sets the document source type.- Parameters:
source- The new source type. Valid values are "FILE", "URL" and "MANAGED".- Since:
- 3.0
-
setCopyOnPublish
void setCopyOnPublish(boolean copyOnPublish) Sets the copy on publish flag. If set totruethe document will be copied to the publish directory when publishing to HTML.- Parameters:
copyOnPublish- The new value.- Since:
- 3.0
-
addDocumentType
Adds a document type to the types this document is connected to.- Parameters:
type- The new document type.- Throws:
MTAccessException- Since:
- 3.0
-
removeDocumentType
Removes a document type from the types this document is connected to.- Parameters:
type- The type to remove.- Throws:
MTAccessException- Since:
- 3.0
-
getOwner
MTUserHeader getOwner()Returns the owner of this document.- Returns:
- the owner of this document.
- Since:
- 3.0
-
setOwner
Sets the owner of the document.- Parameters:
owner- The new owner.- Since:
- 3.0
-
getGroup
MTPermissionGroup getGroup()Returns the group of this document.- Returns:
- the group of this document.
- Since:
- 3.0
-
setGroup
Sets the group of the document.- Parameters:
group- The new group.- Since:
- 3.0
-
setCreated
Sets the creation date of the document.- Parameters:
created- The new creation date.- Since:
- 3.0
-
getLastModifiedBy
MTUserHeader getLastModifiedBy()Returns the last user that modified this document.- Returns:
- the user that last modified this document.
- Since:
- 3.0
-
setLastModifiedBy
Sets the user that last modified the document.- Parameters:
user- The new last modified by user.- Since:
- 3.0
-
getCreatedBy
MTUserHeader getCreatedBy()Returns the user that created this document.- Returns:
- the user that created this document.
- Since:
- 3.0
-
setCreatedBy
Sets the creator of the document.- Parameters:
user- The new creator.- Since:
- 3.0
-
getResponsible
MTSymbolHeader getResponsible()Returns the symbol designated as "responsible" for this document.- Returns:
- The responsible for the document.
- Since:
- 3.0
-
setResponsible
Sets the symbol designated as "responsible" for this document.- Parameters:
responsible- The new responsible.
-
save
Saves changes made to the document.- Throws:
MTAccessException- Since:
- 3.0
-
hasPluginData
boolean hasPluginData()Returns true if there is plug-in data connected to the entity. -
setIcon
Sets the document icon URL. Set to null to use default icon. -
setShowInPanel
void setShowInPanel(boolean showInPanel) - Parameters:
showInPanel-- See Also:
-
setPrefix
Sets a prefix used to identify this document. If used the prefix can be used for filtering/finding documents easier. -
setPrefixLocked
void setPrefixLocked(boolean locked) Locks the current prefix so it cannot be modified. -
cast
-