|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.ds.AbstractDataSourceDescriptor de.smartics.properties.spi.config.ds.DefaultDataSourceManager de.smartics.properties.spi.config.ds.PropertiesStore
public final class PropertiesStore
Provides access to properties in a data source.
Nested Class Summary | |
---|---|
static class |
PropertiesStore.Builder The builder of manager instances. |
Field Summary |
---|
Fields inherited from class de.smartics.properties.spi.config.ds.DefaultDataSourceManager |
---|
dropTable, ignoreTableCreationProblems |
Constructor Summary | |
---|---|
protected |
PropertiesStore(PropertiesStore.Builder builder) Default constructor. |
Method Summary | |
---|---|
boolean |
containsKey(String config, String name) Checks if a property with the given name is stored. |
void |
deleteProperties() Deletes all properties. |
void |
deleteProperty(String config, String name) Deletes the property from the store. |
PropertyCollection |
getCollection(String config) The collection of all properties stored. |
Property |
getProperty(String config, String name) Reads the property with the given name from the data source. |
void |
setProperties(PropertyProvider provider) Stores all properties provided by the given provider. |
void |
setProperty(String config, String name, String value) Sets the property to the given name and value. |
Methods inherited from class de.smartics.properties.spi.config.ds.DefaultDataSourceManager |
---|
createConfigTable, dropConfigTable, getConfigurationKeys, getDataSourceId, getDataSourceProxy, getInsertOrUpdateSqlStatementTemplate, print, toString |
Methods inherited from class de.smartics.properties.spi.config.ds.AbstractDataSourceDescriptor |
---|
getConfigColumn, getNameColumn, getTable, getValueColumn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.smartics.properties.spi.config.ds.PropertiesDataSourceDescriptor |
---|
getConfigColumn, getNameColumn, getTable, getValueColumn |
Constructor Detail |
---|
protected PropertiesStore(PropertiesStore.Builder builder)
builder
- the builder of manager instance.
Method Detail |
---|
public Property getProperty(String config, String name) throws NullPointerException, IllegalArgumentException, DataSourceException
PropertiesDataSourceAccessor
getProperty
in interface
PropertiesDataSourceAccessor
config
- the name of the configuration the property is part of.
name
- the name of the property to fetch.
null
, if no such property is stored in the data source.
NullPointerException
- if
config
or
name
is
null
.
IllegalArgumentException
- if
config
or
name
is blank.
DataSourceException
- on any problem accessing the data source.
public void setProperty(String config, String name, String value) throws IllegalArgumentException, DataSourceException
PropertiesDataSourceAccessor
setProperty
in interface
PropertiesDataSourceAccessor
config
- the name of the configuration the property is part of.
name
- the name of the property to set.
value
- the value of the property.
IllegalArgumentException
- if
config
or
name
is blank.
DataSourceException
- on any problem accessing the data source.
public void setProperties(PropertyProvider provider) throws NullPointerException, DataSourceException
PropertiesDataSourceAccessor
setProperties
in interface
PropertiesDataSourceAccessor
provider
- the provider of properties to store.
NullPointerException
- if
provider
is
null
.
DataSourceException
- on any problem accessing the data source.
public void deleteProperty(String config, String name) throws IllegalArgumentException, DataSourceException
PropertiesDataSourceAccessor
deleteProperty
in interface
PropertiesDataSourceAccessor
config
- the name of the configuration the property is part of.
name
- the name of the property to delete.
IllegalArgumentException
- if
config
or
name
is blank.
DataSourceException
- on any problem accessing the data source.
public PropertyCollection getCollection(String config) throws DataSourceException
config
- the name of the configuration the property is part of.
DataSourceException
- on any database problem.
public boolean containsKey(String config, String name) throws IllegalArgumentException
name
is stored.
config
- the name of the configuration the property is part of.
name
- the name of the property to check if it is stored.
true
if there is a property with that name and a non-
null
value,
false
otherwise.
IllegalArgumentException
- if
config
or
name
is blank.
public void deleteProperties() throws DataSourceException
DataSourceException
- on any database problem.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |