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
WebContextsuitable for use in JavaServer Faces apps. The abstract methods are mapped to the appropriate collections of the underlyingFacesContextinstance 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.FacesContextcontextTheFacesContextinstance for the request represented by thisWebContext.
-
Constructor Summary
Constructors Constructor Description FacesWebContext()Construct an uninitializedFacesWebContextinstance.FacesWebContext(javax.faces.context.FacesContext context)Construct aFacesWebContextinstance 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.MapgetApplicationScope()See theWebContext's Javadoc.javax.faces.context.FacesContextgetContext()Return theFacesContextinstance for the request associated with thisFacesWebContext.java.util.MapgetCookies()See theWebContext's Javadoc.java.util.MapgetHeader()See theWebContext's Javadoc.java.util.MapgetHeaderValues()See theWebContext's Javadoc.java.util.MapgetInitParam()See theWebContext's Javadoc.java.util.MapgetParam()See theWebContext's Javadoc.java.util.MapgetParamValues()See theWebContext's Javadoc.java.util.MapgetRequestScope()See theWebContext's Javadoc.java.util.MapgetSessionScope()See theWebContext's Javadoc.voidinitialize(javax.faces.context.FacesContext context)Initialize (or reinitialize) thisFacesWebContextinstance for the specified JavaServer Faces API objects.voidrelease()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
FacesContextinstance for the request represented by thisWebContext.
-
-
Constructor Detail
-
FacesWebContext
public FacesWebContext()
Construct an uninitialized
FacesWebContextinstance.
-
FacesWebContext
public FacesWebContext(javax.faces.context.FacesContext context)
Construct a
FacesWebContextinstance that is initialized with the specified JavaServer Faces API objects.- Parameters:
context- TheFacesContextfor this request
-
-
Method Detail
-
getContext
public javax.faces.context.FacesContext getContext()
Return the
FacesContextinstance for the request associated with thisFacesWebContext.- Returns:
- The
FacesContextfor this request
-
initialize
public void initialize(javax.faces.context.FacesContext context)
Initialize (or reinitialize) this
FacesWebContextinstance for the specified JavaServer Faces API objects.- Parameters:
context- TheFacesContextfor 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:
getApplicationScopein classWebContext- Returns:
- Application scope Map.
-
getHeader
public java.util.Map getHeader()
See theWebContext's Javadoc.- Specified by:
getHeaderin classWebContext- Returns:
- Header values Map.
-
getHeaderValues
public java.util.Map getHeaderValues()
See theWebContext's Javadoc.- Specified by:
getHeaderValuesin classWebContext- Returns:
- Header values Map.
-
getInitParam
public java.util.Map getInitParam()
See theWebContext's Javadoc.- Specified by:
getInitParamin classWebContext- Returns:
- Initialization parameter Map.
-
getParam
public java.util.Map getParam()
See theWebContext's Javadoc.- Specified by:
getParamin classWebContext- Returns:
- Request parameter Map.
-
getParamValues
public java.util.Map getParamValues()
See theWebContext's Javadoc.- Specified by:
getParamValuesin classWebContext- Returns:
- Request parameter Map.
-
getCookies
public java.util.Map getCookies()
See theWebContext's Javadoc.- Specified by:
getCookiesin classWebContext- Returns:
- Map of Cookies.
- Since:
- Chain 1.1
-
getRequestScope
public java.util.Map getRequestScope()
See theWebContext's Javadoc.- Specified by:
getRequestScopein classWebContext- Returns:
- Request scope Map.
-
getSessionScope
public java.util.Map getSessionScope()
See theWebContext's Javadoc.- Specified by:
getSessionScopein classWebContext- Returns:
- Session scope Map.
-
-