com.ibm.dse.tools.workbench.base
Class WorkbenchSettings

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.base.WorkbenchSettings

public class WorkbenchSettings
extends java.lang.Object
implements WorkbenchVariables

This class implements the Workbench settings It's used to create, modify and select Workbench settings.


Field Summary
protected static java.lang.String defaultDataSource
          The default settings data source
protected static int defaultDataSourceType
          The default settings data source type
protected static Settings settings
          The Settings object
 
Fields inherited from interface com.ibm.dse.tools.workbench.base.WorkbenchVariables
BaseSettings, IDESettings, InstanceWizards, NewInstanceMenu, RepositoryLastURL, RepositoryLastUser, RepositorySettings, ShowConsoleOnStartup, WorkspaceLastURL, WorkspaceLastUser, WorkspaceSettings
 
Constructor Summary
WorkbenchSettings()
           
 
Method Summary
static void flush()
          This method saves the current settings values to the data source
static java.lang.String getProperty(java.lang.String key)
          This method returns the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
static java.lang.String getProperty(java.lang.String group, java.lang.String key)
          This method returns the value of the given group's property
static java.util.Hashtable getSettingsGroup(java.lang.String groupName)
          This method returns a hashtable with the settings of the given group
static java.util.Hashtable getSettingsGroupValues(java.lang.String groupName)
          This method returns a hashtable with the settings of the given group
protected static void initialize()
          Initialize the Workbench Settings using the defaultDataSource
static void removeProperty(java.lang.String key)
          This method removes the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
static void removeProperty(java.lang.String group, java.lang.String key)
          This method deletes a property
static void removeSettingsGroupValues(java.lang.String group)
          This method removes all the properties of the given group
static void setDataSource(java.lang.String name, int type)
          This method initializes the Settings hashtable using the given data source
static void setProperty(java.lang.String key, java.lang.String value)
          This method adds or updates the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
static void setProperty(java.lang.String group, java.lang.String key, java.lang.String value)
          This method adds or updates the value of a given property of a given group
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultDataSource

protected static java.lang.String defaultDataSource
The default settings data source

defaultDataSourceType

protected static int defaultDataSourceType
The default settings data source type

settings

protected static Settings settings
The Settings object
Constructor Detail

WorkbenchSettings

public WorkbenchSettings()
Method Detail

flush

public static void flush()
                  throws WBInvalidArgumentException,
                         WBInputOutputException
This method saves the current settings values to the data source
Throws:
WBInvalidArgumentException - An Invalid argument has beeen passed
WBInputOutputException -  

getProperty

public static java.lang.String getProperty(java.lang.String key)
This method returns the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
Parameters:
key - java.lang.String The key
Returns:
java.lang.String The value

getProperty

public static java.lang.String getProperty(java.lang.String group,
                                           java.lang.String key)
This method 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 static java.util.Hashtable getSettingsGroup(java.lang.String groupName)
This method returns a hashtable with the settings of the given group
Parameters:
groupName - java.lang.String the group name
Returns:
java.util.Hashtable the settings of the group

getSettingsGroupValues

public static java.util.Hashtable getSettingsGroupValues(java.lang.String groupName)
This method returns a hashtable with the settings of the given group
Parameters:
groupName - java.lang.String the group name
Returns:
java.util.Hashtable the settings

initialize

protected static void initialize()
                          throws WBInputOutputException
Initialize the Workbench Settings using the defaultDataSource

removeProperty

public static void removeProperty(java.lang.String key)
This method removes the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
Parameters:
key - java.lang.Object The key

removeProperty

public static void removeProperty(java.lang.String group,
                                  java.lang.String key)
This method deletes a property
Parameters:
group - java.lang.String The group
key - java.lang.String The key

removeSettingsGroupValues

public static void removeSettingsGroupValues(java.lang.String group)
This method removes all the properties of the given group
Parameters:
group - java.lang.String The settings group

setDataSource

public static void setDataSource(java.lang.String name,
                                 int type)
                          throws WBInputOutputException
This method initializes the Settings hashtable using the given data source
Parameters:
name - java.lang.String The data source location
type - int The data source type

setProperty

public static void setProperty(java.lang.String key,
                               java.lang.String value)
This method adds or updates the value of a given property If the property belongs to a group, then it's necessary to use the "group.property" notation
Parameters:
key - java.lang.String The key
value - java.lang.String The value

setProperty

public static void setProperty(java.lang.String group,
                               java.lang.String key,
                               java.lang.String value)
This method adds or updates the value of a given property of a given group
Parameters:
group - java.lang.String The group
key - java.lang.String The key
value - java.lang.String The value