|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.core.AbstractInput
org.mentawai.core.RequestInput
public class RequestInput
Encapsulates a HttpServletRequest as an Input for Mentawai actions. This class also implements the java.util.Map interface so it can be used with JSP Expression Language. Most of map operations are not supported.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
protected static Map<String,Method> |
cache
|
protected Set<String> |
keys
|
protected Map<String,Object> |
map
|
protected javax.servlet.http.HttpServletRequest |
req
|
| Constructor Summary | |
|---|---|
RequestInput(javax.servlet.http.HttpServletRequest req)
Creates an Input for the given HttpServletRequest. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.mentawai.core.AbstractInput |
|---|
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, getObject, getObject, isB, main |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
protected Map<String,Object> map
protected javax.servlet.http.HttpServletRequest req
protected static Map<String,Method> cache
protected Set<String> keys
| Constructor Detail |
|---|
public RequestInput(javax.servlet.http.HttpServletRequest req)
req - The request| Method Detail |
|---|
public String toString()
toString in class Objectpublic javax.servlet.http.HttpServletRequest getRequest()
public String getProperty(String name)
Input
getProperty in interface Inputname - the name of the property
public String getHeader(String name)
Input
getHeader in interface Inputname - the header name
public Iterator<String> getHeaderKeys()
Input
getHeaderKeys in interface Inputpublic Iterator<String> keys()
Input
keys in interface Inputpublic void removeValue(String name)
Input
removeValue in interface Inputname - the name of the parameter to remove.public String getStringValue(String name)
getStringValue in interface Inputname - the parameter's name
public String getString(String name)
getString in interface Inputpublic String[] getStringValues(String name)
getStringValues in interface Inputname - the parameters'name
public String[] getStrings(String name)
getStrings in interface Input
public void setValue(String name,
Object value)
Input
setValue in interface Inputname - the name of the parametervalue - the parameter value (any object)public boolean hasValue(String name)
Input
hasValue in interface Inputname - The name of the key.
public boolean has(String key)
Input
has in interface Inputpublic Object getValue(String name)
Input
getValue in interface Inputname - the name of the parameter
public void clear()
clear in interface Map<String,Object>public boolean isEmpty()
isEmpty in interface Map<String,Object>public boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>public Object get(Object key)
get in interface Map<String,Object>public Set<String> keySet()
keySet in interface Map<String,Object>
public Object put(String key,
Object value)
put in interface Map<String,Object>public void putAll(Map<? extends String,? extends Object> t)
putAll in interface Map<String,Object>public Object remove(Object key)
remove in interface Map<String,Object>public int size()
size in interface Map<String,Object>public Collection<Object> values()
values in interface Map<String,Object>public Set<Map.Entry<String,Object>> entrySet()
entrySet in interface Map<String,Object>protected Locale getLocale()
getLocale in class AbstractInput
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||