HDIV API 2.0.4

org.hdiv.config.multipart
Class Struts2MultipartConfig

java.lang.Object
  extended by org.hdiv.config.multipart.AbstractMultipartConfig
      extended by org.hdiv.config.multipart.Struts2MultipartConfig
All Implemented Interfaces:
IMultipartConfig

public class Struts2MultipartConfig
extends AbstractMultipartConfig

Class containing multipart request configuration and methods initialized from Spring Factory.

Author:
Gorka Vicente

Field Summary
 
Fields inherited from class org.hdiv.config.multipart.AbstractMultipartConfig
maxFileSize, tempDir
 
Fields inherited from interface org.hdiv.config.multipart.IMultipartConfig
ATTRIBUTE_MAX_LENGTH_EXCEEDED, DEFAULT_SIZE_MAX, DEFAULT_SIZE_THRESHOLD, FILEUPLOAD_EXCEPTION
 
Constructor Summary
Struts2MultipartConfig()
           
 
Method Summary
 void addTextParameter(RequestWrapper request, org.apache.commons.fileupload.FileItem item)
          Adds a regular text parameter to the set of text parameters for this request.
 void handleMultipartRequest(RequestWrapper request, javax.servlet.ServletContext servletContext)
          Parses the input stream and partitions the parsed items into a set of form fields and a set of file items.
 
Methods inherited from class org.hdiv.config.multipart.AbstractMultipartConfig
addFileParameter, convertSizeToBytes, getRepositoryPath, getSizeMax, setMaxFileSize, setTempDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Struts2MultipartConfig

public Struts2MultipartConfig()
Method Detail

handleMultipartRequest

public void handleMultipartRequest(RequestWrapper request,
                                   javax.servlet.ServletContext servletContext)
                            throws org.apache.commons.fileupload.FileUploadException,
                                   org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException,
                                   org.springframework.web.multipart.MaxUploadSizeExceededException
Parses the input stream and partitions the parsed items into a set of form fields and a set of file items.

Parameters:
request - The multipart request wrapper.
servletContext - Our ServletContext object
Throws:
org.apache.commons.fileupload.FileUploadException - if an unrecoverable error occurs.
DiskFileUpload.SizeLimitExceededException - if size limit exceeded
org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException
org.springframework.web.multipart.MaxUploadSizeExceededException

addTextParameter

public void addTextParameter(RequestWrapper request,
                             org.apache.commons.fileupload.FileItem item)
Adds a regular text parameter to the set of text parameters for this request. Handles the case of multiple values for the same parameter by using an array for the parameter value.

Parameters:
request - The request in which the parameter was specified.
item - The file item for the parameter to add.

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.