de.smartics.properties.spi.config.ds
Interface PropertiesDataSourceAccessor

Package class diagram package PropertiesDataSourceAccessor
All Superinterfaces:
Serializable
All Known Implementing Classes:
PropertiesStore

public interface PropertiesDataSourceAccessor
     
     
extends Serializable

Interface to access property information from a data source.


Method Summary
 void deleteProperty(String config, String name)
          Deletes the property from the store.
 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.
 

Method Detail

getProperty

Property getProperty(String config,
                     String name)
                     throws NullPointerException,
                            IllegalArgumentException,
                            DataSourceException
Reads the property with the given name from the data source.

Parameters:
config - the name of the configuration the property is part of.
name - the name of the property to fetch.
Returns:
the property or null, if no such property is stored in the data source.
Throws:
NullPointerException - if config or name is null.
IllegalArgumentException - if config or name is blank.
DataSourceException - on any problem accessing the data source.

setProperty

void setProperty(String config,
                 String name,
                 String value)
                 throws NullPointerException,
                        IllegalArgumentException,
                        DataSourceException
Sets the property to the given name and value.

Parameters:
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.
Throws:
NullPointerException - if config or name is null.
IllegalArgumentException - if config or name is blank.
DataSourceException - on any problem accessing the data source.

setProperties

void setProperties(PropertyProvider provider)
                   throws NullPointerException,
                          DataSourceException
Stores all properties provided by the given provider.

Parameters:
provider - the provider of properties to store.
Throws:
NullPointerException - if provider is null.
DataSourceException - on any problem accessing the data source.

deleteProperty

void deleteProperty(String config,
                    String name)
                    throws NullPointerException,
                           IllegalArgumentException,
                           DataSourceException
Deletes the property from the store.

Parameters:
config - the name of the configuration the property is part of.
name - the name of the property to delete.
Throws:
NullPointerException - if config or name is null.
IllegalArgumentException - if config or name is blank.
DataSourceException - on any problem accessing the data source.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.