org.sakaiproject.component.kernel.tool
Class ActiveToolComponent.MyActiveTool.WrappedRequest

java.lang.Object
  extended byjavax.servlet.ServletRequestWrapper
      extended byjavax.servlet.http.HttpServletRequestWrapper
          extended byorg.sakaiproject.component.kernel.tool.ActiveToolComponent.MyActiveTool.WrappedRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest
Enclosing class:
ActiveToolComponent.MyActiveTool

public class ActiveToolComponent.MyActiveTool.WrappedRequest
extends HttpServletRequestWrapper

Wraps a request object so we can override some standard behavior.


Nested Class Summary
protected  class ActiveToolComponent.MyActiveTool.WrappedRequest.IteratorEnumeration
          Enumeration over an iterator
 
Field Summary
protected  Map m_attributes
          attributes to override the wrapped req's attributes.
protected  String m_context
          The context to report.
protected  String m_path
          The pathInfo to report.
protected  Placement m_priorPlacement
          The prior current placementl, to restore after we are done.
protected  Tool m_priorTool
          The prior current tool, to restore after we are done.
protected  ToolSession m_priorToolSession
          The prior current tool session, to restore after we are done.
protected  HttpServletRequest m_wrappedReq
          The request object we wrap.
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
ActiveToolComponent.MyActiveTool.WrappedRequest(HttpServletRequest req, String context, String path, Placement placement, boolean fragment, Tool tool)
           
 
Method Summary
 void cleanup()
           
 Object getAttribute(String name)
           
 Enumeration getAttributeNames()
           
 String getContextPath()
           
 String getPathInfo()
           
 String getServletPath()
           
 void removeAttribute(String name)
           
 void setAttribute(String name, Object value)
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding
 

Field Detail

m_context

protected String m_context
The context to report.


m_path

protected String m_path
The pathInfo to report.


m_attributes

protected Map m_attributes
attributes to override the wrapped req's attributes.


m_priorToolSession

protected ToolSession m_priorToolSession
The prior current tool session, to restore after we are done.


m_priorTool

protected Tool m_priorTool
The prior current tool, to restore after we are done.


m_priorPlacement

protected Placement m_priorPlacement
The prior current placementl, to restore after we are done.


m_wrappedReq

protected HttpServletRequest m_wrappedReq
The request object we wrap.

Constructor Detail

ActiveToolComponent.MyActiveTool.WrappedRequest

public ActiveToolComponent.MyActiveTool.WrappedRequest(HttpServletRequest req,
                                                       String context,
                                                       String path,
                                                       Placement placement,
                                                       boolean fragment,
                                                       Tool tool)
Method Detail

getPathInfo

public String getPathInfo()

getServletPath

public String getServletPath()

getContextPath

public String getContextPath()

getAttribute

public Object getAttribute(String name)

getAttributeNames

public Enumeration getAttributeNames()

setAttribute

public void setAttribute(String name,
                         Object value)

removeAttribute

public void removeAttribute(String name)

cleanup

public void cleanup()