IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.desktop
Class Settings

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended bycom.ibm.dse.desktop.Settings
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class Settings
extends java.util.Hashtable

This class is used to manage (create, modify, and select) settings.

@copyright(c) Copyright IBM Corporation 2000.

See Also:
Serialized Form

Field Summary
static int DATABASE
           
protected  java.lang.String dataSourceLocation
           
static int FILE
           
static java.lang.String NullConstant
           
static int RESOURCE
           
 
Constructor Summary
Settings()
          Creates a Settings object.
 
Method Summary
 void flush()
          Saves the current settings values to the data source.
 java.lang.String getProperty(java.lang.String key)
          Returns the value of a given property.
 java.lang.String getProperty(java.lang.String group, java.lang.String key)
          Returns the value of the given group's property.
 java.util.Hashtable getSettingsGroup(java.lang.String groupName)
          Returns a hash table with the settings of the given group.
 java.util.Hashtable getSettingsGroupValues(java.lang.String groupName)
          Returns a hash table with the settings values of the given group.
protected  void initialize()
          Initializes the Settings, using the given data source.
 void removeProperty(java.lang.String key)
          Removes the value of a given property.
 void removeProperty(java.lang.String group, java.lang.String key)
          Deletes a property.
 void removeSettingsGroupValues(java.lang.String group)
          Removes all the properties of the given group.
 void setDataSource(java.lang.String name, int type)
          Initializes the Settings, using the given data source.
 void setProperty(java.lang.String key, java.lang.String value)
          Adds or updates the value of a given property.
 void setProperty(java.lang.String group, java.lang.String key, java.lang.String value)
          Adds or updates the value of a given property of a given group.
 
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

dataSourceLocation

protected java.lang.String dataSourceLocation

RESOURCE

public static final int RESOURCE
See Also:
Constant Field Values

FILE

public static final int FILE
See Also:
Constant Field Values

DATABASE

public static final int DATABASE
See Also:
Constant Field Values

NullConstant

public static final java.lang.String NullConstant
See Also:
Constant Field Values
Constructor Detail

Settings

public Settings()
Creates a Settings object.

Method Detail

flush

public void flush()
           throws java.lang.Exception
Saves the current settings values to the data source.

Throws:
java.lang.Exception

getProperty

public java.lang.String getProperty(java.lang.String key)
Returns the value of a given property. If the property belongs to a group, it's necessary to use the "group.property" notation.

Parameters:
key - java.lang.Object - the key
Returns:
java.lang.Object - the value

getProperty

public java.lang.String getProperty(java.lang.String group,
                                    java.lang.String key)
Returns the value of the given group's property.

Parameters:
group - java.lang.String - the group
key - java.lang.String - the key
Returns:
java.lang.String

getSettingsGroup

public java.util.Hashtable getSettingsGroup(java.lang.String groupName)
Returns a hash table with the settings of the given group.

Parameters:
groupName - java.lang.String
Returns:
java.util.Hashtable

getSettingsGroupValues

public java.util.Hashtable getSettingsGroupValues(java.lang.String groupName)
Returns a hash table with the settings values of the given group.

Parameters:
groupName - java.lang.String
Returns:
java.util.Hashtable

initialize

protected void initialize()
                   throws java.lang.Exception
Initializes the Settings, using the given data source.

Throws:
java.lang.Exception

removeProperty

public void removeProperty(java.lang.String key)
Removes the value of a given property. If the property belongs to a group, it's necessary to use the "group.property" notation.

Parameters:
key - java.lang.Object - the key
Returns:
java.lang.Object - the value

removeProperty

public void removeProperty(java.lang.String group,
                           java.lang.String key)
Deletes a property.

Parameters:
group - java.lang.String
key - java.lang.String

removeSettingsGroupValues

public void removeSettingsGroupValues(java.lang.String group)
Removes all the properties of the given group.

Parameters:
group - java.lang.String - the settings group

setDataSource

public void setDataSource(java.lang.String name,
                          int type)
                   throws java.lang.Exception
Initializes the Settings, using the given data source.

Parameters:
name - java.lang.String - the data source location
type - int - the data source type
Throws:
java.lang.Exception

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Adds or updates the value of a given property. If the property belongs to a group, it's necessary to use the "group.property" notation.

Parameters:
key - java.lang.String
value - java.lang.String

setProperty

public void setProperty(java.lang.String group,
                        java.lang.String key,
                        java.lang.String value)
Adds or updates the value of a given property of a given group.

Parameters:
group - java.lang.String
key - java.lang.String
value - java.lang.String

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005