public class TypedProperty
extends java.util.Hashtable
implements java.io.Serializable
java.util.Map
object.
It provides additional methods for retrieving properties such as java.lang.Integer
,
java.lang.Double
, java.lang.Float
& java.lang.String
instead of java.lang.Object
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM Copyright notice field.
|
Constructor and Description |
---|
TypedProperty()
This is the default constructor for this class.
|
TypedProperty(java.util.Hashtable hTP)
This constructor creates a typed property object from the given hashtable.
|
TypedProperty(int initialCapacity)
This constructor creates a typed property object, given an initial capacity for the object.
|
TypedProperty(int initialCapacity,
float loadFactor)
This constructor creates a typed property object, given an initial capacity and load factor for the object.
|
Modifier and Type | Method and Description |
---|---|
static TypedProperty |
createTextResponse(java.lang.String textResponse)
Deprecated.
Use the static method of the same name defined in the
AbstractDirectViewCommand class. |
java.lang.Object |
get(java.lang.String key)
This method returns the
Object associated with the specified key. |
java.lang.Object |
get(java.lang.String key,
java.lang.Object def)
This method returns the
Object associated with the specified key. |
java.lang.String[] |
getArray(java.lang.String key)
This method returns the object associated with the given key as an array of
String objects. |
java.lang.String[] |
getArray(java.lang.String key,
java.lang.String[] def)
This method returns the object associated with the given key as an array of
String objects. |
java.math.BigDecimal |
getBigDecimal(java.lang.String key)
This method returns the object associated with the given key as a
BigDecimal object. |
java.math.BigDecimal |
getBigDecimal(java.lang.String key,
java.math.BigDecimal def)
This method returns the object associated with the given key as a
BigDecimal object. |
java.math.BigDecimal |
getBigDecimalChecked(java.lang.String key,
java.math.BigDecimal def)
This method returns the object associated with the given key as a
BigDecimal object. |
boolean |
getBoolean(java.lang.String key)
This method returns the object associated with the given key as a boolean value.
|
boolean |
getBoolean(java.lang.String key,
boolean def)
This method returns the object associated with the given key as a boolean value.
|
java.lang.Double |
getDouble(java.lang.String key)
This method returns the object associated with the given key as a
Double object. |
java.lang.Double |
getDouble(java.lang.String key,
double def)
This method returns the object associated with the given key as a
Double object. |
java.lang.Double |
getDouble(java.lang.String key,
java.lang.Double def)
This method returns the object associated with the given key as a
Double object. |
java.lang.Double |
getDoubleChecked(java.lang.String key,
double def)
This method returns the object associated with the given key as a
Double object. |
java.lang.Double |
getDoubleChecked(java.lang.String key,
java.lang.Double def)
This method returns the object associated with the given key as a
Double object. |
double |
getDoubleValue(java.lang.String key)
This method returns the object associated with the given key as a
double value. |
double |
getDoubleValue(java.lang.String key,
double def)
This method returns the object associated with the given key as a
double value. |
double |
getDoubleValueChecked(java.lang.String key,
double def)
This method returns the object associated with the given key as a
double value. |
java.lang.String |
getEncodedQueryString()
This method returns the query string representation of the parameters stored in the typed property object.
|
java.lang.Float |
getFloat(java.lang.String key)
This method returns the object associated with the given key as a
Float object. |
java.lang.Float |
getFloat(java.lang.String key,
float def)
This method returns the object associated with the given key as a
Float object. |
java.lang.Float |
getFloat(java.lang.String key,
java.lang.Float def)
This method returns the object associated with the given key as a
Float object. |
java.lang.Float |
getFloatChecked(java.lang.String key,
float def)
This method returns the object associated with the given key as a
Float object. |
java.lang.Float |
getFloatChecked(java.lang.String key,
java.lang.Float def)
This method returns the object associated with the given key as a
Float object. |
float |
getFloatValue(java.lang.String key)
This method returns the object associated with the given key as a
float value. |
float |
getFloatValue(java.lang.String key,
float def)
This method returns the value associated with the given key as a
float value. |
float |
getFloatValueChecked(java.lang.String key,
float def)
This method returns the value associated with the given key as a
float value. |
java.lang.Integer |
getInteger(java.lang.String key)
This method returns the object associated with the given key as an
Integer object. |
java.lang.Integer |
getInteger(java.lang.String key,
int def)
This method returns the object associated with the given key as an
Integer object. |
java.lang.Integer |
getInteger(java.lang.String key,
java.lang.Integer def)
This method returns the object associated with the given key as an
Integer object. |
java.lang.Integer |
getIntegerChecked(java.lang.String key,
int def)
This method returns the object associated with the given key as an
Integer object. |
java.lang.Integer |
getIntegerChecked(java.lang.String key,
java.lang.Integer def)
This method returns the object associated with the given key as an
Integer object. |
java.lang.String |
getIntParamName(java.lang.String key)
This method returns the corresponding Electronic Commerce Modeling Language (ECML) version
of the parameter name.
|
int |
getIntValue(java.lang.String key)
This method returns the object associated with the given key as an
integer value. |
int |
getIntValue(java.lang.String key,
int def)
This method returns the object associated with the given key as an
integer value. |
int |
getIntValueChecked(java.lang.String key,
int def)
This method returns the object associated with the given key as an
integer value. |
java.lang.Long |
getLong(java.lang.String key)
This method returns the object associated with the given key as a
Long object. |
java.lang.Long |
getLong(java.lang.String key,
long def)
This method returns the object associated with the given key as a
Long object. |
java.lang.Long |
getLong(java.lang.String key,
java.lang.Long def)
This method returns the object associated with the given key as a
Long object. |
java.lang.Long[] |
getLongArray(java.lang.String key)
This method returns the object associated with the given key as an array of
Long objects. |
java.lang.Long[] |
getLongArray(java.lang.String key,
java.lang.Long[] def)
This method returns the object associated with the given key as an array of
Long objects. |
java.lang.Long[] |
getLongArrayChecked(java.lang.String key,
java.lang.Long[] def)
This method returns the object associated with the given key as an array of
Long objects. |
java.lang.Long |
getLongChecked(java.lang.String key,
long def)
This method returns the object associated with the given key as a
Long object. |
java.lang.Long |
getLongChecked(java.lang.String key,
java.lang.Long def)
This method returns the object associated with the given key as a
Long object. |
long |
getLongValue(java.lang.String key)
This method returns the object associated with the given key as a
long value. |
long |
getLongValue(java.lang.String key,
long def)
This method returns the object associated with the given key as a
long value. |
long |
getLongValueChecked(java.lang.String key,
long def)
This method returns the object associated with the given key as a
long value. |
java.util.Map |
getMap()
This method returns a map representation of the properties.
|
java.lang.String |
getQueryString()
This method returns the query string representation of the parameters stored in the typed property object.
|
java.lang.Short |
getShort(java.lang.String key)
This method returns the object associated with the given key as a
Short object. |
java.lang.Short |
getShort(java.lang.String key,
short def)
This method returns the object associated with the given key as a
Short object. |
java.lang.Short |
getShort(java.lang.String key,
java.lang.Short def)
This method returns the object associated with the given key as a
Short object. |
java.lang.Short |
getShortChecked(java.lang.String key,
short def)
This method returns the object associated with the given key as a
Short object. |
java.lang.Short |
getShortChecked(java.lang.String key,
java.lang.Short def)
This method returns the object associated with the given key as a
Short object. |
short |
getShortValue(java.lang.String key)
This method returns the object associated with the given key as a
short value. |
short |
getShortValue(java.lang.String key,
short def)
This method returns the object associated with the given key as a
short value.. |
short |
getShortValueChecked(java.lang.String key,
short def)
This method returns the object associated with the given key as a
short value.. |
java.lang.String |
getString(java.lang.String key)
This method returns the value associated with the key as a
String object. |
java.lang.String |
getString(java.lang.String key,
java.lang.String def)
This method returns the object associated with the key as a
String object. |
java.lang.Object |
getUrlParam(java.lang.String key)
This method returns the object associated with a given URL parameter name.
|
java.lang.String |
getUrlParamName(java.lang.String key)
This method returns the parameter name of a given parameter.
|
static void |
initUrlParamNameMapper(com.ibm.commerce.datatype.UrlParamMapperFile mapper)
This method initializes the
URL mapping file. |
static java.lang.String[] |
objectToArrayOfString(java.lang.Object aObject,
java.lang.String[] def)
This method converts a
TypedProperty object to an array of String objects. |
static java.lang.String |
objectToString(java.lang.Object aObject,
java.lang.String def)
This method converts a
TypedProperty object to a String object. |
void |
populateParameterAndValueList(java.util.List<java.lang.String> values)
Populate a list of strings with the key and values contained within this
object.
|
void |
putUrlParam(java.lang.String key,
java.lang.Object obj)
This method adds a new property using the URL parameter name as a key.
|
java.util.Map |
toMap()
This method returns a map representation of the properties.
|
java.lang.String |
toProtectedString()
This method returns a
String object that represents that context of the current object. |
java.lang.String |
toString()
This method returns a
String object that represents the information stored in the current object. |
java.lang.String |
toUnprotectedString()
This method returns a
String object that represents the information stored in the current object. |
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public static final java.lang.String COPYRIGHT
public TypedProperty()
public TypedProperty(int initialCapacity)
initialCapacity
- The number of objects that are stored in the typed property.public TypedProperty(int initialCapacity, float loadFactor)
initialCapacity
- The number of objects that are stored in the typed property.loadFactor
- The load factor to increase the size of the number of elements to store.public TypedProperty(java.util.Hashtable hTP)
hTP
- The hashtable to base the typed property object on.public static TypedProperty createTextResponse(java.lang.String textResponse)
AbstractDirectViewCommand
class.TypedProperty
object for sending a text response. This is done by
adding the additional values to the TypedProperty
object needed for calling
the DirectView
.textResponse
- The text to be returned.TypedProperty
object representation of the given text.public java.lang.Object get(java.lang.String key) throws ParameterNotFoundException
Object
associated with the specified key.key
- The key of the parameter to find.Object
associated with the specified key.ParameterNotFoundException
- Thrown if the parameter does not exist
in the TypedProperty
object.public java.lang.Object get(java.lang.String key, java.lang.Object def)
Object
associated with the specified key. If the object does not exist,
the default object is returned.key
- The key of the parameter to find.def
- The default object associated with the parameter.Object
corresponding to the key specified, or the default object if the key cannot be found.public static java.lang.String[] objectToArrayOfString(java.lang.Object aObject, java.lang.String[] def)
TypedProperty
object to an array of String
objects.
If the object is null, a specified default object is returned.
If the object is not an array, an array with a single element (the original object) is returned.
If the object is an array, an array with the same number of elements is returned. Each element
is either null, or the element converted to a String.aObject
- The object to be converted.def
- The default object.String
objects.public java.lang.String[] getArray(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
String
objects.
If the object is null, a ParameterNotFoundException
is thrown.
If the object is an array of String
objects, it is returned.
If the object is an array, a new String
array is created, and each non-null element of the object is
converted to a String
object by calling its toString()
method.
Otherwise, a new array of String
objects is created with one element, whose value is the result of calling the
object's toString()
method.key
- The key of the parameter to find.String
objects.InvalidParameterValueException
- This is never thrown in this implementation.ParameterNotFoundException
- Thrown if the parameter is not found in the TypedProperty
object.public java.lang.String[] getArray(java.lang.String key, java.lang.String[] def)
String
objects.
If the object is null, the specified default object is returned.
If the object is an array of String
objects, it is returned.
If the object is an array of type Object
, a new String
array is created, and each non-null element of the object is
converted to a String
object by calling its toString()
method.
Otherwise, a new array of String
objects is created with one element, whose value is the result of calling the
object's toString()
method.key
- The key of the parameter to find.def
- The default value associated with the parameter.String
objects.public java.math.BigDecimal getBigDecimal(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
BigDecimal
object.key
- The key associated with the parameter to find.BigDecimal
object.InvalidParameterValueException
- Thrown if the object cannot be converted to a BigDecimal
object.ParameterNotFoundException
- Thrown if the specified parameter does not exist.public java.math.BigDecimal getBigDecimal(java.lang.String key, java.math.BigDecimal def)
BigDecimal
object.key
- The key of the parameter to find.def
- The default value associated with the parameter.BigDecimal
object. If the value cannot be found or converted
into a BigDecimal
object, the default value specified is returned.public java.math.BigDecimal getBigDecimalChecked(java.lang.String key, java.math.BigDecimal def) throws InvalidParameterValueException
BigDecimal
object.key
- The key of the parameter to find.def
- The default value associated with the parameter.BigDecimal
object. If the value cannot be found
the default value specified is returned.InvalidParameterValueException
- Thrown if the object cannot be converted to a BigDecimal
object.public boolean getBoolean(java.lang.String key) throws ParameterNotFoundException
key
- The key of the parameter to find.ParameterNotFoundException
- Thrown if the parameter specified cannot be found.public boolean getBoolean(java.lang.String key, boolean def)
key
- The key of the parameter to find.def
- The default value associated with the parameter.public java.lang.Double getDouble(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
Double
object.key
- The key of the parameter to find.Double
object.InvalidParameterValueException
- Thrown if the value cannot be converted to a Double
object.ParameterNotFoundException
- Thrown if the parameter cannot be found.public java.lang.Double getDouble(java.lang.String key, double def)
Double
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Double
object. If the parameter cannot be found or converted to a
Double
object, the default object is returned.public java.lang.Double getDoubleChecked(java.lang.String key, double def) throws InvalidParameterValueException
Double
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Double
object. If the parameter cannot be found
the default object is returned.InvalidParameterValueException
- Thrown if the value cannot be converted to a Double
object.public java.lang.Double getDouble(java.lang.String key, java.lang.Double def)
Double
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Double
object. If the parameter cannot be found or converted to a
Double
object, the default object is returned.public java.lang.Double getDoubleChecked(java.lang.String key, java.lang.Double def) throws InvalidParameterValueException
Double
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Double
object. If the parameter cannot be found
the default object is returned.InvalidParameterValueException
- Thrown if the value cannot be converted to a Double
object.public double getDoubleValue(java.lang.String key) throws ParameterNotFoundException
double
value.key
- The key of the parameter to find.double
value.java.lang.NumberFormatException
- Thrown if the object cannot be converted to a double
value.ParameterNotFoundException
- Thrown if the parameter cannot be found.public double getDoubleValue(java.lang.String key, double def)
double
value.key
- The key of the parameter to find.def
- The default value associated with the parameter.double
value. If the object cannot be found or converted, the default
value specified is returned.public double getDoubleValueChecked(java.lang.String key, double def) throws InvalidParameterValueException
double
value.key
- The key of the parameter to find.def
- The default value associated with the parameter.double
value. If the object cannot be found
the default value specified is returned.InvalidParameterValueException
- Thrown if the value cannot be converted to double
.public java.lang.Float getFloat(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
Float
object.key
- The key of the parameter to find.Float
object.InvalidParameterValueException
- Thrown if the object cannot be converted to a Float
object.ParameterNotFoundException
- Thrown if the parameter cannot be found.public java.lang.Float getFloat(java.lang.String key, float def)
Float
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Float
, the default
object specified is returned.public java.lang.Float getFloatChecked(java.lang.String key, float def) throws InvalidParameterValueException
Float
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.InvalidParameterValueException
- Thrown if the object cannot be converted to a Float
object.public java.lang.Float getFloat(java.lang.String key, java.lang.Float def)
Float
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Float
object. If the value cannot be found or converted to a Float
object, the default
object specified is returned.public java.lang.Float getFloatChecked(java.lang.String key, java.lang.Float def) throws InvalidParameterValueException
Float
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Float
object. If the value cannot be found
the default object specified is returned.InvalidParameterValueException
- Thrown if the object cannot be converted to a Float
object.public float getFloatValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
float
value.key
- The key of the parameter to find.float
value.InvalidParameterValueException
- Thrown if the value cannot be converted in to floatParameterNotFoundException
- Thrown if the parameter cannot be found.public float getFloatValue(java.lang.String key, float def)
float
value.key
- The key of the parameter to find.def
- The default value associated with the parameter.float
value. If the object cannot be found or converted to a float, the default
value specified is returned.public float getFloatValueChecked(java.lang.String key, float def) throws InvalidParameterValueException
float
value.key
- The key of the parameter to find.def
- The default value associated with the parameter.float
value. If the object cannot be found
the default value specified is returned.InvalidParameterValueException
- Thrown if the value cannot be converted to float.public java.lang.Integer getInteger(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
Integer
object.key
- The key of the parameter to find.Integer
object.InvalidParameterValueException
- Thrown if the value cannot be converted to an Integer object.ParameterNotFoundException
- Thrown if the parameter cannot be found.public java.lang.Integer getInteger(java.lang.String key, int def)
Integer
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Integer
object. If the object cannot be found or converted to an Integer
object, the default
object specified is returned.public java.lang.Integer getIntegerChecked(java.lang.String key, int def) throws InvalidParameterValueException
Integer
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Integer
object. If the object cannot be found
the default object specified is returned.InvalidParameterValueException
- Thrown if the value cannot be converted to an Integer object.public java.lang.Integer getInteger(java.lang.String key, java.lang.Integer def)
Integer
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Integer
object. If the object cannot be found or converted to an Integer
object, the default
object specified is returned.public java.lang.Integer getIntegerChecked(java.lang.String key, java.lang.Integer def) throws InvalidParameterValueException
Integer
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Integer
object. If the object cannot be found
the default object specified is returned.InvalidParameterValueException
- Thrown if the value cannot be converted to an Integer object.public java.lang.String getIntParamName(java.lang.String key)
key
- The parameter name.public int getIntValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
integer
value.key
- The key of the parameter to find.integer
value.InvalidParameterValueException
- Thrown if the object cannot be converted to an integer
value.ParameterNotFoundException
- Thrown if the parameter cannot be found.public int getIntValue(java.lang.String key, int def)
integer
value.key
- The key of the parameter to find.def
- The default value associated with the parameter.integer
value. If the object cannot be found or converted to an integer, the default
value is returned.public int getIntValueChecked(java.lang.String key, int def) throws InvalidParameterValueException
integer
value.key
- The key of the parameter to find.def
- The default value associated with the parameter.integer
value. If the object cannot be found
the default value is returned.InvalidParameterValueException
- Thrown if the object cannot be converted to an integer
value.public java.lang.Long getLong(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
Long
object.key
- The key of the parameter to find.Long
object.InvalidParameterValueException
- Thrown if the value cannot be converted in to a Long object.ParameterNotFoundException
- Thrown if the parameter cannot be found.public java.lang.Long getLong(java.lang.String key, long def)
Long
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Long
object. If the object cannot be found or converted to a Long
object, the default
object is returned.public java.lang.Long getLongChecked(java.lang.String key, long def) throws InvalidParameterValueException
Long
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Long
object. If the object cannot be found
the default object is returned.InvalidParameterValueException
- Thrown if the value cannot be converted in to a Long object.public java.lang.Long getLong(java.lang.String key, java.lang.Long def)
Long
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Long
object. If the value cannot be found or converted to a Long
, the default
object is returned.public java.lang.Long getLongChecked(java.lang.String key, java.lang.Long def) throws InvalidParameterValueException
Long
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Long
object. If the value cannot be found
the default object is returned.InvalidParameterValueException
- Thrown if the value cannot be converted in to a Long object.public java.lang.Long[] getLongArray(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
Long
objects.key
- The key of the parameter to find.Long
objects.InvalidParameterValueException
- Thrown if the object cannot be converted in to an array of Long
objects.ParameterNotFoundException
- Thrown if the parameter cannot be found.public java.lang.Long[] getLongArray(java.lang.String key, java.lang.Long[] def)
Long
objects.key
- The key of the parameter to find.def
- The default object associated with the parameter.Long
objects. If the object cannot be found or converted to an array of Long
objects, the default
object is returned.public java.lang.Long[] getLongArrayChecked(java.lang.String key, java.lang.Long[] def) throws InvalidParameterValueException
Long
objects.key
- The key of the parameter to find.def
- The default object associated with the parameter.Long
objects. If the object cannot be found
the default object is returned.InvalidParameterValueException
- Thrown if the object cannot be converted in to an array of Long
objects.public long getLongValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
long
value.key
- The key of the parameter to find.long
value.InvalidParameterValueException
- Thrown if the object cannot be converted to a long
value.ParameterNotFoundException
- Thrown if the parameter cannot be found.public long getLongValue(java.lang.String key, long def)
long
value.key
- The key of the parameter to find.def
- The default object associated with the parameter.long
value. If the object cannot be found or converted to a long
value, the default
value is returned.public long getLongValueChecked(java.lang.String key, long def) throws InvalidParameterValueException
long
value.key
- The key of the parameter to find.def
- The default object associated with the parameter.long
value. If the object cannot be found
the default value is returned.InvalidParameterValueException
- Thrown if the object cannot be converted to a long
value.public java.lang.String getQueryString()
String
object corresponding to the query string representation of the parameters stored in the typed property object.public java.lang.String getEncodedQueryString()
String
object corresponding to the query string representation of the parameters stored in the typed property object.
The parameter names and values are encoded.public java.lang.Short getShort(java.lang.String key) throws InvalidParameterValueException, ParameterNotFoundException
Short
object.key
- The key of the parameter to find.Short
object.InvalidParameterValueException
- Thrown if the object cannot be converted in to a Short
object.ParameterNotFoundException
- Thrown if the parameter cannot be found.public java.lang.Short getShort(java.lang.String key, java.lang.Short def)
Short
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Short
object. If the object cannot be found or converted to a Short
object, the default
object is returned.public java.lang.Short getShortChecked(java.lang.String key, java.lang.Short def) throws InvalidParameterValueException
Short
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Short
object. If the object cannot be found
the default object is returned.InvalidParameterValueException
- Thrown if the object cannot be converted in to a Short
object.public java.lang.Short getShort(java.lang.String key, short def)
Short
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Short
object. If the object cannot be found or converted to a Short
object, the default
object is returned.public java.lang.Short getShortChecked(java.lang.String key, short def) throws InvalidParameterValueException
Short
object.key
- The key of the parameter to find.def
- The default object associated with the parameter.Short
object. If the object cannot be found
the default object is returned.InvalidParameterValueException
- Thrown if the object cannot be converted in to a Short
object.public short getShortValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
short
value.key
- The key of the parameter to find.short
value.InvalidParameterValueException
- Thrown if the object cannot be converted to a short
value..ParameterNotFoundException
- Thrown if the parameter cannot be found.public short getShortValue(java.lang.String key, short def)
short
value..key
- The key of the parameter to find.def
- The default object associated with the parameter.short
value. If the object cannot be found or converted to a short
value, the default
value is returned.public short getShortValueChecked(java.lang.String key, short def) throws InvalidParameterValueException
short
value..key
- The key of the parameter to find.def
- The default object associated with the parameter.short
value. If the object cannot be found
the default value is returned.InvalidParameterValueException
- Thrown if the object cannot be converted to a short
value..public static java.lang.String objectToString(java.lang.Object aObject, java.lang.String def)
TypedProperty
object to a String
object. If the object is an array, the first element is converted.
If the object is null, the specified default object is returned.aObject
- The value to convert.def
- The default object.String
of the TypedProperty
object.public java.lang.String getString(java.lang.String key) throws ParameterNotFoundException
String
object.
If the object is an array and there is a non-null first element,
that element is converted to a String
by calling its toString()
method.
Otherwise, if the object is an array, but there is no non-null first element,
a ParameterNotFoundException
is thrown.
Otherwise, if the value is not null, it is converted to a String
by calling its toString()
method.
Otherwise, a ParameterNotFoundException
is thrown.key
- The key of the parameter to find.String
representation of the parameter.ParameterNotFoundException
- Thrown if the parameter cannot be found.public java.lang.String getString(java.lang.String key, java.lang.String def)
String
object.
If the object is an array and there is a non-null first element,
that element is converted to a String
by calling its toString()
method.
Otherwise, if the object is an array, but there is no non-null first element,
the specified default object is returned.
Otherwise, if the value is not null, it is converted to a String
by calling its toString()
method.
Otherwise, the specified default value is returned.key
- The key of the parameter to find.def
- The default object associated with the parameter.String
representation of the parameter. If the object cannot be found or converted to a String
object, the default
object is returned.public java.lang.Object getUrlParam(java.lang.String key)
key
- The URL parameter namepublic java.lang.String getUrlParamName(java.lang.String key)
key
- The parameter name.public static void initUrlParamNameMapper(com.ibm.commerce.datatype.UrlParamMapperFile mapper)
URL
mapping file. This file maps the WebSphere Commerce Server
parameter names to the Electronic Commerce Modeling Language (ECML) versions of the parameter names.mapper
- The xml file that defines the URL parameter name mapping.public void putUrlParam(java.lang.String key, java.lang.Object obj)
key
- The URL parameter name.obj
- The parameter value.public java.lang.String toProtectedString()
String
object that represents that context of the current object.
Protected parameter values will be displayed as *****String
representation of the context of the current object.public java.lang.String toString()
String
object that represents the information stored in the current object.
Protected parameter values will be displayed as *****toString
in class java.util.Hashtable
String
representation of the current object.public java.lang.String toUnprotectedString()
String
object that represents the information stored in the current object.
Protected parameters will be exposed.String
representation of the current object.public java.util.Map toMap()
Map
object.public java.util.Map getMap()
Map
object.public void populateParameterAndValueList(java.util.List<java.lang.String> values)
values
- The list to populate.