Class OGNLContextPropertyAccessor
- java.lang.Object
-
- org.thymeleaf.standard.expression.OGNLContextPropertyAccessor
-
- All Implemented Interfaces:
ognl.PropertyAccessor
public final class OGNLContextPropertyAccessor extends java.lang.Object implements ognl.PropertyAccessorImplementation of
PropertyAccessorthat allows OGNL to access the contents ofIContextimplementations 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:
PropertyAccessor
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGER(package private) static java.lang.StringREQUEST_PARAMETERS_RESTRICTED_VARIABLE_NAMEstatic java.lang.StringRESTRICT_REQUEST_PARAMETERS
-
Constructor Summary
Constructors Constructor Description OGNLContextPropertyAccessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetProperty(java.util.Map ognlContext, java.lang.Object target, java.lang.Object name)java.lang.StringgetSourceAccessor(ognl.OgnlContext context, java.lang.Object target, java.lang.Object index)java.lang.StringgetSourceSetter(ognl.OgnlContext context, java.lang.Object target, java.lang.Object index)voidsetProperty(java.util.Map context, java.lang.Object target, java.lang.Object name, java.lang.Object value)
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
RESTRICT_REQUEST_PARAMETERS
public static final java.lang.String RESTRICT_REQUEST_PARAMETERS
- See Also:
- Constant Field Values
-
REQUEST_PARAMETERS_RESTRICTED_VARIABLE_NAME
static final java.lang.String REQUEST_PARAMETERS_RESTRICTED_VARIABLE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProperty
public java.lang.Object getProperty(java.util.Map ognlContext, java.lang.Object target, java.lang.Object name) throws ognl.OgnlException- Specified by:
getPropertyin interfaceognl.PropertyAccessor- Throws:
ognl.OgnlException
-
setProperty
public void setProperty(java.util.Map context, java.lang.Object target, java.lang.Object name, java.lang.Object value) throws ognl.OgnlException- Specified by:
setPropertyin interfaceognl.PropertyAccessor- Throws:
ognl.OgnlException
-
getSourceAccessor
public java.lang.String getSourceAccessor(ognl.OgnlContext context, java.lang.Object target, java.lang.Object index)- Specified by:
getSourceAccessorin interfaceognl.PropertyAccessor
-
getSourceSetter
public java.lang.String getSourceSetter(ognl.OgnlContext context, java.lang.Object target, java.lang.Object index)- Specified by:
getSourceSetterin interfaceognl.PropertyAccessor
-
-