HDIV API 2.0.4

org.hdiv.web.multipart
Class HDIVMultipartResolver

java.lang.Object
  extended by org.springframework.web.multipart.commons.CommonsFileUploadSupport
      extended by org.springframework.web.multipart.commons.CommonsMultipartResolver
          extended by org.hdiv.web.multipart.HDIVMultipartResolver
All Implemented Interfaces:
org.springframework.web.context.ServletContextAware, org.springframework.web.multipart.MultipartResolver

public class HDIVMultipartResolver
extends org.springframework.web.multipart.commons.CommonsMultipartResolver

Servlet-based MultipartResolver implementation for Jakarta Commons FileUpload 1.1 or higher and HDIV for Spring MVC.

Provides maxUploadSize, maxInMemorySize, and defaultEncoding settings as bean properties (inherited from CommonsFileUploadSupport). See respective ServletFileUpload / DiskFileItemFactory properties (sizeMax, sizeThreshold, headerEncoding) for details in terms of defaults and accepted values.

Saves temporary files to the servlet container's temporary directory. Needs to be initialized either by an application context or via the constructor that takes a ServletContext (for standalone usage).

NOTE: As of Spring 2.0, this multipart resolver requires Commons FileUpload 1.1 or higher. The implementation does not use any deprecated FileUpload 1.0 API anymore, to be compatible with future Commons FileUpload releases.

Since:
HDIV 2.0.3
Author:
Gorka Vicente
See Also:
#CommonsMultipartResolver(ServletContext), CommonsMultipartFile, org.springframework.web.portlet.multipart.PortletMultipartResolver, ServletFileUpload, DiskFileItemFactory

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.web.multipart.commons.CommonsFileUploadSupport
org.springframework.web.multipart.commons.CommonsFileUploadSupport.MultipartParsingResult
 
Field Summary
 
Fields inherited from class org.springframework.web.multipart.commons.CommonsFileUploadSupport
logger
 
Constructor Summary
HDIVMultipartResolver()
           
 
Method Summary
 org.springframework.web.multipart.MultipartHttpServletRequest defaultResolveMultipart(javax.servlet.http.HttpServletRequest request)
           
 org.springframework.web.multipart.MultipartHttpServletRequest resolveMultipart(javax.servlet.http.HttpServletRequest request)
           
 void setResolveLazily(boolean resolveLazily)
          Set whether to resolve the multipart request lazily at the time of file or parameter access.
 
Methods inherited from class org.springframework.web.multipart.commons.CommonsMultipartResolver
cleanupMultipart, determineEncoding, isMultipart, newFileUpload, parseRequest, setServletContext
 
Methods inherited from class org.springframework.web.multipart.commons.CommonsFileUploadSupport
cleanupFileItems, getDefaultEncoding, getFileItemFactory, getFileUpload, isUploadTempDirSpecified, newFileItemFactory, parseFileItems, prepareFileUpload, setDefaultEncoding, setMaxInMemorySize, setMaxUploadSize, setUploadTempDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDIVMultipartResolver

public HDIVMultipartResolver()
Method Detail

resolveMultipart

public org.springframework.web.multipart.MultipartHttpServletRequest resolveMultipart(javax.servlet.http.HttpServletRequest request)
                                                                               throws org.springframework.web.multipart.MultipartException
Specified by:
resolveMultipart in interface org.springframework.web.multipart.MultipartResolver
Overrides:
resolveMultipart in class org.springframework.web.multipart.commons.CommonsMultipartResolver
Throws:
org.springframework.web.multipart.MultipartException

defaultResolveMultipart

public org.springframework.web.multipart.MultipartHttpServletRequest defaultResolveMultipart(javax.servlet.http.HttpServletRequest request)
                                                                                      throws org.springframework.web.multipart.MultipartException
Throws:
org.springframework.web.multipart.MultipartException

setResolveLazily

public void setResolveLazily(boolean resolveLazily)
Set whether to resolve the multipart request lazily at the time of file or parameter access.

Default is "false", resolving the multipart elements immediately, throwing corresponding exceptions at the time of the resolveMultipart(javax.servlet.http.HttpServletRequest) call. Switch this to "true" for lazy multipart parsing, throwing parse exceptions once the application attempts to obtain multipart files or parameters.

Overrides:
setResolveLazily in class org.springframework.web.multipart.commons.CommonsMultipartResolver

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.