Class ReconnectDataEdge
- java.lang.Object
-
- de.aristaflow.adept2.core.changeoperations.ReconnectDataEdge
-
public class ReconnectDataEdge extends Object
The intended task of this change operation is to reconnect an already existent and already to a parameter connected data edge to a parameter which is disabled or unconnected. Call isPossible first to check if the change is valid, than call perform operation to execute the change. TODO Refactor; use a common interface for change operations. Note: if a data element should be mapped to a parameter which is actually connected use change operationSwapDataElementParameterConnection
instead
-
-
Constructor Summary
Constructors Constructor Description ReconnectDataEdge()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isPossible(ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the instance .static boolean
isPossible(ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, CheckReport checkReport)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the template.static boolean
isPossible(Template template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the template.static boolean
isPossible(Template template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, CheckReport checkReport)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the template.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Connect the given data element with the given parameter (via the given already existing data edge) in the instance.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, UpdateManager updateManager)
Connect the given data element with the given parameter (via the given already existing data edge) in the instance.static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Connect the given data element with the given parameter (via the given already existing data edge) in the template.static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, UpdateManager updateManager)
Connect the given data element with the given parameter (via the given already existing data edge) in the template.protected static void
performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, UpdateManager updateManager)
Worker method to do the structural changes for both changeable templates and changeable instances.
-
-
-
Method Detail
-
isPossible
public static boolean isPossible(Template template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the template.- Parameters:
template
- the template where the change operation is performed on.nodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the data edge objectparam
- the parameter the data element (via data edge) should be connected with- Returns:
- true if possible
-
isPossible
public static boolean isPossible(Template template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, CheckReport checkReport)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the template. If the check fails the reason is stored in the given checkReport (provided that checkReport is not null)- Parameters:
template
- the template where the change operation is performed on.nodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the data edge objectparam
- the parameter the data element (via data edge) should be connected withcheckReport
- an (empty) checkReport object which contains the reason why the isPossible failed (i.e. in the case the method returns false), may be null- Returns:
- true if possible
-
isPossible
public static boolean isPossible(ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the instance .- Parameters:
instance
- the changeable instance where the change operation is performed on.nodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the data edge objectparam
- the parameter the data element (via data edge) should be connected with- Returns:
- true if possible
-
isPossible
public static boolean isPossible(ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, CheckReport checkReport)
Check if it is possible to reconnect the given data edge (respectively the connected data element) to the given parameter in the template. If the check fails the reason is stored in the given checkReport (provided that checkReport is not null)- Parameters:
instance
- the changeable instance where the change operation is performed on.nodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the data edge objectparam
- the parameter the data element (via data edge) should be connected withcheckReport
- an (empty) checkReport object which contains the reason why the isPossible failed (i.e. in the case the method returns false), may be null- Returns:
- true if possible
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Connect the given data element with the given parameter (via the given already existing data edge) in the template.- Parameters:
session
- The session which is used to check for access rights on this method.template
- the related templateparam
- the parameter where the data element (given by dataElementID) is to be connected withnodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the edge object
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, UpdateManager updateManager)
Connect the given data element with the given parameter (via the given already existing data edge) in the template. (with updateManager)- Parameters:
session
- The session which is used to check for access rights on this method.template
- the related templateparam
- the parameter where the data element (given by dataElementID) is to be connected withnodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the edge objectupdateManager
- the manager who controls the update of the visual graph components. (maybe null)
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param)
Connect the given data element with the given parameter (via the given already existing data edge) in the instance.- Parameters:
session
- The session which is used to check for access rights on this method.instance
- the related changeable instanceparam
- the parameter where the data element (given by dataElementID) is to be connected withnodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the edge object
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, UpdateManager updateManager)
Connect the given data element with the given parameter (via the given already existing data edge) in the instance. (with updateManager)- Parameters:
session
- The session which is used to check for access rights on this method.instance
- the related changeable instanceparam
- the parameter where the data element (given by dataElementID) is to be connected withnodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the edge objectupdateManager
- the manager who controls the update of the visual graph components. (maybe null)
-
performOperation
protected static void performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, int dataElementID, DataEdge dataEdge, ProcessModelParameter param, UpdateManager updateManager)
Worker method to do the structural changes for both changeable templates and changeable instances.- Parameters:
session
- The session which is used to check for access rights on this method.processGraph
- an instance of type ChangeableTemplate or ChangeableInstanceparam
- the parameter where the data element (given by dataElementID) is to be connected withnodeID
- the node where the data edge is connected withdataElementID
- the data element where the data edge is connected withdataEdge
- the edge objectupdateManager
- the manager who controls the update of the visual graph components. (maybe null)
-
-