org.jfree.report.modules.preferences.filesystem
Class FileConfigStorage
java.lang.Object
org.jfree.report.modules.preferences.filesystem.FileConfigStorage
- ConfigStorage
The FileConfigStorage is a storage provider that stores its content on the
local filesystem. The directory used contains the data as plain text property
files.
FileConfigStorage(File baseDirectory) - Creates a new file config storage and stores the contents in the given
directory.
|
boolean | isAvailable(String configPath) - Tests, whether some configuration data exists for the given configuration.
|
Configuration | load(String configPath, Configuration defaults) - Loads the properties from the given path, specifying the given properties
as default.
|
void | store(String configPath, Configuration config) - Stores the given properties on the defined path.
|
String | toString()
|
FileConfigStorage
public FileConfigStorage(File baseDirectory)
Creates a new file config storage and stores the contents in the given
directory.
baseDirectory
- the directory that should contain the files.
isAvailable
public boolean isAvailable(String configPath)
Tests, whether some configuration data exists for the given configuration.
- isAvailable in interface ConfigStorage
configPath
- the configuration path to the property storage.
- true, if there are properties under this path, false otherwise.
load
public Configuration load(String configPath,
Configuration defaults)
throws ConfigStoreException
Loads the properties from the given path, specifying the given properties
as default.
- load in interface ConfigStorage
configPath
- the configuration path from where to load the
properties.defaults
- the property set that acts as fallback to provide default
values.
store
public void store(String configPath,
Configuration config)
throws ConfigStoreException
Stores the given properties on the defined path.
This implementation stores the data as property files.
- store in interface ConfigStorage
configPath
- the configuration path that specifies where to store the
properties.
#storeProperties(java.lang.String, java.util.Properties)