Class OGNLContextPropertyAccessor
- Object
-
- org.thymeleaf.standard.expression.OGNLContextPropertyAccessor
-
- All Implemented Interfaces:
ognl.PropertyAccessor
public final class OGNLContextPropertyAccessor extends Object implements ognl.PropertyAccessor
Implementation 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
- Author:
- Michal Kreuzman, Daniel Fernández
- See Also:
PropertyAccessor
-
-
Field Summary
Fields Modifier and Type Field Description static StringRESTRICT_REQUEST_PARAMETERS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetProperty(Map ognlContext, Object target, Object name)StringgetSourceAccessor(ognl.OgnlContext context, Object target, Object index)StringgetSourceSetter(ognl.OgnlContext context, Object target, Object index)voidsetProperty(Map context, Object target, Object name, Object value)
-
-
-
Field Detail
-
RESTRICT_REQUEST_PARAMETERS
public static final String RESTRICT_REQUEST_PARAMETERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProperty
public Object getProperty(Map ognlContext, Object target, Object name) throws ognl.OgnlException
- 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
public String getSourceAccessor(ognl.OgnlContext context, Object target, Object index)
- Specified by:
getSourceAccessorin interfaceognl.PropertyAccessor
-
-