Package org.sakaiproject.component.api
Class ServerConfigurationService.ConfigurationListener.BlockingConfigItem
- java.lang.Object
-
- 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 theServerConfigurationService.ConfigurationListener, returning this indicates that the config change should stop processing the change and retain the original value
-
-
Constructor Summary
Constructors Constructor Description BlockingConfigItem()SPECIAL marker class, indicates that the config change should stop processing the change and retain the original value
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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()static ServerConfigurationService.ConfigurationListener.BlockingConfigIteminstance()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
-
instance
public static ServerConfigurationService.ConfigurationListener.BlockingConfigItem instance()
-
requested
public int requested()
Description copied from interface:ServerConfigurationService.ConfigItemCalled whenever this config item is requested- Specified by:
requestedin interfaceServerConfigurationService.ConfigItem- Returns:
- the current number of times requested
-
changed
public int changed(Object value, String source)
Description copied from interface:ServerConfigurationService.ConfigItemCalled whenever this config item is changed- Specified by:
changedin interfaceServerConfigurationService.ConfigItem- Parameters:
value- the new valuesource- 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.ConfigItemDuplicate this config item This is mostly used to ensure we do not send the internal objects out where they could be changed- Specified by:
copyin interfaceServerConfigurationService.ConfigItem- Returns:
- a config item with all the same values
-
getName
public String getName()
- Specified by:
getNamein interfaceServerConfigurationService.ConfigItem- Returns:
- the name/key for this configuration value
-
getValue
public Object getValue()
- Specified by:
getValuein interfaceServerConfigurationService.ConfigItem- Returns:
- the actual stored value for this config (null indicates it is not set)
-
getType
public String getType()
- Specified by:
getTypein interfaceServerConfigurationService.ConfigItem- Returns:
- the type of the value (string, int, boolean, array) - from
ServerConfigurationService.TYPES
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceServerConfigurationService.ConfigItem- Returns:
- the human readable description of this configuration value
-
getSource
public String getSource()
- Specified by:
getSourcein interfaceServerConfigurationService.ConfigItem- Returns:
- the name of the most recent source for this config value (e.g. sakai/sakai.properties)
-
getDefaultValue
public Object getDefaultValue()
- Specified by:
getDefaultValuein interfaceServerConfigurationService.ConfigItem- Returns:
- the default value for this config (null indicates it is not set)
-
getRequested
public int getRequested()
- Specified by:
getRequestedin interfaceServerConfigurationService.ConfigItem- Returns:
- the number of times the config value was requested (or looked up)
-
getChanged
public int getChanged()
- Specified by:
getChangedin interfaceServerConfigurationService.ConfigItem- Returns:
- the number of times this config value was changed (or updated)
-
getVersion
public int getVersion()
- Specified by:
getVersionin interfaceServerConfigurationService.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:
getHistoryin interfaceServerConfigurationService.ConfigItem- Returns:
- the history of the config item over time (empty array if it has never changed)
-
isRegistered
public boolean isRegistered()
- Specified by:
isRegisteredin interfaceServerConfigurationService.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:
isDefaultedin interfaceServerConfigurationService.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:
isSecuredin interfaceServerConfigurationService.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.ConfigItemIndicates is this config item is dynamic or static (default is static)- Specified by:
isDynamicin interfaceServerConfigurationService.ConfigItem- Returns:
- true is this config can be modified at runtime (dynamic), false if runtime changes are not allowed (static)
-
-