Class FacesWebContext
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap
-
- org.apache.commons.chain.impl.ContextBase
-
- org.apache.commons.chain.web.WebContext
-
- org.apache.commons.chain.web.faces.FacesWebContext
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map
,Context
public class FacesWebContext extends WebContext
Concrete implementation of
WebContext
suitable for use in JavaServer Faces apps. The abstract methods are mapped to the appropriate collections of the underlyingFacesContext
instance that is passed to the constructor (or the initialize method).- Version:
- $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private javax.faces.context.FacesContext
context
TheFacesContext
instance for the request represented by thisWebContext
.
-
Constructor Summary
Constructors Constructor Description FacesWebContext()
Construct an uninitializedFacesWebContext
instance.FacesWebContext(javax.faces.context.FacesContext context)
Construct aFacesWebContext
instance that is initialized with the specified JavaServer Faces API objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map
getApplicationScope()
See theWebContext
's Javadoc.javax.faces.context.FacesContext
getContext()
Return theFacesContext
instance for the request associated with thisFacesWebContext
.java.util.Map
getCookies()
See theWebContext
's Javadoc.java.util.Map
getHeader()
See theWebContext
's Javadoc.java.util.Map
getHeaderValues()
See theWebContext
's Javadoc.java.util.Map
getInitParam()
See theWebContext
's Javadoc.java.util.Map
getParam()
See theWebContext
's Javadoc.java.util.Map
getParamValues()
See theWebContext
's Javadoc.java.util.Map
getRequestScope()
See theWebContext
's Javadoc.java.util.Map
getSessionScope()
See theWebContext
's Javadoc.void
initialize(javax.faces.context.FacesContext context)
Initialize (or reinitialize) thisFacesWebContext
instance for the specified JavaServer Faces API objects.void
release()
Release references to allocated resources acquired ininitialize()
of via subsequent processing.-
Methods inherited from class org.apache.commons.chain.impl.ContextBase
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll, size
-
-
-
-
Field Detail
-
context
private javax.faces.context.FacesContext context
The
FacesContext
instance for the request represented by thisWebContext
.
-
-
Constructor Detail
-
FacesWebContext
public FacesWebContext()
Construct an uninitialized
FacesWebContext
instance.
-
FacesWebContext
public FacesWebContext(javax.faces.context.FacesContext context)
Construct a
FacesWebContext
instance that is initialized with the specified JavaServer Faces API objects.- Parameters:
context
- TheFacesContext
for this request
-
-
Method Detail
-
getContext
public javax.faces.context.FacesContext getContext()
Return the
FacesContext
instance for the request associated with thisFacesWebContext
.- Returns:
- The
FacesContext
for this request
-
initialize
public void initialize(javax.faces.context.FacesContext context)
Initialize (or reinitialize) this
FacesWebContext
instance for the specified JavaServer Faces API objects.- Parameters:
context
- TheFacesContext
for this request
-
release
public void release()
Release references to allocated resources acquired in
initialize()
of via subsequent processing. After this method is called, subsequent calls to any other method thaninitialize()
will return undefined results.
-
getApplicationScope
public java.util.Map getApplicationScope()
See theWebContext
's Javadoc.- Specified by:
getApplicationScope
in classWebContext
- Returns:
- Application scope Map.
-
getHeader
public java.util.Map getHeader()
See theWebContext
's Javadoc.- Specified by:
getHeader
in classWebContext
- Returns:
- Header values Map.
-
getHeaderValues
public java.util.Map getHeaderValues()
See theWebContext
's Javadoc.- Specified by:
getHeaderValues
in classWebContext
- Returns:
- Header values Map.
-
getInitParam
public java.util.Map getInitParam()
See theWebContext
's Javadoc.- Specified by:
getInitParam
in classWebContext
- Returns:
- Initialization parameter Map.
-
getParam
public java.util.Map getParam()
See theWebContext
's Javadoc.- Specified by:
getParam
in classWebContext
- Returns:
- Request parameter Map.
-
getParamValues
public java.util.Map getParamValues()
See theWebContext
's Javadoc.- Specified by:
getParamValues
in classWebContext
- Returns:
- Request parameter Map.
-
getCookies
public java.util.Map getCookies()
See theWebContext
's Javadoc.- Specified by:
getCookies
in classWebContext
- Returns:
- Map of Cookies.
- Since:
- Chain 1.1
-
getRequestScope
public java.util.Map getRequestScope()
See theWebContext
's Javadoc.- Specified by:
getRequestScope
in classWebContext
- Returns:
- Request scope Map.
-
getSessionScope
public java.util.Map getSessionScope()
See theWebContext
's Javadoc.- Specified by:
getSessionScope
in classWebContext
- Returns:
- Session scope Map.
-
-