|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.icenigrid.gridsam.core.hostenv.ConfigUtil
public class ConfigUtil
Purpose:
A utility class to find out the ConfigUtilProvider and deal with
configuration files. Logically a configuration has many items identified by
itemID, and each item has some properties in key-value pair format.
| Constructor Summary | |
|---|---|
ConfigUtil(java.lang.String configFileName)
Construct the ConfigUtil object from a config file name. |
|
| Method Summary | |
|---|---|
java.lang.String |
getConfigFileName()
Get the config file name. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Get a property value of the default item. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue,
java.lang.String itemID)
Get the property value of a specific item. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigUtil(java.lang.String configFileName)
throws JobManagerException
configFileName - the config file name.
JobManagerException - Cannot find 'gridsam.ConfigUtilProvider' from the the common
configuration.| Method Detail |
|---|
public java.lang.String getConfigFileName()
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
throws JobManagerException
key - the key or name of the property.defaultValue - the default value of the property.
JobManagerException - s
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue,
java.lang.String itemID)
throws JobManagerException
key - the key or name of the property.defaultValue - the default value of the property.itemID - the itemID to identify the item.
JobManagerException - error happend when read config file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||