Class AddSystemDataFlow
- java.lang.Object
-
- de.aristaflow.adept2.core.changeoperations.AddSystemDataFlow
-
public class AddSystemDataFlow extends Object
Change operation for adding a system data flow. Call isPossible first to check if the operation is valid, than call perform operation to execute the change TODO Refactor; use a common interface for change operations.
-
-
Constructor Summary
Constructors Constructor Description AddSystemDataFlow()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static boolean
isPossible(Instance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, CheckReport checkReport)
Check if it is possible (concerning structural correctness and state based correctness) to add a system data flow of the given type between the given nodes.static boolean
isPossible(Instance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Check if it is possible (concerning structural correctness and state based correctness) to add a system data flow of the given type between the given nodes.static boolean
isPossible(Instance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness and state based correctness) to add a system data flow of the given type between the given nodes.protected static boolean
isPossible(Template template, int prodNodeId, SystemDataProducer systemDataType, int consNodeId, CheckReport checkReport)
Check if it is possible (concerning structural correctness) to add a system data flow of the given type between the given nodes.static boolean
isPossible(Template template, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Check if it is possible (concerning structural correctness) to add a system data flow between the given nodes.static boolean
isPossible(Template template, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness) to add a system data flow of the given type between the given nodes.static void
performOperation(SessionToken session, ChangeableInstance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Adds a system data flow of the given type between the given nodes in the given instance.static void
performOperation(SessionToken session, ChangeableInstance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, UpdateManager updateManager)
Adds a system data flow of the given type between the given nodes in the given instance.static void
performOperation(SessionToken session, ChangeableTemplate template, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Adds a system data flow of the given type between the given nodes.static void
performOperation(SessionToken session, ChangeableTemplate template, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, UpdateManager updateManager)
Adds a system data flow of the given type between the given nodes.protected static void
performOperation(SessionToken session, ChangePrimitives processGraph, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, 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 producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Check if it is possible (concerning structural correctness) to add a system data flow between the given nodes.- Parameters:
template
- The corresponding templateproducerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer node- Returns:
- True, if possible.
-
isPossible
public static boolean isPossible(Template template, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness) to add a system data flow of the given type between the given nodes. If it is not possible the reasons are stored in the checkReport.- Parameters:
template
- The corresponding templateproducerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer nodecheckReport
- 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
protected static boolean isPossible(Template template, int prodNodeId, SystemDataProducer systemDataType, int consNodeId, CheckReport checkReport)
Check if it is possible (concerning structural correctness) to add a system data flow of the given type between the given nodes. Note: This method is for internal use only, because it ignores if the node already has a parameter where the data flow can be connected with. If it is not possible the reasons are stored in the checkReport.- Parameters:
template
- The corresponding templateprodNodeId
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consNodeId
- the node which consumes the system parameter.checkReport
- 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 instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Check if it is possible (concerning structural correctness and state based correctness) to add a system data flow of the given type between the given nodes.- Parameters:
instance
- The corresponding instanceproducerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer node- Returns:
- True, if possible.
-
isPossible
public static boolean isPossible(Instance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, CheckReport checkReport)
Check if it is possible (concerning structural correctness and state based correctness) to add a system data flow of the given type between the given nodes. If it is not possible the reasons are stored in the checkReport.- Parameters:
instance
- The corresponding changeable instanceproducerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer nodecheckReport
- 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
protected static boolean isPossible(Instance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, CheckReport checkReport)
Check if it is possible (concerning structural correctness and state based correctness) to add a system data flow of the given type between the given nodes. Note: This method is for internal use only, because it ignores if the node already has a parameter where the data flow can be connected with.- Parameters:
instance
- The corresponding changeable instanceproducerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.checkReport
- 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.
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Adds a system data flow of the given type between the given nodes.- Parameters:
session
- The session which is used to check for access rights on this method.template
- The related changeable template.producerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer node
-
performOperation
public static void performOperation(SessionToken session, ChangeableTemplate template, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, UpdateManager updateManager)
Adds a system data flow of the given type between the given nodes. (Operation with updateManager)- Parameters:
session
- The session which is used to check for access rights on this method.template
- The related changeable template.producerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer nodeupdateManager
- The UpdateManager where modifications are logged, may be null
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName)
Adds a system data flow of the given type between the given nodes in the given instance.- Parameters:
session
- The session which is used to check for access rights on this method.instance
- The related changeable instance.producerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer node
-
performOperation
public static void performOperation(SessionToken session, ChangeableInstance instance, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, UpdateManager updateManager)
Adds a system data flow of the given type between the given nodes 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.producerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer nodeupdateManager
- the manager which is responsible for the graphical adaptation of the template (maybe null)
-
performOperation
protected static void performOperation(SessionToken session, ChangePrimitives processGraph, int producerNodeID, SystemDataProducer systemDataType, int consumerNodeID, String inputParameterName, 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 ChangeableInstanceproducerNodeID
- the node which produces the system parameter.systemDataType
- the type of the system dataSystemDataProducer
consumerNodeID
- the node which consumes the system parameter.inputParameterName
- the name of the parameter which must exist in the the consumer nodeupdateManager
- the manager which is responsible for the graphical adaptation of the template (maybe null)
-
-