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

Package class diagram package SerializableCacheConfigurationPropertiesManagement
java.lang.Object
  extended by de.smartics.properties.api.config.domain.AbstractAdminModeSupportedPropertiesManagement
      extended by de.smartics.properties.impl.config.cache.AbstractCacheConfigurationPropertiesManagement
          extended by de.smartics.properties.impl.config.cache.SerializableCacheConfigurationPropertiesManagement
All Implemented Interfaces:
ConfigurationProperties, ConfigurationPropertiesManagement, SerializableConfigurationProperties, SerializableConfigurationPropertiesManagement, ConfigurationPropertiesManagementSpi, ConfigurationPropertiesSpi, SerializableConfigurationPropertiesManagementSpi, Serializable

public final class SerializableCacheConfigurationPropertiesManagement
     
     
extends AbstractCacheConfigurationPropertiesManagement
implements SerializableConfigurationPropertiesManagementSpi

A delegate that provides a cache.

See Also:
Serialized Form

Constructor Summary
SerializableCacheConfigurationPropertiesManagement(SerializableConfigurationPropertiesManagementSpi delegate)
          Default constructor.
 
Method Summary
protected  ConfigurationPropertiesManagementSpi getDelegate()
          Returns a reference to the delegate.
<T> T
getProperties(Class<T> propertiesInterface, SerializableConfigurationProperties configuration)
          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.
 PropertyStoreAccessor getPropertyStoreAccessor()
          Provides direct access to the properties in the underlying store.
 boolean isInAdminMode()
          Checks whether or not this configuration is in administration mode.
 void setToAdminMode(boolean newMode)
          Sets the administration mode for this configuration.
 SerializableConfigurationPropertiesManagement toSerializable()
          Creates a serializable variant of this implementation.
 
Methods inherited from class de.smartics.properties.impl.config.cache.AbstractCacheConfigurationPropertiesManagement
addDefinitions, addDescriptors, addPropertyChangeListener, addPropertyChangeListener, flush, getCache, getContext, getContext, getDescriptor, getDescriptor, getKey, getMandatoryPropertyDescriptors, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyAsType, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueSecurity, getRegistry, getValidatedProperty, getValidatedProperty, getValidatedProperty, removePropertyChangeListener, removePropertyChangeListener, setProperty, unsetProperty, validate, validate, validate, validate, validate
 
Methods inherited from class de.smartics.properties.api.config.domain.AbstractAdminModeSupportedPropertiesManagement
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
addDefinitions, addDescriptors, flush, getDescriptor, getDescriptor, getMandatoryPropertyDescriptors, getPropertyValueSecurity, getRegistry, setProperty, toRepresentative, unsetProperty
 
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

SerializableCacheConfigurationPropertiesManagement

public SerializableCacheConfigurationPropertiesManagement(SerializableConfigurationPropertiesManagementSpi delegate)
                                                   throws NullPointerException
Default constructor.

Parameters:
delegate - the wrapped delegate whose properties are to be cached.
Throws:
NullPointerException - if delegate is null.
Method Detail

isInAdminMode

public boolean isInAdminMode()
Description copied from class: AbstractAdminModeSupportedPropertiesManagement
Checks whether or not this configuration is in administration mode. In this mode the configuration is less strict with certain validations. Especially it allows to edit otherwise read-only properties.

This implementation also checks whether the admin mode is set for the current thread only. Please refer to ConfigControl for details on how to set the admin mode for the current thread.

Specified by:
isInAdminMode in interface ConfigurationProperties
Overrides:
isInAdminMode in class AbstractAdminModeSupportedPropertiesManagement
Returns:
true if the configuration is in administration mode, false otherwise.

setToAdminMode

public void setToAdminMode(boolean newMode)
Description copied from interface: ConfigurationPropertiesManagement
Sets the administration mode for this configuration.

Specified by:
setToAdminMode in interface ConfigurationPropertiesManagement
Overrides:
setToAdminMode in class AbstractAdminModeSupportedPropertiesManagement
Parameters:
newMode - the new value of the mode true if the configuration is to be set in administration mode, false if not.
See Also:
ConfigurationProperties.isInAdminMode()

getDelegate

protected ConfigurationPropertiesManagementSpi getDelegate()
Description copied from class: AbstractCacheConfigurationPropertiesManagement
Returns a reference to the delegate.

Specified by:
getDelegate in class AbstractCacheConfigurationPropertiesManagement
Returns:
a reference to the delegate. Never null.

getProperties

public <T> T getProperties(Class<T> propertiesInterface,
                           SerializableConfigurationProperties configuration)
Description copied from interface: ConfigurationPropertiesSpi
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.

Allows to pass in a configuration to consult.

Specified by:
getProperties in interface ConfigurationPropertiesSpi
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.
configuration - the access to the properties. Must not be null.
Returns:
a implementation of the given interface to access property information.

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

getPropertyStoreAccessor

public PropertyStoreAccessor getPropertyStoreAccessor()
Description copied from interface: ConfigurationPropertiesManagement
Provides direct access to the properties in the underlying store.

Specified by:
getPropertyStoreAccessor in interface ConfigurationPropertiesManagement
Returns:
direct access to the properties in the underlying store.


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