org.apache.shale.application.faces
Class ShaleWebContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      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.servlet.ServletWebContext
                      extended by org.apache.shale.application.faces.ShaleWebContext
All Implemented Interfaces:
Serializable, Cloneable, Map, Context

public class ShaleWebContext
extends ServletWebContext

Commons Chain Context implementation for Shale.

$Id: ShaleWebContext.java 465067 2006-10-17 21:45:17Z rahul $

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.apache.commons.chain.web.servlet.ServletWebContext
context, request, response
 
Constructor Summary
ShaleWebContext(ServletContext context, HttpServletRequest request, HttpServletResponse response)
          Construct a new context instance with the specified parameters.
 
Method Summary
 javax.faces.context.FacesContext getFacesContext()
          Return the FacesContext for the current request, if any; otherwise, return null.
 void setFacesContext(javax.faces.context.FacesContext facesContext)
          Set the FacesContext for the current request.
 void setRequest(HttpServletRequest request)
          Set the HttpServletRequest that will be passed on to the remainder of the filter chain.
 void setResponse(HttpServletResponse response)
          Set the HttpServletResponse that will be passed on to the remainder of the filter chain.
 
Methods inherited from class org.apache.commons.chain.web.servlet.ServletWebContext
getApplicationScope, getContext, getCookies, getHeader, getHeaderValues, getInitParam, getParam, getParamValues, getRequest, getRequestScope, getResponse, getSessionScope, initialize, release
 
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

ShaleWebContext

public ShaleWebContext(ServletContext context,
                       HttpServletRequest request,
                       HttpServletResponse response)

Construct a new context instance with the specified parameters.

Parameters:
context - ServletContext for this application
request - HttpServetRewquest for this request
response - HttpServletResponse for this request
Method Detail

getFacesContext

public javax.faces.context.FacesContext getFacesContext()

Return the FacesContext for the current request, if any; otherwise, return null.


setFacesContext

public void setFacesContext(javax.faces.context.FacesContext facesContext)

Set the FacesContext for the current request. This method should only be called by the framework, once it is determined that this is actually a JSF request.

Parameters:
facesContext - The FacesContext for this request

setRequest

public void setRequest(HttpServletRequest request)

Set the HttpServletRequest that will be passed on to the remainder of the filter chain. If this is different from the request originally used to create this context, it must be an implementation of HttpServletRequestWrapper that wraps the original request.

NOTE - Setting ths property is only useful if it occurs in the preprocessing portion of the chain, before the filter chain has been invoked.

Parameters:
request - The request or request wrapper to pass on

setResponse

public void setResponse(HttpServletResponse response)

Set the HttpServletResponse that will be passed on to the remainder of the filter chain. If this is different from the response originally used to create this context, it must be an implementation of HttpServletResponseWrapper that wraps the original request.

NOTE - Setting ths property is only useful if it occurs in the preprocessing portion of the chain, before the filter chain has been invoked.

Parameters:
response - The response or response wrapper to pass on


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.