org.dspace.app.webui.util
Class FileUploadRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.dspace.app.webui.util.FileUploadRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class FileUploadRequest
extends javax.servlet.http.HttpServletRequestWrapper

Based on the com.oreilly.servlet.MultipartWrapper object, this is an HTTP request wrapper for multi-part (MIME) POSTs. It uses DSpace configuration properties to determine the temporary directory to use and the maximum allowable upload size.

Version:
$Revision$
Author:
Robert Tansley

Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
FileUploadRequest(javax.servlet.http.HttpServletRequest req)
          Parse a multipart request and extracts the files
 
Method Summary
 String getContentType(String name)
           
 File getFile(String name)
           
 Enumeration<String> getFileNames()
           
 Enumeration<String> getFileParameterNames()
           
 String getFilesystemName(String name)
           
 javax.servlet.http.HttpServletRequest getOriginalRequest()
          Get back the original HTTP request object
 String getParameter(String name)
           
 Map getParameterMap()
           
 Enumeration getParameterNames()
           
 String[] getParameterValues(String name)
           
 
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, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, 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, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Constructor Detail

FileUploadRequest

public FileUploadRequest(javax.servlet.http.HttpServletRequest req)
                  throws IOException,
                         org.apache.commons.fileupload.FileUploadBase.FileSizeLimitExceededException
Parse a multipart request and extracts the files

Parameters:
req - the original request
Throws:
IOException
org.apache.commons.fileupload.FileUploadBase.FileSizeLimitExceededException
Method Detail

getParameterNames

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

getParameter

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

getParameterValues

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

getParameterMap

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

getFilesystemName

public String getFilesystemName(String name)

getContentType

public String getContentType(String name)

getFile

public File getFile(String name)

getFileParameterNames

public Enumeration<String> getFileParameterNames()

getFileNames

public Enumeration<String> getFileNames()

getOriginalRequest

public javax.servlet.http.HttpServletRequest getOriginalRequest()
Get back the original HTTP request object

Returns:
the original HTTP request


Copyright © 2013 DuraSpace. All Rights Reserved.