| |
|
| java.lang.Object org.datashare.plugins.PropertiesManager.PropertiesManagerAdapter
PropertiesManagerAdapter | public class PropertiesManagerAdapter implements PropertiesInterface(Code) | | Generic version of the PropertiesInterface. It uses three sources of
properties to modify the initial values passed in through the hashTable
parameter of the setParameters method. There are three sources of
properties. The first is from a file if a key called fileName is contained
in the hashtable provided. The second source of properties is the system
properties, and finally they can be provided at the command line as well.
author: Bart Carlton (Charles Wood) version: 2.0 |
Method Summary | |
protected void | getPropertiesFromCommandLine() Modifies the properties hashtable [localHash] based on any command
line options. | protected void | getPropertiesFromFile() Modifies the properties hashtable [localHash] based on a
properties file. | protected void | getPropertiesFromSystemProperties() Modifies the properties hashtable [localHash] based on system properties. | public void | setCommandLineArgs(String[] args) Sets the command line arguments string to be used for altering
values in the local hashtable. | public void | setParameters(Hashtable localHash) | public Hashtable | updateProperties() Returns the modified hashtable after setting properties based on the property
file provided in the hahstable, the system properties
and the command line arguments string if it has been set. |
PropertiesManagerAdapter | public PropertiesManagerAdapter()(Code) | | constructor
|
getPropertiesFromCommandLine | protected void getPropertiesFromCommandLine()(Code) | | Modifies the properties hashtable [localHash] based on any command
line options. If a property is not in the hashtable already, it is
not added to the properties hashtable.
|
getPropertiesFromFile | protected void getPropertiesFromFile()(Code) | | Modifies the properties hashtable [localHash] based on a
properties file. The filename must be provided in the hashtable
with its key as "fileName". New properties are added in addition
to old ones being modified.
|
getPropertiesFromSystemProperties | protected void getPropertiesFromSystemProperties()(Code) | | Modifies the properties hashtable [localHash] based on system properties.
New properties are added in addition to old ones being modified.
|
setCommandLineArgs | public void setCommandLineArgs(String[] args)(Code) | | Sets the command line arguments string to be used for altering
values in the local hashtable.
param args the string array that is to be processed as the
command line arguments
|
setParameters | public void setParameters(Hashtable localHash)(Code) | | Sets the hashtable containing the default properties to be used
param localHash the hashtable that contains the intial properties
list and their default values
|
updateProperties | public Hashtable updateProperties()(Code) | | Returns the modified hashtable after setting properties based on the property
file provided in the hahstable, the system properties
and the command line arguments string if it has been set.
Returns hashtable with the newly set values
|
|
|
|