org.apache.commons.chain.web.faces
Class FacesWebContext

java.lang.Object
  extended by java.util.AbstractMap
      extended by java.util.HashMap
          extended by org.apache.commons.chain.impl.ContextBase
              extended by org.apache.commons.chain.web.WebContext
                  extended by org.apache.commons.chain.web.faces.FacesWebContext
All Implemented Interfaces:
Serializable, Cloneable, 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 underlying FacesContext 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) $
Author:
Craig R. McClanahan
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry
 
Constructor Summary
FacesWebContext()
          Construct an uninitialized FacesWebContext instance.
FacesWebContext(javax.faces.context.FacesContext context)
          Construct a FacesWebContext instance that is initialized with the specified JavaServer Faces API objects.
 
Method Summary
 Map getApplicationScope()
          See the WebContext's Javadoc.
 javax.faces.context.FacesContext getContext()
          Return the FacesContext instance for the request associated with this FacesWebContext.
 Map getCookies()
          See the WebContext's Javadoc.
 Map getHeader()
          See the WebContext's Javadoc.
 Map getHeaderValues()
          See the WebContext's Javadoc.
 Map getInitParam()
          See the WebContext's Javadoc.
 Map getParam()
          See the WebContext's Javadoc.
 Map getParamValues()
          See the WebContext's Javadoc.
 Map getRequestScope()
          See the WebContext's Javadoc.
 Map getSessionScope()
          See the WebContext's Javadoc.
 void initialize(javax.faces.context.FacesContext context)
          Initialize (or reinitialize) this FacesWebContext instance for the specified JavaServer Faces API objects.
 void release()
          Release references to allocated resources acquired in initialize() 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, containsKey, size
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, equals, hashCode, size
 

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 - The FacesContext for this request
Method Detail

getContext

public javax.faces.context.FacesContext getContext()

Return the FacesContext instance for the request associated with this FacesWebContext.

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 - The FacesContext 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 than initialize() will return undefined results.


getApplicationScope

public Map getApplicationScope()
See the WebContext's Javadoc.

Specified by:
getApplicationScope in class WebContext
Returns:
Application scope Map.

getHeader

public Map getHeader()
See the WebContext's Javadoc.

Specified by:
getHeader in class WebContext
Returns:
Header values Map.

getHeaderValues

public Map getHeaderValues()
See the WebContext's Javadoc.

Specified by:
getHeaderValues in class WebContext
Returns:
Header values Map.

getInitParam

public Map getInitParam()
See the WebContext's Javadoc.

Specified by:
getInitParam in class WebContext
Returns:
Initialization parameter Map.

getParam

public Map getParam()
See the WebContext's Javadoc.

Specified by:
getParam in class WebContext
Returns:
Request parameter Map.

getParamValues

public Map getParamValues()
See the WebContext's Javadoc.

Specified by:
getParamValues in class WebContext
Returns:
Request parameter Map.

getCookies

public Map getCookies()
See the WebContext's Javadoc.

Specified by:
getCookies in class WebContext
Returns:
Map of Cookies.
Since:
Chain 1.1

getRequestScope

public Map getRequestScope()
See the WebContext's Javadoc.

Specified by:
getRequestScope in class WebContext
Returns:
Request scope Map.

getSessionScope

public Map getSessionScope()
See the WebContext's Javadoc.

Specified by:
getSessionScope in class WebContext
Returns:
Session scope Map.


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.