public class RequestInput extends AbstractInput implements Map<String,Object>
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,Method> |
cache |
protected Set<String> |
keys |
protected Map<String,Object> |
map |
protected javax.servlet.http.HttpServletRequest |
req |
protected javax.servlet.http.HttpServletResponse |
res |
| Constructor and Description |
|---|
RequestInput(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Creates an Input for the given HttpServletRequest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
String |
getHeader(String name)
Gets a header value from this input.
|
Iterator<String> |
getHeaderKeys()
Gets an iterator with all header names.
|
protected Locale |
getLocale() |
String |
getProperty(String name)
Gets a property associated with this input.
|
javax.servlet.http.HttpServletRequest |
getRequest()
Gets the HttpServletRequest this input encapsulates.
|
String |
getString(String name) |
String[] |
getStrings(String name) |
String |
getStringValue(String name)
Deprecated.
use getString instead
|
String[] |
getStringValues(String name)
Deprecated.
use getStrings instead
|
Object |
getValue(String name)
Gets a parameter value (any object) with the given name.
|
boolean |
has(String key)
Check if the input has this key (Shorter verions of hasValue)
|
boolean |
hasValue(String name)
Checks if a value exists.
|
boolean |
isEmpty() |
Iterator<String> |
keys()
Gets an iterator with all the parameter names.
|
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,? extends Object> t) |
Object |
remove(Object key) |
void |
removeValue(String name)
Removes a parameter from this input.
|
void |
setValue(String name,
Object value)
Sets a parameter value with the given name.
|
int |
size() |
String |
toString() |
Collection<Object> |
values() |
getBoolean, getBoolean, getBooleanValue, getBooleanValue, getDate, getDate, getDate, getDouble, getDouble, getDoubleValue, getDoubleValue, getEnum, getEnums, getFloat, getFloat, getFloatValue, getFloatValue, getInt, getInt, getInts, getIntValue, getIntValue, getIntValues, getLong, getLong, getLongs, getLongValue, getLongValue, getObject, getObject, getObject, getObject, getObject, getObject, getObject, inject, inject, isB, mainprotected javax.servlet.http.HttpServletRequest req
protected javax.servlet.http.HttpServletResponse res
public RequestInput(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
req - The requestpublic javax.servlet.http.HttpServletRequest getRequest()
public String getProperty(String name)
InputgetProperty in interface Inputname - the name of the propertypublic String getHeader(String name)
Inputpublic Iterator<String> getHeaderKeys()
InputgetHeaderKeys in interface Inputpublic Iterator<String> keys()
Inputpublic void removeValue(String name)
InputremoveValue in interface Inputname - the name of the parameter to remove.public String getStringValue(String name)
getStringValue in interface Inputname - the parameter's namepublic String[] getStringValues(String name)
getStringValues in interface Inputname - the parameters'namepublic String[] getStrings(String name)
getStrings in interface Inputpublic void setValue(String name, Object value)
Inputpublic boolean hasValue(String name)
Inputpublic boolean has(String key)
Inputpublic Object getValue(String name)
Inputpublic boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>protected Locale getLocale()
getLocale in class AbstractInputCopyright © 2015. All Rights Reserved.