com.jalios.jcms.upload
Class MultipartRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by com.jalios.jcms.upload.MultipartRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest, org.apache.commons.fileupload.ProgressListener

public class MultipartRequest
extends javax.servlet.http.HttpServletRequestWrapper
implements org.apache.commons.fileupload.ProgressListener

HttpServletRequest Wrapper decoding multipart request and displaying MULTIPART_UPLOAD instead in file fields. The method getFileUploadStatus() may be called by AJAX request to follow upload status

Since:
jcms-5.7.0
Version:
$Revision: 28994 $
Author:
Jean-Philippe Encausse

Field Summary
protected  List<org.apache.commons.fileupload.FileItem> items
           
static String MULTIPART_UPLOAD
           
protected  HashMap<String,String[]> params
           
static String REVISION
           
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
protected MultipartRequest(javax.servlet.http.HttpServletRequest request)
           
 
Method Summary
 String getParameter(String arg0)
           
 Map getParameterMap()
           
 Enumeration getParameterNames()
           
 String[] getParameterValues(String arg0)
           
 void parseRequest(File directory, int sizeThreshold, long sizeMax)
           
 void setParameter(String key, String value)
           
 void setParameter(String key, String[] values)
           
 void update(long pBytesRead, long pContentLength, int pItems)
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, 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
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

MULTIPART_UPLOAD

public static final String MULTIPART_UPLOAD
See Also:
Constant Field Values

items

protected List<org.apache.commons.fileupload.FileItem> items

params

protected HashMap<String,String[]> params
Constructor Detail

MultipartRequest

protected MultipartRequest(javax.servlet.http.HttpServletRequest request)
Method Detail

parseRequest

public void parseRequest(File directory,
                         int sizeThreshold,
                         long sizeMax)
                  throws org.apache.commons.fileupload.FileUploadException,
                         UnsupportedEncodingException
Throws:
org.apache.commons.fileupload.FileUploadException
UnsupportedEncodingException

update

public void update(long pBytesRead,
                   long pContentLength,
                   int pItems)
Specified by:
update in interface org.apache.commons.fileupload.ProgressListener

setParameter

public void setParameter(String key,
                         String value)

setParameter

public void setParameter(String key,
                         String[] values)

getParameter

public String getParameter(String arg0)
Specified by:
getParameter in interface javax.servlet.ServletRequest
Overrides:
getParameter in class javax.servlet.ServletRequestWrapper
See Also:
ServletRequest.getParameter(String)

getParameterMap

public Map getParameterMap()
Specified by:
getParameterMap in interface javax.servlet.ServletRequest
Overrides:
getParameterMap in class javax.servlet.ServletRequestWrapper
See Also:
ServletRequest.getParameterMap()

getParameterNames

public Enumeration getParameterNames()
Specified by:
getParameterNames in interface javax.servlet.ServletRequest
Overrides:
getParameterNames in class javax.servlet.ServletRequestWrapper
See Also:
ServletRequest.getParameterNames()

getParameterValues

public String[] getParameterValues(String arg0)
Specified by:
getParameterValues in interface javax.servlet.ServletRequest
Overrides:
getParameterValues in class javax.servlet.ServletRequestWrapper
See Also:
ServletRequest.getParameterValues(String)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.