de.smartics.properties.impl.config.cache
Class AbstractCacheConfigurationPropertiesManagement

Package class diagram package AbstractCacheConfigurationPropertiesManagement
java.lang.Object
  extended by de.smartics.properties.api.config.domain.AbstractAdminModeSupportedPropertiesManagement
      extended by de.smartics.properties.impl.config.cache.AbstractCacheConfigurationPropertiesManagement
All Implemented Interfaces:
ConfigurationProperties, ConfigurationPropertiesManagement, Serializable
Direct Known Subclasses:
CacheConfigurationPropertiesManagement, SerializableCacheConfigurationPropertiesManagement

@ThreadSafe
public abstract class AbstractCacheConfigurationPropertiesManagement
     
     
extends AbstractAdminModeSupportedPropertiesManagement

A delegate that provides a cache.

See Also:
Serialized Form

Constructor Summary
  AbstractCacheConfigurationPropertiesManagement(ConfigurationKey<?> configurationKey)
          Default constructor.
protected AbstractCacheConfigurationPropertiesManagement(de.smartics.properties.impl.config.cache.DependencyTrackingCache cache)
          Default constructor that allows to specify a cache to be used.
 
Method Summary
 ConfigurationPropertiesManagement addDefinitions(PropertyProvider provider)
          Adds the given definitions to this configuration.
 void addDescriptors(Class<?> propertySetType)
          Adds all property descriptors declared in the given type.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds the given listener to track any property changes.
 void addPropertyChangeListener(PropertyKey name, PropertyChangeListener listener)
          Adds the given listener as a listener to the given property.
 void flush()
          Signal to flush properties changed in memory to be written to a secondary storage.
protected  de.smartics.properties.impl.config.cache.DependencyTrackingCache getCache()
          Provides access to the cache.
 PropertiesContext getContext(Class<?> declaringType)
          Returns the properties context for the declaring type.
 PropertyContext getContext(PropertyDescriptor descriptor)
          Returns the properties context the property described by the given descriptor is part of.
protected abstract  ConfigurationPropertiesManagementSpi getDelegate()
          Returns a reference to the delegate.
 PropertyDescriptor getDescriptor(PropertyKey key)
          Returns the descriptor for the given key.
 PropertyDescriptor getDescriptor(String key)
          Returns the descriptor for the given key.
 ConfigurationKey<?> getKey()
          Returns the key of the configuration.
 List<PropertyDescriptor> getMandatoryPropertyDescriptors()
          Returns the list of mandatory properties.
