|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.bnl.gums.configuration.FileConfigurationStore
public class FileConfigurationStore
Implements the logic to retrieve the configuration from the gums.config file taken from the classpath. The file will be reloaded as soon as if it changes, on demand (no polling).
Constructor Summary | |
---|---|
FileConfigurationStore()
Creates a new FileConfigurationStore object. |
|
FileConfigurationStore(java.lang.String configDir,
java.lang.String resourceDir,
java.lang.String version,
boolean create)
Creates a new FileConfigurationStore object. |
Method Summary | |
---|---|
static void |
copyFile(java.lang.String source,
java.lang.String target)
Copy source to target |
void |
deleteBackupConfiguration(java.lang.String dateStr)
|
java.util.Collection |
getBackupConfigDates()
Get a list of config files that have been backed up |
boolean |
isActive()
Defines whether a configuration can be retrieved from the store. |
boolean |
isReadOnly()
Defines whether the configuration can be changed or not. |
static void |
moveFile(java.lang.String source,
java.lang.String target)
Move source to target |
Configuration |
restoreConfiguration(java.lang.String dateStr)
Restores configuration in memory. |
Configuration |
retrieveConfiguration()
Loads the configuration in memory. |
void |
setConfiguration(Configuration conf,
boolean backupCopy)
Set and store the configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileConfigurationStore()
public FileConfigurationStore(java.lang.String configDir, java.lang.String resourceDir, java.lang.String version, boolean create)
filename
- create
- if true, a new barbones configuration file will be created
at given filename if no file currently exists thereMethod Detail |
---|
public static void copyFile(java.lang.String source, java.lang.String target)
source
- target
- public static void moveFile(java.lang.String source, java.lang.String target)
source
- target
- public void deleteBackupConfiguration(java.lang.String dateStr)
deleteBackupConfiguration
in interface ConfigurationStore
public java.util.Collection getBackupConfigDates()
ConfigurationStore
getBackupConfigDates
in interface ConfigurationStore
public boolean isActive()
ConfigurationStore
isActive
in interface ConfigurationStore
public boolean isReadOnly()
ConfigurationStore
isReadOnly
in interface ConfigurationStore
public Configuration retrieveConfiguration()
ConfigurationStore
retrieveConfiguration
in interface ConfigurationStore
public Configuration restoreConfiguration(java.lang.String dateStr)
ConfigurationStore
restoreConfiguration
in interface ConfigurationStore
public void setConfiguration(Configuration conf, boolean backupCopy) throws java.lang.Exception
ConfigurationStore
setConfiguration
in interface ConfigurationStore
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |