Package se.conciliate.extensions.store
Interface MTModelHeader
- All Superinterfaces:
Comparable<MTNamedObject>
,MTDataObject
,MTNamedObject
- All Known Subinterfaces:
MTCompleteModel
,MTCompleteSwimlaneModel
,MTModel
,MTSwimlaneModel
Header interface for models. A model is the visual representation of
for example a business process or an organizational structure. It consists
of a collection of vertices and a collection of edges interconnecting these
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 model.expand()
Returns aMTModel
for this model.findAttributeByType
(String typeUUID) Finds a attribute for this model, based on its type UUID.Finds the models attributes as headers.Finds the models attributes.Finds all breakdowns, in the current workspace, for thisMTModelHeader
.Finds the documents connected to this model as headers.Finds the ID:s of documents connected to this model.Finds the documents connected to this model.Finds an edge in this model, based on its type UUID.Finds all edges in this model as headers.Finds all edges in this model.findExtensionDocuments
(String provider) Finds the extension documents connected to this model.Finds all layers in this model as headers.Finds all layers in this model.findPluginData
(MTDataProvider provider, String key) Finds plug-in data connected to this model.Finds information about the revisions available of this model.Finds all symbols in this model as headers.Finds all symbols in this model.Finds all vertices in this model as headers.Finds all vertices in this model.Returns the name of the group.long
Returns the ID of the repository that this model belongs to.Returns the models revision info.getType()
Returns this modelsModelType
, or null if no suitable type is found.Returns the current workflow state.long
Returns the ID of the workspace of this model.boolean
isNotify()
Checks whether notifications should be sent in next publication.load()
Loads the complete model with all vertices, edges and symbols.void
lock()
Tries to aquire a temporary lock on this model.void
lock
(long duration) Tries to lock the model for a given duration in milliseconds.void
Immediately releases a lock on the model.boolean
remove()
Removes the model.default Long
restore()
If this model 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
-
getRepositoryID
long getRepositoryID()Returns the ID of the repository that this model belongs to.- Returns:
- the ID of the repository that this model belongs to.
-
getWorkspaceID
long getWorkspaceID()Returns the ID of the workspace of this model.- Returns:
- the ID of the workspace of this model.
-
getType
ModelType getType()Returns this modelsModelType
, or null if no suitable type is found.- Specified by:
getType
in interfaceMTDataObject
- Returns:
- this models
ModelType
, or null if no suitable type is found.
-
getGroupTitle
String getGroupTitle()Returns the name of the group.- Returns:
- The group name
- Since:
- 3.1
-
getRevision
MTRevisionInfo getRevision()Returns the models revision info.- Returns:
- The models revision info.
- Since:
- 4.3
-
getWorkflowState
WorkflowState getWorkflowState()Returns the current workflow state.- Returns:
- The workflow state of the model.
-
isNotify
boolean isNotify()Checks whether notifications should be sent in next publication.- Returns:
- True if notifications should be sent, false otherwise.
-
expand
Returns aMTModel
for this model. Beware that this might require querying the storage layer for more data.- Returns:
- A
MTModel
representing this model. - Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
remove
Removes the model. Only this revision of the model will be removed and it will only be removed from the current workspace since it can exist in other workspaces if it is a locked revision. The symbols in the model will not be removed since they may be used elsewhere.- Returns:
- a boolean.
- Throws:
MTAccessException
- If an MTAccessException occurs.MTRemoteChangeException
- If an MTRemoteChangeException occurs.- Since:
- 3.0
-
load
Loads the complete model with all vertices, edges and symbols.- Returns:
- The complete loaded model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
lock
Tries to aquire a temporary lock on this model. If aquired, the method returns normally, otherwise anMTRemoteChangeException
is raised. An aquired lock will prevent other users from making changes to this model 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 model has changed since it was last fetched from storage or if someone else (other MTUser) currently holds the lock.
-
lock
Tries to lock the model for a given duration in milliseconds.- Parameters:
duration
- The duration- Throws:
MTAccessException
- if the current user lack access rights to this object.MTRemoteChangeException
- if this model has changed since it was last fetched from storage or if someone else (other MTUser) currently holds the lock.- See Also:
-
releaseLock
void releaseLock()Immediately releases a lock on the model. 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. -
findAttributes
Finds the models attributes.- Returns:
- The attributes for the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 5.0
-
findAttributeByType
Finds a attribute for this model, based on its type UUID.- Returns:
- the attribute for this model where the attribute has an attribute type with UUID 'uuid'.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 5.0
-
findAttributeHeaders
Finds the models attributes as headers.- Returns:
- The attributes for the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 5.0
-
findDocumentIDs
Finds the ID:s of documents connected to this model.- Returns:
- The ID:s of documents connected to this model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findDocuments
Finds the documents connected to this model.- Returns:
- An iterator over all documents connected to this model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findDocumentHeaders
Finds the documents connected to this model as headers.- Returns:
- An iterator over all documents connected to this model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findExtensionDocuments
Finds the extension documents connected to this model.- Parameters:
provider
- The provider to get documents for.- Returns:
- All extenstion documents connected to this model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findVertices
Finds all vertices in this model.- Returns:
- All vertices in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findVertexHeaders
Finds all vertices in this model as headers.- Returns:
- All vertices in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findSymbols
Finds all symbols in this model.- Returns:
- All symbols in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findSymbolHeaders
Finds all symbols in this model as headers.- Returns:
- All symbols in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findEdges
Finds all edges in this model.- Returns:
- All edges in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findEdge
Finds an edge in this model, based on its type UUID.- Returns:
- edge in this model with UUID 'uuid'.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.1
-
findEdgeHeaders
Finds all edges in this model as headers.- Returns:
- All edges in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findLayers
Finds all layers in this model.- Returns:
- All layers in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
findLayerHeaders
Finds all layers in this model as headers.- Returns:
- All layers in the model.
- Throws:
MTAccessException
- If an MTAccessException occurs.- Since:
- 3.0
-
createPluginData
Creates a new plug-in data connected to this model.- Parameters:
provider
- The provider.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 model.- 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.3
-
findBreakdowns
Finds all breakdowns, in the current workspace, for thisMTModelHeader
.- Returns:
- all breakdowns, in the current workspace, for this
MTModelHeader
. - Throws:
MTAccessException
- if the user don't have the proper access rights.
-
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
-
getPluginDataBulkOperations
MTPluginDataOperations getPluginDataBulkOperations() -
getNewPluginData
List<MTPluginDataOperations.Data> getNewPluginData() -
setNewPluginData
-
getNewPluginRelations
List<MTPluginDataOperations.Relation> getNewPluginRelations() -
setNewPluginRelations
-
restore
If this model has previously been removed from the current workspace it will be restored. Any symbols used in the restored model will be synchronized to use the current versions in the current workspace. If needed a new revision of the model will be created to make these changes.- Returns:
- The id of the restored model or null if the model could not be restored. This can be the ID of this model or a new revision if it was needed to keep symbols in the model up-to-date.
-