de.smartics.properties.spi.config.support
Class AbstractAdminModeConfigurationProperties

Package class diagram package AbstractAdminModeConfigurationProperties
java.lang.Object
  extended by de.smartics.properties.spi.config.support.AbstractConfigurationProperties
      extended by de.smartics.properties.spi.config.support.AbstractAdminModeConfigurationProperties
All Implemented Interfaces:
ConfigurationProperties, ConfigurationPropertiesManagement, ConfigurationPropertiesSpi
Direct Known Subclasses:
AbstractConfigurationPropertiesManagement

public abstract class AbstractAdminModeConfigurationProperties
     
     
extends AbstractConfigurationProperties
implements ConfigurationPropertiesManagement

Base implementation to support administration modes.


Constructor Summary
protected AbstractAdminModeConfigurationProperties()
          Constructor for serializable subclasses.
protected AbstractAdminModeConfigurationProperties(ConfigurationKey<?> key, de.smartics.properties.api.core.domain.PropertyDescriptorRegistry registry, de.smartics.properties.api.core.security.PropertyValueSecurity decrypter)
          Default constructor.
 
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 de.smartics.properties.spi.config.support.AbstractConfigurationProperties
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getContext, getContext, getKey, getProperties, getProperties, getProperty, getProperty, getProperty, getProperty, getPropertyDescriptor, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValue, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueAsString, getPropertyValueSecurity, getRegistry, getValidatedProperty, getValidatedProperty, removePropertyChangeListener, removePropertyChangeListener, resolveAndConvert, resolveAndConvertAndValidate, toString, validate, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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

AbstractAdminModeConfigurationProperties

protected AbstractAdminModeConfigurationProperties()
Constructor for serializable subclasses.


AbstractAdminModeConfigurationProperties

protected AbstractAdminModeConfigurationProperties(ConfigurationKey<?> key,
                                                   de.smartics.properties.api.core.domain.PropertyDescriptorRegistry registry,
                                                   de.smartics.properties.api.core.security.PropertyValueSecurity decrypter)
                                            throws de.smartics.util.lang.NullArgumentException
Default constructor.

Parameters:
key - the key that identifies the configuration.
registry - the registry to resolve property descriptors.
decrypter - the helper to decrypt secured property values.
Throws:
de.smartics.util.lang.NullArgumentException - if key, registry or decrypter is null.
Method Detail

isInAdminMode

public final boolean isInAdminMode()
Description copied from interface: ConfigurationProperties
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.

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

setToAdminMode

public final 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: ConfigurationProperties
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
Overrides:
toRepresentative in class AbstractConfigurationProperties
Returns:
the representative (may be this).


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