<T> T
getProperties(Class<T> propertiesInterface)
          Returns a implementation of the given interface that has access to the property keys, the property descriptors and the properties itself, when they are declared in the given interface.
 DescribedProperty getProperty(PropertyDescriptor descriptor)
          Returns the property for the given descriptor.
 DescribedProperty getProperty(PropertyDescriptor descriptor, Object defaultValue)
          Returns the property for the given descriptor, allowing to transparently provide a default value to be returned in case the property has not been set.
 DescribedProperty getProperty(PropertyKey key)
          Returns the property for the given key.
 DescribedProperty getProperty(String key)
          Returns the property for the given key.
 DescribedProperty getProperty(String key, Object defaultValue)
          Returns the property for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.
 Object getPropertyAsType(PropertyDescriptor descriptor)
          Returns the yet not validated property for the given descriptor's key.
 Object getPropertyValue(PropertyDescriptor descriptor)
          Returns the property value for the given descriptor.
 Object getPropertyValue(PropertyDescriptor descriptor, Object defaultValue)
          Returns the property value for the given descriptor, allowing to transparently provide a default value to be returned in case the property has not been set.
 Object getPropertyValue(PropertyKey key)
          Returns the property value for the given key.
 Object getPropertyValue(String key)
          Returns the property value for the given key.
 Object getPropertyValue(String key, Object defaultValue)
          Returns the property value for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.
 String getPropertyValueAsString(PropertyDescriptor descriptor)
          Returns the property string value for the given descriptor.
 String getPropertyValueAsString(PropertyDescriptor descriptor, Object defaultValue)
          Returns the property string value for the given descriptor.
 String getPropertyValueAsString(String key)
          Returns the property string value for the given key.
 String getPropertyValueAsString(String key, Object defaultValue)
          Returns the property string value for the given key.
 PropertyValueSecurity getPropertyValueSecurity()
          Returns the property value security helper to en- and decrypt property values.
 PropertyDescriptorRegistry getRegistry()
          Returns the registry to resolve property descriptors.
 ValidatedProperty getValidatedProperty(PropertyDescriptor descriptor, Object defaultValue)
          Returns the validated property for the given descriptor's key, allowing to transparently provide a default value to be returned in case the property has not been set.
 ValidatedProperty getValidatedProperty(PropertyKey key, Object defaultValue)
          Returns the validated property for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.
 ValidatedProperty getValidatedProperty(String key, Object defaultValue)
          Returns the validated property for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes the given listener to stop tracking property changes.
 void removePropertyChangeListener(PropertyKey name, PropertyChangeListener listener)
          Removes the given listener as a listener to the given property.
 Property setProperty(PropertyKey key, String value)
          Sets the property value for the given key.
 Property unsetProperty(PropertyKey key)
          Unsets the property value for the given key.
 void validate()
          Validates all properties in the given configuration in a non-lenient fashion.
 void validate(boolean lenient, Class<?>... groups)
          Validates all properties in the given configuration.
 void validate(Class<?>... groups)
          Validates all properties in the given configuration and groups in a non-lenient fashion.
 void validate(PropertyDescriptor descriptor, Class<?>... ifInOneOfTheseGroups)
          Validates the given property in the given configuration.
 void validate(PropertyDescriptor descriptor, String value, Class<?>... ifInOneOfTheseGroups)
          Validates the given property in the given configuration.
 
Methods inherited from class de.smartics.properties.api.config.domain.AbstractAdminModeSupportedPropertiesManagement
isInAdminMode, setToAdminMode, toRepresentative
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.smartics.properties.api.config.domain.ConfigurationPropertiesManagement
getPropertyStoreAccessor, toSerializable
 

Constructor Detail

AbstractCacheConfigurationPropertiesManagement

public AbstractCacheConfigurationPropertiesManagement(ConfigurationKey<?> configurationKey)
Default constructor.

Parameters:
configurationKey - the key to the configuration this cache implementation works for.

AbstractCacheConfigurationPropertiesManagement

protected AbstractCacheConfigurationPropertiesManagement(de.smartics.properties.impl.config.cache.DependencyTrackingCache cache)
                                                  throws NullPointerException
Default constructor that allows to specify a cache to be used.

Parameters:
cache - the synchronized cache.
Throws:
NullPointerException - if cache is null.
Method Detail

getDelegate

protected abstract ConfigurationPropertiesManagementSpi getDelegate()
Returns a reference to the delegate.

Returns:
a reference to the delegate. Never null.

getCache

protected final de.smartics.properties.impl.config.cache.DependencyTrackingCache getCache()
Provides access to the cache.

Returns:
the cache.

getPropertyAsType

public Object getPropertyAsType(PropertyDescriptor descriptor)
                         throws IllegalArgumentException,
                                UnknownPropertyException,
                                PropertyValueConversionException,
                                SecurityException,
                                PropertyRootException
Description copied from interface: ConfigurationProperties
Returns the yet not validated property for the given descriptor's key. This is useful to access the resolved and converted value to apply validation only under certain conditions.

Parameters:
descriptor - descriptor key to the property.
Returns:
the resolved property. May be null if the property's value is actually unset.
Throws:
IllegalArgumentException - if descriptor is blank.
UnknownPropertyException - if descriptor is not known.
PropertyValueConversionException - if the property cannot be converted to its value.
SecurityException - on any problem decrypting an encrypted value.
PropertyRootException - on any problem.

