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 TypeMethodDescriptionvoid
Adds a document type to the types this document is connected to.boolean
boolean
static 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.boolean
Returns true if there is plug-in data connected to the entity.void
Removes a document type from the types this document is connected to.void
removeProperty
(String provider, String name) Removes a property.void
save()
Saves changes made to the document.void
setContent
(String content) Sets the documents content in the current language.void
setContent
(MTLanguageHeader language, String content) Sets the documents content in a given language.void
setContentSource
(String source) Sets the document source type.void
setCopyOnPublish
(boolean copyOnPublish) Sets the copy on publish flag.void
setCreated
(Date created) Sets the creation date of the document.void
setCreatedBy
(MTUserHeader user) Sets the creator of the document.void
setGroup
(MTPermissionGroup group) Sets the group of the document.void
Sets the document icon URL.void
setLastModified
(Date lastModified) Overrides the last modified date of the list.void
Sets the user that last modified the document.void
setOwner
(MTUserHeader owner) Sets the owner of the document.void
setPluginData
(MTDataProvider provider, Object data) Sets plugin data for a provider.void
Sets a prefix used to identify this document.void
setPrefixLocked
(boolean locked) Locks the current prefix so it cannot be modified.void
setProperty
(String provider, String name, String value) Sets a property value.void
setResponsible
(MTSymbolHeader responsible) Sets the symbol designated as "responsible" for this document.void
setShowInPanel
(boolean showInPanel) void
Sets the documents title in the current language.void
setTitle
(MTLanguageHeader language, String title) Sets the documents title in a given language.void
setTranslated
(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, setNewPluginRelations
Methods inherited from interface se.conciliate.extensions.store.MTHistoryEnabled
getHistory, getID, getUUID
Methods 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 totrue
the 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
-