org.apache.cocoon.processing.impl
Class MockProcessInfoProvider.StubRequest

java.lang.Object
  extended byorg.apache.cocoon.processing.impl.MockProcessInfoProvider.StubRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest
Enclosing class:
MockProcessInfoProvider

public static class MockProcessInfoProvider.StubRequest
extends Object
implements HttpServletRequest

This is a stub implementation of HttpServletRequest.

See Also:
http://thread.gmane.org/gmane.text.xml.cocoon.devel/74276

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
MockProcessInfoProvider.StubRequest(org.apache.cocoon.environment.Request request)
           
 
Method Summary
 Object get(String name)
           
 Object getAttribute(String name)
           
 Enumeration getAttributeNames()
           
 Map getAttributes()
           
 String getAuthType()
           
 String getCharacterEncoding()
           
 int getContentLength()
           
 String getContentType()
           
 String getContextPath()
           
 Map getCookieMap()
           
 Cookie[] getCookies()
           
 long getDateHeader(String name)
           
 String getHeader(String name)
           
 Enumeration getHeaderNames()
           
 Map getHeaders()
           
 Enumeration getHeaders(String name)
           
 ServletInputStream getInputStream()
           
 int getIntHeader(String name)
           
 String getLocalAddr()
           
 Object getLocalAttribute(String name)
           
 Enumeration getLocalAttributeNames()
           
 Locale getLocale()
           
 Enumeration getLocales()
           
 String getLocalName()
           
 int getLocalPort()
           
 String getMethod()
           
 String getParameter(String name)
           
 Map getParameterMap()
           
 Enumeration getParameterNames()
           
 Map getParameters()
           
 String[] getParameterValues(String name)
           
 String getPathInfo()
           
 String getPathTranslated()
           
 String getProtocol()
           
 String getQueryString()
           
 BufferedReader getReader()
           
 String getRealPath(String path)
           
 String getRemoteAddr()
           
 String getRemoteHost()
           
 int getRemotePort()
           
 String getRemoteUser()
           
 RequestDispatcher getRequestDispatcher(String path)
           
 String getRequestedSessionId()
           
 String getRequestURI()
           
 StringBuffer getRequestURL()
           
 String getScheme()
           
 String getServerName()
           
 int getServerPort()
           
 String getServletPath()
           
 HttpSession getSession()
           
 HttpSession getSession(boolean create)
           
 String getSitemapPath()
           
 String getSitemapURI()
           
 String getSitemapURIPrefix()
           
 Principal getUserPrincipal()
           
 boolean isRequestedSessionIdFromCookie()
           
 boolean isRequestedSessionIdFromUrl()
           
 boolean isRequestedSessionIdFromURL()
           
 boolean isRequestedSessionIdValid()
           
 boolean isSecure()
           
 boolean isUserInRole(String role)
           
 void removeAttribute(String name)
           
 void removeLocalAttribute(String name)
           
 Object searchAttribute(String name)
           
 void setAttribute(String name, Object o)
           
 void setCharacterEncoding(String enc)
           
 void setLocalAttribute(String name, Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockProcessInfoProvider.StubRequest

public MockProcessInfoProvider.StubRequest(org.apache.cocoon.environment.Request request)
Method Detail

get

public Object get(String name)

getLocalAttribute

public Object getLocalAttribute(String name)

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface ServletRequest

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface ServletRequest

getLocalAttributeNames

public Enumeration getLocalAttributeNames()

getAttributes

public Map getAttributes()

getAuthType

public String getAuthType()
Specified by:
getAuthType in interface HttpServletRequest

getCharacterEncoding

public String getCharacterEncoding()
Specified by:
getCharacterEncoding in interface ServletRequest

getContentLength

public int getContentLength()
Specified by:
getContentLength in interface ServletRequest

getContentType

public String getContentType()
Specified by:
getContentType in interface ServletRequest

getContextPath

public String getContextPath()
Specified by:
getContextPath in interface HttpServletRequest

getCookieMap

public Map getCookieMap()

getCookies

public Cookie[] getCookies()
Specified by:
getCookies in interface HttpServletRequest

getDateHeader

public long getDateHeader(String name)
Specified by:
getDateHeader in interface HttpServletRequest

getHeader

public String getHeader(String name)
Specified by:
getHeader in interface HttpServletRequest

getHeaderNames

public Enumeration getHeaderNames()
Specified by:
getHeaderNames in interface HttpServletRequest

getHeaders

public Map getHeaders()

getHeaders

public Enumeration getHeaders(String name)
Specified by:
getHeaders in interface HttpServletRequest

getInputStream

public ServletInputStream getInputStream()
                                  throws IOException,
                                         UnsupportedOperationException
Specified by:
getInputStream in interface ServletRequest
Throws:
IOException
UnsupportedOperationException

getLocale

public Locale getLocale()
Specified by:
getLocale in interface ServletRequest

getLocales

public Enumeration getLocales()
Specified by:
getLocales in interface ServletRequest

getMethod

public String getMethod()
Specified by:
getMethod in interface HttpServletRequest

getParameter

public String getParameter(String name)
Specified by:
getParameter in interface ServletRequest

getParameterNames

public Enumeration getParameterNames()
Specified by:
getParameterNames in interface ServletRequest

getParameters

public Map getParameters()

getParameterValues

public String[] getParameterValues(String name)
Specified by:
getParameterValues in interface ServletRequest

getPathInfo

public String getPathInfo()
Specified by:
getPathInfo in interface HttpServletRequest

getPathTranslated

public String getPathTranslated()
Specified by:
getPathTranslated in interface HttpServletRequest

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface ServletRequest

getQueryString

public String getQueryString()
Specified by:
getQueryString in interface HttpServletRequest

getRemoteAddr

public String getRemoteAddr()
Specified by:
getRemoteAddr in interface ServletRequest

getRemoteHost

public String getRemoteHost()
Specified by:
getRemoteHost in interface ServletRequest

getRemoteUser

public String getRemoteUser()
Specified by:
getRemoteUser in interface HttpServletRequest

getRequestedSessionId

public String getRequestedSessionId()
Specified by:
getRequestedSessionId in interface HttpServletRequest

getRequestURI

public String getRequestURI()
Specified by:
getRequestURI in interface HttpServletRequest

getScheme

public String getScheme()
Specified by:
getScheme in interface ServletRequest

getServerName

public String getServerName()
Specified by:
getServerName in interface ServletRequest

getServerPort

public int getServerPort()
Specified by:
getServerPort in interface ServletRequest

getServletPath

public String getServletPath()
Specified by:
getServletPath in interface HttpServletRequest

getSession

public HttpSession getSession()
Specified by:
getSession in interface HttpServletRequest

getSession

public HttpSession getSession(boolean create)
Specified by:
getSession in interface HttpServletRequest

getSitemapPath

public String getSitemapPath()

getSitemapURI

public String getSitemapURI()

getSitemapURIPrefix

public String getSitemapURIPrefix()

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface HttpServletRequest

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Specified by:
isRequestedSessionIdFromCookie in interface HttpServletRequest

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Specified by:
isRequestedSessionIdFromURL in interface HttpServletRequest

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Specified by:
isRequestedSessionIdValid in interface HttpServletRequest

isSecure

public boolean isSecure()
Specified by:
isSecure in interface ServletRequest

isUserInRole

public boolean isUserInRole(String role)
Specified by:
isUserInRole in interface HttpServletRequest

removeLocalAttribute

public void removeLocalAttribute(String name)

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface ServletRequest

searchAttribute

public Object searchAttribute(String name)

setLocalAttribute

public void setLocalAttribute(String name,
                              Object o)

setAttribute

public void setAttribute(String name,
                         Object o)
Specified by:
setAttribute in interface ServletRequest

setCharacterEncoding

public void setCharacterEncoding(String enc)
                          throws UnsupportedEncodingException
Specified by:
setCharacterEncoding in interface ServletRequest
Throws:
UnsupportedEncodingException

getIntHeader

public int getIntHeader(String name)
Specified by:
getIntHeader in interface HttpServletRequest

getRequestURL

public StringBuffer getRequestURL()
Specified by:
getRequestURL in interface HttpServletRequest

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Specified by:
isRequestedSessionIdFromUrl in interface HttpServletRequest

getLocalAddr

public String getLocalAddr()
Specified by:
getLocalAddr in interface ServletRequest

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface ServletRequest

getLocalPort

public int getLocalPort()
Specified by:
getLocalPort in interface ServletRequest

getParameterMap

public Map getParameterMap()
Specified by:
getParameterMap in interface ServletRequest

getReader

public BufferedReader getReader()
                         throws IOException
Specified by:
getReader in interface ServletRequest
Throws:
IOException

getRealPath

public String getRealPath(String path)
Specified by:
getRealPath in interface ServletRequest

getRemotePort

public int getRemotePort()
Specified by:
getRemotePort in interface ServletRequest

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(String path)
Specified by:
getRequestDispatcher in interface ServletRequest


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.