|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurationPropertiesManagement
Provides management access to the configuration properties. Allows to add properties and other functions not related with accessing property values.
de.smartics.properties.api.config
.
Method Summary | |
---|---|
ConfigurationPropertiesManagement |
addDefinitions(Properties properties) Adds the given definitions to this configuration. |
void |
addDescriptors(Class<?> declaringType) Adds all property descriptors declared in the given type. |
void |
flush() Signal to flush properties changed in memory to be written to a secondary storage. |
PropertyDescriptor |
getDescriptor(PropertyKey key) Returns the descriptor for the given key. |
PropertyDescriptor |
getDescriptor(String key) Returns the descriptor for the given key. |
List<PropertyDescriptor> |
getMandatoryPropertyDescriptors() Returns the list of mandatory properties. |
PropertyDescriptorRegistry |
getRegistry() Returns the registry to resolve property descriptors. |
Property |
setProperty(PropertyKey key, String value) Sets the property value for the given key. |
SerializableConfigurationPropertiesManagement |
toSerializable() Creates a serializable variant of this implementation. |
Property |
unsetProperty(PropertyKey key) Unsets the property value for the given key. |
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 |
Method Detail |
---|
PropertyDescriptorRegistry getRegistry()
void addDescriptors(Class<?> declaringType) throws DuplicatePropertyDeclarationsException
declaringType
- the type that declares the descriptors.
DuplicatePropertyDeclarationsException
- if any of the descriptors declare the same property.
PropertyDescriptor getDescriptor(String key) throws UnknownPropertyException
key
- the of the requested descriptor.
key
.
UnknownPropertyException
- if the property is not known.
PropertyDescriptor getDescriptor(PropertyKey key) throws UnknownPropertyException
key
- the of the requested descriptor.
key
.
UnknownPropertyException
- if the property is not known.
List<PropertyDescriptor> getMandatoryPropertyDescriptors()
Returns a copy that can be edited.
ConfigurationPropertiesManagement addDefinitions(Properties properties) throws NullPointerException
properties
- the property definitions to add.
NullPointerException
- if
properties
is
null
.
Property setProperty(PropertyKey key, String value) throws NullPointerException, PropertyValidationException, ReadOnlyPropertyException
key
- the key to the property.
value
- the value to the property.
null
is returned if the property had no value prior to this call.
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.
Property unsetProperty(PropertyKey key) throws NullPointerException, ReadOnlyPropertyException
key
- the key to the property.
null
is returned if the property had no value prior to this call.
NullPointerException
- if
key
is
null
.
ReadOnlyPropertyException
- if the property to update is read-only.
void flush()
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.
SerializableConfigurationPropertiesManagement toSerializable()
toSerializable
in interface
ConfigurationProperties
ConfigurationPropertiesProxy
,
ConfigurationPropertiesManagementProxy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |