Class OGNLContextPropertyAccessor

  • All Implemented Interfaces:
    ognl.PropertyAccessor

    public final class OGNLContextPropertyAccessor
    extends 
    implements 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
    Author:
    Michal Kreuzman, Daniel Fernández
    See Also:
    PropertyAccessor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
       ognlContext,  target,  name)  
      getSourceAccessor​(ognl.OgnlContext context,  target,  index)  
      getSourceSetter​(ognl.OgnlContext context,  target,  index)  
      void  context,  target,  name,  value)  
      • Methods inherited from class java.lang.

        , , , , , , , , , ,
    • Field Detail

      • RESTRICT_REQUEST_PARAMETERS

        public static final  RESTRICT_REQUEST_PARAMETERS
        See Also:
        Constant Field Values
    • Method Detail

      • getProperty

        public  getProperty​( ognlContext,
                                   target,
                                   name)
                           throws ognl.OgnlException
        Specified by:
        getProperty in interface ognl.PropertyAccessor
        Throws:
        ognl.OgnlException
      • setProperty

        public void setProperty​( context,
                                 target,
                                 name,
                                 value)
                         throws ognl.OgnlException
        Specified by:
        setProperty in interface ognl.PropertyAccessor
        Throws:
        ognl.OgnlException
      • getSourceAccessor

        public  getSourceAccessor​(ognl.OgnlContext context,
                                         target,
                                         index)
        Specified by:
        getSourceAccessor in interface ognl.PropertyAccessor
      • getSourceSetter

        public  getSourceSetter​(ognl.OgnlContext context,
                                       target,
                                       index)
        Specified by:
        getSourceSetter in interface ognl.PropertyAccessor