com.iplanet.am.util
Class SystemProperties

java.lang.Object
  |
  +--com.iplanet.am.util.SystemProperties

public class SystemProperties
extends java.lang.Object

This class provides functionality that allows single-point-of-access to all related system properties. The class tries to first find a class, AMConfig.class, and then a file, AMConfig.properties in the CLASSPATH accessible to this code. The class takes precedence over the flat file. If multiple servers are running, each may have their own configuration file. The naming convention for such scenarios is AMConfig-serverName.


Field Summary
static java.lang.String CONFIG_FILE_NAME
          Default name of the config file
static java.lang.String CONFIG_PATH
          Runtime flag to be set, in order to override the path of the config file
static java.lang.String iasGXId
          Application Server specific deployment configuration
 
Constructor Summary
SystemProperties()
           
 
Method Summary
static java.lang.String get(java.lang.String key)
          This method lets you query for a system property whose value is same as String key.
static java.lang.String get(java.lang.String key, java.lang.String def)
          This method lets you query for a system property whose value is same as String key.
static java.util.Properties getAll()
          This method lets you get all the properties defined and their values.
static java.util.Properties getPlatform()
          This method lets you query for all the platform properties defined and their values.
static void initializeProperties(java.lang.String file)
          Initializes properties bundle from the file passed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iasGXId

public static java.lang.String iasGXId
Application Server specific deployment configuration

CONFIG_PATH

public static final java.lang.String CONFIG_PATH
Runtime flag to be set, in order to override the path of the config file

CONFIG_FILE_NAME

public static final java.lang.String CONFIG_FILE_NAME
Default name of the config file
Constructor Detail

SystemProperties

public SystemProperties()
Method Detail

get

public static java.lang.String get(java.lang.String key)
This method lets you query for a system property whose value is same as String key.
Parameters:
key - type String, the key whose value one is looking for.
Returns:
the value if the key exists; otherwise returns null

get

public static java.lang.String get(java.lang.String key,
                                   java.lang.String def)
This method lets you query for a system property whose value is same as String key.
Parameters:
key - type String , the key whose value one is looking for.
def - type String , the default value the method returns if the key does not exist.
Returns:
the value if the key exists; otherwise returns null

getAll

public static java.util.Properties getAll()
This method lets you get all the properties defined and their values.
Returns:
Properties object with all the key value pairs.

getPlatform

public static java.util.Properties getPlatform()
This method lets you query for all the platform properties defined and their values. Returns a Properties object with all the key value pairs.
Returns:
the platform properties

initializeProperties

public static void initializeProperties(java.lang.String file)
                                 throws java.util.MissingResourceException
Initializes properties bundle from the file passed.
Parameters:
file - type String , File name for the resource bundle
Throws:
java.util.MissingResourceException -