Package se.conciliate.extensions.store
Interface MTSymbolHeader
- All Superinterfaces:
Comparable<MTNamedObject>
,MTDataObject
,MTNamedObject
- All Known Subinterfaces:
MTCompleteSymbol
,MTSymbol
Header interface for symbols. A symbol could be for example
a role, a process or an individual. Each symbol can be placed in
one or more models where they are represented by vertices.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Number of seconds a lock will be in effect from the time of invocation of a locking method (lock()
). -
Method Summary
Modifier and TypeMethodDescriptioncreatePluginData
(MTDataProvider provider, String key) Creates a new plug-in data connected to this symbol.expand()
Returns aMTSymbol
for this symbol.findAttributeByType
(String typeUUID) Finds an attribute for this symbol, based on its attribute's type UUID.Finds all attributes for this symbol, as headers.Finds all attributes for this symbol.Finds all models that this symbol breaks down to in the current workspace, as headers.Finds all models that this symbol breaks down to in the current workspace.Finds all documents connected to this symbol, as headers.Finds the ID:s of all documents connected to this symbol.Finds all documents connected to this symbol.Finds the ID:s of all edges going to or from this symbol in the current workspace.findExtensionDocuments
(String provider) Finds all extension documents connected to this symbol.Finds the ID:s of all models that this symbol participates in in the current workspace.Finds headers of all models that this symbol participates in in the current workspace.findPluginData
(MTDataProvider provider, String key) Finds plug-in data connected to this symbol.Finds the ID:s of all documents having this symbol set as responsible.Finds information about the revisions available of this model.Finds all vertices displaying this symbol in the current workspace, as headers.Finds all vertices displaying this symbol in the current workspace.Returns the name of the group.Returns the raw title.getRawTitle
(MTLanguageHeader lang) Returns the raw title in the given language.Returns the symbols revision infogetType()
Returns this symbolsSymbolType
, or null if no suitable type is found.Returns the visual variant of this symbol.load()
Loads the complete symbol with documents and descriptions.void
lock()
Tries to acquire a temporary lock on this symbol.void
Immediately releases a lock on the symbol.boolean
remove()
Removes the symbol from the current workspace if it is not used in any of the workspaces models.default Long
restore()
If this symbol has previously been removed from the current workspace it will be restored.void
void
setNewPluginRelations
(List<MTPluginDataOperations.Relation> relations) Methods inherited from interface se.conciliate.extensions.store.MTDataObject
getCreated, getLastModified, getLastModifiedByName, getOwnerName, getPrefix, getReferenceID, getTypeID, isPrefixLocked, isRevisionLocked, isTranslated, isTranslated
Methods inherited from interface se.conciliate.extensions.store.MTNamedObject
compareTo, getID, getParentRevisionID, getTitle, getTitle, getUUID
-
Field Details
-
LOCK_TIME_PERIOD
static final int LOCK_TIME_PERIODNumber of seconds a lock will be in effect from the time of invocation of a locking method (lock()
). This may change between versions of this package.- See Also:
-
-
Method Details
-
getType
SymbolType getType()Returns this symbolsSymbolType
, or null if no suitable type is found.- Specified by:
getType
in interfaceMTDataObject
- Returns:
- this symbols
SymbolType
, or null if no suitable type is found.
-
getVariant
SymbolVariant getVariant()Returns the visual variant of this symbol.- Returns:
- the name of the visual variant of this symbol
- Since:
- 3.2
-
getGroupTitle
String getGroupTitle()Returns the name of the group.- Returns:
- The group name
- Since:
- 3.1
-
getRevision
MTRevisionInfo getRevision()Returns the symbols revision info- Returns:
- The symbols revision info.
- Since:
- 4.3
-
expand
Returns aMTSymbol
for this symbol. Beware that this might require querying the storage layer for more data.- Returns:
- A
MTSymbol
representing this symbol. - Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
remove
Removes the symbol from the current workspace if it is not used in any of the workspaces models. If it is, either remove the models from the workspace or the vertices from the model before removing the symbol.- Returns:
- A boolean.
- Throws:
MTAccessException
- If an MTAccessException occurs.MTRemoteChangeException
- If an MTRemoteChangeException occurs.- Since:
- 3.0
-
restore
If this symbol has previously been removed from the current workspace it will be restored.- Returns:
- The id of the restored symbol or null if the symbol could not be restored.
-
lock
Tries to acquire a temporary lock on this symbol. If aquired, the method returns normally, otherwise anMTRemoteChangeException
is raised. An acquired lock will prevent other users from making changes to this symbol and in effect ensures that noMTRemoteChangeException
occur on other calls while the lock is in effect. The lock will be in effect for at leastLOCK_TIME_PERIOD
seconds from the time of the call. If save is invoked and successfull within that time, the lock is automatically prolonged.
NOTE:- This method may block for an unspecified amount of time.
- Callers can not assume to have the lock for the specified time as counted from the return from this method, but from the invocation of this method!
- Throws:
MTAccessException
- if the current user lack access rights to this object.MTRemoteChangeException
- if this symbol has changed since it was last fetched from storage or if someone else (other MTUser) currently holds the lock.
-
releaseLock
void releaseLock()Immediately releases a lock on the symbol. If this method is not called the lock will be released when 5 minutes has passed from when it was required. If another user has the lock this method will have no effect. -
getRawTitle
Returns the raw title in the given language. An raw title may include special characters that are not included in #getTitle, such as the soft hyphen character. This method should be used to get the title including its "formatting hints".- Parameters:
lang
- The language to get the title for.- Returns:
- The raw, "unformatted", title of the symbol.
-
getRawTitle
String getRawTitle()Returns the raw title. An raw title may include special characters that are not included in #getTitle, such as the soft hyphen character. This method should be used to get the title including its "formatting hints".- Returns:
- The raw, "unformatted", title of the symbol.
-
findAttributes
Finds all attributes for this symbol.- Returns:
- All attributes for this symbol.
- Throws:
MTAccessException
- Since:
- 5.0
-
findAttributeByType
Finds an attribute for this symbol, based on its attribute's type UUID.- Returns:
- attribute for this symbol where the attribute has an attribute type with UUID 'uuid'.
- Throws:
MTAccessException
- Since:
- 5.0
-
findAttributeHeaders
Finds all attributes for this symbol, as headers.- Returns:
- All attributes for this symbol.
- Throws:
MTAccessException
- Since:
- 5.0
-
findBreakdowns
Finds all models that this symbol breaks down to in the current workspace.- Returns:
- All models that this symbol breaks down to in the current workspace.
- Throws:
MTAccessException
- Since:
- 3.0
-
findBreakdownHeaders
Finds all models that this symbol breaks down to in the current workspace, as headers.- Returns:
- All models that this symbol breaks down to in the current workspace.
- Throws:
MTAccessException
- Since:
- 3.0
-
findDocumentIDs
Finds the ID:s of all documents connected to this symbol.- Returns:
- The ID:s of all documents connected to this symbol.
- Throws:
MTAccessException
- Since:
- 3.0
-
findDocuments
Finds all documents connected to this symbol.- Returns:
- All documents connected to this symbol.
- Throws:
MTAccessException
- Since:
- 3.0
-
findDocumentHeaders
Finds all documents connected to this symbol, as headers.- Returns:
- All documents connected to this symbol.
- Throws:
MTAccessException
- Since:
- 3.0
-
findExtensionDocuments
Finds all extension documents connected to this symbol.- Parameters:
provider
- The provider to get documents for.- Returns:
- All extension documents connected to this symbol.
- Throws:
MTAccessException
- Since:
- 3.0
-
findVertices
Finds all vertices displaying this symbol in the current workspace.- Returns:
- All vertices displaying this symbol in the current workspace.
- Throws:
MTAccessException
- Since:
- 3.0
-
findVertexHeaders
Finds all vertices displaying this symbol in the current workspace, as headers.- Returns:
- All vertices displaying this symbol in the current workspace.
- Throws:
MTAccessException
- Since:
- 3.0
-
findParticipatesInModelIDs
Finds the ID:s of all models that this symbol participates in in the current workspace. The values of the map are true if the model is set as the home model for the symbol.- Throws:
MTAccessException
-
findParticipatesInModels
Finds headers of all models that this symbol participates in in the current workspace. The values of the map are true if the model is set as the home model for the symbol.- Throws:
MTAccessException
-
findEdgeIDs
Finds the ID:s of all edges going to or from this symbol in the current workspace.- Returns:
- The ID:s of all edges going to or from this symbol in the current workspace.
- Throws:
MTAccessException
- Since:
- 3.0
-
findResponsibleForDocumentIDs
Finds the ID:s of all documents having this symbol set as responsible.- Returns:
- The ID:s of all documents having this symbol set as responsible.
- Throws:
MTAccessException
- Since:
- 3.0
-
createPluginData
Creates a new plug-in data connected to this symbol.- 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 symbol.- 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
-
findRevisions
List<MTRevisionInfo> findRevisions()Finds information about the revisions available of this model.- Returns:
- A list of information about the different revisions made of this model.
- Since:
- 3.3
-
load
MTCompleteSymbol load()Loads the complete symbol with documents and descriptions.- Returns:
- The complete loaded symbol.
- Throws:
MTAccessException
- Since:
- 3.3
-
getPluginDataBulkOperations
MTPluginDataOperations getPluginDataBulkOperations() -
getNewPluginData
List<MTPluginDataOperations.Data> getNewPluginData() -
setNewPluginData
-
getNewPluginRelations
List<MTPluginDataOperations.Relation> getNewPluginRelations() -
setNewPluginRelations
-