getValidatedProperty

public final ValidatedProperty getValidatedProperty(PropertyDescriptor descriptor,
                                                    Object defaultValue)
                                             throws IllegalArgumentException,
                                                    UnknownPropertyException,
                                                    PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the validated property for the given descriptor's key, allowing to transparently provide a default value to be returned in case the property has not been set.

Parameters:
descriptor - descriptor key to the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the validated property. Never null, although the value / validated value of the returned property may be null.
Throws:
IllegalArgumentException - if descriptor is blank.
UnknownPropertyException - if descriptor is not known.
PropertyValidationException - if the property is invalid according to its constraints.

getProperty

public final DescribedProperty getProperty(PropertyDescriptor descriptor,
                                           Object defaultValue)
                                    throws IllegalArgumentException,
                                           UnknownPropertyException
Description copied from interface: ConfigurationProperties
Returns the property for the given descriptor, allowing to transparently provide a default value to be returned in case the property has not been set.

Parameters:
descriptor - the descriptor containing the unique key of the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the requested property.
Throws:
UnknownPropertyException - if the key of the descriptor is not known.
IllegalArgumentException

getProperty

public final DescribedProperty getProperty(String key)
                                    throws IllegalArgumentException,
                                           UnknownPropertyException
Description copied from interface: ConfigurationProperties
Returns the property for the given key.

Parameters:
key - the unique key of the property.
Returns:
the requested property.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.

getProperty

public final DescribedProperty getProperty(String key,
                                           Object defaultValue)
                                    throws IllegalArgumentException,
                                           UnknownPropertyException
Description copied from interface: ConfigurationProperties
Returns the property for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.

Parameters:
key - the unique key of the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the requested property.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.

getPropertyValue

public final Object getPropertyValue(PropertyDescriptor descriptor,
                                     Object defaultValue)
                              throws IllegalArgumentException,
                                     UnknownPropertyException,
                                     PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property value for the given descriptor, allowing to transparently provide a default value to be returned in case the property has not been set.

Parameters:
descriptor - the key to the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
UnknownPropertyException - if the requested property is not known to the system.
PropertyValidationException - if the property is invalid according to its constraints.
IllegalArgumentException

getProperties

public final <T> T getProperties(Class<T> propertiesInterface)
Description copied from interface: ConfigurationProperties
Returns a implementation of the given interface that has access to the property keys, the property descriptors and the properties itself, when they are declared in the given interface. The interface must be annotated with an PropertySet annotation.

Type Parameters:
T - type variable to enable a type save return value.
Parameters:
propertiesInterface - a PropertySet annotated interface for which a implementation to access the property keys, descriptors and values is requested.
Returns:
a implementation of the given interface to access property information.

setProperty

public final Property setProperty(PropertyKey key,
                                  String value)
                           throws NullPointerException,
                                  PropertyValidationException,
                                  ReadOnlyPropertyException
Description copied from interface: ConfigurationPropertiesManagement
Sets the property value for the given key.

Parameters:
key - the key to the property.
value - the value to the property.
Returns:
the old value to the property. A value of null is returned if the property had no value prior to this call.
Throws:
NullPointerException - if key is null.
PropertyValidationException - if the property value is invalid according to its constraints.
ReadOnlyPropertyException - if the property to update is read-only.

unsetProperty

public final Property unsetProperty(PropertyKey key)
                             throws NullPointerException,
                                    ReadOnlyPropertyException
Description copied from interface: ConfigurationPropertiesManagement
Unsets the property value for the given key.

Parameters:
key - the key to the property.
Returns:
the old value to the property. A value of null is returned if the property had no value prior to this call.
Throws:
NullPointerException - if key is null.
ReadOnlyPropertyException - if the property to update is read-only.

addDefinitions

public final ConfigurationPropertiesManagement addDefinitions(PropertyProvider provider)
                                                       throws NullPointerException
