org.pf.tools.cda.base.global
Class Preferences

java.lang.Object
  extended by org.pf.tools.cda.base.global.Preferences

public class Preferences
extends java.lang.Object

Contains individual settings that can be stored and loded from a file.

Version:
1.3
Author:
Manfred Duchrow

Method Summary
 java.lang.Boolean getAutoInsertVariablesIntoClasspath()
           
 java.lang.String[] getAutoLoadWorksets()
          Returns the workset filenames to be loaded automatically at startup.
 java.lang.String getLastWorksetDirectory()
          Returns the last used workset directory or null
 java.lang.String getSetting(java.lang.String key)
          Returns the preference settings value or null for the given key
static Preferences instance()
          Returns the only instance this class supports (design pattern "Singleton")
 void setAutoInsertVariablesIntoClasspath(java.lang.Boolean flag)
           
 void setAutoLoadWorksets(java.lang.String[] worksetFilenames)
          Sets the workset filenames to be loaded automatically at next startup
 void setLastWorksetDirectory(java.lang.String dir)
          Sets the last used workset directory
 void setSetting(java.lang.String key, java.lang.String value)
          Set the preference settings value or null for the given key
 void store()
          Store all preferences to a file 'cda.prefs' in the user's home directory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static Preferences instance()
Returns the only instance this class supports (design pattern "Singleton")


getLastWorksetDirectory

public java.lang.String getLastWorksetDirectory()
Returns the last used workset directory or null


setLastWorksetDirectory

public void setLastWorksetDirectory(java.lang.String dir)
Sets the last used workset directory


getAutoLoadWorksets

public java.lang.String[] getAutoLoadWorksets()
Returns the workset filenames to be loaded automatically at startup. This method never returns null.


setAutoLoadWorksets

public void setAutoLoadWorksets(java.lang.String[] worksetFilenames)
Sets the workset filenames to be loaded automatically at next startup


getAutoInsertVariablesIntoClasspath

public java.lang.Boolean getAutoInsertVariablesIntoClasspath()

setAutoInsertVariablesIntoClasspath

public void setAutoInsertVariablesIntoClasspath(java.lang.Boolean flag)

getSetting

public java.lang.String getSetting(java.lang.String key)
Returns the preference settings value or null for the given key


setSetting

public void setSetting(java.lang.String key,
                       java.lang.String value)
Set the preference settings value or null for the given key


store

public void store()
Store all preferences to a file 'cda.prefs' in the user's home directory.