com.ibm.commerce.server
Class ConfigProperties

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--java.util.Properties
                    |
                    +--com.ibm.commerce.server.ConfigProperties
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class ConfigProperties
extends java.util.Properties
implements java.io.Serializable

Gets the properties values from property cache. The property cache is constructed from the information in the configuration xml file. The key for the properties is all the hierarchy path from "InstanceProperties" layer in the configuration file, plus the property attribute name and separated with "/", for example, "RuleServices/RuleService/name".

See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
protected  java.lang.String merchantKey
           
 
Fields inherited from class java.util.Properties
defaults
 
Method Summary
 java.util.Vector getAllValues(java.lang.String key)
          Returns the all values from the configuration file as a Vector
 java.lang.String getMerchantKey()
          Gets the merchant key
 java.lang.String getSeparator()
           
 java.lang.String getValue(java.lang.String key)
          Returns the first value from the configuration file as a string
 java.lang.String getValue(java.lang.String key, java.lang.String def)
          Returns the first value from the configuration file as a string
 java.lang.String getWebServerAlias(java.lang.String key)
          Returns the value of a web server alias
 void setMerchantKey(java.lang.String key)
          Gets the merchant key
 void setWebServerAlias(java.lang.String name, java.lang.String value)
          Sets the value of a web server alias
static ConfigProperties singleton()
          Gets the merchant key
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store
 
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, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

merchantKey

protected java.lang.String merchantKey
Method Detail

getAllValues

public java.util.Vector getAllValues(java.lang.String key)
Returns the all values from the configuration file as a Vector
Parameters:
key - the key to find a value for, the format is hierarchy path1 + "/" + path2 .. + "/" + nameOfAttribute
Returns:
the all values associtated with the key passed in from the attribute set

getMerchantKey

public java.lang.String getMerchantKey()
Gets the merchant key
Returns:
the merchant key value in String

getSeparator

public java.lang.String getSeparator()

getValue

public java.lang.String getValue(java.lang.String key)
Returns the first value from the configuration file as a string
Parameters:
key - the key to find a value for, the format is hierarchy path1 + "/" + path2 .. + "/" + nameOfAttribute
Returns:
the first value associtated with the key passed in from the attribute set

getValue

public java.lang.String getValue(java.lang.String key,
                                 java.lang.String def)
Returns the first value from the configuration file as a string
Parameters:
key - the key to find a value for,
the - default value if no parameter with that key is found
Returns:
the first value associtated with the key passed in from the attribute set

getWebServerAlias

public java.lang.String getWebServerAlias(java.lang.String key)
Returns the value of a web server alias
Parameters:
name - String - name of alias,

setMerchantKey

public void setMerchantKey(java.lang.String key)
Gets the merchant key
Returns:
the merchant key value in String

setWebServerAlias

public void setWebServerAlias(java.lang.String name,
                              java.lang.String value)
Sets the value of a web server alias
Parameters:
name - String - name of alias,
value - String - value of alias,

singleton

public static ConfigProperties singleton()
Gets the merchant key
Returns:
the merchant key value in String