Description copied from interface: ConfigurationPropertiesManagement
Adds the given definitions to this configuration.

Parameters:
provider - the property definitions to add.
Returns:
a reference to this configuration for chaining.
Throws:
NullPointerException - if properties is null.

flush

public final void flush()
Description copied from interface: ConfigurationPropertiesManagement
Signal to flush properties changed in memory to be written to a secondary storage.

Implementations are not required to only write on a flush. They have to make sure that after the flush is called, all data is transfered to the secondary storage.


getRegistry

public final PropertyDescriptorRegistry getRegistry()
Description copied from interface: ConfigurationPropertiesManagement
Returns the registry to resolve property descriptors.

Returns:
the registry to resolve property descriptors.

getPropertyValueSecurity

public PropertyValueSecurity getPropertyValueSecurity()
Description copied from interface: ConfigurationPropertiesManagement
Returns the property value security helper to en- and decrypt property values.

Returns:
the property value security helper to en- and decrypt property values.

getPropertyValue

public final Object getPropertyValue(PropertyDescriptor descriptor)
                              throws NullPointerException,
                                     PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property value for the given descriptor.

Parameters:
descriptor - the key to the property.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
NullPointerException - if descriptor is null.
PropertyValidationException - if the property is invalid according to its constraints.

getPropertyValue

public final Object getPropertyValue(PropertyKey key)
                              throws IllegalArgumentException,
                                     UnknownPropertyException,
                                     PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property value for the given key.

Parameters:
key - the key to the property.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.
PropertyValidationException - if the property is invalid according to its constraints.

getPropertyValue

public final Object getPropertyValue(String key,
                                     Object defaultValue)
                              throws NullPointerException,
                                     PropertyValueConversionException,
                                     PropertyValidationException,
                                     UnknownPropertyException
Description copied from interface: ConfigurationProperties
Returns the property value for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.

Parameters:
key - the key to the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
PropertyValidationException - if the property is invalid according to its constraints.
UnknownPropertyException - if key is not known.
NullPointerException
PropertyValueConversionException

getPropertyValue

public final Object getPropertyValue(String key)
                              throws IllegalArgumentException,
                                     UnknownPropertyException,
                                     PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property value for the given key.

Parameters:
key - the key to the property.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.
PropertyValidationException - if the property is invalid according to its constraints.

getPropertyValueAsString

public final String getPropertyValueAsString(PropertyDescriptor descriptor)
                                      throws NullPointerException,
                                             PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property string value for the given descriptor. If the property type is not String, the Object.toString() method is called to create the string representation of the value. null is always returned as null (not as the String "null").

Parameters:
descriptor - the key to the property.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
NullPointerException - if descriptor is null.
PropertyValidationException - if the property is invalid according to its constraints.

getPropertyValueAsString

public final String getPropertyValueAsString(String key)
                                      throws IllegalArgumentException,
                                             UnknownPropertyException,
                                             PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property string value for the given key. If the property type is not String, the Object.toString() method is called to create the string representation of the value. null is always returned as null (not as the String "null").

Parameters:
key - the key to the property.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.
PropertyValidationException - if the property is invalid according to its constraints.

getPropertyValueAsString

public final String getPropertyValueAsString(PropertyDescriptor descriptor,
                                             Object defaultValue)
                                      throws NullPointerException,
                                             PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property string value for the given descriptor. If the property type is not String, the Object.toString() method is called to create the string representation of the value. null is always returned as null (not as the String "null").

Parameters:
descriptor - the key to the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
NullPointerException - if descriptor is null.
PropertyValidationException - if the property is invalid according to its constraints.

getPropertyValueAsString

public final String getPropertyValueAsString(String key,
                                             Object defaultValue)
                                      throws IllegalArgumentException,
                                             UnknownPropertyException,
                                             PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the property string value for the given key. If the property type is not String, the Object.toString() method is called to create the string representation of the value. null is always returned as null (not as the String "null").

