|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.am.util.SystemProperties
This class provides functionality that allows single-point-of-access to all related system properties.
The system properties can be set in couple of ways:
programmatically by calling the initializeProperties
method,
or can be statically loaded at startup from a file named:
AMConfig.[class,properties]
.
Setting the properties through the API takes precedence and will replace
the properties loaded via file. For statically loading
the properties via a file, this class tries to first find a class,
AMConfig.class
, and then
a file, AMConfig.properties
in the CLASSPATH accessible to this
code. The AMConfig.class
takes precedence over the flat file
AMConfig.properties
.
If multiple servers are running, each may have their own configuration file.
The naming convention for such scenarios is AMConfig-
.
Field Summary | |
static java.lang.String |
CONFIG_FILE_NAME
Default name of the configuration file. |
static java.lang.String |
CONFIG_PATH
Runtime flag to be set, in order to override the path of the configuration 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.lang.String |
getInitializationError()
Returns error messages during initialization, else null . |
static java.util.Properties |
getPlatform()
Deprecated. use getAll() |
static void |
initializeProperties(java.util.Properties properties)
Initializes the properties to be used by Access Manager. |
static void |
initializeProperties(java.lang.String file)
Initializes properties bundle from the file |
static void |
initializeProperties(java.lang.String propertyName,
java.lang.String propertyValue)
Initializes the property to be used by Access Manager. |
static long |
lastModified()
Returns a counter for last modification. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String iasGXId
public static final java.lang.String CONFIG_PATH
public static final java.lang.String CONFIG_FILE_NAME
Constructor Detail |
public SystemProperties()
Method Detail |
public static java.lang.String get(java.lang.String key)
String
key. The method first tries to read
the property from java.lang.System followed by a lookup in the
config file.key
- type String
, the key whose value one is
looking for.null
public static java.lang.String get(java.lang.String key, java.lang.String def)
String
key.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.null
public static java.util.Properties getAll()
public static java.util.Properties getPlatform()
getAll()
public static void initializeProperties(java.lang.String file) throws java.util.MissingResourceException
file
passed.
- Parameters:
file
- type String
, file name for the resource bundle- Throws:
java.util.MissingResourceException
-
public static void initializeProperties(java.util.Properties properties)
properties
- properties for access managerpublic static void initializeProperties(java.lang.String propertyName, java.lang.String propertyValue)
propertyName
- property namepropertyValue
- property valuepublic static long lastModified()
initializeProperties
.
This is a convenience methods for applications to track changes
to access manager properties.public static java.lang.String getInitializationError()
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |