Class WebContext
java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
org.apache.commons.chain.impl.ContextBase
org.apache.commons.chain.web.javax.WebContext
- Direct Known Subclasses:
FacesWebContext,PortletWebContext,ServletWebContext
Extended
Context that provides web based applications that use
it a "generic" view of HTTP related requests and responses, without
tying the application to a particular underlying Java API (such as
servlets). It is expected that a concrete subclass of WebContext
for each API (such as
org.apache.commons.chain.web.javax.servlet.ServletWebContext) will
support adapting that particular API's implementation of request and
response objects into this generic framework.
The characteristics of a web request/response are made visible via
a series of JavaBeans properties (and mapped to read-only attributes
of the same name, as supported by ContextBase.
- Version:
- $Revision$ $Date$
- Author:
- Craig R. McClanahan
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn a mutableMapthat maps application scope attribute names to their values.Return an immutableMapthat maps cookie names to the set of cookies specified in the request.Return an immutableMapthat maps header names to the first (or only) header value (as a String).Return an immutableMapthat maps header names to the set of all values specified in the request (as a String array).Return an immutableMapthat maps context application initialization parameters to their values.getParam()Return an immutableMapthat maps request parameter names to the first (or only) value (as a String).Return an immutableMapthat maps request parameter names to the set of all values (as a String array).Return a mutableMapthat maps request scope attribute names to their values.Return a mutableMapthat maps session scope attribute names to their values.Methods inherited from class org.apache.commons.chain.impl.ContextBase
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll, size
-
Constructor Details
-
WebContext
public WebContext()The Default-Constructor for this class.
-
-
Method Details
-
getApplicationScope
Return a mutableMapthat maps application scope attribute names to their values.- Returns:
- Application scope Map.
-
getHeader
Return an immutableMapthat maps header names to the first (or only) header value (as a String). Header names must be matched in a case-insensitive manner.- Returns:
- Header values Map.
-
getHeaderValues
Return an immutableMapthat maps header names to the set of all values specified in the request (as a String array). Header names must be matched in a case-insensitive manner.- Returns:
- Header values Map.
-
getInitParam
Return an immutableMapthat maps context application initialization parameters to their values.- Returns:
- Initialization parameter Map.
-
getParam
Return an immutableMapthat maps request parameter names to the first (or only) value (as a String).- Returns:
- Request parameter Map.
-
getParamValues
Return an immutableMapthat maps request parameter names to the set of all values (as a String array).- Returns:
- Request parameter Map.
-
getCookies
Return an immutableMapthat maps cookie names to the set of cookies specified in the request.- Returns:
- Map of Cookies.
- Since:
- Chain 1.1
-
getRequestScope
Return a mutableMapthat maps request scope attribute names to their values.- Returns:
- Request scope Map.
-
getSessionScope
Return a mutableMapthat maps session scope attribute names to their values.- Returns:
- Session scope Map.
-