org.exist.http.servlets
Class HttpRequestWrapper
java.lang.Object
org.exist.http.servlets.HttpRequestWrapper
- All Implemented Interfaces:
- RequestWrapper
public class HttpRequestWrapper
- extends Object
- implements RequestWrapper
A wrapper for requests processed by a servlet.
- Author:
- Wolfgang Meier , Pierrick Brihaye
HttpRequestWrapper
public HttpRequestWrapper(HttpServletRequest servletRequest,
String formEncoding,
String containerEncoding)
- Constructs a wrapper for the given servlet request.
- Parameters:
servletRequest
- The request as viewed by the servletformEncoding
- The encoding of the request's formscontainerEncoding
- The encoding of the servlet
HttpRequestWrapper
public HttpRequestWrapper(HttpServletRequest servletRequest,
String formEncoding,
String containerEncoding,
boolean parseMultipart)
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttribute
in interface RequestWrapper
getCookies
public Cookie[] getCookies()
- Returns an array of Cookies
- Specified by:
getCookies
in interface RequestWrapper
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream
in interface RequestWrapper
- Throws:
IOException
- See Also:
ServletRequest.getInputStream()
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interface RequestWrapper
- See Also:
ServletRequest.getCharacterEncoding()
getContentLength
public int getContentLength()
- Specified by:
getContentLength
in interface RequestWrapper
- See Also:
ServletRequest.getContentLength()
getContentType
public String getContentType()
- Specified by:
getContentType
in interface RequestWrapper
- See Also:
ServletRequest.getContentType()
getContextPath
public String getContextPath()
- Specified by:
getContextPath
in interface RequestWrapper
- See Also:
HttpServletRequest.getContextPath()
getHeader
public String getHeader(String arg0)
- Specified by:
getHeader
in interface RequestWrapper
- See Also:
HttpServletRequest.getHeader(String)
getHeaderNames
public Enumeration getHeaderNames()
- Specified by:
getHeaderNames
in interface RequestWrapper
- Returns:
- An enumeration of header names
- See Also:
ServletRequest.getCharacterEncoding()
getHeaders
public Enumeration getHeaders(String arg0)
- Specified by:
getHeaders
in interface RequestWrapper
- See Also:
HttpServletRequest.getHeaders(String)
getMethod
public String getMethod()
- Specified by:
getMethod
in interface RequestWrapper
- See Also:
HttpServletRequest.getMethod()
getParameter
public String getParameter(String name)
- Specified by:
getParameter
in interface RequestWrapper
- See Also:
ServletRequest.getParameter(String)
getFileUploadParam
public File getFileUploadParam(String name)
- Specified by:
getFileUploadParam
in interface RequestWrapper
- See Also:
ServletRequest.getParameter(String)
getUploadedFileName
public String getUploadedFileName(String name)
- Specified by:
getUploadedFileName
in interface RequestWrapper
- See Also:
ServletRequest.getParameter(String)
getParameterNames
public Enumeration getParameterNames()
- Specified by:
getParameterNames
in interface RequestWrapper
- See Also:
ServletRequest.getParameterNames()
getParameterValues
public String[] getParameterValues(String key)
- Specified by:
getParameterValues
in interface RequestWrapper
- See Also:
ServletRequest.getParameterValues(String)
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfo
in interface RequestWrapper
- See Also:
HttpServletRequest.getPathInfo()
getPathTranslated
public String getPathTranslated()
- Specified by:
getPathTranslated
in interface RequestWrapper
- See Also:
HttpServletRequest.getPathTranslated()
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interface RequestWrapper
- See Also:
ServletRequest.getProtocol()
getQueryString
public String getQueryString()
- Specified by:
getQueryString
in interface RequestWrapper
- See Also:
HttpServletRequest.getQueryString()
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddr
in interface RequestWrapper
- See Also:
ServletRequest.getRemoteAddr()
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHost
in interface RequestWrapper
- See Also:
ServletRequest.getRemoteHost()
getRemoteUser
public String getRemoteUser()
- Specified by:
getRemoteUser
in interface RequestWrapper
- See Also:
HttpServletRequest.getRemoteUser()
getRequestedSessionId
public String getRequestedSessionId()
- Specified by:
getRequestedSessionId
in interface RequestWrapper
- See Also:
HttpServletRequest.getRequestedSessionId()
getRequestURI
public String getRequestURI()
- Specified by:
getRequestURI
in interface RequestWrapper
- See Also:
HttpServletRequest.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:
ServletRequest.getScheme()
getServerName
public String getServerName()
- Specified by:
getServerName
in interface RequestWrapper
- See Also:
ServletRequest.getServerName()
getServerPort
public int getServerPort()
- Specified by:
getServerPort
in interface RequestWrapper
- See Also:
ServletRequest.getServerPort()
getServletPath
public String getServletPath()
- Specified by:
getServletPath
in interface RequestWrapper
- See Also:
HttpServletRequest.getServletPath()
getSession
public SessionWrapper getSession()
- Specified by:
getSession
in interface RequestWrapper
- See Also:
HttpServletRequest.getSession()
getSession
public SessionWrapper getSession(boolean arg0)
- Specified by:
getSession
in interface RequestWrapper
- See Also:
HttpServletRequest.getSession(boolean)
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interface RequestWrapper
- See Also:
HttpServletRequest.getUserPrincipal()
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
- Specified by:
isRequestedSessionIdFromCookie
in interface RequestWrapper
- See Also:
HttpServletRequest.isRequestedSessionIdFromCookie()
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
- Specified by:
isRequestedSessionIdFromURL
in interface RequestWrapper
- See Also:
HttpServletRequest.isRequestedSessionIdFromURL()
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
- Specified by:
isRequestedSessionIdValid
in interface RequestWrapper
- See Also:
HttpServletRequest.isRequestedSessionIdValid()
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interface RequestWrapper
- See Also:
ServletRequest.isSecure()
isUserInRole
public boolean isUserInRole(String arg0)
- Specified by:
isUserInRole
in interface RequestWrapper
- See Also:
HttpServletRequest.isUserInRole(String)
removeAttribute
public void removeAttribute(String arg0)
- Specified by:
removeAttribute
in interface RequestWrapper
- See Also:
ServletRequest.removeAttribute(String)
setAttribute
public void setAttribute(String arg0,
Object arg1)
- Specified by:
setAttribute
in interface RequestWrapper
- See Also:
ServletRequest.setAttribute(String, Object)
setCharacterEncoding
public void setCharacterEncoding(String arg0)
throws UnsupportedEncodingException
- Specified by:
setCharacterEncoding
in interface RequestWrapper
- Throws:
UnsupportedEncodingException
- See Also:
ServletRequest.setCharacterEncoding(String)
setPathInfo
public void setPathInfo(String arg0)
setServletPath
public void setServletPath(String arg0)
Copyright (C) Wolfgang Meier. All rights reserved.