org.thymeleaf.standard.expression
Class OgnlVariableExpressionEvaluator

Object
  extended by org.thymeleaf.standard.expression.OgnlVariableExpressionEvaluator
All Implemented Interfaces:
IStandardVariableExpressionEvaluator

public class OgnlVariableExpressionEvaluator
extends Object
implements IStandardVariableExpressionEvaluator

Since:
2.0.9
Author:
Daniel Fernández

Field Summary
static OgnlVariableExpressionEvaluator INSTANCE
           
 
Constructor Summary
protected OgnlVariableExpressionEvaluator()
           
 
Method Summary
protected  Map<String,Object> computeAdditionalContextVariables(IProcessingContext processingContext)
           
 Object evaluate(Configuration configuration, IProcessingContext processingContext, String expression, StandardExpressionExecutionContext expContext, boolean useSelectionAsRoot)
           Evaluate the variable expression.
protected  void setVariableRestrictions(StandardExpressionExecutionContext expContext, Object evaluationRoot, Map<String,Object> contextVariables)
           
protected  boolean shouldApplyOgnlBooleanFix()
           Determines whether a fix should be applied to OGNL in order to evaluate Strings as booleans in the same way as Thymeleaf does ('false', 'off' and 'no' are actually "false" instead of OGNL's default "true").
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final OgnlVariableExpressionEvaluator INSTANCE
Constructor Detail

OgnlVariableExpressionEvaluator

protected OgnlVariableExpressionEvaluator()
Method Detail

evaluate

public final Object evaluate(Configuration configuration,
                             IProcessingContext processingContext,
                             String expression,
                             StandardExpressionExecutionContext expContext,
                             boolean useSelectionAsRoot)
Description copied from interface: IStandardVariableExpressionEvaluator

Evaluate the variable expression.

Specified by:
evaluate in interface IStandardVariableExpressionEvaluator
Parameters:
configuration - the Configuration object for the template execution environment.
processingContext - the processing context object containing the variables to be applied to the expression.
expression - the expression to be evaluated (as a String).
expContext - the expression execution context to be applied (preprocessing, etc.)
useSelectionAsRoot - specify whether this is a variable expression (${...}, false) or a selection variable expression (*{...}, true).
Returns:
the result of evaluating the expression.

computeAdditionalContextVariables

protected Map<String,Object> computeAdditionalContextVariables(IProcessingContext processingContext)

setVariableRestrictions

protected void setVariableRestrictions(StandardExpressionExecutionContext expContext,
                                       Object evaluationRoot,
                                       Map<String,Object> contextVariables)

toString

public String toString()
Overrides:
toString in class Object

shouldApplyOgnlBooleanFix

protected boolean shouldApplyOgnlBooleanFix()

Determines whether a fix should be applied to OGNL in order to evaluate Strings as booleans in the same way as Thymeleaf does ('false', 'off' and 'no' are actually "false" instead of OGNL's default "true").

Returns:
whether the OGNL boolean fix should be applied or not.


Copyright © 2013 The THYMELEAF team. All Rights Reserved.