org.apache.commons.workflow.web
Class WebContext

java.lang.Object
  extended by org.apache.commons.workflow.base.BaseContext
      extended by org.apache.commons.workflow.web.WebContext
All Implemented Interfaces:
Context

public class WebContext
extends BaseContext

WebContext is a specialized Context implementation appropriate for web applications that run on top of a Servlet 2.2 (or later) container. It exposes the attributes associated with requests, sessions, and the servlet context as Scopes within the workflow management system.

Version:
$Revision: 155475 $ $Date: 2005-02-26 13:31:11 +0000 (Sat, 26 Feb 2005) $
Author:
Craig R. McClanahan

Field Summary
static int APPLICATION_SCOPE
          The scope identifier for the scope associated with the current servlet context.
static String APPLICATION_SCOPE_NAME
          The scope name for the scope associated with the current servlet context.
protected  javax.servlet.http.HttpSession httpSession
          The HttpSession that provides our associated "session" scope.
static int REQUEST_SCOPE
          The scope identifier for the scope associated with the current servlet request.
static String REQUEST_SCOPE_NAME
          The scope name for the scope associated with the current servlet request.
protected  javax.servlet.ServletContext servletContext
          The ServletContext that provides our associated "application" scope.
protected  javax.servlet.ServletRequest servletRequest
          The ServletRequest that provides our associated "request" scope.
protected  javax.servlet.ServletResponse servletResponse
          The ServletResponse we should pass on to any request dispatcher delegations.
static int SESSION_SCOPE
          The scope identifier for the scope associated with the current HTTP session.
static String SESSION_SCOPE_NAME
          The scope name for the scope associated with the current HTTP session.
 
Fields inherited from class org.apache.commons.workflow.base.BaseContext
activity, bean, calls, names, nextStep, scopes, stack, state, support, suspend
 
Fields inherited from interface org.apache.commons.workflow.Context
LOCAL_SCOPE, MAX_SCOPES
 
Constructor Summary
WebContext()
           
 
Method Summary
 javax.servlet.http.HttpSession getHttpSession()
           
 javax.servlet.ServletContext getServletContext()
           
 javax.servlet.ServletRequest getServletRequest()
           
 javax.servlet.ServletResponse getServletResponse()
           
 void setHttpSession(javax.servlet.http.HttpSession httpSession)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 void setServletRequest(javax.servlet.ServletRequest servletRequest)
           
 void setServletResponse(javax.servlet.ServletResponse servletResponse)
           
 
Methods inherited from class org.apache.commons.workflow.base.BaseContext
addContextListener, addScope, call, clear, clearBlockState, contains, contains, execute, get, get, getActivity, getCalls, getJXPathContext, getLocal, getNextStep, getScope, getScope, getScopeId, getSuspend, isEmpty, isEmptyBlockState, peek, peekBlockState, pop, popBlockState, push, pushBlockState, put, put, remove, remove, removeContextListener, setActivity, setNextStep, setSuspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_SCOPE

public static final int REQUEST_SCOPE
The scope identifier for the scope associated with the current servlet request.

See Also:
Constant Field Values

REQUEST_SCOPE_NAME

public static final String REQUEST_SCOPE_NAME
The scope name for the scope associated with the current servlet request.

See Also:
Constant Field Values

SESSION_SCOPE

public static final int SESSION_SCOPE
The scope identifier for the scope associated with the current HTTP session.

See Also:
Constant Field Values

SESSION_SCOPE_NAME

public static final String SESSION_SCOPE_NAME
The scope name for the scope associated with the current HTTP session.

See Also:
Constant Field Values

APPLICATION_SCOPE

public static final int APPLICATION_SCOPE
The scope identifier for the scope associated with the current servlet context.

See Also:
Constant Field Values

APPLICATION_SCOPE_NAME

public static final String APPLICATION_SCOPE_NAME
The scope name for the scope associated with the current servlet context.

See Also:
Constant Field Values

httpSession

protected javax.servlet.http.HttpSession httpSession
The HttpSession that provides our associated "session" scope.


servletContext

protected javax.servlet.ServletContext servletContext
The ServletContext that provides our associated "application" scope.


servletRequest

protected javax.servlet.ServletRequest servletRequest
The ServletRequest that provides our associated "request" scope.


servletResponse

protected javax.servlet.ServletResponse servletResponse
The ServletResponse we should pass on to any request dispatcher delegations.

Constructor Detail

WebContext

public WebContext()
Method Detail

getHttpSession

public javax.servlet.http.HttpSession getHttpSession()

setHttpSession

public void setHttpSession(javax.servlet.http.HttpSession httpSession)

getServletContext

public javax.servlet.ServletContext getServletContext()

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)

getServletRequest

public javax.servlet.ServletRequest getServletRequest()

setServletRequest

public void setServletRequest(javax.servlet.ServletRequest servletRequest)

getServletResponse

public javax.servlet.ServletResponse getServletResponse()

setServletResponse

public void setServletResponse(javax.servlet.ServletResponse servletResponse)


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