|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blackboard.platform.filesystem.MultipartRequest
public class MultipartRequest
Utility object to provide an encapsulation of all the data received in a file upload.
Field Summary | |
---|---|
protected java.util.Hashtable |
_hashFiles
|
protected java.util.Hashtable |
_hashParams
|
static java.lang.String |
MULTIPART_TKN
|
Constructor Summary | |
---|---|
protected |
MultipartRequest()
Default constructor. |
Method Summary | |
---|---|
protected void |
addFile(java.lang.String name,
java.io.File file)
adds a File to the list of files provided with the upload. |
protected void |
addParameter(java.lang.String name,
java.lang.String value)
Adds a parameter identified by name. |
java.io.File |
getFile(java.lang.String name)
Returns a File associated with the given name. |
java.io.File |
getFileFromParameterName(java.lang.String name)
Returns a File associated with the given parameter name. |
java.io.File[] |
getFiles(java.lang.String name)
Returns an array of all the files uploaded with this request. |
java.lang.String |
getParameter(java.lang.String name)
Returns a scalar string value. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns an array of values associated with a given form field. |
static MultipartRequest |
getRequestInstance(javax.servlet.http.HttpServletRequest req)
Gets the MultipartRequest instance out of the given request object. |
static void |
setRequestInstance(javax.servlet.http.HttpServletRequest req,
MultipartRequest mr)
Associates a MultipartRequest object with the given request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String MULTIPART_TKN
protected java.util.Hashtable _hashParams
protected java.util.Hashtable _hashFiles
Constructor Detail |
---|
protected MultipartRequest()
Method Detail |
---|
public java.lang.String getParameter(java.lang.String name)
name
- the name of the parameter to retrieve
public java.io.File getFile(java.lang.String name)
name
- name of the file. this value will usually come from another parameter.
public java.io.File getFileFromParameterName(java.lang.String name)
name
- name of the parameter. this value will usually come from the form element name.
public java.lang.String[] getParameterValues(java.lang.String name)
name
- name of the form field
public java.io.File[] getFiles(java.lang.String name)
name
- Name of the field.
protected void addFile(java.lang.String name, java.io.File file)
name
- name of the file to addfile
- Fileprotected void addParameter(java.lang.String name, java.lang.String value)
name
- name of the form fieldvalue
- value to insertpublic static void setRequestInstance(javax.servlet.http.HttpServletRequest req, MultipartRequest mr)
req
- the HttpServletRequest that will hold the MultipartRequestmr
- the MultipartRequest.public static MultipartRequest getRequestInstance(javax.servlet.http.HttpServletRequest req)
req
- the request object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |