|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ParameterParser is an interface to a utility to handle parsing and retrieving the data passed via the GET/POST/PATH_INFO arguments.
NOTE: The name= portion of a name=value pair may be converted to lowercase or uppercase when the object is initialized and when new data is added. This behaviour is determined by the url.case.folding property in TurbineResources.properties. Adding a name/value pair may overwrite existing name=value pairs if the names match:
ParameterParser pp = data.getParameters(); pp.add("ERROR",1); pp.add("eRrOr",2); int result = pp.getInt("ERROR");In the above example, result is 2.
Field Summary |
Fields inherited from interface org.apache.turbine.util.parser.ValueParser |
URL_CASE_FOLDING, URL_CASE_FOLDING_LOWER, URL_CASE_FOLDING_NONE, URL_CASE_FOLDING_UPPER |
Method Summary | |
void |
add(java.lang.String name,
org.apache.commons.fileupload.FileItem item)
Add a FileItem object as a parameters. |
void |
append(java.lang.String name,
org.apache.commons.fileupload.FileItem item)
Deprecated. Use add(String name, FileItem item) instead. |
org.apache.commons.fileupload.FileItem |
getFileItem(java.lang.String name)
Return a FileItem object for the given name. |
org.apache.commons.fileupload.FileItem[] |
getFileItems(java.lang.String name)
Return an array of FileItem objects for the given name. |
javax.servlet.http.HttpServletRequest |
getRequest()
Gets the parsed servlet request. |
byte[] |
getUploadData()
Gets the uploadData byte[] |
void |
setRequest(javax.servlet.http.HttpServletRequest req)
Sets the servlet request to be parser. |
void |
setUploadData(byte[] uploadData)
Sets the uploadData byte[] |
Methods inherited from interface org.apache.turbine.util.parser.ValueParser |
add, add, add, add, add, add, append, clear, containsDateSelectorKeys, containsKey, convert, get, getBigDecimal, getBigDecimal, getBigDecimals, getBool, getBool, getBoolean, getBoolean, getBooleanObject, getBooleanObject, getByte, getByte, getByteObject, getByteObject, getBytes, getCharacterEncoding, getDate, getDate, getDate, getDouble, getDouble, getDoubleObject, getDoubleObject, getDoubleObjects, getDoubles, getFloat, getFloat, getFloatObject, getFloatObject, getFloatObjects, getFloats, getInt, getInt, getInteger, getInteger, getInteger, getIntegers, getIntObject, getIntObject, getIntObjects, getInts, getKeys, getLong, getLong, getLongObject, getLongObject, getLongObjects, getLongs, getNumberKey, getObject, getObjects, getString, getString, getStringKey, getStrings, getStrings, keys, keySet, remove, setCharacterEncoding, setProperties, setString, setStrings, toString |
Method Detail |
public javax.servlet.http.HttpServletRequest getRequest()
public void setRequest(javax.servlet.http.HttpServletRequest req)
To add name/value pairs to this set of parameters, use the
add()
methods.
req
- An HttpServletRequest.public void setUploadData(byte[] uploadData)
uploadData
- A byte[] with data.public byte[] getUploadData()
public void append(java.lang.String name, org.apache.commons.fileupload.FileItem item)
name
- A String with the name.item
- A FileItem with the value.public void add(java.lang.String name, org.apache.commons.fileupload.FileItem item)
name
- A String with the name.item
- A FileItem with the value.public org.apache.commons.fileupload.FileItem getFileItem(java.lang.String name)
name
- A String with the name.
public org.apache.commons.fileupload.FileItem[] getFileItems(java.lang.String name)
name
- A String with the name.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |