public class DefaultMultipartWrapperFactory extends Object implements MultipartWrapperFactory
Default implementation of a factory for MultipartWrappers. Looks up a class name in
Configuration under the key specified by WRAPPER_CLASS_NAME. If no class
name is configured, defaults to the CosMultipartWrapper. An additional configuration
parameter is supported to specify the maximum post size allowable.
| Modifier and Type | Field and Description |
|---|---|
static String[] |
BUNDLED_IMPLEMENTATIONS
The names of the MultipartWrapper classes that will be tried if no other is specified.
|
static String |
MAX_POST
Key used to lookup the name of the maximum post size.
|
static String |
WRAPPER_CLASS_NAME
The configuration key used to lookup the implementation of MultipartWrapper.
|
| Constructor and Description |
|---|
DefaultMultipartWrapperFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(Configuration config)
Invoked directly after instantiation to allow the configured component to perform one time
initialization.
|
MultipartWrapper |
wrap(HttpServletRequest request)
Wraps the request in an appropriate implementation of MultipartWrapper that is capable of
providing access to request parameters and any file parts contained within the request.
|
public static final String WRAPPER_CLASS_NAME
public static final String[] BUNDLED_IMPLEMENTATIONS
public static final String MAX_POST
public void init(Configuration config) throws Exception
init in interface ConfigurableComponentconfig - the Configuration object being used by StripesException - should be thrown if the component cannot be configured well enough to use.public MultipartWrapper wrap(HttpServletRequest request) throws IOException, FileUploadLimitExceededException
wrap in interface MultipartWrapperFactoryrequest - an active HttpServletRequestIOException - if encountered when consuming the contents of the requestFileUploadLimitExceededException - if the post size of the request exceeds any
configured limits© Copyright 2005-2006, Stripes Development Team.