FileDocCategorySizeDatePackage
MultiPartRequest.javaAPI DocExample4549Mon Jul 23 13:26:36 BST 2007org.apache.struts2.dispatcher.multipart

MultiPartRequest

public interface MultiPartRequest
Abstract wrapper class HTTP requests to handle multi-part data.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.String[]getContentType(java.lang.String fieldName)
Returns the content type(s) of the file(s) associated with the specified field name (as supplied by the client browser), or null if no files are associated with the given field name.

param
fieldName input field name
return
an array of content encoding for the specified input field name or null if no content type was specified.

public java.util.ListgetErrors()
Returns a list of error messages that may have occurred while processing the request. If there are no errors, an empty list is returned. If the underlying implementation (ie: pell, cos, jakarta, etc) cannot support providing these errors, an empty list is also returned. This list of errors is repoted back to the {@link MultiPartRequestWrapper}'s errors field.

return
a list of Strings that represent various errors during parsing

public java.io.File[]getFile(java.lang.String fieldName)
Returns a {@link java.io.File} object for the filename specified or null if no files are associated with the given field name.

param
fieldName input field name
return
a File[] object for files associated with the specified input field name

public java.lang.String[]getFileNames(java.lang.String fieldName)
Returns a String[] of file names for files associated with the specified input field name

param
fieldName input field name
return
a String[] of file names for files associated with the specified input field name

public java.util.EnumerationgetFileParameterNames()
Returns an enumeration of the parameter names for uploaded files

return
an enumeration of the parameter names for uploaded files

public java.lang.String[]getFilesystemName(java.lang.String fieldName)
Returns the file system name(s) of files associated with the given field name or null if no files are associated with the given field name.

param
fieldName input field name
return
the file system name(s) of files associated with the given field name

public java.lang.StringgetParameter(java.lang.String name)
Returns the specified request parameter.

param
name the name of the parameter to get
return
the parameter or null if it was not found.

public java.util.EnumerationgetParameterNames()
Returns an enumeration of String parameter names.

return
an enumeration of String parameter names.

public java.lang.String[]getParameterValues(java.lang.String name)
Returns a list of all parameter values associated with a parameter name. If there is only one parameter value per name the resulting array will be of length 1.

param
name the name of the parameter.
return
an array of all values associated with the parameter name.

public voidparse(javax.servlet.http.HttpServletRequest request, java.lang.String saveDir)