Class OGNLContextPropertyAccessor
java.lang.Object
org.thymeleaf.standard.expression.OGNLContextPropertyAccessor
- All Implemented Interfaces:
ognl.PropertyAccessor
Implementation of PropertyAccessor that allows OGNL to access the contents of IContext
implementations as if they were a Map.
Note this accessor also has to take care of variable access restrictions (like e.g. forbidding access to the request parameters in unescaped text or in preprocessing expressions).
Note a class with this name existed since 2.0, but it was completely reimplemented in Thymeleaf 3.0
- Since:
- 3.0.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(Map ognlContext, Object target, Object name) getSourceAccessor(ognl.OgnlContext context, Object target, Object index) getSourceSetter(ognl.OgnlContext context, Object target, Object index) voidsetProperty(Map context, Object target, Object name, Object value)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
RESTRICT_REQUEST_PARAMETERS
- See Also:
-
REQUEST_PARAMETERS_RESTRICTED_VARIABLE_NAME
- See Also:
-
-
Constructor Details
-
OGNLContextPropertyAccessor
OGNLContextPropertyAccessor()
-
-
Method Details
-
getProperty
- Specified by:
getPropertyin interfaceognl.PropertyAccessor- Throws:
ognl.OgnlException
-
setProperty
public void setProperty(Map context, Object target, Object name, Object value) throws ognl.OgnlException - Specified by:
setPropertyin interfaceognl.PropertyAccessor- Throws:
ognl.OgnlException
-
getSourceAccessor
- Specified by:
getSourceAccessorin interfaceognl.PropertyAccessor
-
getSourceSetter
- Specified by:
getSourceSetterin interfaceognl.PropertyAccessor
-