Interface ModelChangeEvent
public interface ModelChangeEvent
An event describing a model change. The event has four methods of which two
will always return a valid result (
An event specifies that a model has changed in some way (vertices/edges/documents/descriptions and so on has been added or removed) OR the model is part of a breakdown event (a breakdown has either been added or removed). In the latter case,
To listen for model change events, register an
getEventType()
and getModel()
)
while the other two might return null (getSymbol()
and getEdge()
). An event specifies that a model has changed in some way (vertices/edges/documents/descriptions and so on has been added or removed) OR the model is part of a breakdown event (a breakdown has either been added or removed). In the latter case,
getSymbol()
specifies the symbol that was broken down and
getModel()
specifies the model that the symbol was broken down to. A
breakdown from an edge is analogous.To listen for model change events, register an
MTModelStoreListener
using the white board pattern.- Author:
- Per-Erik
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
An event specifying that a symbol has been broken down to the model.static final int
An event specifying that a symbol no longer breaks down to the model.static final int
static final int
An event specifying that the model has changed in some way.static final int
static final int
static final int
lite specific -
Method Summary
Modifier and TypeMethodDescriptionReturns the attribute data of the attribute that changed or null if this is not a model attribute changed event.Returns the attribute type of the attribute that changed or null if this is not a model attribute changed event.getEdge()
Returns the edge involved in the change or null if no edge was involved in the change.int
Returns the event type which is any of the statically defined integers in this class.getModel()
Returns the model that was changed or the "model-part" of a breakdown.Returns the symbol involved in the change or null if no symbol was involved in the change.
-
Field Details
-
BREAKDOWN_ADDED
static final int BREAKDOWN_ADDEDAn event specifying that a symbol has been broken down to the model.- See Also:
-
BREAKDOWN_REMOVED
static final int BREAKDOWN_REMOVEDAn event specifying that a symbol no longer breaks down to the model.- See Also:
-
MODEL_CHANGED
static final int MODEL_CHANGEDAn event specifying that the model has changed in some way. The following is a non-exclusive list:- See Also:
-
MODEL_ATTRIBUTE_CHANGED
static final int MODEL_ATTRIBUTE_CHANGED- See Also:
-
SYMBOLS_REPLACED
static final int SYMBOLS_REPLACED- See Also:
-
MODEL_HOME_CHANGED
static final int MODEL_HOME_CHANGED- See Also:
-
WORKFLOW_TRANSITION
static final int WORKFLOW_TRANSITIONlite specific- See Also:
-
-
Method Details
-
getModel
MTModelHeader getModel()Returns the model that was changed or the "model-part" of a breakdown.- Returns:
- the model of the event.
-
getSymbol
MTSymbolHeader getSymbol()Returns the symbol involved in the change or null if no symbol was involved in the change. This is used for example when a breakdown is added or removed.- Returns:
- the symbol involved in the change or null if no symbol was involved in the change.
-
getEdge
MTEdgeHeader getEdge()Returns the edge involved in the change or null if no edge was involved in the change. This is used for example when a breakdown is added or removed.- Returns:
- the edge involved in the change or null if no edge was involved in the change.
-
getAttributeType
MTAttributeType getAttributeType()Returns the attribute type of the attribute that changed or null if this is not a model attribute changed event.- Returns:
- the attribute type of the attribute that changed or null if this is not a model attribute changed event
-
getAttributeData
String getAttributeData()Returns the attribute data of the attribute that changed or null if this is not a model attribute changed event.- Returns:
- the attribute data of the attribute that changed or null if this is not a model attribute changed event
-
getReplacedSymbols
Collection<MTSymbolHeader> getReplacedSymbols() -
getVertex
MTCompleteVertex getVertex() -
getEventType
int getEventType()Returns the event type which is any of the statically defined integers in this class.- Returns:
- The event type.
- See Also:
-