|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.domain.ConfigurationPropertiesProxy de.smartics.properties.spi.config.domain.ConfigurationPropertiesManagementProxy
public final class ConfigurationPropertiesManagementProxy
A serialization proxy that allows non serializable configuration properties instances to be serialized using their factories cache and ability to recreate that instances.
Constructor Summary | |
---|---|
ConfigurationPropertiesManagementProxy(ConfigurationKey<?> key, ConfigurationPropertiesFactory factory) Default constructor. |
Method Summary | |
---|---|
ConfigurationPropertiesManagement |
addDefinitions(PropertyProvider properties) Adds the given definitions to this configuration. |
void |
addDescriptors(Class<?> propertySetType) 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. |
PropertyStoreAccessor |
getPropertyStoreAccessor() Provides direct access to the properties in the underlying store. |
PropertyValueSecurity |
getPropertyValueSecurity() Returns the property value security helper to en- and decrypt property values. |
PropertyDescriptorRegistry |
getRegistry() Returns the registry to resolve property descriptors. |
boolean |
isInAdminMode() Checks whether or not this configuration is in administration mode. |
Property |
setProperty(PropertyKey key, String value) Sets the property value for the given key. |
void |
setToAdminMode(boolean newMode) Sets the administration mode for this configuration. |
ConfigurationPropertiesManagement |
toRepresentative() Creates an representative of this configuration. |
SerializableConfigurationPropertiesManagement |
toSerializable() Creates a serializable variant of this implementation. |
Property |
unsetProperty(PropertyKey key) Unsets the property value for the given key. |
Methods inherited from class de.smartics.properties.spi.config.domain.ConfigurationPropertiesProxy |
---|
addPropertyChangeListener, addPropertyChangeListener, getContext, getContext, getFactory, getKey, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyAsType, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getValidatedProperty, getValidatedProperty, getValidatedProperty, removePropertyChangeListener, removePropertyChangeListener, validate, validate, validate, validate, validate |
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.ConfigurationProperties |
---|
addPropertyChangeListener, addPropertyChangeListener, getContext, getContext, getKey, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyAsType, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getValidatedProperty, getValidatedProperty, getValidatedProperty, removePropertyChangeListener, removePropertyChangeListener, validate, validate, validate, validate, validate |
Constructor Detail |
---|
public ConfigurationPropertiesManagementProxy(ConfigurationKey<?> key, ConfigurationPropertiesFactory factory)
key
- the key of the configuration properties instance is to be associated with
factory
- the factory to create instances of the configuration properties.
Method Detail |
---|
public PropertyDescriptorRegistry getRegistry()
ConfigurationPropertiesManagement
getRegistry
in interface
ConfigurationPropertiesManagement
public PropertyValueSecurity getPropertyValueSecurity()
ConfigurationPropertiesManagement
getPropertyValueSecurity
in interface
ConfigurationPropertiesManagement
public PropertyStoreAccessor getPropertyStoreAccessor()
ConfigurationPropertiesManagement
getPropertyStoreAccessor
in interface
ConfigurationPropertiesManagement
public boolean isInAdminMode()
ConfigurationProperties
isInAdminMode
in interface
ConfigurationProperties
isInAdminMode
in class
ConfigurationPropertiesProxy
true
if the configuration is in administration mode,
false
otherwise.
public void setToAdminMode(boolean newMode)
ConfigurationPropertiesManagement
setToAdminMode
in interface
ConfigurationPropertiesManagement
newMode
- the new value of the mode
true
if the configuration is to be set in administration mode,
false
if not.
ConfigurationProperties.isInAdminMode()
public void addDescriptors(Class<?> propertySetType) throws DuplicatePropertyDeclarationsException
ConfigurationPropertiesManagement
addDescriptors
in interface
ConfigurationPropertiesManagement
propertySetType
- the type that declares the descriptors.
DuplicatePropertyDeclarationsException
- if any of the descriptors declare the same property.
public PropertyDescriptor getDescriptor(String key) throws UnknownPropertyException
ConfigurationPropertiesManagement
getDescriptor
in interface
ConfigurationPropertiesManagement
key
- the of the requested descriptor.
key
.
UnknownPropertyException
- if the property is not known.
public PropertyDescriptor getDescriptor(PropertyKey key) throws UnknownPropertyException
ConfigurationPropertiesManagement
getDescriptor
in interface
ConfigurationPropertiesManagement
key
- the of the requested descriptor.
key
.
UnknownPropertyException
- if the property is not known.
public List<PropertyDescriptor> getMandatoryPropertyDescriptors()
ConfigurationPropertiesManagement
Returns a copy that can be edited.
getMandatoryPropertyDescriptors
in interface
ConfigurationPropertiesManagement
public ConfigurationPropertiesManagement addDefinitions(PropertyProvider properties) throws NullPointerException
ConfigurationPropertiesManagement
addDefinitions
in interface
ConfigurationPropertiesManagement
properties
- the property definitions to add.
NullPointerException
- if
properties
is
null
.
public Property setProperty(PropertyKey key, String value) throws NullPointerException, PropertyValidationException, ReadOnlyPropertyException
ConfigurationPropertiesManagement
setProperty
in interface
ConfigurationPropertiesManagement
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.
public Property unsetProperty(PropertyKey key) throws NullPointerException, ReadOnlyPropertyException
ConfigurationPropertiesManagement
unsetProperty
in interface
ConfigurationPropertiesManagement
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.
public void flush()
ConfigurationPropertiesManagement
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.
flush
in interface
ConfigurationPropertiesManagement
public ConfigurationPropertiesManagement toRepresentative()
ConfigurationProperties
toRepresentative
in interface
ConfigurationProperties
toRepresentative
in interface
ConfigurationPropertiesManagement
toRepresentative
in class
ConfigurationPropertiesProxy
public SerializableConfigurationPropertiesManagement toSerializable()
ConfigurationProperties
toSerializable
in interface
ConfigurationProperties
toSerializable
in interface
ConfigurationPropertiesManagement
toSerializable
in class
ConfigurationPropertiesProxy
ConfigurationPropertiesProxy
,
ConfigurationPropertiesManagementProxy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |