| org.springframework.webflow.core.collection.ParameterMap
All known Subclasses: org.springframework.webflow.core.collection.LocalParameterMap,
ParameterMap | public interface ParameterMap extends MapAdaptable(Code) | | An interface for accessing parameters in a backing map. Parameters are
immutable and have string keys and string values.
The accessor methods offered by this class taking a target type argument
only need to support conversions to well know types like String, Number subclasses,
Boolean and so on.
author: Keith Donald |
Method Summary | |
public AttributeMap | asAttributeMap() Adapts this parameter map to an
AttributeMap . | public boolean | contains(String parameterName) | public String | get(String parameterName) Get a parameter value, returning null if no value is
found. | public String | get(String parameterName, String defaultValue) Get a parameter value, returning the defaultValue if no value is found. | public Object | get(String parameterName, Class targetType) Get a parameter value, converting it from String to the
target type. | public Object | get(String parameterName, Class targetType, Object defaultValue) Get a parameter value, converting it from String to the
target type or returning the defaultValue if not found. | public String[] | getArray(String parameterName) Get a multi-valued parameter value, returning null if no
value is found. | public Object[] | getArray(String parameterName, Class targetElementType) Get a multi-valued parameter value, converting each value to the target
type or returning null if no value is found. | public Boolean | getBoolean(String parameterName) Returns a boolean parameter value in the map, returning null
if no value was found. | public Boolean | getBoolean(String parameterName, Boolean defaultValue) Returns a boolean parameter value in the map, returning the defaultValue
if no value was found. | public Integer | getInteger(String parameterName) Returns an integer parameter value in the map, returning
null if no value was found. | public Integer | getInteger(String parameterName, Integer defaultValue) Returns an integer parameter value in the map, returning the defaultValue
if no value was found. | public Long | getLong(String parameterName) Returns a long parameter value in the map, returning null
if no value was found. | public Long | getLong(String parameterName, Long defaultValue) Returns a long parameter value in the map, returning the defaultValue if
no value was found. | public MultipartFile | getMultipartFile(String parameterName) Get a multi-part file parameter value, returning null if
no value is found. | public Number | getNumber(String parameterName, Class targetType) Returns a number parameter value in the map that is of the specified
type, returning null if no value was found. | public Number | getNumber(String parameterName, Class targetType, Number defaultValue) Returns a number parameter value in the map of the specified type,
returning the defaultValue if no value was found. | public String | getRequired(String parameterName) Get the value of a required parameter. | public Object | getRequired(String parameterName, Class targetType) Get the value of a required parameter and convert it to the target type. | public String[] | getRequiredArray(String parameterName) Get a required multi-valued parameter value. | public Object[] | getRequiredArray(String parameterName, Class targetElementType) Get a required multi-valued parameter value, converting each value to the
target type. | public Boolean | getRequiredBoolean(String parameterName) Returns a boolean parameter value in the map, throwing an exception if
the parameter is not present or could not be converted. | public Integer | getRequiredInteger(String parameterName) Returns an integer parameter value in the map, throwing an exception if
the parameter is not present or could not be converted. | public Long | getRequiredLong(String parameterName) Returns a long parameter value in the map, throwing an exception if the
parameter is not present or could not be converted. | public MultipartFile | getRequiredMultipartFile(String parameterName) Get the value of a required multipart file parameter. | public Number | getRequiredNumber(String parameterName, Class targetType) Returns a number parameter value in the map, throwing an exception if the
parameter is not present or could not be converted. | public boolean | isEmpty() | public int | size() Returns the number of parameters in this map. |
asAttributeMap | public AttributeMap asAttributeMap()(Code) | | Adapts this parameter map to an
AttributeMap .
the underlying map as a unmodifiable attribute map |
contains | public boolean contains(String parameterName)(Code) | | Does the parameter with the provided name exist in this map?
Parameters: parameterName - the parameter name true if so, false otherwise |
get | public String get(String parameterName)(Code) | | Get a parameter value, returning null if no value is
found.
Parameters: parameterName - the parameter name the parameter value |
get | public String get(String parameterName, String defaultValue)(Code) | | Get a parameter value, returning the defaultValue if no value is found.
Parameters: parameterName - the parameter name Parameters: defaultValue - the default the parameter value |
get | public Object get(String parameterName, Class targetType) throws ConversionException(Code) | | Get a parameter value, converting it from String to the
target type.
Parameters: parameterName - the name of the parameter Parameters: targetType - the target type of the parameter value the converted parameter value, or null if not found throws: ConversionException - when the value could not be converted |
get | public Object get(String parameterName, Class targetType, Object defaultValue) throws ConversionException(Code) | | Get a parameter value, converting it from String to the
target type or returning the defaultValue if not found.
Parameters: parameterName - name of the parameter to get Parameters: targetType - the target type of the parameter value Parameters: defaultValue - the default value the converted parameter value, or the default if not found throws: ConversionException - when a value could not be converted |
getArray | public String[] getArray(String parameterName)(Code) | | Get a multi-valued parameter value, returning null if no
value is found. If the parameter is single valued an array with a single
element is returned.
Parameters: parameterName - the parameter name the parameter value array |
getArray | public Object[] getArray(String parameterName, Class targetElementType) throws ConversionException(Code) | | Get a multi-valued parameter value, converting each value to the target
type or returning null if no value is found.
Parameters: parameterName - the parameter name Parameters: targetElementType - the target type of the array's elements the converterd parameter value array throws: ConversionException - when the value could not be converted |
getBoolean | public Boolean getBoolean(String parameterName) throws ConversionException(Code) | | Returns a boolean parameter value in the map, returning null
if no value was found.
Parameters: parameterName - the parameter name the long parameter value throws: ConversionException - when the value could not be converted |
getBoolean | public Boolean getBoolean(String parameterName, Boolean defaultValue) throws ConversionException(Code) | | Returns a boolean parameter value in the map, returning the defaultValue
if no value was found.
Parameters: parameterName - the parameter name Parameters: defaultValue - the default the boolean parameter value throws: ConversionException - when the value could not be converted |
getInteger | public Integer getInteger(String parameterName) throws ConversionException(Code) | | Returns an integer parameter value in the map, returning
null if no value was found.
Parameters: parameterName - the parameter name the integer parameter value throws: ConversionException - when the value could not be converted |
getInteger | public Integer getInteger(String parameterName, Integer defaultValue) throws ConversionException(Code) | | Returns an integer parameter value in the map, returning the defaultValue
if no value was found.
Parameters: parameterName - the parameter name Parameters: defaultValue - the default the integer parameter value throws: ConversionException - when the value could not be converted |
getLong | public Long getLong(String parameterName) throws ConversionException(Code) | | Returns a long parameter value in the map, returning null
if no value was found.
Parameters: parameterName - the parameter name the long parameter value throws: ConversionException - when the value could not be converted |
getLong | public Long getLong(String parameterName, Long defaultValue) throws ConversionException(Code) | | Returns a long parameter value in the map, returning the defaultValue if
no value was found.
Parameters: parameterName - the parameter name Parameters: defaultValue - the default the long parameter value throws: ConversionException - when the value could not be converted |
getMultipartFile | public MultipartFile getMultipartFile(String parameterName)(Code) | | Get a multi-part file parameter value, returning null if
no value is found.
Parameters: parameterName - the parameter name the multipart file |
getNumber | public Number getNumber(String parameterName, Class targetType) throws ConversionException(Code) | | Returns a number parameter value in the map that is of the specified
type, returning null if no value was found.
Parameters: parameterName - the parameter name Parameters: targetType - the target number type the number parameter value throws: ConversionException - when the value could not be converted |
getNumber | public Number getNumber(String parameterName, Class targetType, Number defaultValue) throws ConversionException(Code) | | Returns a number parameter value in the map of the specified type,
returning the defaultValue if no value was found.
Parameters: parameterName - the parameter name Parameters: defaultValue - the default the number parameter value throws: ConversionException - when the value could not be converted |
getRequiredMultipartFile | public MultipartFile getRequiredMultipartFile(String parameterName)(Code) | | Get the value of a required multipart file parameter.
Parameters: parameterName - the name of the parameter the parameter value throws: IllegalArgumentException - when the parameter is not found |
isEmpty | public boolean isEmpty()(Code) | | Is this parameter map empty, with a size of 0?
true if empty, false if not |
size | public int size()(Code) | | Returns the number of parameters in this map.
the parameter count |
|
|