de.smartics.properties.spi.config.ds
Class DataSourceConfigurationPropertyProvider

Package class diagram package DataSourceConfigurationPropertyProvider
java.lang.Object
  extended by de.smartics.properties.spi.config.ds.DataSourceConfigurationPropertyProvider
All Implemented Interfaces:
PropertyProvider, Serializable

@NotThreadSafe
public final class DataSourceConfigurationPropertyProvider
     
     
extends Object
implements PropertyProvider

Provides an adapter for properties in a data source to match the PropertyProvider interface.

See Also:
Serialized Form

Constructor Summary
DataSourceConfigurationPropertyProvider(ConfigurationKey configurationKey, PropertiesStore manager)
          Default constructor.
 
Method Summary
 boolean containsKey(String name)
          Checks if a given property is provided by the property provider.
 ConfigurationKey getConfigurationKey()
          The key of the configuration this property provider provides properties for.
 PropertyCollection getProperties()
          Returns the collection of all property values known to the system.
 Property getProperty(String name)
          Returns the property with the given name.
 PropertyLocation getSourceId()
          Returns the unique identifier of the property source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceConfigurationPropertyProvider

public DataSourceConfigurationPropertyProvider(ConfigurationKey configurationKey,
                                               PropertiesStore manager)
                                        throws NullPointerException
Default constructor.

Parameters:
configurationKey - the identifier of the configuration the provided properties are part of.
manager - the access to the properties of the data source.
Throws:
NullPointerException - if configurationKey or manager is null.
Method Detail

getConfigurationKey

public ConfigurationKey getConfigurationKey()
Description copied from interface: PropertyProvider
The key of the configuration this property provider provides properties for.

Specified by:
getConfigurationKey in interface PropertyProvider
Returns:
the key of the configuration this property provider provides properties for.

getSourceId

public PropertyLocation getSourceId()
Description copied from interface: PropertyProvider
Returns the unique identifier of the property source. This value is used to identify the source when reporting about a property.

Specified by:
getSourceId in interface PropertyProvider
Returns:
the unique identifier of the property source.

getProperty

public Property getProperty(String name)
                     throws NullPointerException,
                            IllegalArgumentException
Description copied from interface: PropertyProvider
Returns the property with the given name.

Specified by:
getProperty in interface PropertyProvider
Parameters:
name - the name of the property to fetch.
Returns:
the value to the property.
Throws:
NullPointerException - if name is null.
IllegalArgumentException - if the property is not known. A property is not known if its key has not been registered. A property that is registered with the null value is known.

getProperties

public PropertyCollection getProperties()
Description copied from interface: PropertyProvider
Returns the collection of all property values known to the system.

Specified by:
getProperties in interface PropertyProvider
Returns:
the collection of all property values known to the system. May be empty, but is never null.

containsKey

public boolean containsKey(String name)
                    throws NullPointerException
Description copied from interface: PropertyProvider
Checks if a given property is provided by the property provider.

Specified by:
containsKey in interface PropertyProvider
Parameters:
name - the property name to check.
Returns:
true if the provider provides a property for the name, false otherwise.
Throws:
NullPointerException - if name is null.


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