public interface Input
| Modifier and Type | Method and Description |
|---|---|
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
|
<E extends Enum<E>> |
getEnum(String name,
Class<E> enumClass)
Convert the parameter value from this action input as an Enum.
|
<E extends Enum<E>> |
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 instead.
|
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.
getLong instead
|
long |
getLongValue(String name,
long def)
Deprecated.
getLong instead
|
<E> E |
getObject(Class<? extends E> klass)
Gets a populated object with the values from the action input.
|
<E> E |
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.
|
Iterator<String> |
keys()
Gets an iterator with all the parameter names.
|
void |
removeValue(String name)
Removes a parameter from this input.
|
void |
setValue(String name,
Object value)
Sets a parameter value with the given name.
|
String getHeader(String name)
name - the header nameIterator<String> getHeaderKeys()
boolean hasValue(String name)
name - The name of the key.boolean has(String key)
key - String getProperty(String name)
name - the name of the propertyString getStringValue(String name)
name - the parameter's nameint getIntValue(String name)
name - the parameter's nameNullPointerException - if the value does not exist.InputException - is the value cannot be converted to an int.int getInt(String name)
String[] getStringValues(String name)
name - the parameters'nameint[] getIntValues(String name)
name - the parameters'nameInputException - if any of the values cannot be converted to an int.int[] getInts(String name)
void setValue(String name, Object value)
name - the name of the parametervalue - the parameter value (any object)Object getValue(String name)
name - the name of the parametervoid removeValue(String name)
name - the name of the parameter to remove.Iterator<String> keys()
int getIntValue(String name, int def)
name - the parameter's namedef - default value to returnInputException - is the value cannot be converted to an int.int getInt(String name, int def)
long getLongValue(String name)
name - the parameter's nameNullPointerException - if the value does not exist.InputException - is the value cannot be converted to a longlong getLong(String name)
long[] getLongs(String name)
name - the parameters'nameInputException - if any of the values cannot be converted to an long.long getLongValue(String name, long def)
name - the parameter's namedef - default value to returnInputException - is the value cannot be converted to a long.long getLong(String name, long def)
boolean getBooleanValue(String name)
name - the parameter's nameNullPointerException - if the value does not exist.InputException - is the value cannot be converted to a boolean.boolean getBoolean(String name)
boolean getBooleanValue(String name, boolean def)
name - the parameter's namedef - default value to returnInputException - is the value cannot be converted to a boolean.boolean getBoolean(String name, boolean def)
float getFloatValue(String name)
name - the parameter's nameNullPointerException - if the value does not exist.InputException - is the value cannot be converted to a float.float getFloat(String name)
float getFloatValue(String name, float def)
name - the parameter's namedef - default value to returnInputException - is the value cannot be converted to a float.float getFloat(String name, float def)
double getDoubleValue(String name)
name - the parameter's nameNullPointerException - if the value does not exist.InputException - is the value cannot be converted to a doubledouble getDouble(String name)
double getDoubleValue(String name, double def)
name - the parameter's namedef - default value to returnInputException - is the value cannot be converted to a double.double getDouble(String name, double def)
<E> E getObject(Class<? extends E> klass)
klass - void inject(Object bean)
bean - <E> E getObject(Class<? extends E> klass, String prefix)
klass - prefix - void inject(Object bean, String prefix)
bean - prefix - Date getDate(String name)
name - the parameter's nameInputException - throws if the attributte can't be parsedDate getDate(String name, int style)
name - the parameter's namestyle - the DateFormat style to be usedInputException - throws if the attributte can't be parsedDate getDate(String name, String pattern)
name - the parameter's namepattern - The SimpleDateFormat pattern to be usedInputException - throws if the attributte can't be parsed<E extends Enum<E>> E getEnum(String name, Class<E> enumClass)
name - the parameter's nameenumClass - the Enum's classCopyright © 2015. All Rights Reserved.