Parameters:
key - the key to the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the value to the property. A value of null is returned in cause of an optional property being not set.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.
PropertyValidationException - if the property is invalid according to its constraints.

getProperty

public final DescribedProperty getProperty(PropertyKey key)
                                    throws IllegalArgumentException,
                                           UnknownPropertyException
Description copied from interface: ConfigurationProperties
Returns the property for the given key.

Parameters:
key - the unique key of the property.
Returns:
the requested property.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.

getProperty

public final DescribedProperty getProperty(PropertyDescriptor descriptor)
                                    throws IllegalArgumentException,
                                           UnknownPropertyException
Description copied from interface: ConfigurationProperties
Returns the property for the given descriptor.

Parameters:
descriptor - the descriptor containing the unique key of the property.
Returns:
the requested property.
Throws:
UnknownPropertyException - if the key of the descriptor is not known.
IllegalArgumentException

getValidatedProperty

public final ValidatedProperty getValidatedProperty(String key,
                                                    Object defaultValue)
                                             throws IllegalArgumentException,
                                                    UnknownPropertyException,
                                                    PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the validated property for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.

Parameters:
key - the key to the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the validated property. Never null, although the value / validated value of the returned property may be null.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.
PropertyValidationException - if the property is invalid according to its constraints.

getValidatedProperty

public final ValidatedProperty getValidatedProperty(PropertyKey key,
                                                    Object defaultValue)
                                             throws IllegalArgumentException,
                                                    UnknownPropertyException,
                                                    PropertyValidationException
Description copied from interface: ConfigurationProperties
Returns the validated property for the given key, allowing to transparently provide a default value to be returned in case the property has not been set.

Parameters:
key - the key to the property.
defaultValue - the default value to use in case no value has been specified.
Returns:
the validated property. Never null, although the value / validated value of the returned property may be null.
Throws:
IllegalArgumentException - if key is blank.
UnknownPropertyException - if key is not known.
PropertyValidationException - if the property is invalid according to its constraints.

addDescriptors

public final void addDescriptors(Class<?> propertySetType)
                          throws DuplicatePropertyDeclarationsException
Description copied from interface: ConfigurationPropertiesManagement
Adds all property descriptors declared in the given type.

Parameters:
propertySetType - the type that declares the descriptors.
Throws:
DuplicatePropertyDeclarationsException - if any of the descriptors declare the same property.

getKey

public final ConfigurationKey<?> getKey()
Description copied from interface: ConfigurationProperties
Returns the key of the configuration.

Returns:
the key of the configuration. Never null.

getDescriptor

public final PropertyDescriptor getDescriptor(String key)
                                       throws UnknownPropertyException
Description copied from interface: ConfigurationPropertiesManagement
Returns the descriptor for the given key.

Parameters:
key - the of the requested descriptor.
Returns:
the descriptor whose key matches the given key.
Throws:
UnknownPropertyException - if the property is not known.

getContext

public final PropertiesContext getContext(Class<?> declaringType)
                                   throws NullPointerException
Description copied from interface: ConfigurationProperties
Returns the properties context for the declaring type. The declaring type is the interface type annotated with the PropertySet annotation. The context provides information about the properties of that set.

Parameters:
declaringType - the type that declares the properties whose context is requested.
Returns:
the context for the properties declared by the given type.
Throws:
NullPointerException - if declaringType is null.

getDescriptor

public final PropertyDescriptor getDescriptor(PropertyKey key)
                                       throws UnknownPropertyException
Description copied from interface: ConfigurationPropertiesManagement
Returns the descriptor for the given key.

Parameters:
key - the of the requested descriptor.
Returns:
the descriptor whose key matches the given key.
Throws:
UnknownPropertyException - if the property is not known.

getMandatoryPropertyDescriptors

public final List<PropertyDescriptor> getMandatoryPropertyDescriptors()
Description copied from interface: ConfigurationPropertiesManagement
Returns the list of mandatory properties.

