Package org.sakaiproject.component.api
Interface ServerConfigurationService.ConfigItem
-
- All Known Implementing Classes:
BasicConfigItem,ServerConfigurationService.ConfigurationListener.BlockingConfigItem
- Enclosing interface:
- ServerConfigurationService
public static interface ServerConfigurationService.ConfigItemDefines the config item holding class
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intchanged(Object value, String source)Called whenever this config item is changedServerConfigurationService.ConfigItemcopy()Duplicate this config item This is mostly used to ensure we do not send the internal objects out where they could be changedintgetChanged()ObjectgetDefaultValue()StringgetDescription()ServerConfigurationService.ConfigHistory[]getHistory()StringgetName()intgetRequested()StringgetSource()StringgetType()ObjectgetValue()intgetVersion()booleanisDefaulted()booleanisDynamic()Indicates is this config item is dynamic or static (default is static)booleanisRegistered()booleanisSecured()intrequested()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 valuesource- 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) - from
ServerConfigurationService.TYPES
-
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)
-
getDescription
String getDescription()
- Returns:
- the human readable description of this configuration value
-
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 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
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
-
isDynamic
boolean isDynamic()
Indicates is this config item is dynamic or static (default is static)- Returns:
- true is this config can be modified at runtime (dynamic), false if runtime changes are not allowed (static)
-
-