All Implemented Interfaces:
IReportingDS, IRuleEngineDS

public class ConfigRuleEngineDS extends RuleEngineDelegateDS
Datasource implementation to wrap the project datasource and delegate some method calls to the IApplicationConfiguration.
Since:
8.0
Author:
Jon van Leuven
  • Constructor Details

  • Method Details

    • allowTargetDowncast

      public boolean allowTargetDowncast()
      Description copied from interface: IRuleEngineDS
      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.
      1. Item.prijs <= Item.naam
      2. Item.prijs <= Product.naam
      3. Product.prijs <= Item.naam
      4. Product.prijs <= Product.naam
      Specified by:
      allowTargetDowncast in interface IRuleEngineDS
      Overrides:
      allowTargetDowncast in class RuleEngineDelegateDS
      Returns:
      boolean indicating if down-casting of rules is allowed.
    • getParserVersion

      public Version getParserVersion()
      Description copied from interface: IRuleEngineDS
      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.
      Specified by:
      getParserVersion in interface IRuleEngineDS
      Overrides:
      getParserVersion in class RuleEngineDelegateDS
      Returns:
      The version of the parser that should be used.
    • iterateConstraints

      public void iterateConstraints(IConstraintVisitor visitor)
      Description copied from interface: IRuleEngineDS
      The rule engine will invoke this method to allow the data layer to add constraints for attributes to the rule engine.
      Specified by:
      iterateConstraints in interface IRuleEngineDS
      Overrides:
      iterateConstraints in class RuleEngineDelegateDS
      Parameters:
      visitor - The visitor that should be used to add the constraints to.
    • iterateSources

      public void iterateSources(ISourceVisitor visitor)
      Description copied from interface: IRuleEngineDS
      The rule engine will invoke this method to allow the data layer to add to add sources for attributes to the rule engine.
      Specified by:
      iterateSources in interface IRuleEngineDS
      Overrides:
      iterateSources in class RuleEngineDelegateDS
      Parameters:
      visitor - The visitor that should be used to add the source to.