|
HDIV API 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hdiv.config.multipart.AbstractMultipartConfig
public abstract class AbstractMultipartConfig
Class containing multipart request configuration and methods initialized from Spring Factory.
| Field Summary | |
|---|---|
protected java.lang.String |
maxFileSize
The maximum allowable size, in bytes, of an uploaded file. |
protected java.lang.String |
tempDir
The temporary working directory to use for file uploads. |
| Fields inherited from interface org.hdiv.config.multipart.IMultipartConfig |
|---|
ATTRIBUTE_MAX_LENGTH_EXCEEDED, DEFAULT_SIZE_MAX, DEFAULT_SIZE_THRESHOLD, FILEUPLOAD_EXCEPTION |
| Constructor Summary | |
|---|---|
AbstractMultipartConfig()
|
|
| Method Summary | |
|---|---|
void |
addFileParameter(RequestWrapper request,
org.apache.commons.fileupload.FileItem item)
Adds a file parameter to the set of file parameters for this request and also to the list of all parameters. |
long |
convertSizeToBytes(java.lang.String sizeString,
long defaultSize)
Converts a size value from a string representation to its numeric value. |
java.lang.String |
getRepositoryPath(javax.servlet.ServletContext servletContext)
Returns the path to the temporary directory to be used for uploaded files which are written to disk. |
protected long |
getSizeMax()
Returns the maximum allowable size, in bytes, of an uploaded file. |
void |
setMaxFileSize(java.lang.String maxFileSize)
|
void |
setTempDir(java.lang.String tempDir)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.hdiv.config.multipart.IMultipartConfig |
|---|
addTextParameter, handleMultipartRequest |
| Field Detail |
|---|
protected java.lang.String maxFileSize
protected java.lang.String tempDir
| Constructor Detail |
|---|
public AbstractMultipartConfig()
| Method Detail |
|---|
public long convertSizeToBytes(java.lang.String sizeString,
long defaultSize)
sizeString - The string representation of the size to be converted.defaultSize - The value to be returned if the string is invalid.
public java.lang.String getRepositoryPath(javax.servlet.ServletContext servletContext)
saveDir attribute
of the <multipartConfig> element in the Spring config file.javax.servlet.context.tempdir
attribute.
getRepositoryPath in interface IMultipartConfigservletContext - servlet context
public void addFileParameter(RequestWrapper request,
org.apache.commons.fileupload.FileItem item)
addFileParameter in interface IMultipartConfigrequest - The request in which the parameter was specified.item - The file item for the parameter to add.public void setMaxFileSize(java.lang.String maxFileSize)
maxFileSize - The maximum size to set.public void setTempDir(java.lang.String tempDir)
tempDir - The tempDir to set.protected long getSizeMax()
|
HDIV 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||