|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.core.InputWrapper
public class InputWrapper
A wrapper for the action input.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
InputWrapper()
|
|
InputWrapper(Input input)
|
|
| Method Summary | ||
|---|---|---|
void |
clear()
|
|
boolean |
containsKey(Object key)
|
|
boolean |
containsValue(Object value)
|
|
Iterator |
entries()
|
|
Set |
entrySet()
|
|
Object |
get(Object key)
|
|
boolean |
getBoolean(String name)
|
|
boolean |
getBoolean(String name,
boolean def)
|
|
boolean |
getBooleanValue(String name)
Deprecated. use getBoolean instead |
|
boolean |
getBooleanValue(String name,
boolean def)
Deprecated. use getBoolean instead |
|
Date |
getDate(String name)
Parse a parameter value from this input as a Date. |
|
Date |
getDate(String name,
int style)
Parse a parameter value from this action input as a Date using the given style. |
|
Date |
getDate(String name,
String pattern)
Parse a parameter value from this action input as a Date using the given pattern. |
|
double |
getDouble(String name)
|
|
double |
getDouble(String name,
double def)
|
|
double |
getDoubleValue(String name)
Deprecated. use getDouble instead |
|
double |
getDoubleValue(String name,
double def)
Deprecated. use getDouble instead |
|
|
getEnum(String name,
Class<E> enumClass)
Convert the parameter value from this action input as an Enum. |
|
|
getEnums(String name,
Class<E> enumClass)
Convert the parameter value from this action input as an Array of Enums. |
|
float |
getFloat(String name)
|
|
float |
getFloat(String name,
float def)
|
|
float |
getFloatValue(String name)
Deprecated. use getFloat instead |
|
float |
getFloatValue(String name,
float def)
Deprecated. use getFloat instead |
|
String |
getHeader(String name)
Gets a header value from this input. |
|
Iterator<String> |
getHeaderKeys()
Gets an iterator with all header names. |
|
int |
getInt(String name)
|
|
int |
getInt(String name,
int def)
|
|
int[] |
getInts(String name)
|
|
int |
getIntValue(String name)
Deprecated. use getInt instead |
|
int |
getIntValue(String name,
int def)
Deprecated. use getInt instead |
|
int[] |
getIntValues(String name)
Deprecated. use getInts intead |
|
long |
getLong(String name)
|
|
long |
getLong(String name,
long def)
|
|
long[] |
getLongs(String name)
Gets all parameter values with the given name as an long array. |
|
long |
getLongValue(String name)
Deprecated. use getLong instead |
|
long |
getLongValue(String name,
long def)
Deprecated. use getLong instead |
|
|
getObject(Class<? extends E> klass)
Gets a populated object with the values from the action input. |
|
|
getObject(Class<? extends E> klass,
String prefix)
Gets a populated object with the values from the action input. |
|
String |
getProperty(String name)
Gets a property associated with this input. |
|
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. |
|
void |
inject(Object bean)
Populates (inject properties) the bean with the values from the input. |
|
void |
inject(Object bean,
String prefix)
Populates (inject properties) the bean with the values from the input. |
|
boolean |
isEmpty()
|
|
Iterator<String> |
keys()
Gets an iterator with all the parameter names. |
|
Set<Object> |
keySet()
|
|
Object |
put(Object key,
Object value)
|
|
void |
putAll(Map map)
|
|
Object |
remove(Object key)
|
|
void |
removeInput()
|
|
void |
removeValue(String name)
Removes a parameter from this input. |
|
void |
setInput(Input input)
|
|
void |
setValue(String name,
Object value)
Sets a parameter value with the given name. |
|
int |
size()
|
|
Collection<Object> |
values()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public InputWrapper()
public InputWrapper(Input input)
| Method Detail |
|---|
public void setInput(Input input)
public void removeInput()
public String getHeader(String name)
Input
getHeader in interface Inputname - the header name
public String getStringValue(String name)
Input
getStringValue in interface Inputname - the parameter's name
public String getString(String name)
getString in interface Inputpublic int getIntValue(String name)
Input
getIntValue in interface Inputname - the parameter's name
public int getInt(String name)
getInt in interface Input
public int getIntValue(String name,
int def)
Input
getIntValue in interface Inputname - the parameter's namedef - default value to return
public int getInt(String name,
int def)
getInt in interface Inputpublic boolean hasValue(String name)
Input
hasValue in interface Inputname - The name of the key.
public boolean has(String key)
Input
has in interface Inputpublic long getLongValue(String name)
Input
getLongValue in interface Inputname - the parameter's name
public long getLong(String name)
getLong in interface Inputpublic long[] getLongs(String name)
Input
getLongs in interface Inputname - the parameters'name
public long getLongValue(String name,
long def)
Input
getLongValue in interface Inputname - the parameter's namedef - default value to return
public long getLong(String name,
long def)
getLong in interface Inputpublic float getFloatValue(String name)
Input
getFloatValue in interface Inputname - the parameter's name
public float getFloat(String name)
getFloat in interface Input
public float getFloatValue(String name,
float def)
Input
getFloatValue in interface Inputname - the parameter's namedef - default value to return
public float getFloat(String name,
float def)
getFloat in interface Inputpublic double getDoubleValue(String name)
Input
getDoubleValue in interface Inputname - the parameter's name
public double getDouble(String name)
getDouble in interface Input
public double getDoubleValue(String name,
double def)
Input
getDoubleValue in interface Inputname - the parameter's namedef - default value to return
public double getDouble(String name,
double def)
getDouble in interface Inputpublic boolean getBooleanValue(String name)
Input
getBooleanValue in interface Inputname - the parameter's name
public boolean getBoolean(String name)
getBoolean in interface Input
public boolean getBooleanValue(String name,
boolean def)
Input
getBooleanValue in interface Inputname - the parameter's namedef - default value to return
public boolean getBoolean(String name,
boolean def)
getBoolean in interface Inputpublic String[] getStringValues(String name)
Input
getStringValues in interface Inputname - the parameters'name
public String[] getStrings(String name)
getStrings in interface Inputpublic int[] getIntValues(String name)
Input
getIntValues in interface Inputname - the parameters'name
public int[] getInts(String name)
getInts 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 Object getValue(String name)
Input
getValue in interface Inputname - the name of the parameter
public void removeValue(String name)
Input
removeValue in interface Inputname - the name of the parameter to remove.public Iterator<String> keys()
Input
keys in interface Inputpublic Iterator<String> getHeaderKeys()
Input
getHeaderKeys in interface Inputpublic String getProperty(String name)
Input
getProperty in interface Inputname - the name of the property
public <E> E getObject(Class<? extends E> klass)
Input
getObject in interface Input
public <E> E getObject(Class<? extends E> klass,
String prefix)
Input
getObject in interface Inputpublic void inject(Object bean)
Input
inject in interface Input
public void inject(Object bean,
String prefix)
Input
inject in interface Inputpublic void clear()
clear in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Set entrySet()
entrySet in interface Mappublic Object get(Object key)
get in interface Mappublic Set<Object> keySet()
keySet in interface Map
public Object put(Object key,
Object value)
put in interface Mappublic void putAll(Map map)
putAll in interface Mappublic Object remove(Object key)
remove in interface Mappublic int size()
size in interface Mappublic Collection<Object> values()
values in interface Mappublic Iterator entries()
public Date getDate(String name)
Input
getDate in interface Inputname - the parameter's name
public Date getDate(String name,
String pattern)
Input
getDate in interface Inputname - the parameter's namepattern - The SimpleDateFormat pattern to be used
public Date getDate(String name,
int style)
Input
getDate in interface Inputname - the parameter's namestyle - the DateFormat style to be used
public <E extends Enum<E>> E getEnum(String name,
Class<E> enumClass)
Input
getEnum in interface Inputname - the parameter's nameenumClass - the Enum's class
public <E extends Enum<E>> Set<E> getEnums(String name,
Class<E> enumClass)
Input
getEnums in interface Inputname - the parameter's nameenumClass - the Enum's class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||