Returns a copy that can be edited.

Returns:
the list of mandatory properties.

getContext

public final PropertyContext getContext(PropertyDescriptor descriptor)
                                 throws NullPointerException
Description copied from interface: ConfigurationProperties
Returns the properties context the property described by the given descriptor is part of.

Parameters:
descriptor - the descriptor of the property whose context is requested.
Returns:
the context of the property described by the descriptor.
Throws:
NullPointerException - if descriptor is null.

validate

public final void validate()
                    throws ConfigurationValidationException
Description copied from interface: ConfigurationProperties
Validates all properties in the given configuration in a non-lenient fashion.

Throws:
ConfigurationValidationException - if the configuration contains properties that do not meet the required constraints.

validate

public final void validate(Class<?>... groups)
                    throws ConfigurationValidationException
Description copied from interface: ConfigurationProperties
Validates all properties in the given configuration and groups in a non-lenient fashion.

Parameters:
groups - the validation groups to consider in the validation process. The groups will be validated in the given order. As soon as a validation group fails, the validation process is aborted without checking the not yet processed groups.
Throws:
ConfigurationValidationException - if the configuration contains properties that do not meet the required constraints.

validate

public final void validate(boolean lenient,
                           Class<?>... groups)
                    throws ConfigurationValidationException
Description copied from interface: ConfigurationProperties
Validates all properties in the given configuration.

Parameters:
lenient - the lenient flag that tells the validation process to handle unknown properties gracefully if set to true. If the value is false unknown properties are reported as validation failures.
groups - the validation groups to consider in the validation process. The groups will be validated in the given order. As soon as a validation group fails, the validation process is aborted without checking the not yet processed groups.
Throws:
ConfigurationValidationException - if the configuration contains properties that do not meet the required constraints.

validate

public final void validate(PropertyDescriptor descriptor,
                           Class<?>... ifInOneOfTheseGroups)
                    throws ConfigurationValidationException
Description copied from interface: ConfigurationProperties
Validates the given property in the given configuration.

Parameters:
descriptor - the descriptor whose value is to be validated.
ifInOneOfTheseGroups - the validation only takes place if this constraint is part of any of the specified groups or the argument is empty or null.
Throws:
ConfigurationValidationException - if property does not meet the required constraints.

validate

public final void validate(PropertyDescriptor descriptor,
                           String value,
                           Class<?>... ifInOneOfTheseGroups)
                    throws ConfigurationValidationException
Description copied from interface: ConfigurationProperties
Validates the given property in the given configuration.

Parameters:
descriptor - the descriptor whose value is to be validated.
value - the property value to be validated.
ifInOneOfTheseGroups - the validation only takes place if this constraint is part of any of the specified groups or the argument is empty or null.
Throws:
ConfigurationValidationException - if property does not meet the required constraints.

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyKey name,
                                            PropertyChangeListener listener)
                                     throws NullPointerException
Description copied from interface: ConfigurationProperties
Adds the given listener as a listener to the given property.

Parameters:
name - the name of the property to track changes.
listener - the listener to add.
Throws:
NullPointerException - if name or listener is null.

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyKey name,
                                               PropertyChangeListener listener)
                                        throws NullPointerException
Description copied from interface: ConfigurationProperties
Removes the given listener as a listener to the given property.

Parameters:
name - the name of the property to stop tracking changes.
listener - the listener to remove.
Throws:
NullPointerException - if name or listener is null.

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener listener)
                                     throws NullPointerException
Description copied from interface: ConfigurationProperties
Adds the given listener to track any property changes.

Parameters:
listener - the listener to add.
Throws:
NullPointerException - if listener is null.

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener listener)
                                        throws NullPointerException
Description copied from interface: ConfigurationProperties
Removes the given listener to stop tracking property changes.

Parameters:
listener - the listener to remove.
Throws:
NullPointerException - if listener is null.


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