com.ibm.commerce.datatype

Class TypedProperty

  • java.lang.Object
    • java.util.Dictionary<K,V>
      • java.util.Hashtable
        • com.ibm.commerce.datatype.TypedProperty
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map


    public class TypedProperty
    extends java.util.Hashtable
    implements java.io.Serializable
    This class is a wrapper to a 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.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM Copyright notice field.
    • Constructor Summary

      Constructors 
      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.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      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.
      • Methods inherited from class java.util.Hashtable

        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
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TypedProperty

        public TypedProperty()
        This is the default constructor for this class. It calls the constructor from the superclass.
      • TypedProperty

        public TypedProperty(int initialCapacity)
        This constructor creates a typed property object, given an initial capacity for the object.
        Parameters:
        initialCapacity - The number of objects that are stored in the typed property.
      • TypedProperty

        public TypedProperty(int initialCapacity,
                             float loadFactor)
        This constructor creates a typed property object, given an initial capacity and load factor for the object.
        Parameters:
        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.
      • TypedProperty

        public TypedProperty(java.util.Hashtable hTP)
        This constructor creates a typed property object from the given hashtable.
        Parameters:
        hTP - The hashtable to base the typed property object on.
    • Method Detail

      • createTextResponse

        public static TypedProperty createTextResponse(java.lang.String textResponse)
        Deprecated. Use the static method of the same name defined in the AbstractDirectViewCommand class.
        This method prepares a TypedProperty object for sending a text response. This is done by adding the additional values to the TypedProperty object needed for calling the DirectView.
        Parameters:
        textResponse - The text to be returned.
        Returns:
        A TypedProperty object representation of the given text.
      • get

        public java.lang.Object get(java.lang.String key)
                             throws ParameterNotFoundException
        This method returns the Object associated with the specified key.
        Parameters:
        key - The key of the parameter to find.
        Returns:
        The Object associated with the specified key.
        Throws:
        ParameterNotFoundException - Thrown if the parameter does not exist in the TypedProperty object.
      • get

        public java.lang.Object get(java.lang.String key,
                                    java.lang.Object def)
        This method returns the Object associated with the specified key. If the object does not exist, the default object is returned.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The Object corresponding to the key specified, or the default object if the key cannot be found.
      • objectToArrayOfString

        public 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. 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.
        Parameters:
        aObject - The object to be converted.
        def - The default object.
        Returns:
        An array of String objects.
      • getArray

        public java.lang.String[] getArray(java.lang.String key)
                                    throws ParameterNotFoundException,
                                           InvalidParameterValueException
        This method returns the object associated with the given key as an array of 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.
        Parameters:
        key - The key of the parameter to find.
        Returns:
        An array of String objects.
        Throws:
        InvalidParameterValueException - This is never thrown in this implementation.
        ParameterNotFoundException - Thrown if the parameter is not found in the TypedProperty object.
      • getArray

        public 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. 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        An array of String objects.
      • getBigDecimal

        public 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The specified parameter as a BigDecimal object. If the value cannot be found or converted into a BigDecimal object, the default value specified is returned.
      • getBigDecimalChecked

        public java.math.BigDecimal getBigDecimalChecked(java.lang.String key,
                                                         java.math.BigDecimal def)
                                                  throws InvalidParameterValueException
        This method returns the object associated with the given key as a BigDecimal object.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The specified parameter as a BigDecimal object. If the value cannot be found the default value specified is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted to a BigDecimal object.
      • getBoolean

        public boolean getBoolean(java.lang.String key)
                           throws ParameterNotFoundException
        This method returns the object associated with the given key as a boolean value.
        Parameters:
        key - The key of the parameter to find.
        Returns:
        The boolean value associated with the specified parameter.
        Throws:
        ParameterNotFoundException - Thrown if the parameter specified cannot be found.
      • getBoolean

        public boolean getBoolean(java.lang.String key,
                                  boolean def)
        This method returns the object associated with the given key as a boolean value.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The boolean value associated with the specified parameter. If the parameter cannot be found, the default value specified is returned.
      • getDouble

        public java.lang.Double getDouble(java.lang.String key,
                                          double def)
        This method returns the object associated with the given key as a Double object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The specified parameter as a Double object. If the parameter cannot be found or converted to a Double object, the default object is returned.
      • getDoubleChecked

        public java.lang.Double getDoubleChecked(java.lang.String key,
                                                 double def)
                                          throws InvalidParameterValueException
        This method returns the object associated with the given key as a Double object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The specified parameter as a Double object. If the parameter cannot be found the default object is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted to a Double object.
      • getDouble

        public 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Double object. If the parameter cannot be found or converted to a Double object, the default object is returned.
      • getDoubleChecked

        public java.lang.Double getDoubleChecked(java.lang.String key,
                                                 java.lang.Double def)
                                          throws InvalidParameterValueException
        This method returns the object associated with the given key as a Double object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Double object. If the parameter cannot be found the default object is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted to a Double object.
      • getDoubleValue

        public double getDoubleValue(java.lang.String key)
                              throws ParameterNotFoundException
        This method returns the object associated with the given key as a double value.
        Parameters:
        key - The key of the parameter to find.
        Returns:
        The object associated with the parameter as a double value.
        Throws:
        java.lang.NumberFormatException - Thrown if the object cannot be converted to a double value.
        ParameterNotFoundException - Thrown if the parameter cannot be found.
      • getDoubleValue

        public double getDoubleValue(java.lang.String key,
                                     double def)
        This method returns the object associated with the given key as a double value.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The object associated with the parameter as a double value. If the object cannot be found or converted, the default value specified is returned.
      • getDoubleValueChecked

        public double getDoubleValueChecked(java.lang.String key,
                                            double def)
                                     throws InvalidParameterValueException
        This method returns the object associated with the given key as a double value.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The object associated with the parameter as a double value. If the object cannot be found the default value specified is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted to double.
      • getFloat

        public java.lang.Float getFloat(java.lang.String key,
                                        float def)
        This method returns the object associated with the given key as a Float object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Float object. If the object cannot be found or converted to a Float, the default object specified is returned.
      • getFloatChecked

        public java.lang.Float getFloatChecked(java.lang.String key,
                                               float def)
                                        throws InvalidParameterValueException
        This method returns the object associated with the given key as a Float object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Float object. If the object cannot be found the default object specified is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted to a Float object.
      • getFloat

        public 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Float object. If the value cannot be found or converted to a Float object, the default object specified is returned.
      • getFloatChecked

        public java.lang.Float getFloatChecked(java.lang.String key,
                                               java.lang.Float def)
                                        throws InvalidParameterValueException
        This method returns the object associated with the given key as a Float object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Float object. If the value cannot be found the default object specified is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted to a Float object.
      • getFloatValue

        public float getFloatValue(java.lang.String key,
                                   float def)
        This method returns the value associated with the given key as a float value.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The object associated with the parameter as a float value. If the object cannot be found or converted to a float, the default value specified is returned.
      • getFloatValueChecked

        public float getFloatValueChecked(java.lang.String key,
                                          float def)
                                   throws InvalidParameterValueException
        This method returns the value associated with the given key as a float value.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The object associated with the parameter as a float value. If the object cannot be found the default value specified is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted to float.
      • getInteger

        public java.lang.Integer getInteger(java.lang.String key,
                                            int def)
        This method returns the object associated with the given key as an Integer object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as an Integer object. If the object cannot be found or converted to an Integer object, the default object specified is returned.
      • getIntegerChecked

        public java.lang.Integer getIntegerChecked(java.lang.String key,
                                                   int def)
                                            throws InvalidParameterValueException
        This method returns the object associated with the given key as an Integer object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as an Integer object. If the object cannot be found the default object specified is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted to an Integer object.
      • getInteger

        public 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as an Integer object. If the object cannot be found or converted to an Integer object, the default object specified is returned.
      • getIntegerChecked

        public java.lang.Integer getIntegerChecked(java.lang.String key,
                                                   java.lang.Integer def)
                                            throws InvalidParameterValueException
        This method returns the object associated with the given key as an Integer object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as an Integer object. If the object cannot be found the default object specified is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted to an Integer object.
      • getIntParamName

        public java.lang.String getIntParamName(java.lang.String key)
        This method returns the corresponding Electronic Commerce Modeling Language (ECML) version of the parameter name.
        Parameters:
        key - The parameter name.
        Returns:
        The ECML version of the parameter name.
      • getIntValue

        public int getIntValue(java.lang.String key,
                               int def)
        This method returns the object associated with the given key as an integer value.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The object associated with the parameter as an integer value. If the object cannot be found or converted to an integer, the default value is returned.
      • getIntValueChecked

        public int getIntValueChecked(java.lang.String key,
                                      int def)
                               throws InvalidParameterValueException
        This method returns the object associated with the given key as an integer value.
        Parameters:
        key - The key of the parameter to find.
        def - The default value associated with the parameter.
        Returns:
        The object associated with the parameter as an integer value. If the object cannot be found the default value is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted to an integer value.
      • getLong

        public java.lang.Long getLong(java.lang.String key,
                                      long def)
        This method returns the object associated with the given key as a Long object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Long object. If the object cannot be found or converted to a Long object, the default object is returned.
      • getLongChecked

        public java.lang.Long getLongChecked(java.lang.String key,
                                             long def)
                                      throws InvalidParameterValueException
        This method returns the object associated with the given key as a Long object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Long object. If the object cannot be found the default object is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted in to a Long object.
      • getLong

        public 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Long object. If the value cannot be found or converted to a Long, the default object is returned.
      • getLongChecked

        public java.lang.Long getLongChecked(java.lang.String key,
                                             java.lang.Long def)
                                      throws InvalidParameterValueException
        This method returns the object associated with the given key as a Long object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Long object. If the value cannot be found the default object is returned.
        Throws:
        InvalidParameterValueException - Thrown if the value cannot be converted in to a Long object.
      • getLongArray

        public 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as an array of Long objects. If the object cannot be found or converted to an array of Long objects, the default object is returned.
      • getLongArrayChecked

        public java.lang.Long[] getLongArrayChecked(java.lang.String key,
                                                    java.lang.Long[] def)
                                             throws InvalidParameterValueException
        This method returns the object associated with the given key as an array of Long objects.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as an array of Long objects. If the object cannot be found the default object is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted in to an array of Long objects.
      • getLongValue

        public long getLongValue(java.lang.String key,
                                 long def)
        This method returns the object associated with the given key as a long value.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a long value. If the object cannot be found or converted to a long value, the default value is returned.
      • getLongValueChecked

        public long getLongValueChecked(java.lang.String key,
                                        long def)
                                 throws InvalidParameterValueException
        This method returns the object associated with the given key as a long value.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a long value. If the object cannot be found the default value is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted to a long value.
      • getQueryString

        public java.lang.String getQueryString()
        This method returns the query string representation of the parameters stored in the typed property object.
        Returns:
        A String object corresponding to the query string representation of the parameters stored in the typed property object.
      • getEncodedQueryString

        public java.lang.String getEncodedQueryString()
        This method returns the query string representation of the parameters stored in the typed property object.
        Returns:
        A String object corresponding to the query string representation of the parameters stored in the typed property object. The parameter names and values are encoded.
      • getShort

        public 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Short object. If the object cannot be found or converted to a Short object, the default object is returned.
      • getShortChecked

        public java.lang.Short getShortChecked(java.lang.String key,
                                               java.lang.Short def)
                                        throws InvalidParameterValueException
        This method returns the object associated with the given key as a Short object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Short object. If the object cannot be found the default object is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted in to a Short object.
      • getShort

        public java.lang.Short getShort(java.lang.String key,
                                        short def)
        This method returns the object associated with the given key as a Short object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Short object. If the object cannot be found or converted to a Short object, the default object is returned.
      • getShortChecked

        public java.lang.Short getShortChecked(java.lang.String key,
                                               short def)
                                        throws InvalidParameterValueException
        This method returns the object associated with the given key as a Short object.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a Short object. If the object cannot be found the default object is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted in to a Short object.
      • getShortValue

        public short getShortValue(java.lang.String key,
                                   short def)
        This method returns the object associated with the given key as a short value..
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a short value. If the object cannot be found or converted to a short value, the default value is returned.
      • getShortValueChecked

        public short getShortValueChecked(java.lang.String key,
                                          short def)
                                   throws InvalidParameterValueException
        This method returns the object associated with the given key as a short value..
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        The object associated with the parameter as a short value. If the object cannot be found the default value is returned.
        Throws:
        InvalidParameterValueException - Thrown if the object cannot be converted to a short value..
      • objectToString

        public static java.lang.String objectToString(java.lang.Object aObject,
                                                      java.lang.String def)
        This method converts a 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.
        Parameters:
        aObject - The value to convert.
        def - The default object.
        Returns:
        A String of the TypedProperty object.
      • getString

        public java.lang.String getString(java.lang.String key)
                                   throws ParameterNotFoundException
        This method returns the value associated with the key as a 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.
        Parameters:
        key - The key of the parameter to find.
        Returns:
        A String representation of the parameter.
        Throws:
        ParameterNotFoundException - Thrown if the parameter cannot be found.
      • getString

        public 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. 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.
        Parameters:
        key - The key of the parameter to find.
        def - The default object associated with the parameter.
        Returns:
        A String representation of the parameter. If the object cannot be found or converted to a String object, the default object is returned.
      • getUrlParam

        public java.lang.Object getUrlParam(java.lang.String key)
        This method returns the object associated with a given URL parameter name. The parameter name has an Electronic Commerce Modeling Language (ECML) version that is used to retrieve the parameter value.
        Parameters:
        key - The URL parameter name
        Returns:
        The object associated with the parameter. If no value is found, then null is returned.
      • getUrlParamName

        public java.lang.String getUrlParamName(java.lang.String key)
        This method returns the parameter name of a given parameter. If the parameter name has a corresponding Electronic Commerce Modeling Language (ECML) version, that version of the parameter name will be returned. If the parameter does not have a corresponding ECML version, then the given version of the parameter name will be returned.
        Parameters:
        key - The parameter name.
        Returns:
        The ECML version of the parameter name. If no ECML version exists, the given key is returned.
      • initUrlParamNameMapper

        public static void initUrlParamNameMapper(com.ibm.commerce.datatype.UrlParamMapperFile mapper)
        This method initializes the URL mapping file. This file maps the WebSphere Commerce Server parameter names to the Electronic Commerce Modeling Language (ECML) versions of the parameter names.
        Parameters:
        mapper - The xml file that defines the URL parameter name mapping.
      • putUrlParam

        public void putUrlParam(java.lang.String key,
                                java.lang.Object obj)
        This method adds a new property using the URL parameter name as a key. If given, the Electronic Commerce Modeling Language (ECML) version of the parameter name will be converted to the WebSphere Commerce Server version. It will then be stored.
        Parameters:
        key - The URL parameter name.
        obj - The parameter value.
      • toProtectedString

        public java.lang.String toProtectedString()
        This method returns a String object that represents that context of the current object. Protected parameter values will be displayed as *****
        Returns:
        A protected String representation of the context of the current object.
      • toString

        public java.lang.String toString()
        This method returns a String object that represents the information stored in the current object. Protected parameter values will be displayed as *****
        Overrides:
        toString in class java.util.Hashtable
        Returns:
        A protected String representation of the current object.
      • toUnprotectedString

        public java.lang.String toUnprotectedString()
        This method returns a String object that represents the information stored in the current object. Protected parameters will be exposed.
        Returns:
        A String representation of the current object.
      • toMap

        public java.util.Map toMap()
        This method returns a map representation of the properties.
        Returns:
        A Map object.
      • getMap

        public java.util.Map getMap()
        This method returns a map representation of the properties.
        Returns:
        A Map object.
      • populateParameterAndValueList

        public void populateParameterAndValueList(java.util.List<java.lang.String> values)
        Populate a list of strings with the key and values contained within this object. Note : the list of values will be filtered if it contains a property that is protected.
        Parameters:
        values - The list to populate.