|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectledge.parameters.DefaultParameters
org.objectledge.parameters.SortedParameters
org.objectledge.parameters.RequestParameters
public class RequestParameters
Request parameters contain parameters from the request sorted by their names.
TODO: figure out a way to discover URL parameters encoding, now UTF-8 is used, but browsers encode GET form parameters using form page encoding thus rendering UTF-8 decoding useless. Problems:
| Field Summary | |
|---|---|
private static int |
NAME
|
private Set<String> |
pathParams
|
private Set<String> |
postParams
|
private Set<String> |
queryParams
|
private static int |
SEPARATOR_AFTER_NAME
|
private static int |
SEPARATOR_AFTER_VALUE
|
private static int |
START
|
private static int |
VALUE
|
| Fields inherited from class org.objectledge.parameters.DefaultParameters |
|---|
map, TRUE |
| Constructor Summary | |
|---|---|
protected |
RequestParameters()
No arg constructor for mocking. |
|
RequestParameters(javax.servlet.http.HttpServletRequest request)
Create the parameter container with parameters found in http request. |
| Method Summary | |
|---|---|
void |
addPOSTParameter(String name,
String value)
To be used by FileUploadValve, that handles multipart/form-data POSTs. |
private void |
addURLParams(String urlPart,
String separator)
|
static RequestParameters |
getRequestParameters(Context context)
Usefull method to retrieve parameters from context. |
boolean |
isPathInfoParameter(String name)
Checks if the parameter was passed in through request path info. |
boolean |
isPOSTParameter(String name)
Checks if the parameter was passed in through POST request body. |
boolean |
isQueryStringParameter(String name)
Checks if the parameter was passed in through request query string. |
| Methods inherited from class org.objectledge.parameters.SortedParameters |
|---|
setupMap |
| Methods inherited from class org.objectledge.parameters.DefaultParameters |
|---|
add, add, add, add, add, add, add, add, add, add, add, add, add, get, get, getBoolean, getBoolean, getBooleans, getChild, getDate, getDate, getDates, getFloat, getFloat, getFloats, getInt, getInt, getInts, getLong, getLong, getLongs, getParameterNames, getSingleValue, getStrings, isDefined, remove, remove, remove, remove, remove, remove, remove, remove, removeExcept, set, set, set, set, set, set, set, set, set, set, set, set, set, toString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Set<String> pathParams
private Set<String> queryParams
private Set<String> postParams
private static final int START
private static final int NAME
private static final int SEPARATOR_AFTER_NAME
private static final int VALUE
private static final int SEPARATOR_AFTER_VALUE
| Constructor Detail |
|---|
protected RequestParameters()
public RequestParameters(javax.servlet.http.HttpServletRequest request)
throws IllegalArgumentException
request - the request
IllegalArgumentException - if illegal escape sequences appears.| Method Detail |
|---|
public static RequestParameters getRequestParameters(Context context)
context - the context.
private void addURLParams(String urlPart,
String separator)
public boolean isPathInfoParameter(String name)
name - name of the parameter.
true if the parameter was passed in through path info.public boolean isQueryStringParameter(String name)
name - name of the parameter.
true if the parameter was passed in through request query string.public boolean isPOSTParameter(String name)
name - name of the parameter.
true if the parameter was passed through POST request body.
public void addPOSTParameter(String name,
String value)
name - of the parameter.value - value of the parameter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||