Package org.chenile.stm.ognl
Class HttpServletRequestAccessor
java.lang.Object
org.chenile.stm.ognl.HttpServletRequestAccessor
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getCookieProperty
(HttpServletRequest request, String name) protected Object
getHeaderProperty
(HttpServletRequest request, String name) getProperty
(Map context, Object target, Object name) getSourceAccessor
(ognl.OgnlContext context, Object target, Object index) getSourceSetter
(ognl.OgnlContext context, Object target, Object index) void
setProperty
(Map context, Object target, Object name, Object value)
-
Constructor Details
-
HttpServletRequestAccessor
public HttpServletRequestAccessor()
-
-
Method Details
-
getProperty
- Specified by:
getProperty
in interfaceognl.PropertyAccessor
- Throws:
ognl.OgnlException
-
setProperty
public void setProperty(Map context, Object target, Object name, Object value) throws ognl.OgnlException - Specified by:
setProperty
in interfaceognl.PropertyAccessor
- Throws:
ognl.OgnlException
-
getCookieProperty
-
getHeaderProperty
-
getSourceAccessor
- Specified by:
getSourceAccessor
in interfaceognl.PropertyAccessor
-
getSourceSetter
- Specified by:
getSourceSetter
in interfaceognl.PropertyAccessor
-