Class StandardExpressionObjectFactory
- Object
-
- org.thymeleaf.standard.expression.StandardExpressionObjectFactory
-
- All Implemented Interfaces:
IExpressionObjectFactory
public class StandardExpressionObjectFactory extends Object implements IExpressionObjectFactory
Builds the expression objects to be used by Standard dialects.
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StandardExpressionObjectFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
buildObject(IExpressionContext context, String expressionObjectName)
Build the requested object.Set<String>
getAllExpressionObjectNames()
Return the complete list of expression objects that can be created by this factory.boolean
isCacheable(String expressionObjectName)
Returns whether a specific expression object can be cached and reused for all expressions in the same template execution or not.
-
-
-
Field Detail
-
CONTEXT_EXPRESSION_OBJECT_NAME
public static final String CONTEXT_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
ROOT_EXPRESSION_OBJECT_NAME
public static final String ROOT_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
VARIABLES_EXPRESSION_OBJECT_NAME
public static final String VARIABLES_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
SELECTION_TARGET_EXPRESSION_OBJECT_NAME
public static final String SELECTION_TARGET_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
LOCALE_EXPRESSION_OBJECT_NAME
public static final String LOCALE_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
REQUEST_EXPRESSION_OBJECT_NAME
public static final String REQUEST_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
RESPONSE_EXPRESSION_OBJECT_NAME
public static final String RESPONSE_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
SESSION_EXPRESSION_OBJECT_NAME
public static final String SESSION_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
SERVLET_CONTEXT_EXPRESSION_OBJECT_NAME
public static final String SERVLET_CONTEXT_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
CONVERSIONS_EXPRESSION_OBJECT_NAME
public static final String CONVERSIONS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
URIS_EXPRESSION_OBJECT_NAME
public static final String URIS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
CALENDARS_EXPRESSION_OBJECT_NAME
public static final String CALENDARS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
DATES_EXPRESSION_OBJECT_NAME
public static final String DATES_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
BOOLS_EXPRESSION_OBJECT_NAME
public static final String BOOLS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
NUMBERS_EXPRESSION_OBJECT_NAME
public static final String NUMBERS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
OBJECTS_EXPRESSION_OBJECT_NAME
public static final String OBJECTS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
STRINGS_EXPRESSION_OBJECT_NAME
public static final String STRINGS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
ARRAYS_EXPRESSION_OBJECT_NAME
public static final String ARRAYS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
LISTS_EXPRESSION_OBJECT_NAME
public static final String LISTS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
SETS_EXPRESSION_OBJECT_NAME
public static final String SETS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
MAPS_EXPRESSION_OBJECT_NAME
public static final String MAPS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
AGGREGATES_EXPRESSION_OBJECT_NAME
public static final String AGGREGATES_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
MESSAGES_EXPRESSION_OBJECT_NAME
public static final String MESSAGES_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
IDS_EXPRESSION_OBJECT_NAME
public static final String IDS_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
EXECUTION_INFO_OBJECT_NAME
public static final String EXECUTION_INFO_OBJECT_NAME
- See Also:
- Constant Field Values
-
HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME
public static final String HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
HTTP_SESSION_EXPRESSION_OBJECT_NAME
public static final String HTTP_SESSION_EXPRESSION_OBJECT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAllExpressionObjectNames
public Set<String> getAllExpressionObjectNames()
Description copied from interface:IExpressionObjectFactory
Return the complete list of expression objects that can be created by this factory.
This list will be used for determining if a factory might actually be asked to build an object, so it should contain all possible objects to be built by the factory.
- Specified by:
getAllExpressionObjectNames
in interfaceIExpressionObjectFactory
- Returns:
- the list of objects this factory can build.
-
isCacheable
public boolean isCacheable(String expressionObjectName)
Description copied from interface:IExpressionObjectFactory
Returns whether a specific expression object can be cached and reused for all expressions in the same template execution or not.
Note this cacheable flag refers only to reuse of the object in expressions in expressions executed during a single template execution.
- Specified by:
isCacheable
in interfaceIExpressionObjectFactory
- Parameters:
expressionObjectName
- the name of the expression object.- Returns:
true
is the object is to be considered cacheable,false
if not.
-
buildObject
public Object buildObject(IExpressionContext context, String expressionObjectName)
Description copied from interface:IExpressionObjectFactory
Build the requested object.
- Specified by:
buildObject
in interfaceIExpressionObjectFactory
- Parameters:
context
- the context being used for processing the template.expressionObjectName
- the name of the expression object to be built.- Returns:
- the built object, or
null
if the object could not be built.
-
-