Package org.sakaiproject.component.api
Interface ServerConfigurationService.ConfigurationListener
-
- Enclosing interface:
- ServerConfigurationService
public static interface ServerConfigurationService.ConfigurationListenerAllows a service to be notified when configuration settings are changed, It is up to the implementor to ignore the changes they do not care about. Filter on theServerConfigurationService.ConfigItem.getName(). NOTE: this does NOT include any changes which happen during the initial properties file loading
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classServerConfigurationService.ConfigurationListener.BlockingConfigItemThis 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
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchanged(ServerConfigurationService.ConfigItem configItem, ServerConfigurationService.ConfigItem previousConfigItem)This will be called each time aServerConfigurationService.ConfigItemis changed, this will be called after the item has been changed and will reflect the new values for this config item NOTE: it does NOT include the the initial registration of that config item and initial startup of theServerConfigurationServiceServerConfigurationService.ConfigItemchanging(ServerConfigurationService.ConfigItem currentConfigItem, ServerConfigurationService.ConfigItem newConfigItem)This will be called each time aServerConfigurationService.ConfigItemis changed, this will be called before the item has been changed and will reflect the current values for this config item.
-
-
-
Method Detail
-
changing
ServerConfigurationService.ConfigItem changing(ServerConfigurationService.ConfigItem currentConfigItem, ServerConfigurationService.ConfigItem newConfigItem)
This will be called each time aServerConfigurationService.ConfigItemis changed, this will be called before the item has been changed and will reflect the current values for this config item. NOTE: the default implementation of this should be to just return null if processing should be allowed to continue unimpeded NOTE: it does NOT include the the initial registration of that config item and initial startup of theServerConfigurationService- Parameters:
currentConfigItem- theServerConfigurationService.ConfigItemwhich is changing (will be null if item is new), this item should not be changed by this methodnewConfigItem- theServerConfigurationService.ConfigItemwhich will become the new one- Returns:
- null to allow processing to continue as usual
OR instance of
ServerConfigurationService.ConfigurationListener.BlockingConfigItemto block the change from happening (change will be discarded and processing will stop) OR the modified newConfigItem item which will be used as the new config value
-
changed
void changed(ServerConfigurationService.ConfigItem configItem, ServerConfigurationService.ConfigItem previousConfigItem)
This will be called each time aServerConfigurationService.ConfigItemis changed, this will be called after the item has been changed and will reflect the new values for this config item NOTE: it does NOT include the the initial registration of that config item and initial startup of theServerConfigurationService- Parameters:
configItem- theServerConfigurationService.ConfigItemwhich changed, this item should not be changed by this methodpreviousConfigItem- theServerConfigurationService.ConfigItembefore the change (will be null if item is new)
-
-