Package com.aquima.interactions.rule.ds
Interface IRuleEngineDS
- All Superinterfaces:
IReportingDS
- All Known Implementing Classes:
ConfigRuleEngineDS
,ConfigRuleEngineDS
,ReportingRuleEngineDS
,RuleEngineDelegateDS
,RuleEngineDS
,XmlRuleEngineDS
,XmlRuleEngineDS
This interface defines the main functions that a data layer for a rule engine should implement to initialize the
various business rules.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
Given a rule that can source a target attribute, it uses source attributes.This function returns the data source for the expression parser.This method returns the version of the parser that should be used.void
iterateConstraints
(IConstraintVisitor visitor) The rule engine will invoke this method to allow the data layer to add constraints for attributes to the rule engine.void
iterateRuleGroups
(IRuleGroupVisitor visitor) The rule engine will invoke this method to allow the data layer to add the rule group definitions to the rule engine.void
iterateSources
(ISourceVisitor visitor) The rule engine will invoke this method to allow the data layer to add to add sources for attributes to the rule engine.void
iterateValidations
(IValidationVisitor visitor) The rule engine will invoke this method to allow the data layer to add a validation rule for an attribute to the rule engine.Methods inherited from interface com.aquima.interactions.foundation.report.IReportingDS
addMessage
-
Field Details
-
CATEGORY
Category used in error and/or warnings found during initialization.
-
-
Method Details
-
allowTargetDowncast
boolean allowTargetDowncast()Given a rule that can source a target attribute, it uses source attributes. In KS-4.2 one can define A rule that sources Item.price while using the subtype Product in the expression. If the allowTarget upcast function is true the second case: Sourcing with Item.prijs using Product.naam will auto upcast Item.prijs to Product.prijs. This makes the the rule valid and used when product.prijs is requested.- Item.prijs <= Item.naam
- Item.prijs <= Product.naam
- Product.prijs <= Item.naam
- Product.prijs <= Product.naam
- Returns:
- boolean indicating if down-casting of rules is allowed.
-
getParserVersion
Version getParserVersion()This method returns the version of the parser that should be used. At the moment there are two parser versions available:- Version 4.x and lower, which will only accept expressions in the original syntax.
- Version 5.x or higher, which will accept most of the original syntax and several new expression constructs.
- Returns:
- The version of the parser that should be used.
-
iterateRuleGroups
The rule engine will invoke this method to allow the data layer to add the rule group definitions to the rule engine.- Parameters:
visitor
- The visitor that should be used to add the rule groups to.- Throws:
InitializationException
- This exception is thrown when the rule groups could not be initialized.
-
iterateSources
The rule engine will invoke this method to allow the data layer to add to add sources for attributes to the rule engine.- Parameters:
visitor
- The visitor that should be used to add the source to.- Throws:
InitializationException
- This exception is raised when a rule could not be added due to errors.
-
iterateConstraints
The rule engine will invoke this method to allow the data layer to add constraints for attributes to the rule engine.- Parameters:
visitor
- The visitor that should be used to add the constraints to.- Throws:
InitializationException
- This exception is raised when a rule could not be added due to errors.
-
iterateValidations
The rule engine will invoke this method to allow the data layer to add a validation rule for an attribute to the rule engine.- Parameters:
visitor
- The visitor that should be used to add the validation to.- Throws:
InitializationException
- This exception is raised when a rule could not be added due to errors.
-
getExpressionEngineDS
IExpressionEngineDS getExpressionEngineDS()This function returns the data source for the expression parser.- Returns:
- The parser data source which is mandatory.
-