Interface RuleCompilerContext

  • All Known Implementing Classes:
    DefaultRuleCompilerContext

    public interface RuleCompilerContext
    This interface represents the context valid for the compilation of a rule. It is passed to, and potentially modified by, each phase of the compilation process.
    • Method Detail

      • getRuleVersion

        long getRuleVersion()
        Returns the rule version.
        Returns:
        engine rule version
      • setRuleVersion

        void setRuleVersion​(long version)
        Provides means of setting engine version of the rule.
        Parameters:
        version - - engine rule version
      • getModuleName

        java.lang.String getModuleName()
        Returns the rules module name.
        Returns:
        rules module name
      • getRuleParameters

        java.util.List<RuleParameterData> getRuleParameters()
        Returns the rule parameters.
        Returns:
        The rule parameters
      • getVariablesGenerator

        RuleIrVariablesGenerator getVariablesGenerator()
        Returns the variables generator valid for this compiler context.
        Returns:
        the variables generator
      • getAttributes

        java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Returns a mutable Map that can be used to store attributes associated with this RuleCompilerContext.
        Returns:
        the map containing the attributes
      • getFailureExceptions

        java.util.List<java.lang.Exception> getFailureExceptions()
        Returns all failure causing exceptions for this RuleCompilerContext.
      • getProblems

        java.util.List<RuleCompilerProblem> getProblems()
        Returns all problems arose during compilation process.
      • addProblem

        void addProblem​(RuleCompilerProblem problem)
        Adds a problem arose during compilation process to the list.
        Parameters:
        problem -
      • getConditionDefinitions

        java.util.Map<java.lang.String,​RuleConditionDefinitionData> getConditionDefinitions()
        Returns condition definitions for rule
      • getActionDefinitions

        java.util.Map<java.lang.String,​RuleActionDefinitionData> getActionDefinitions()
        Returns action definitions for rule
      • getRuleConditions

        java.util.List<RuleConditionData> getRuleConditions()
        Returns rule conditions for rule