Class JexlHelper

java.lang.Object
net.simplace.core.jexl.JexlHelper

public class JexlHelper extends Object
Creates JexlRuleScripts with the shared SIMPLACE JEXL engine.
Author:
Andreas Enders
  • Field Details

    • JEXL_ENGINE

      public static final org.apache.commons.jexl3.JexlEngine JEXL_ENGINE
      the shared, thread safe JEXL engine with the SIMPLACE namespaces (see JexlBuilder)
  • Constructor Details

    • JexlHelper

      public JexlHelper()
  • Method Details

    • create

      public static final JexlRuleScript create(JexlRuleScript.COMPLEXITY aComplexity, String aRuleOrExpression)
      Creates a rule script with a given complexity.
      Parameters:
      aComplexity - how the rule is evaluated
      aRuleOrExpression - the rule text
      Returns:
      the created rule script, or null if the rule is empty
    • create

      public static final JexlRuleScript create(String aRuleOrExpression)
      Creates a rule script; the complexity is derived from the rule (see JexlRuleScript.analyseComplexity(String)).
      Parameters:
      aRuleOrExpression - the rule text
      Returns:
      the created rule script, or null if the rule is null or empty