org.sakaiproject.component.api
Class ServerConfigurationService.ConfigurationListener.BlockingConfigItem

java.lang.Object
  extended by org.sakaiproject.component.api.ServerConfigurationService.ConfigurationListener.BlockingConfigItem
All Implemented Interfaces:
ServerConfigurationService.ConfigItem
Enclosing interface:
ServerConfigurationService.ConfigurationListener

public static class ServerConfigurationService.ConfigurationListener.BlockingConfigItem
extends Object
implements ServerConfigurationService.ConfigItem

This is a special marker class that is used in the ServerConfigurationService.ConfigurationListener, returning this indicates that the config change should stop processing the change and retain the original value


Constructor Summary
ServerConfigurationService.ConfigurationListener.BlockingConfigItem()
          SPECIAL marker class, indicates that the config change should stop processing the change and retain the original value
 
Method Summary
 int changed(Object value, String source)
          Called whenever this config item is changed
 ServerConfigurationService.ConfigItem copy()
          Duplicate this config item This is mostly used to ensure we do not send the internal objects out where they could be changed
 int getChanged()
           
 Object getDefaultValue()
           
 String getDescription()
           
 ServerConfigurationService.ConfigHistory[] getHistory()
           
 String getName()
           
 int getRequested()
           
 String getSource()
           
 String getType()
           
 Object getValue()
           
 int getVersion()
           
static ServerConfigurationService.ConfigurationListener.BlockingConfigItem instance()
           
 boolean isDefaulted()
           
 boolean isDynamic()
          Indicates is this config item is dynamic or static (default is static)
 boolean isRegistered()
           
 boolean isSecured()
           
 int requested()
          Called whenever this config item is requested
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerConfigurationService.ConfigurationListener.BlockingConfigItem

public ServerConfigurationService.ConfigurationListener.BlockingConfigItem()
SPECIAL marker class, indicates that the config change should stop processing the change and retain the original value

Method Detail

instance

public static ServerConfigurationService.ConfigurationListener.BlockingConfigItem instance()

requested

public int requested()
Description copied from interface: ServerConfigurationService.ConfigItem
Called whenever this config item is requested

Specified by:
requested in interface ServerConfigurationService.ConfigItem
Returns:
the current number of times requested

changed

public int changed(Object value,
                   String source)
Description copied from interface: ServerConfigurationService.ConfigItem
Called whenever this config item is changed

Specified by:
changed in interface ServerConfigurationService.ConfigItem
Parameters:
value - the new value
source - the source which is making the change
Returns:
the current number of times the item was changed

copy

public ServerConfigurationService.ConfigItem copy()
Description copied from interface: ServerConfigurationService.ConfigItem
Duplicate this config item This is mostly used to ensure we do not send the internal objects out where they could be changed

Specified by:
copy in interface ServerConfigurationService.ConfigItem
Returns:
a config item with all the same values

getName

public String getName()
Specified by:
getName in interface ServerConfigurationService.ConfigItem
Returns:
the name/key for this configuration value

getValue

public Object getValue()
Specified by:
getValue in interface ServerConfigurationService.ConfigItem
Returns:
the actual stored value for this config (null indicates it is not set)

getType

public String getType()
Specified by:
getType in interface ServerConfigurationService.ConfigItem
Returns:
the type of the value (string, int, boolean, array) - from ServerConfigurationService.TYPES

getDescription

public String getDescription()
Specified by:
getDescription in interface ServerConfigurationService.ConfigItem
Returns:
the human readable description of this configuration value

getSource

public String getSource()
Specified by:
getSource in interface ServerConfigurationService.ConfigItem
Returns:
the name of the most recent source for this config value (e.g. sakai/sakai.properties)

getDefaultValue

public Object getDefaultValue()
Specified by:
getDefaultValue in interface ServerConfigurationService.ConfigItem
Returns:
the default value for this config (null indicates it is not set)

getRequested

public int getRequested()
Specified by:
getRequested in interface ServerConfigurationService.ConfigItem
Returns:
the number of times the config value was requested (or looked up)

getChanged

public int getChanged()
Specified by:
getChanged in interface ServerConfigurationService.ConfigItem
Returns:
the number of times this config value was changed (or updated)

getVersion

public int getVersion()
Specified by:
getVersion in interface ServerConfigurationService.ConfigItem
Returns:
the version of this config item (a newly created item is version 1), incremented with each change

getHistory

public ServerConfigurationService.ConfigHistory[] getHistory()
Specified by:
getHistory in interface ServerConfigurationService.ConfigItem
Returns:
the history of the config item over time (empty array if it has never changed)

isRegistered

public boolean isRegistered()
Specified by:
isRegistered in interface ServerConfigurationService.ConfigItem
Returns:
indicates if this config is registered (true) or if it is only requested (false) (requested means someone asked for it but the setting has not been stored in the config service)

isDefaulted

public boolean isDefaulted()
Specified by:
isDefaulted in interface ServerConfigurationService.ConfigItem
Returns:
indicates is this config is has a default value defined (this can only be known for items which are requested)

isSecured

public boolean isSecured()
Specified by:
isSecured in interface ServerConfigurationService.ConfigItem
Returns:
indicates is this config value should not be revealed because there are security implications

isDynamic

public boolean isDynamic()
Description copied from interface: ServerConfigurationService.ConfigItem
Indicates is this config item is dynamic or static (default is static)

Specified by:
isDynamic in interface ServerConfigurationService.ConfigItem
Returns:
true is this config can be modified at runtime (dynamic), false if runtime changes are not allowed (static)


Copyright © 2003-2013 The Sakai Foundation. All Rights Reserved.