Class RemoveNodeSystemParameter
- java.lang.Object
-
- de.aristaflow.adept2.core.changeoperations.RemoveNodeSystemParameter
-
public class RemoveNodeSystemParameter extends Object
Change operation for removing a system parameter from a node. TODO Refactor; use a common interface for change operations.
-
-
Constructor Summary
Constructors Constructor Description RemoveNodeSystemParameter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isPossible(Instance instance, int nodeID, ActivityConstants.AccessType type, String parameterName)
Check if it is possible (concerning structural correctness and state based correctness) to remove the given system parameter from the given node.static boolean
isPossible(Instance instance, int nodeID, ActivityConstants.AccessType type, String parameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness and state based correctness) to remove the given system parameter from the given node.static boolean
isPossible(Instance inst, int nodeId, Node node, ActivityConstants.AccessType type, String paramName, CheckReport checkReport)
Gets whether it is possible (concerning structural correctness and state-based correctness) to remove the designated system parameter from the designated node.static boolean
isPossible(Template template, int nodeID, ActivityConstants.AccessType type, String parameterName)
Check if it is possible (concerning structural correctness) to remove the given system parameter from the given node.static boolean
isPossible(Template template, int nodeID, ActivityConstants.AccessType type, String parameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness) to remove the given system parameter from the given node.static boolean
isPossible(Template templ, int nodeId, Node node, ActivityConstants.AccessType type, String paramName, CheckReport checkReport)
Gets whether it is possible (concerning structural correctness) to remove the designated system parameter from the designated node.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID, ActivityConstants.AccessType type, String parameterName)
Removes the given system parameter from the given node in the given instance.static void
performOperation(SessionToken session, ChangeableInstance instance, int nodeID, ActivityConstants.AccessType type, String parameterName, UpdateManager updateManager)
Removes the given system parameter from the given node in the given instance.static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID, ActivityConstants.AccessType type, String parameterName)
Removes the given system parameter from the given node in the given template.static void
performOperation(SessionToken session, ChangeableTemplate template, int nodeID, ActivityConstants.AccessType type, String parameterName, UpdateManager updateManager)
Removes the given system parameter from the given node in the given template.protected static void
performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, ActivityConstants.AccessType type, String parameterName, UpdateManager updateManager)
Worker method to do the structural changes for both changeable templates and changeable instances.
-
-
-
Field Detail
-
logger
protected static final Logger logger
a Logger
-
-
Method Detail
-
isPossible
public static boolean isPossible(Template template, int nodeID, ActivityConstants.AccessType type, String parameterName)
Check if it is possible (concerning structural correctness) to remove the given system parameter from the given node.- Parameters:
template
- The corresponding templatenodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parameter- Returns:
- True, if possible.
-
isPossible
public static boolean isPossible(Template template, int nodeID, ActivityConstants.AccessType type, String parameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness) to remove the given system parameter from the given node. If it is not possible the reasons are stored in the checkReport.- Parameters:
template
- The corresponding templatenodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parametercheckReport
- 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 null- Returns:
- True, if possible.
-
isPossible
public static boolean isPossible(Template templ, int nodeId, Node node, ActivityConstants.AccessType type, String paramName, CheckReport checkReport)
Gets whether it is possible (concerning structural correctness) to remove the designated system parameter from the designated node. If it is not possible the reasons are stored in the designated (optional)checkReport
.- Parameters:
templ
- The corresponding template.nodeId
- The ID of the node from to which to remove the designated system parameter.node
- The node from which the system parameter should be removed. This may be an adapted node with a (new or changed) string property value no longer consuming the value of the designated parameter. In this case the designated node is obviously different fromTemplate.getNode(int)
since it already contains the changes as if the system parameter has been removed.type
- The access type SYSTEM_READ or SYSTEM_WRITEparamName
- The name of the system parameter to remove.checkReport
- A checkReport object which can be filled with the reason why the isPossible failed (i. e. in the case the method returns false). This may benull
.- Returns:
- Whether it is possible (concerning structural correctness) to remove the designated system parameter from the designated node.
-
isPossible
public static boolean isPossible(Instance instance, int nodeID, ActivityConstants.AccessType type, String parameterName)
Check if it is possible (concerning structural correctness and state based correctness) to remove the given system parameter from the given node.- Parameters:
instance
- The related changeable instance.nodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parameter- Returns:
- True, if possible.
-
isPossible
public static boolean isPossible(Instance instance, int nodeID, ActivityConstants.AccessType type, String parameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness and state based correctness) to remove the given system parameter from the given node. If it is not possible the reasons are stored in the checkReport.- Parameters:
instance
- The related changeable instance.nodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parametercheckReport
- 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 null- Returns:
- True, if possible.
-
isPossible
public static boolean isPossible(Instance inst, int nodeId, Node node, ActivityConstants.AccessType type, String paramName, CheckReport checkReport)
Gets whether it is possible (concerning structural correctness and state-based correctness) to remove the designated system parameter from the designated node. If it is not possible the reasons are stored in the designated (optional)checkReport
.- Parameters:
inst
- The related changeable instance.nodeId
- The ID of the node from to which to remove the designated system parameter.node
- The node from which the system parameter should be removed. This may be an adapted node with a (new or changed) string property value no longer consuming the value of the designated parameter. In this case the designated node is obviously different fromTemplate.getNode(int)
since it already contains the changes as if the system parameter has been removed.type
- The access type SYSTEM_READ or SYSTEM_WRITEparamName
- The name of the system parameter to remove.checkReport
- A checkReport object which can be filled with the reason why the isPossible failed (i. e. in the case the method returns false). This may benull
.- Returns:
- Whether it is possible (concerning structural correctness and state-based correctness) to remove the designated system parameter from the designated node.
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID, ActivityConstants.AccessType type, String parameterName)
Removes the given system parameter from the given node in the given template.- Parameters:
session
- The session which is used to check for access rights on this method.template
- The related changeable template.nodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parameter
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int nodeID, ActivityConstants.AccessType type, String parameterName, UpdateManager updateManager)
Removes the given system parameter from the given node in the given template. (Operation with updateManager)- Parameters:
session
- The session which is used to check for access rights on this method.template
- The related changeable template.nodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parameterupdateManager
- The UpdateManager where modifications are logged, may be null
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID, ActivityConstants.AccessType type, String parameterName)
Removes the given system parameter from the given node in the given instance.- Parameters:
session
- The session which is used to check for access rights on this method.instance
- The related changeable instance.nodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parameter
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int nodeID, ActivityConstants.AccessType type, String parameterName, UpdateManager updateManager)
Removes the given system parameter from the given node in the given instance. (Operation with updateManager)- Parameters:
session
- The session which is used to check for access rights on this method.instance
- The related changeable instance.nodeID
- the node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parameterupdateManager
- the manager which is responsible for the graphical adaptation of the template (maybe null)
-
performOperation
protected static void performOperation(SessionToken session, ChangePrimitives processGraph, int nodeID, ActivityConstants.AccessType type, String parameterName, 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 node where the system parameter should be removed.type
- the access type SYSTEM_READ or SYSTEM_WRITEparameterName
- the name of the system parameterupdateManager
- the manager which is responsible for the graphical adaptation of the template (maybe null)
-
-