org.exist.cocoon
Class CocoonRequestWrapper

java.lang.Object
  extended by org.exist.cocoon.CocoonRequestWrapper
All Implemented Interfaces:
RequestWrapper

public class CocoonRequestWrapper
extends Object
implements RequestWrapper

A wrapper for requests processed by Cocoon.

Author:
Wolfgang Meier , Pierrick Brihaye

Constructor Summary
CocoonRequestWrapper(org.apache.cocoon.environment.Request cocoonRequest)
          Constructs a wrapper for the given Cocoon request.
CocoonRequestWrapper(org.apache.cocoon.environment.Request cocoonRequest, HttpServletRequest servletRequest)
          Constructs a wrapper for the given Cocoon request.
 
Method Summary
 Object get(String arg0)
           
 Object getAttribute(String name)
           
 String getCharacterEncoding()
           
 int getContentLength()
           
 String getContentType()
           
 String getContextPath()
           
 Map getCookieMap()
           
 Cookie[] getCookies()
           
 File getFileUploadParam(String parameter)
           
 String getHeader(String arg0)
           
 Enumeration getHeaderNames()
           
 Enumeration getHeaders(String arg0)
           
 InputStream getInputStream()
           
 String getMethod()
           
 String getParameter(String arg0)
           
 Enumeration getParameterNames()
           
 String[] getParameterValues(String arg0)
           
 String getPathInfo()
           
 String getPathTranslated()
           
 String getProtocol()
           
 String getQueryString()
           
 String getRemoteAddr()
           
 String getRemoteHost()
           
 String getRemoteUser()
           
 String getRequestedSessionId()
           
 String getRequestURI()
           
 StringBuffer getRequestURL()
           
 String getScheme()
           
 String getServerName()
           
 int getServerPort()
           
 String getServletPath()
           
 SessionWrapper getSession()
           
 SessionWrapper getSession(boolean arg0)
           
 String getSitemapURI()
           
 String getUploadedFileName(String parameter)
           
 Principal getUserPrincipal()
           
 boolean isRequestedSessionIdFromCookie()
           
 boolean isRequestedSessionIdFromURL()
           
 boolean isRequestedSessionIdValid()
           
 boolean isSecure()
           
 boolean isUserInRole(String arg0)
           
 void removeAttribute(String arg0)
           
 void setAttribute(String arg0, Object arg1)
           
 void setCharacterEncoding(String arg0)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CocoonRequestWrapper

public CocoonRequestWrapper(org.apache.cocoon.environment.Request cocoonRequest)
Constructs a wrapper for the given Cocoon request.

Parameters:
cocoonRequest - The request as viewed by Cocoon.

CocoonRequestWrapper

public CocoonRequestWrapper(org.apache.cocoon.environment.Request cocoonRequest,
                            HttpServletRequest servletRequest)
Constructs a wrapper for the given Cocoon request.

Parameters:
cocoonRequest - The request as viewed by Cocoon.
servletRequest - The request as viewed by Cocoon's servlet
Method Detail

getAttribute

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

getCookies

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

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface RequestWrapper
Throws:
IOException
See Also:
ServletRequest.getInputStream()

get

public Object get(String arg0)
See Also:
Request.get(String)

getCharacterEncoding

public String getCharacterEncoding()
Specified by:
getCharacterEncoding in interface RequestWrapper
See Also:
Request.getCharacterEncoding()

getContentLength

public int getContentLength()
Specified by:
getContentLength in interface RequestWrapper
See Also:
Request.getContentLength()

getContentType

public String getContentType()
Specified by:
getContentType in interface RequestWrapper
See Also:
Request.getContentType()

getContextPath

public String getContextPath()
Specified by:
getContextPath in interface RequestWrapper
See Also:
Request.getContextPath()

getCookieMap

public Map getCookieMap()
See Also:
Request.getCookieMap()

getHeader

public String getHeader(String arg0)
Specified by:
getHeader in interface RequestWrapper
See Also:
Request.getHeader(String)

getHeaderNames

public Enumeration getHeaderNames()
Specified by:
getHeaderNames in interface RequestWrapper
See Also:
Request.getHeaderNames()

getHeaders

public Enumeration getHeaders(String arg0)
Specified by:
getHeaders in interface RequestWrapper
See Also:
Request.getHeaders(String)

getMethod

public String getMethod()
Specified by:
getMethod in interface RequestWrapper
See Also:
Request.getMethod()

getParameter

