|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--com.ibm.commerce.datatype.TypedProperty
TypedProperties extends the Hashtable. It provides additional methods for retrieving properties as integer, double, float instead of string.
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Field Summary | |
protected static com.ibm.commerce.datatype.UrlParamMapperFile |
urlMapperFile
|
protected java.util.Hashtable |
urlNameMapper
|
Constructor Summary | |
TypedProperty()
TypedProperty constructor comment. |
|
TypedProperty(java.util.Hashtable hTP)
Construct a TypedProperty object from a Hashtable. |
|
TypedProperty(int initialCapacity)
TypedProperty constructor comment. |
|
TypedProperty(int initialCapacity,
float loadFactor)
TypedProperty constructor comment. |
Method Summary | |
static TypedProperty |
createTextResponse(java.lang.String textResponse)
Prepare a TypedProperty object for sending text response |
java.lang.Object |
get(java.lang.String key)
Return the value associated with the key |
java.lang.Object |
get(java.lang.String key,
java.lang.Object def)
Return the value associated with the key |
java.lang.String[] |
getArray(java.lang.String key)
Return the value associated with the key as a String array |
java.lang.String[] |
getArray(java.lang.String key,
java.lang.String[] def)
Return the value associated with the key as a String array |
java.math.BigDecimal |
getBigDecimal(java.lang.String key)
Return the value associated with the key |
java.math.BigDecimal |
getBigDecimal(java.lang.String key,
java.math.BigDecimal def)
Return the value associated with the key |
boolean |
getBoolean(java.lang.String key)
returns the value associated with the key. |
boolean |
getBoolean(java.lang.String key,
boolean def)
Return the value associated with the key |
java.lang.Double |
getDouble(java.lang.String key)
Return the value associated with the key |
java.lang.Double |
getDouble(java.lang.String key,
double def)
Return the value associated with the key |
java.lang.Double |
getDouble(java.lang.String key,
java.lang.Double def)
Return the value associated with the key |
double |
getDoubleValue(java.lang.String key)
Return the value associated with the key |
double |
getDoubleValue(java.lang.String key,
double def)
Return the value associated with the key |
java.lang.Float |
getFloat(java.lang.String key)
Return the value associated with the key |
java.lang.Float |
getFloat(java.lang.String key,
float def)
Return the value associated with the key |
java.lang.Float |
getFloat(java.lang.String key,
java.lang.Float def)
Return the value associated with the key |
float |
getFloatValue(java.lang.String key)
Return the value associated with the key |
float |
getFloatValue(java.lang.String key,
float def)
Return the value associated with the key |
java.lang.Integer |
getInteger(java.lang.String key)
Return the value associated with the key |
java.lang.Integer |
getInteger(java.lang.String key,
int def)
Return the value associated with the key |
java.lang.Integer |
getInteger(java.lang.String key,
java.lang.Integer def)
Return the value associated with the key |
java.lang.String |
getIntParamName(java.lang.String key)
Return the value associated with the key as a string. |
int |
getIntValue(java.lang.String key)
get the Integer Value |
int |
getIntValue(java.lang.String key,
int def)
Return the value associated with the key |
java.lang.Long |
getLong(java.lang.String key)
Return the value associated with the key in Long |
java.lang.Long |
getLong(java.lang.String key,
long def)
Return the value associated with the key |
java.lang.Long |
getLong(java.lang.String key,
java.lang.Long def)
Return the value associated with the key |
java.lang.Long[] |
getLongArray(java.lang.String key)
Return the value associated with the key as an array of Long |
java.lang.Long[] |
getLongArray(java.lang.String key,
java.lang.Long[] def)
Return the value associated with the key as a String array |
long |
getLongValue(java.lang.String key)
returns the value associated with the key. |
long |
getLongValue(java.lang.String key,
long def)
Return the value associated with the key |
java.lang.String |
getQueryString()
Return the context of this TypedProperty as a query string. |
java.lang.Short |
getShort(java.lang.String key)
Return the value associated with the key |
java.lang.Short |
getShort(java.lang.String key,
short def)
Return the value associated with the key |
java.lang.Short |
getShort(java.lang.String key,
java.lang.Short def)
Return the value associated with the key |
short |
getShortValue(java.lang.String key)
returns the value associated with the key. |
short |
getShortValue(java.lang.String key,
short def)
Return the value associated with the key |
java.lang.String |
getString(java.lang.String key)
Return the value associated with the key as a string. |
java.lang.String |
getString(java.lang.String key,
java.lang.String def)
Return the value associated with the key. |
java.lang.Object |
getUrlParam(java.lang.String key)
Return the value associated with the url parameter name as a string. |
java.lang.String |
getUrlParamName(java.lang.String key)
Given an internal parameter name, return the corresponding url parameter name. |
static void |
initUrlParamNameMapper(com.ibm.commerce.datatype.UrlParamMapperFile mapper)
Initialize the url parameter name mapper. |
void |
putUrlParam(java.lang.String key,
java.lang.Object obj)
Add a new property using the url parameter name as key. |
java.lang.String |
toProtectedString()
Return a string that represents that context of this TypedProperty. |
java.lang.String |
toString()
Return a string that represents that context of this TypedProperty. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static com.ibm.commerce.datatype.UrlParamMapperFile urlMapperFile
protected java.util.Hashtable urlNameMapper
Constructor Detail |
public TypedProperty()
public TypedProperty(java.util.Hashtable hTP)
hashtable
- Hashtable - input hashtablepublic TypedProperty(int initialCapacity)
initialCapacity
- intpublic TypedProperty(int initialCapacity, float loadFactor)
initialCapacity
- intloadFactor
- floatMethod Detail |
public static TypedProperty createTextResponse(java.lang.String textResponse)
textResponse
- java.lang.String - text to be returnedpublic java.lang.Object get(java.lang.String key) throws ParameterNotFoundException
key
- java.lang.StringParameterNotFoundException
- public java.lang.Object get(java.lang.String key, java.lang.Object def)
key
- java.lang.Stringpublic java.lang.String[] getArray(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public java.lang.String[] getArray(java.lang.String key, java.lang.String[] def)
key
- java.lang.Stringdef
- String[] - default value to be returned if paramter is
not found or if it cannot be returned as an array of stringspublic java.math.BigDecimal getBigDecimal(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.Stringjava.lang.NumberFormatException
- The exception description.ParameterNotFoundException
- public java.math.BigDecimal getBigDecimal(java.lang.String key, java.math.BigDecimal def)
key
- java.lang.Stringjava.lang.NumberFormatException
- The exception description.ParameterNotFoundException
- public boolean getBoolean(java.lang.String key) throws ParameterNotFoundException
key
- java.lang.StringParameterNotFoundException
- public boolean getBoolean(java.lang.String key, boolean def)
key
- java.lang.Stringdef
- boolean - default valuepublic java.lang.Double getDouble(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public java.lang.Double getDouble(java.lang.String key, double def)
key
- java.lang.Stringdef
- double - default value to be returnedpublic java.lang.Double getDouble(java.lang.String key, java.lang.Double def)
key
- java.lang.Stringdef
- Doublepublic double getDoubleValue(java.lang.String key) throws ParameterNotFoundException
key
- java.lang.Stringjava.lang.NumberFormatException
- The exception description.ParameterNotFoundException
- public double getDoubleValue(java.lang.String key, double def)
key
- java.lang.Stringdef
- doublepublic java.lang.Float getFloat(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public java.lang.Float getFloat(java.lang.String key, float def)
key
- java.lang.Stringdef
- floatpublic java.lang.Float getFloat(java.lang.String key, java.lang.Float def)
key
- java.lang.Stringdef
- Floatpublic float getFloatValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public float getFloatValue(java.lang.String key, float def)
key
- java.lang.Stringdef
- floatpublic java.lang.Integer getInteger(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public java.lang.Integer getInteger(java.lang.String key, int def)
key
- java.lang.Stringdef
- intpublic java.lang.Integer getInteger(java.lang.String key, java.lang.Integer def)
key
- java.lang.Stringdef
- Integerpublic java.lang.String getIntParamName(java.lang.String key)
key
- java.lang.String - rul parameter nameobj
- Object - parameter valuecom.ibm.commerce.exception.ParameterNotFound.
- public int getIntValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.String
com.ibm.commerce.exception.InvalidParameterValueException
com.ibm.commerce.exception.ParameterNotFoundExceptionpublic int getIntValue(java.lang.String key, int def)
key
- - java.lang.Stringdef
- - int, the default valuepublic java.lang.Long getLong(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public java.lang.Long getLong(java.lang.String key, long def)
key
- java.lang.Stringdef
- longspublic java.lang.Long getLong(java.lang.String key, java.lang.Long def)
key
- java.lang.Stringdef
- Longpublic java.lang.Long[] getLongArray(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public java.lang.Long[] getLongArray(java.lang.String key, java.lang.Long[] def)
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public long getLongValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public long getLongValue(java.lang.String key, long def)
key
- java.lang.Stringdef
- long default long valuepublic java.lang.String getQueryString()
public java.lang.Short getShort(java.lang.String key) throws InvalidParameterValueException, ParameterNotFoundException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public java.lang.Short getShort(java.lang.String key, short def)
key
- java.lang.Stringdef
- intpublic java.lang.Short getShort(java.lang.String key, java.lang.Short def)
key
- java.lang.Stringdef
- Shortpublic short getShortValue(java.lang.String key) throws ParameterNotFoundException, InvalidParameterValueException
key
- java.lang.StringInvalidParameterValueException
- ParameterNotFoundException
- public short getShortValue(java.lang.String key, short def)
key
- java.lang.Stringdef
- short - default short valuepublic java.lang.String getString(java.lang.String key) throws ParameterNotFoundException
key
- java.lang.Stringcom.ibm.commerce.exception.ParameterNotFound.
- public java.lang.String getString(java.lang.String key, java.lang.String def)
key
- java.lang.Stringdef
- String - a default stringpublic java.lang.Object getUrlParam(java.lang.String key)
key
- java.lang.String - url parameter namepublic java.lang.String getUrlParamName(java.lang.String key)
key
- java.lang.String - internal name for the url parameterpublic static void initUrlParamNameMapper(com.ibm.commerce.datatype.UrlParamMapperFile mapper)
key
- java.lang.String - the xml file that defines the url parameter name mappingpublic void putUrlParam(java.lang.String key, java.lang.Object obj)
key
- java.lang.String - url parameter nameobj
- Object - parameter valuepublic java.lang.String toProtectedString()
public java.lang.String toString()
toString
in class java.util.Hashtable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |