Class ExpressionUtils

java.lang.Object
de.hybris.platform.util.ExpressionUtils

public final class ExpressionUtils extends Object
  • Method Details

    • evaluateToInteger

      public static Integer evaluateToInteger(String expression, Map<String,Object> variables)
    • evaluate

      public static Object evaluate(String expression, Map<String,Object> variables)
      Allows evaluating SpEL expression. SimpleEvaluationContext will be used as evaluation context which does not allow using full extent of SpEL language. If you need to have more control over expression evaluation, you can use evaluate(String, EvaluationContext) method and provide dedicated evaluation context.
      Parameters:
      expression - SpEL expression
      variables - variables that can be used in expression
    • evaluate

      public static Object evaluate(String expression, org.springframework.expression.EvaluationContext evaluationContext)
      Allows evaluating SpEL expression.
      Parameters:
      expression - SpEL expression
      evaluationContext - evaluation context. Make sure the evaluation context is not allowing code execution from untrusted source