Class ConstraintVisitor
java.lang.Object
com.aquima.interactions.rule.graph.RuleVisitor
com.aquima.interactions.rule.graph.ConstraintVisitor
- All Implemented Interfaces:
IConstraintVisitor
,IRuleVisitor
Rule visitor that is used during initialization to add constraint rules to the rule graph.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ConstraintVisitor
(RuleGraph graph, IProject project, IMetaModel model, IRuleFactory ruleFactory, IParserFactory parserFactory, IConnectionManager connectionManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConstraint
(IConstraint constraint) The data layer implementation should invoke this addConstraint method for each constraint that should be added to the rule engine.void
addExternalConstraint
(IExternalRuleDS externalRule) The data layer may invoke this method to add an external constraint rule.void
addTable
(String targetAttribute, IDecisionTableDS tableDS) This method can be used to add a decision table to a specific attribute as constraint.Methods inherited from class com.aquima.interactions.rule.graph.RuleVisitor
getConnectionManager, getMetaModel, getParser, getProject, isR4IgnoreScope, isR4Parser, isSingletonOrNamed, validateRuleGroups, validateSourceScopeObjects, validateTargetAttributes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.rule.ds.IRuleVisitor
getMetaModel, getParser
-
Constructor Details
-
ConstraintVisitor
protected ConstraintVisitor(RuleGraph graph, IProject project, IMetaModel model, IRuleFactory ruleFactory, IParserFactory parserFactory, IConnectionManager connectionManager)
-
-
Method Details
-
addConstraint
Description copied from interface:IConstraintVisitor
The data layer implementation should invoke this addConstraint method for each constraint that should be added to the rule engine.- Specified by:
addConstraint
in interfaceIConstraintVisitor
- Parameters:
constraint
- The constraint that should be added to the rule engine.- Throws:
InitializationException
- This exception is raised when the rule could not be added due to errors.
-
addExternalConstraint
Description copied from interface:IConstraintVisitor
The data layer may invoke this method to add an external constraint rule. The rule factory will be used to locate the implementation for the constraint.- Specified by:
addExternalConstraint
in interfaceIConstraintVisitor
- Parameters:
externalRule
- Data source providing information about the external constraint rule.- Throws:
InitializationException
- This exception is raised when the rule could not be added due to errors.
-
addTable
public void addTable(String targetAttribute, IDecisionTableDS tableDS) throws InitializationException Description copied from interface:IConstraintVisitor
This method can be used to add a decision table to a specific attribute as constraint. The decision table should evaluate to a set of values that are valid for the attribute.- Specified by:
addTable
in interfaceIConstraintVisitor
- Parameters:
targetAttribute
- The attribute for which the decision table applies.tableDS
- Data source containing the definition of the decision table.- Throws:
InitializationException
- This exception is raised when the rule could not be added due to errors.
-