org.sakaiproject.component.api
Interface ServerConfigurationService.ConfigItem

All Known Implementing Classes:
BasicConfigItem
Enclosing interface:
ServerConfigurationService

public static interface ServerConfigurationService.ConfigItem

Defines the config item holding class


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()
           
 ServerConfigurationService.ConfigHistory[] getHistory()
           
 String getName()
           
 int getRequested()
           
 String getSource()
           
 String getType()
           
 Object getValue()
           
 int getVersion()
           
 boolean isDefaulted()
           
 boolean isRegistered()
           
 boolean isSecured()
           
 int requested()
          Called whenever this config item is requested
 

Method Detail

requested

int requested()
Called whenever this config item is requested

Returns:
the current number of times requested

changed

int changed(Object value,
            String source)
Called whenever this config item is changed

Parameters:
value - the new value
source - the source which is making the change
Returns:
the current number of times the item was changed

copy

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

Returns:
a config item with all the same values

getName

String getName()
Returns:
the name/key for this configuration value

getValue

Object getValue()
Returns:
the actual stored value for this config (null indicates it is not set)

getType

String getType()
Returns:
the type of the value (string, int, boolean, array)

getSource

String getSource()
Returns:
the name of the most recent source for this config value (e.g. sakai/sakai.properties)

getDefaultValue

Object getDefaultValue()
Returns:
the default value for this config (null indicates it is not set)

getRequested

int getRequested()
Returns:
the number of times the config value was requested (or looked up)

getChanged

int getChanged()
Returns:
the number of times this config value was changed (or updated)

getVersion

int getVersion()
Returns:
the version of this config item (a newly created item is version 1), incremented with each change

getHistory

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

isRegistered

boolean isRegistered()
Returns:
indicates is 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

boolean isDefaulted()
Returns:
indicates is this config is has a default value defined (this can only be known for items which are requested)

isSecured

boolean isSecured()
Returns:
indicates is this config value should not be revealed because there are security implications


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