|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.bnl.gums.configuration.ConfigurationStore 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).
Field Summary |
---|
Fields inherited from class gov.bnl.gums.configuration.ConfigurationStore |
---|
format |
Constructor Summary | |
---|---|
FileConfigurationStore()
Creates a new FileConfigurationStore object. |
|
FileConfigurationStore(String configDir)
Creates a new FileConfigurationStore object. |
Method Summary | |
---|---|
static void |
copyFile(String source,
String target)
Copy source to target |
void |
deleteBackupConfiguration(String name)
Delete backup configuration |
Collection |
getBackupNames()
Get a list of config date strings that have been backed up |
Date |
getLastModification()
Get last modified |
boolean |
isActive()
Defines whether a configuration can be retrieved from the store. |
static void |
moveFile(String source,
String target)
Move source to target |
Configuration |
restoreConfiguration(String name)
Restores configuration in memory. |
Configuration |
retrieveConfiguration()
Loads the configuration in memory if or from storage based on reload. |
void |
setConfiguration(Configuration conf,
boolean backupCopy,
String name,
Date date)
Set and store the configuration. |
Methods inherited from class gov.bnl.gums.configuration.ConfigurationStore |
---|
getFormat |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileConfigurationStore()
public FileConfigurationStore(String configDir)
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(String source, String target)
source
- target
- public static void moveFile(String source, String target)
source
- target
- public void deleteBackupConfiguration(String name)
ConfigurationStore
deleteBackupConfiguration
in class ConfigurationStore
public Collection getBackupNames()
ConfigurationStore
getBackupNames
in class ConfigurationStore
public Date getLastModification()
ConfigurationStore
getLastModification
in class ConfigurationStore
public boolean isActive()
ConfigurationStore
isActive
in class ConfigurationStore
public Configuration restoreConfiguration(String name)
ConfigurationStore
restoreConfiguration
in class ConfigurationStore
public Configuration retrieveConfiguration()
ConfigurationStore
retrieveConfiguration
in class ConfigurationStore
public void setConfiguration(Configuration conf, boolean backupCopy, String name, Date date) throws Exception
ConfigurationStore
setConfiguration
in class ConfigurationStore
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |