Class AssignEmptyEmbeddedSubprocess
- java.lang.Object
-
- de.aristaflow.adept2.core.changeoperations.AssignEmptyEmbeddedSubprocess
-
public class AssignEmptyEmbeddedSubprocess extends Object
Change operation for the creation/assignment of an empty embedded subprocess on a node. Call isPossible first to check if the assignment is valid, than call perform operation to execute the change. TODO Refactor; use a common interface for change operations.
-
-
Constructor Summary
Constructors Constructor Description AssignEmptyEmbeddedSubprocess()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isPossible(Instance instance, int nodeID)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural and state-based correctness) for the given instance.static boolean
isPossible(Instance instance, int nodeID, CheckReport checkReport)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural and state-based correctness) for the given instance.static boolean
isPossible(Template template, int nodeID)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural correctness) for the given template.static boolean
isPossible(Template template, int nodeID, CheckReport checkReport)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural correctness) for the given template.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID)
Creates and assigns an empty embedded subprocess to a node in the given instance.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID, UpdateManager updateManager)
Creates and assigns an empty embedded subprocess to a node in the given instance (with updateManager).static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID)
Creates and assigns an empty embedded subprocess to a node in the given template.static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID, UpdateManager updateManager)
Creates and assigns an empty embedded subprocess to a node in the given template (with updateManager).protected static void
performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, 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)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural correctness) for the given template.- Parameters:
template
- the template where the method is performed onnodeID
- the ID of the node where the empty embedded subprocess should be assigned- Returns:
- returns True if the mapping is valid
-
isPossible
public static boolean isPossible(Template template, int nodeID, CheckReport checkReport)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural correctness) for the given 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 method is performed onnodeID
- the ID of the node where the empty embedded subprocess should be assignedcheckReport
- 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:
- returns True if the mapping is valid
-
isPossible
public static boolean isPossible(Instance instance, int nodeID)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural and state-based correctness) for the given instance.- Parameters:
instance
- the changeable instance where the method is performed onnodeID
- the ID of the node where the empty embedded subprocess should be assigned- Returns:
- returns True if the mapping is valid
-
isPossible
public static boolean isPossible(Instance instance, int nodeID, CheckReport checkReport)
Checks if the assignment of an empty embedded subprocess is valid (concerning structural and state-based correctness) for the given instance. 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 method is performed onnodeID
- the ID of the node where the empty embedded subprocess should be assignedcheckReport
- 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:
- returns True if the mapping is valid
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID)
Creates and assigns an empty embedded subprocess to a node in the given template.- Parameters:
session
- The session which is used to check for access rights on this method.template
- the template where the method is performed onnodeID
- the ID of the node where the EBP is to be assigned
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID, UpdateManager updateManager)
Creates and assigns an empty embedded subprocess to a node in the given template (with updateManager).- Parameters:
session
- The session which is used to check for access rights on this method.template
- the changeable template where the method is performed onnodeID
- the ID of the node where the EBP is to be assignedupdateManager
- the manager who controls the update of the visual graph components. (maybe null)
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID)
Creates and assigns an empty embedded subprocess to a node in the given instance.- Parameters:
session
- The session which is used to check for access rights on this method.instance
- the changeable instance where the method is performed onnodeID
- the ID of the node where the EBP is to be assigned
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID, UpdateManager updateManager)
Creates and assigns an empty embedded subprocess to a node in the given instance (with updateManager).- Parameters:
session
- The session which is used to check for access rights on this method.instance
- the changeable instance where the method is performed onnodeID
- the ID of the node where the EBP is to be assignedupdateManager
- the manager who controls the update of the visual graph components. (maybe null)
-
performOperation
protected static void performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, 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 ChangeableInstancenodeID
- the ID of the node where the subprocess is to be assignedupdateManager
- the manager who controls the update of the visual graph components. (maybe null)
-
-