org.apache.cocoon.servlet.multipart
Class MultipartHttpServletRequest

java.lang.Object
  extended by org.apache.cocoon.servlet.multipart.MultipartHttpServletRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public class MultipartHttpServletRequest
extends Object
implements HttpServletRequest

Servlet request wrapper for multipart parser.

Version:
CVS $Id: MultipartHttpServletRequest.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Jeroen ter Voorde, Stefano Mazzocchi

Constructor Summary
MultipartHttpServletRequest(HttpServletRequest request, Hashtable values)
          Create this wrapper around the given request and including the given parts.
 
Method Summary
 void cleanup()
          Cleanup eventually uploaded parts that were saved on disk
 Object get(String name)
          Method get
 Object getAttribute(String name)
          Method getAttribute
 Enumeration getAttributeNames()
          Method getAttributeNames
 String getAuthType()
          Method getAuthType
 String getCharacterEncoding()
          Method getCharacterEncoding
 int getContentLength()
          Method getContentLength
 String getContentType()
          Method getContentType
 String getContextPath()
          Method getContextPath
 Cookie[] getCookies()
          Method getCookies
 long getDateHeader(String name)
          Method getDateHeader
 String getHeader(String name)
          Method getHeader
 Enumeration getHeaderNames()
          Method getHeaderNames
 Enumeration getHeaders(String name)
          Method getHeaders
 ServletInputStream getInputStream()
          Method getInputStream
 int getIntHeader(String name)
          Method getIntHeader
 Locale getLocale()
          Method getLocale
 Enumeration getLocales()
          Method getLocales
 String getMethod()
          Method getMethod
 String getParameter(String name)
          Method getParameter
 Map getParameterMap()
           
 Enumeration getParameterNames()
          Method getParameterNames
 String[] getParameterValues(String name)
          Method getParameterValues
 String getPathInfo()
          Method getPathInfo
 String getPathTranslated()
          Method getPathTranslated
 String getProtocol()
          Method getProtocol
 String getQueryString()
          Method getQueryString
 BufferedReader getReader()
          Method getReader
 String getRealPath(String path)
          Method getRealPath
 String getRemoteAddr()
          Method getRemoteAddr
 String getRemoteHost()
          Method getRemoteHost
 String getRemoteUser()
          Method getRemoteUser
 RequestDispatcher getRequestDispatcher(String path)
          Method getRequestDispatcher
 String getRequestedSessionId()
          Method getRequestedSessionId
 String getRequestURI()
          Method getRequestURI
 StringBuffer getRequestURL()
           
 String getScheme()
          Method getScheme
 String getServerName()
          Method getServerName
 int getServerPort()
          Method getServerPort
 String getServletPath()
          Method getServletPath
 HttpSession getSession()
          Method getSession
 HttpSession getSession(boolean create)
          Method getSession
 Principal getUserPrincipal()
          Method getUserPrincipal
 boolean isRequestedSessionIdFromCookie()
          Method isRequestedSessionIdFromCookie
 boolean isRequestedSessionIdFromUrl()
          Deprecated. use isRequestedSessionIdFromURL() instead
 boolean isRequestedSessionIdFromURL()
          Method isRequestedSessionIdFromURL
 boolean isRequestedSessionIdValid()
          Method isRequestedSessionIdValid
 boolean isSecure()
          Method isSecure
 boolean isUserInRole(String role)
          Method isUserInRole
 void removeAttribute(String name)
          Method removeAttribute
 void setAttribute(String name, Object o)
          Method setAttribute
 void setCharacterEncoding(String arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartHttpServletRequest

public MultipartHttpServletRequest(HttpServletRequest request,
                                   Hashtable values)
Create this wrapper around the given request and including the given parts.

Method Detail

cleanup

public void cleanup()
             throws IOException
Cleanup eventually uploaded parts that were saved on disk

Throws:
IOException

get

public Object get(String name)
Method get

Parameters:
name -

getParameterNames

public Enumeration getParameterNames()
Method getParameterNames

Specified by:
getParameterNames in interface ServletRequest

getParameter

public String getParameter(String name)
Method getParameter

Specified by:
getParameter in interface ServletRequest
Parameters:
name -

getParameterValues

public String[] getParameterValues(String name)
Method getParameterValues

Specified by:
getParameterValues in interface ServletRequest
Parameters:
name -

getAttribute

public Object getAttribute(String name)
Method getAttribute

Specified by:
getAttribute in interface ServletRequest
Parameters:
name -

getAttributeNames

public Enumeration getAttributeNames()
Method getAttributeNames

Specified by:
getAttributeNames in interface ServletRequest

getCharacterEncoding

public String getCharacterEncoding()
Method getCharacterEncoding

Specified by:
getCharacterEncoding in interface ServletRequest

getContentLength

public int getContentLength()
Method getContentLength

Specified by:
getContentLength in interface ServletRequest

getContentType

public String getContentType()
Method getContentType

Specified by:
getContentType in interface ServletRequest

getInputStream

public ServletInputStream getInputStream()
                                  throws IOException
Method getInputStream

Specified by:
getInputStream in interface ServletRequest
Throws:
IOException

getProtocol

public String getProtocol()
Method getProtocol

Specified by:
getProtocol in interface ServletRequest

getScheme

public String getScheme()
Method getScheme

Specified by:
getScheme in interface ServletRequest

getServerName

public String getServerName()
Method getServerName

Specified by:
getServerName in interface ServletRequest

getServerPort

public int getServerPort()
Method getServerPort

Specified by:
getServerPort in interface ServletRequest

getReader

public BufferedReader getReader()
                         throws IOException
Method getReader

Specified by:
getReader in interface ServletRequest
Throws:
IOException

getRemoteAddr

public String getRemoteAddr()
Method getRemoteAddr

Specified by:
getRemoteAddr in interface ServletRequest

getRemoteHost

public String getRemoteHost()
Method getRemoteHost

Specified by:
getRemoteHost in interface ServletRequest

setAttribute

public void setAttribute(String name,
                         Object o)
Method setAttribute

Specified by:
setAttribute in interface ServletRequest
Parameters:
name -
o -

removeAttribute

public void removeAttribute(String name)
Method removeAttribute

Specified by:
removeAttribute in interface ServletRequest
Parameters:
name -

getLocale

public Locale getLocale()
Method getLocale

Specified by:
getLocale in interface ServletRequest

getLocales

public Enumeration getLocales()
Method getLocales

Specified by:
getLocales in interface ServletRequest

isSecure

public boolean isSecure()
Method isSecure

Specified by:
isSecure in interface ServletRequest

getRequestDispatcher

public RequestDispatcher getRequestDispatcher(String path)
Method getRequestDispatcher

Specified by:
getRequestDispatcher in interface ServletRequest
Parameters:
path -

getRealPath

public String getRealPath(String path)
Method getRealPath

Specified by:
getRealPath in interface ServletRequest
Parameters:
path -

getAuthType

public String getAuthType()
Method getAuthType

Specified by:
getAuthType in interface HttpServletRequest

getCookies

public Cookie[] getCookies()
Method getCookies

Specified by:
getCookies in interface HttpServletRequest

getDateHeader

public long getDateHeader(String name)
Method getDateHeader

Specified by:
getDateHeader in interface HttpServletRequest
Parameters:
name -

getHeader

public String getHeader(String name)
Method getHeader

Specified by:
getHeader in interface HttpServletRequest
Parameters:
name -

getHeaders

public Enumeration getHeaders(String name)
Method getHeaders

Specified by:
getHeaders in interface HttpServletRequest
Parameters:
name -

getHeaderNames

public Enumeration getHeaderNames()
Method getHeaderNames

Specified by:
getHeaderNames in interface HttpServletRequest

getIntHeader

public int getIntHeader(String name)
Method getIntHeader

Specified by:
getIntHeader in interface HttpServletRequest
Parameters:
name -

getMethod

public String getMethod()
Method getMethod

Specified by:
getMethod in interface HttpServletRequest

getPathInfo

public String getPathInfo()
Method getPathInfo

Specified by:
getPathInfo in interface HttpServletRequest

getPathTranslated

public String getPathTranslated()
Method getPathTranslated

Specified by:
getPathTranslated in interface HttpServletRequest

getContextPath

public String getContextPath()
Method getContextPath

Specified by:
getContextPath in interface HttpServletRequest

getQueryString

public String getQueryString()
Method getQueryString

Specified by:
getQueryString in interface HttpServletRequest

getRemoteUser

public String getRemoteUser()
Method getRemoteUser

Specified by:
getRemoteUser in interface HttpServletRequest

isUserInRole

public boolean isUserInRole(String role)
Method isUserInRole

Specified by:
isUserInRole in interface HttpServletRequest
Parameters:
role -

getUserPrincipal

public Principal getUserPrincipal()
Method getUserPrincipal

Specified by:
getUserPrincipal in interface HttpServletRequest

getRequestedSessionId

public String getRequestedSessionId()
Method getRequestedSessionId

Specified by:
getRequestedSessionId in interface HttpServletRequest

getRequestURI

public String getRequestURI()
Method getRequestURI

Specified by:
getRequestURI in interface HttpServletRequest

getServletPath

public String getServletPath()
Method getServletPath

Specified by:
getServletPath in interface HttpServletRequest

getSession

public HttpSession getSession(boolean create)
Method getSession

Specified by:
getSession in interface HttpServletRequest
Parameters:
create -

getSession

public HttpSession getSession()
Method getSession

Specified by:
getSession in interface HttpServletRequest

isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()
Method isRequestedSessionIdValid

Specified by:
isRequestedSessionIdValid in interface HttpServletRequest

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()
Method isRequestedSessionIdFromCookie

Specified by:
isRequestedSessionIdFromCookie in interface HttpServletRequest

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Method isRequestedSessionIdFromURL

Specified by:
isRequestedSessionIdFromURL in interface HttpServletRequest

isRequestedSessionIdFromUrl

public boolean isRequestedSessionIdFromUrl()
Deprecated. use isRequestedSessionIdFromURL() instead

Method isRequestedSessionIdFromUrl

Specified by:
isRequestedSessionIdFromUrl in interface HttpServletRequest

getRequestURL

public StringBuffer getRequestURL()

getParameterMap

public Map getParameterMap()

setCharacterEncoding

public void setCharacterEncoding(String arg0)
                          throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException


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