Class StandardExpressionContext

java.lang.Object
com.broadleafcommerce.rulesengine.expression.context.StandardExpressionContext
All Implemented Interfaces:
ExpressionContext, Serializable
Direct Known Subclasses:
StandardSpelExpressionContext

public class StandardExpressionContext extends Object implements ExpressionContext
Standard implementation of ExpressionContext for use when evaluating expressions. Fields are immutable.
Author:
Nathan Moore (nathanmoore).
See Also:
  • Field Details

    • EMPTY_EXPRESSION_CONTEXT

      public static final ExpressionContext EMPTY_EXPRESSION_CONTEXT
  • Constructor Details

    • StandardExpressionContext

      public StandardExpressionContext(boolean matchAny, int limit, Map<String,Object> variables)
    • StandardExpressionContext

      public StandardExpressionContext()
  • Method Details

    • isMatchAnyRule

      public boolean isMatchAnyRule()
      Description copied from interface: ExpressionContext
      'Match any' is intended to be used to determine whether all of a group of rules must match against an object or just 1.
      Specified by:
      isMatchAnyRule in interface ExpressionContext
      Returns:
      whether all rules must match or any
    • getLimit

      public int getLimit()
      Description copied from interface: ExpressionContext
      'Limit' is intended to be used to limit the number of results to return when matching a group of rules against a group of objects.
      Specified by:
      getLimit in interface ExpressionContext
      Returns:
      number of matching results to return
    • getVariables

      public Map<String,Object> getVariables()
      Description copied from interface: ExpressionContext
      'Variables' is intended to be used to store named variables that are to be injected into an expression or group of expressions, replacing #variableName references.
      Specified by:
      getVariables in interface ExpressionContext
      Returns:
      variables to inject into an expression or group of expressions
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object