de.smartics.properties.impl.config.ds
Class DataSourceConfigurationProperties

Package class diagram package DataSourceConfigurationProperties
java.lang.Object
  extended by de.smartics.properties.spi.config.support.AbstractConfigurationProperties
      extended by de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesManagement
          extended by de.smartics.properties.impl.config.ds.DataSourceConfigurationProperties
All Implemented Interfaces:
ConfigurationProperties, ConfigurationPropertiesManagement, SerializableConfigurationProperties, SerializableConfigurationPropertiesManagement, ConfigurationPropertiesManagementSpi, ConfigurationPropertiesSpi, SerializableConfigurationPropertiesManagementSpi, Serializable

@ThreadSafe
public final class DataSourceConfigurationProperties
     
     
extends AbstractConfigurationPropertiesManagement
implements SerializableConfigurationPropertiesManagement, SerializableConfigurationPropertiesManagementSpi

Implementation based on Properties.

See Also:
Serialized Form

Constructor Summary
DataSourceConfigurationProperties(ConfigurationKey key, PropertyDescriptorRegistry registry, PropertiesStore store)
          Default constructor.
 
Method Summary
protected  Property deletePropertyInStore(String name)
          Deletes the property with the given name.
protected  PropertyCollection getPropertyCollectionFromStore()
          Returns a collection to iterate over all properties of the configuration.
protected  Property getPropertyFromStore(String name)
          Fetches the property from the store by the given name.
protected  Property setPropertyToStore(String name, String value)
          Sets the property to the given value.
 SerializableConfigurationPropertiesManagement toSerializable()
          Creates a serializable variant of this implementation.
 
Methods inherited from class de.smartics.properties.spi.config.support.AbstractConfigurationPropertiesManagement
addDefinitions, addDescriptors, flush, getDescriptor, getDescriptor, getMandatoryPropertyDescriptors, getProperty, getProperty, getResolvedProperty, setProperty, unsetProperty, validate
 
Methods inherited from class de.smartics.properties.spi.config.support.AbstractConfigurationProperties
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getContext, getContext, getKey, getProperties, getProperties, getProperty, getProperty, getProperty, getPropertyDescriptor, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getRegistry, getResolvedProperty, getResolvedProperty, removePropertyChangeListener, removePropertyChangeListener, resolveAndConvert, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.smartics.properties.api.config.domain.ConfigurationPropertiesManagement
addDefinitions, addDescriptors, flush, getDescriptor, getDescriptor, getMandatoryPropertyDescriptors, getRegistry, setProperty, unsetProperty
 
Methods inherited from interface de.smartics.properties.spi.config.support.ConfigurationPropertiesSpi
getProperties
 
Methods inherited from interface de.smartics.properties.api.config.domain.ConfigurationProperties
addPropertyChangeListener, addPropertyChangeListener, getContext, getContext, getKey, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getResolvedProperty, getResolvedProperty, getResolvedProperty, removePropertyChangeListener, removePropertyChangeListener, validate, validate
 

Constructor Detail

DataSourceConfigurationProperties

public DataSourceConfigurationProperties(ConfigurationKey key,
                                         PropertyDescriptorRegistry registry,
                                         PropertiesStore store)
                                  throws de.smartics.util.lang.NullArgumentException
Default constructor.

Parameters:
key - the key that identifies the configuration.
registry - the registry to resolve property descriptors.
store - the store containing properties.
Throws:
de.smartics.util.lang.NullArgumentException - if key or registry is null.
Method Detail

getPropertyFromStore

protected Property getPropertyFromStore(String name)
Description copied from class: AbstractConfigurationPropertiesManagement
Fetches the property from the store by the given name.

Specified by:
getPropertyFromStore in class AbstractConfigurationPropertiesManagement
Parameters:
name - the name of the property to fetch.
Returns:
the property value. Must not be null (although the value of the property may be null).

setPropertyToStore

protected Property setPropertyToStore(String name,
                                      String value)
                               throws NullPointerException,
                                      PropertyValidationException,
                                      ReadOnlyPropertyException
Description copied from class: AbstractConfigurationPropertiesManagement
Sets the property to the given value.

Specified by:
setPropertyToStore in class AbstractConfigurationPropertiesManagement
Parameters:
name - the name of the property to set.
value - the value to the property.
Returns:
the old property. Must not be null (although the value of the property may be null).
Throws:
NullPointerException - if name is null.
PropertyValidationException
ReadOnlyPropertyException

deletePropertyInStore

protected Property deletePropertyInStore(String name)
Description copied from class: AbstractConfigurationPropertiesManagement
Deletes the property with the given name.

Specified by:
deletePropertyInStore in class AbstractConfigurationPropertiesManagement
Parameters:
name - the name of the property to delete.
Returns:
the value of the deleted property.

toSerializable

public SerializableConfigurationPropertiesManagement toSerializable()
Description copied from interface: ConfigurationProperties
Creates a serializable variant of this implementation.

Specified by:
toSerializable in interface ConfigurationProperties
Specified by:
toSerializable in interface ConfigurationPropertiesManagement
Returns:
a serializable variant of this implementation.
See Also:
ConfigurationPropertiesProxy, ConfigurationPropertiesManagementProxy

getPropertyCollectionFromStore

protected PropertyCollection getPropertyCollectionFromStore()
Description copied from class: AbstractConfigurationPropertiesManagement
Returns a collection to iterate over all properties of the configuration.

Specified by:
getPropertyCollectionFromStore in class AbstractConfigurationPropertiesManagement
Returns:
a collection to iterate over all properties of the configuration.


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