|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scubatoolkit.Settings
This class manages the settings of the application. The init() * method should be called at the beginning of the application to * load the settings files. * * @author Javier Vilalta * @author Lee Turner * @version 1.0
Field Summary | |
static java.lang.String |
activityLogFileName
|
static java.lang.String |
configFileName
|
private static Settings |
instance
|
private static Logger |
log
|
private Document |
scubaToolkitConfig
|
static java.lang.String |
settingsDirectoryName
|
Constructor Summary | |
private |
Settings()
Constructor for the Settings object |
Method Summary | |
java.lang.String |
getActivityLogPath()
Gets the path to the access log file * * @return The path to the access log file |
boolean |
getBooleanSetting(java.lang.String settingName)
Returns the value of a boolean property returning false * if not defined. |
boolean |
getBooleanSetting(java.lang.String settingName,
boolean def)
Returns the value of a boolean property returning the default value * if not defined. |
java.lang.String |
getBuildDate()
Gets the buildDate attribute of the Settings object * * @return The buildDate value |
double |
getDoubleSetting(java.lang.String settingName,
double def)
Returns the value of an double property returning the default value * if not defined. |
static Settings |
getInstance()
Gets the instance attribute of the Settings class * * @return The instance value |
int |
getIntegerSetting(java.lang.String settingName,
int def)
Returns the value of an integer property returning the default value * if not defined. |
java.lang.String |
getSetting(java.lang.String settingName)
Gets a setting from the config file returning null if not defined. |
java.lang.String |
getSetting(java.lang.String settingName,
java.lang.String def)
Gets a setting from the config file returning the default value * if not defined. |
java.lang.String |
getSettingsDirectory()
Gets the settingsPath attribute of the Settings class * * @return The settingsPath value |
java.lang.String |
getVersion()
Gets the version attribute of the Settings object * * @return The version value |
void |
init()
Description of the Method * * @exception SettingsException Description of the Exception |
void |
saveSettings()
Description of the Method * * @exception SettingsException Description of the Exception |
void |
setDoubleSetting(java.lang.String settingName,
double value)
Sets the value of an double property. |
void |
setIntegerSetting(java.lang.String settingName,
int value)
Sets the value of an integer property. |
void |
setSetting(java.lang.String settingName,
java.lang.String settingValue)
Sets the setting attribute of the Settings object * * @param settingName The new setting value * @param settingValue The new setting value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Logger log
private static Settings instance
public static java.lang.String settingsDirectoryName
public static java.lang.String activityLogFileName
public static java.lang.String configFileName
private Document scubaToolkitConfig
Constructor Detail |
private Settings()
Method Detail |
public static Settings getInstance()
public void init() throws SettingsException
SettingsException
public java.lang.String getSettingsDirectory()
public java.lang.String getActivityLogPath()
public final java.lang.String getVersion()
public final java.lang.String getBuildDate()
public final java.lang.String getSetting(java.lang.String settingName)
public final java.lang.String getSetting(java.lang.String settingName, java.lang.String def)
public final boolean getBooleanSetting(java.lang.String settingName)
public final boolean getBooleanSetting(java.lang.String settingName, boolean def)
public final int getIntegerSetting(java.lang.String settingName, int def)
public double getDoubleSetting(java.lang.String settingName, double def)
public final void setIntegerSetting(java.lang.String settingName, int value)
public final void setDoubleSetting(java.lang.String settingName, double value)
public final void setSetting(java.lang.String settingName, java.lang.String settingValue)
public void saveSettings() throws SettingsException
SettingsException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |