Class UpdateDataEdge
- java.lang.Object
-
- de.aristaflow.adept2.core.changeoperations.UpdateDataEdge
-
public class UpdateDataEdge extends Object
Change Operation to update the properties of a data edge. Call isPossible first to check if the update is valid, than call perform operation to execute the change. TODO Refactor; use a common interface for change operations. TODO enable the change of UserAttributes when concept is clear
-
-
Constructor Summary
Constructors Constructor Description UpdateDataEdge()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isPossible(ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural and state based correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the instance.static boolean
isPossible(ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, CheckReport checkReport, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural and state based correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the instance.static boolean
isPossible(Template template, int nodeID, int dataElementID, ActivityConstants.AccessType type, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the template.static boolean
isPossible(Template template, int nodeID, int dataElementID, ActivityConstants.AccessType type, CheckReport checkReport, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the template.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, UpdateManager updateManager, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given instance using the data in the given data edge object.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given instance using the data in the given data edge object.static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, UpdateManager updateManager, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given template using the data in the given data edge object.static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given template using the data in the given data edge object.protected static void
performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, UpdateManager updateManager, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Worker method to do the structural changes for both changeable templates and changeable instances.
-
-
-
Field Detail
-
logger
protected static final Logger logger
aLogger
-
-
Method Detail
-
isPossible
public static boolean isPossible(Template template, int nodeID, int dataElementID, ActivityConstants.AccessType type, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the template. The following attributes / properties may be updated and must therefore be tested:- OPTIONAL
- USER_ATTRIBUTE
- Parameters:
template
- the template where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEdataEdgeProperties
- the properties which should be changed- Returns:
- true if the change of the given properties are valid
-
isPossible
public static boolean isPossible(Template template, int nodeID, int dataElementID, ActivityConstants.AccessType type, CheckReport checkReport, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the template. The following attributes / properties may be updated and must therefore be tested:- OPTIONAL
- USER_ATTRIBUTE
- Parameters:
template
- the template where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEcheckReport
- a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be nulldataEdgeProperties
- the properties which should be changed- Returns:
- true if the change of the given properties are valid
-
isPossible
public static boolean isPossible(ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural and state based correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the instance. The following attributes / properties may be updated and must therefore be tested:- OPTIONAL
- USER_ATTRIBUTE
- Parameters:
instance
- the changeable instance where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEdataEdgeProperties
- the properties which should be changed- Returns:
- true if the change of the given properties are valid
-
isPossible
public static boolean isPossible(ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, CheckReport checkReport, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Checks if it is valid (concerning structural and state based correctness) for the data edge (described by the given node ID and the given data element ID) to update the properties given bydataEdgeProperties
in the instance. The following attributes / properties may be updated and must therefore be tested:- USER_ATTRIBUTE
- Parameters:
instance
- the changeable instance where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEcheckReport
- a checkReport object which can be filled with the reason why the isPossible failed (i.e. in the case the method returns false), may be nulldataEdgeProperties
- the properties which should be changed- Returns:
- true if the change of the given properties are valid
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given template using the data in the given data edge object. The given data edge object is just used as a temporary container for the new values. The properties specify which attributes of the data edge will be updated. The following properties may be updated from the given object:- OPTIONAL
- Parameters:
session
- the related sessiontemplate
- the changeable template where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEdataEdge
- a temporary data edge object, containing the new valuesdataEdgeProperties
- the properties which should be changed
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, UpdateManager updateManager, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given template using the data in the given data edge object. The given data edge object is just used as a temporary container for the new values. The properties specify which attributes of the data edge will be updated. (Operation with updateManager) The following properties may be updated from the given object:- OPTIONAL
- Parameters:
session
- the related sessiontemplate
- the changeable template where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEdataEdge
- a temporary data edge object, containing the new valuesupdateManager
- The update manager which will be informed about process changes.dataEdgeProperties
- the properties which should be changed
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given instance using the data in the given data edge object. The given data edge object is just used as a temporary container for the new values. The properties specify which attributes of the data edge will be updated. The following properties may be updated from the given object:- OPTIONAL
- Parameters:
session
- the related sessioninstance
- the changeable instance where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEdataEdge
- a temporary data edge object, containing the new valuesdataEdgeProperties
- the properties which should be changed
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, UpdateManager updateManager, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Updates the data edge (described by the given node ID and the given data element ID) in the given instance using the data in the given data edge object. The given data edge object is just used as a temporary container for the new values. The properties specify which attributes of the data edge will be updated. (Operation with updateManager) The following properties may be updated from the given object:- OPTIONAL
- Parameters:
session
- the related sessioninstance
- the changeable instance where the method is performed onnodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEdataEdge
- a temporary data edge object, containing the new valuesupdateManager
- The update manager which will be informed about process changes.dataEdgeProperties
- the properties which should be changed
-
performOperation
protected static void performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, int dataElementID, ActivityConstants.AccessType type, DataEdge dataEdge, UpdateManager updateManager, ProcessConstants.DataEdgeProperty... dataEdgeProperties)
Worker method to do the structural changes for both changeable templates and changeable instances. The following properties may be updated from the given object:- OPTIONAL
- Parameters:
session
- the related sessionprocessGraph
- an instance of type ChangeableTemplate or ChangeableInstancenodeID
- the id of the node on one side of the data edgedataElementID
- the id of the data element on the other side of the data edgetype
- the direction of the data edge READ or WRITEdataEdge
- a temporary data edge object, containing the new valuesupdateManager
- The update manager which will be informed about process changes.dataEdgeProperties
- the properties which should be changed
-
-