Class MTModelStoreAdapter
java.lang.Object
se.conciliate.extensions.store.event.MTModelStoreAdapter
- All Implemented Interfaces:
EventListener
,MTModelStoreListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
modelAdded
(MTModel model, MTWorkspace workspace, MTRepository repo) Called when a model is added through the store api, but before it is saved.
NOTE: No guarantees are made about wich thread this method is called upon.void
modelChanged
(MTModelHeader model, ModelChangeEvent event) Called when a model is changed through the store api.
NOTE: No guarantees are made about wich thread this method is called upon.void
modelRemoved
(String modelUUID, ModelType type, MTWorkspace workspace, MTRepository repo) Called when a model has been removed through the store api.void
revisionChanged
(MTModel model, MTWorkspace workspace, MTRepository repo) Called when a change was made to the current revision of a model, i.e.void
revisionCreated
(MTModel model, MTWorkspace workspace, MTRepository repo) Called when a new revision of a model is created through the store api.
NOTE: No guarantees are made about wich thread this method is called upon.void
revisionLocked
(MTModel model, MTWorkspace workspace, MTRepository repo) Called when the current revision of a model is locked.
NOTE: No guarantees are made about wich thread this method is called upon.
-
Constructor Details
-
MTModelStoreAdapter
public MTModelStoreAdapter()
-
-
Method Details
-
modelAdded
Description copied from interface:MTModelStoreListener
Called when a model is added through the store api, but before it is saved.
NOTE: No guarantees are made about wich thread this method is called upon. It is up to the implementation to handle thread safety.- Specified by:
modelAdded
in interfaceMTModelStoreListener
- Parameters:
model
- The model that was addedworkspace
- The workspace in which the model was addedrepo
- The repository in which the model was added
-
modelChanged
Description copied from interface:MTModelStoreListener
Called when a model is changed through the store api.
NOTE: No guarantees are made about wich thread this method is called upon. It is up to the implementation to handle thread safety.- Specified by:
modelChanged
in interfaceMTModelStoreListener
- Parameters:
model
- The model that was changed.event
- An event describing the change.- See Also:
-
modelRemoved
public void modelRemoved(String modelUUID, ModelType type, MTWorkspace workspace, MTRepository repo) Description copied from interface:MTModelStoreListener
Called when a model has been removed through the store api. Since the model no longer exist, it cannot be sent as a parameter. Instead, the unique identifier (UUID) is sent as a string.
NOTE: No guarantees are made about wich thread this method is called upon. It is up to the implementation to handle thread safety.- Specified by:
modelRemoved
in interfaceMTModelStoreListener
- Parameters:
modelUUID
- The uuid of the model that was removed.type
- The type of the model that was removed.workspace
- The workspace from which the model was removedrepo
- The repository from which the model was removed.
-
revisionChanged
Description copied from interface:MTModelStoreListener
Called when a change was made to the current revision of a model, i.e. the revision log was updated.
NOTE: No guarantees are made about wich thread this method is called upon. It is up to the implementation to handle thread safety.- Specified by:
revisionChanged
in interfaceMTModelStoreListener
- Parameters:
model
- The model where the change was made.workspace
- The workspace in which the revision of the model was changed.repo
- The repository in which the revision of the model was changed.
-
revisionCreated
Description copied from interface:MTModelStoreListener
Called when a new revision of a model is created through the store api.
NOTE: No guarantees are made about wich thread this method is called upon. It is up to the implementation to handle thread safety.- Specified by:
revisionCreated
in interfaceMTModelStoreListener
- Parameters:
model
- The model that now has a new revision.workspace
- The workspace in which the new revision of the model was created.repo
- The repository in which the new revision of the model was created.
-
revisionLocked
Description copied from interface:MTModelStoreListener
Called when the current revision of a model is locked.
NOTE: No guarantees are made about wich thread this method is called upon. It is up to the implementation to handle thread safety.- Specified by:
revisionLocked
in interfaceMTModelStoreListener
- Parameters:
model
- The model that now has its revision locked.workspace
- The workspace in which the revision of the model was locked.repo
- The repository in which the revision of the model was locked.
-