org.openbp.common.application
Class RootDirProvider

java.lang.Object
  extended by org.openbp.common.application.RootDirProvider
All Implemented Interfaces:
SettingProvider

public class RootDirProvider
extends java.lang.Object
implements SettingProvider

Provider that resolves the read-only property 'RootDir' to the application root directory (see Application.getRootDir()).

Author:
Heiko Erhardt

Constructor Summary
RootDirProvider()
          Default constructor.
 
Method Summary
 java.lang.Object getSetting(java.lang.String name)
          Gets a setting value.
 boolean loadSettings()
          Loads the settings.
 boolean saveSettings()
          Saves the settings.
 boolean setSetting(java.lang.String name, java.lang.Object value)
          Sets a setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootDirProvider

public RootDirProvider()
Default constructor.

Method Detail

getSetting

public java.lang.Object getSetting(java.lang.String name)
Gets a setting value.

Specified by:
getSetting in interface SettingProvider
Parameters:
name - Name of the setting
Returns:
The setting value or null if the setting does not exist

setSetting

public boolean setSetting(java.lang.String name,
                          java.lang.Object value)
Sets a setting. System properties cannot be saved, so the method returns always false.

Specified by:
setSetting in interface SettingProvider
Parameters:
name - Name of the setting
value - Value of the setting
Returns:
false

loadSettings

public boolean loadSettings()
Loads the settings. Does nothing.

Specified by:
loadSettings in interface SettingProvider
Returns:
true

saveSettings

public boolean saveSettings()
Saves the settings. Does nothing.

Specified by:
saveSettings in interface SettingProvider
Returns:
true


Copyright © 2011. All Rights Reserved.