public String getParameter(String arg0)
Specified by:
getParameter in interface RequestWrapper
See Also:
Request.getParameter(String)

getParameterNames

public Enumeration getParameterNames()
Specified by:
getParameterNames in interface RequestWrapper
See Also:
Request.getParameterNames()

getParameterValues

public String[] getParameterValues(String arg0)
Specified by:
getParameterValues in interface RequestWrapper
See Also:
Request.getParameterValues(String)

getPathInfo

public String getPathInfo()
Specified by:
getPathInfo in interface RequestWrapper
See Also:
Request.getPathInfo()

getPathTranslated

public String getPathTranslated()
Specified by:
getPathTranslated in interface RequestWrapper
See Also:
Request.getPathTranslated()

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface RequestWrapper
See Also:
Request.getProtocol()

getQueryString

public String getQueryString()
Specified by:
getQueryString in interface RequestWrapper
See Also:
Request.getQueryString()

getRemoteAddr

public String getRemoteAddr()
Specified by:
getRemoteAddr in interface RequestWrapper
See Also:
Request.getRemoteAddr()

getRemoteHost

public String getRemoteHost()
Specified by:
getRemoteHost in interface RequestWrapper
See Also:
Request.getRemoteHost()

getRemoteUser

public String getRemoteUser()
Specified by:
getRemoteUser in interface RequestWrapper
See Also:
Request.getRemoteUser()

getRequestedSessionId

public String getRequestedSessionId()
Specified by:
getRequestedSessionId in interface RequestWrapper
See Also:
Request.getRequestedSessionId()

getRequestURI

public String getRequestURI()
Specified by:
getRequestURI in interface RequestWrapper
See Also:
Request.getRequestURI()

getRequestURL

public StringBuffer getRequestURL()
Specified by:
getRequestURL in interface RequestWrapper
See Also:
HttpServletRequest.getRequestURL()

getScheme

public String getScheme()
Specified by:
getScheme in interface RequestWrapper
See Also:
Request.getScheme()

getServerName

public String getServerName()
Specified by:
getServerName in interface RequestWrapper
See Also:
Request.getServerName()

getServerPort

public int getServerPort()
Specified by:
getServerPort in interface RequestWrapper
See Also:
Request.getServerPort()

getServletPath

public String getServletPath()
Specified by:
getServletPath in interface RequestWrapper
See Also:
Request.getServletPath()()

getSession

public SessionWrapper getSession()
Specified by:
getSession in interface RequestWrapper
See Also:
Request.getSession()

getSession

public SessionWrapper getSession(boolean arg0)
Specified by:
getSession in interface RequestWrapper
See Also:
Request.getSession(boolean)

getSitemapURI

public String getSitemapURI()
See Also:
Request.getSitemapURI()

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface RequestWrapper
See Also:
Request.getUserPrincipal()

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Specified by:
isRequestedSessionIdFromCookie in interface RequestWrapper
See Also:
Request.isRequestedSessionIdFromCookie()

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Specified by:
isRequestedSessionIdFromURL in interface RequestWrapper
See Also:
Request.isRequestedSessionIdFromURL()

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Specified by:
isRequestedSessionIdValid in interface RequestWrapper
See Also:
Request.isRequestedSessionIdValid()

isSecure

public boolean isSecure()
Specified by:
isSecure in interface RequestWrapper
See Also:
Request.isSecure()

isUserInRole

public boolean isUserInRole(String arg0)
Specified by:
isUserInRole in interface RequestWrapper
See Also:
Request.isUserInRole(String)

removeAttribute

public void removeAttribute(String arg0)
Specified by:
removeAttribute in interface RequestWrapper
See Also:
Request.removeAttribute(String)

setAttribute

public void setAttribute(String arg0,
                         Object arg1)
Specified by:
setAttribute in interface RequestWrapper
See Also:
Request.setAttribute(String, Object)

setCharacterEncoding

public void setCharacterEncoding(String arg0)
                          throws UnsupportedEncodingException
Specified by:
setCharacterEncoding in interface RequestWrapper
Throws:
UnsupportedEncodingException
See Also:
Request.setCharacterEncoding(String)

getFileUploadParam

public File getFileUploadParam(String parameter)
Specified by:
getFileUploadParam in interface RequestWrapper

getUploadedFileName

public String getUploadedFileName(String parameter)
Specified by:
getUploadedFileName in interface RequestWrapper


Copyright (C) Wolfgang Meier. All rights reserved.