de.smartics.properties.api.config.domain
Class AbstractAdminModeSupportedPropertiesManagement

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

public abstract class AbstractAdminModeSupportedPropertiesManagement
     
     
extends Object
implements ConfigurationPropertiesManagement, Serializable

Base implementation to support administration modes.

See Also:
Serialized Form

Constructor Summary
AbstractAdminModeSupportedPropertiesManagement()
           
 
Method Summary
 boolean isInAdminMode()
          Checks whether or not this configuration is in administration mode.
 void setToAdminMode(boolean newMode)
          Sets the administration mode for this configuration.
 ConfigurationPropertiesManagement toRepresentative()
          Creates an representative of this configuration.
 
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, getPropertyStoreAccessor, getPropertyValueSecurity, getRegistry, setProperty, toSerializable, 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

AbstractAdminModeSupportedPropertiesManagement

public AbstractAdminModeSupportedPropertiesManagement()
Method Detail

isInAdminMode

public boolean isInAdminMode()
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
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
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()

toRepresentative

public ConfigurationPropertiesManagement toRepresentative()
Description copied from interface: ConfigurationPropertiesManagement
Creates an representative of this configuration. If the configuration serves for a specific configuration key, this instance will be returned. If the configuration servers for multiple configuration keys, the representative is returned. The representative is usually the configuration that is associated with the full key.

Specified by:
toRepresentative in interface ConfigurationProperties
Specified by:
toRepresentative in interface ConfigurationPropertiesManagement
Returns:
the representative (may be this).


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