Class HttpServletRequestAccessor

java.lang.Object
org.chenile.stm.ognl.HttpServletRequestAccessor
All Implemented Interfaces:
ognl.PropertyAccessor

public class HttpServletRequestAccessor extends Object implements ognl.PropertyAccessor
Author:
raja Exposes various attributes of the HttpServletRequest. If it has direct request properties such as requestURI,pathTranslated etc. then they are returned directly. If the property ends with "Cookie" it is assumed that the property is expected in a cookie. So cookies are examined to obtain the property value. if the property name ends with Header it is assumed to be a header property and hence the property is queried as such. For all other properties first they are examined to see if they have been set as parameters. If not they would be assumed to be request attributes.
  • Constructor Details

    • HttpServletRequestAccessor

      public HttpServletRequestAccessor()
  • Method Details

    • getProperty

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

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

      protected Object getCookieProperty(HttpServletRequest request, String name)
    • getHeaderProperty

      protected Object getHeaderProperty(HttpServletRequest request, String name)
    • getSourceAccessor

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

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