public class FileConfigStorage extends java.lang.Object implements ConfigStorage
Constructor and Description |
---|
FileConfigStorage(java.io.File baseDirectory)
Creates a new file config storage and stores the contents in the given
directory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAvailable(java.lang.String configPath)
Tests, whether some configuration data exists for the given configuration.
|
org.pentaho.reporting.libraries.base.config.Configuration |
load(java.lang.String configPath,
org.pentaho.reporting.libraries.base.config.Configuration defaults)
Loads the properties from the given path, specifying the given properties
as default.
|
void |
store(java.lang.String configPath,
org.pentaho.reporting.libraries.base.config.Configuration config)
Stores the given properties on the defined path.
|
java.lang.String |
toString() |
public FileConfigStorage(java.io.File baseDirectory)
baseDirectory
- the directory that should contain the files.public void store(java.lang.String configPath, org.pentaho.reporting.libraries.base.config.Configuration config) throws ConfigStoreException
store
in interface ConfigStorage
configPath
- the configuration path that specifies where to store the
properties.config
- the properties which should be stored.ConfigStoreException
- if an error occured.public org.pentaho.reporting.libraries.base.config.Configuration load(java.lang.String configPath, org.pentaho.reporting.libraries.base.config.Configuration defaults) throws ConfigStoreException
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.ConfigStoreException
- if an error occured.public boolean isAvailable(java.lang.String configPath)
isAvailable
in interface ConfigStorage
configPath
- the configuration path to the property storage.public java.lang.String toString()
toString
in class java.lang.Object