com.devsphere.mapping
Class FormData
java.lang.Object
|
+--com.devsphere.mapping.FormData
- Direct Known Subclasses:
- ServletFormData
- public abstract class FormData
- extends java.lang.Object
Abstract class whose methods are implemented by form data wrappers.
ServletFormData extends this class and wraps
a javax.servlet.http.HttpServletRequest
instance.
- See Also:
ServletFormData
Method Summary |
abstract FileBean |
getFileParameter(java.lang.String name)
Gets the value of a file parameter as a FileBean ,
or null if the parameter is missing or is not an uploaded file. |
abstract java.util.Enumeration |
getFileParameterNames()
Gets an Enumeration of String objects,
containing the names of the file parameters. |
abstract FileBean[] |
getFileParameterValues(java.lang.String name)
Gets the values of a file parameter as a FileBean[] ,
or null if the parameter is missing or is not a list of uploaded files. |
abstract java.lang.String |
getParameter(java.lang.String name)
Gets the value of a request parameter as a String ,
or null if the parameter is missing or is an uploaded file. |
abstract java.util.Enumeration |
getParameterNames()
Gets an Enumeration of String objects,
containing the names of the request parameters. |
abstract java.lang.String[] |
getParameterValues(java.lang.String name)
Gets the values of a request parameter as a String[] ,
or null if the parameter is missing or is a list of uploaded files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormData
public FormData()
getParameterNames
public abstract java.util.Enumeration getParameterNames()
- Gets an
Enumeration
of String
objects,
containing the names of the request parameters.
The parameter names of the uploaded files are not included.
The enumeration is empty if the request has no parameters
or it has only uploaded files.
- Returns:
- the enumeration of the names of the request parameters.
getParameter
public abstract java.lang.String getParameter(java.lang.String name)
- Gets the value of a request parameter as a
String
,
or null
if the parameter is missing or is an uploaded file.
- Parameters:
name
- the name of the request parameter.- Returns:
- the first (maybe unique) string value of the parameter.
- Throws:
NullPointerException
- if name
is null
.
getParameterValues
public abstract java.lang.String[] getParameterValues(java.lang.String name)
- Gets the values of a request parameter as a
String[]
,
or null
if the parameter is missing or is a list of uploaded files.
- Parameters:
name
- the name of the request parameter.- Returns:
- a string array containing all of the values the parameter has.
- Throws:
NullPointerException
- if name
is null
.
getFileParameterNames
public abstract java.util.Enumeration getFileParameterNames()
- Gets an
Enumeration
of String
objects,
containing the names of the file parameters.
The enumeration is empty if the request has no file parameters.
- Returns:
- the enumeration of the names of the file parameters.
getFileParameter
public abstract FileBean getFileParameter(java.lang.String name)
- Gets the value of a file parameter as a
FileBean
,
or null
if the parameter is missing or is not an uploaded file.
- Parameters:
name
- the name of the file parameter.- Returns:
- the first (maybe unique) file value of the parameter.
- Throws:
NullPointerException
- if name
is null
.
getFileParameterValues
public abstract FileBean[] getFileParameterValues(java.lang.String name)
- Gets the values of a file parameter as a
FileBean[]
,
or null
if the parameter is missing or is not a list of uploaded files.
- Parameters:
name
- the name of the file parameter.- Returns:
- a
FileBean
array containing all of the values the parameter has. - Throws:
NullPointerException
- if name
is null
.