Class SettingListener
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.listener.Listener<SettingService,SettingData>
org.exoplatform.commons.api.settings.SettingListener
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin,org.exoplatform.services.listener.ListenerBase<SettingService,SettingData>
public abstract class SettingListener
extends org.exoplatform.services.listener.Listener<SettingService,SettingData>
This class is registered with the SettingsService
and is invoked when an event with the same name is broadcasted.
There may be many listeners with the same name to listen to an event.
- eXo level API
- Experimental
-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when the setting service dispatches an event.abstract voidonRemoveContext(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when all setting properties in a context are removed.abstract voidonRemoveKey(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when a setting property is removed with a specified composite key (context, scope, key).abstract voidonRemoveScope(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when all setting properties in a scope are removed.abstract voidonSet(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when a new setting property is saved.Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.exoplatform.services.listener.ListenerBase
getName
-
Constructor Details
-
SettingListener
public SettingListener()
-
-
Method Details
-
onSet
public abstract void onSet(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when a new setting property is saved.- Parameters:
event- The event that the setting service dispatches when a new setting property is saved successfully.- eXo level API
- Experimental
-
onRemoveKey
public abstract void onRemoveKey(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when a setting property is removed with a specified composite key (context, scope, key).- Parameters:
event- The event that the setting service dispatches when a new setting property is removed successfully.- eXo level API
- Experimental
-
onRemoveScope
public abstract void onRemoveScope(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when all setting properties in a scope are removed.- Parameters:
event- The event that the setting service dispatches when all setting properties in a scope are removed successfully.- eXo level API
- Experimental
-
onRemoveContext
public abstract void onRemoveContext(org.exoplatform.services.listener.Event<SettingService, SettingData> event) Calls back a function when all setting properties in a context are removed.- Parameters:
event- The event that the setting service dispatches when all setting properties in a context are removed successfully.- eXo level API
- Experimental
-
onEvent
public void onEvent(org.exoplatform.services.listener.Event<SettingService, SettingData> event) throws ExceptionCalls back a function when the setting service dispatches an event.- Parameters:
event- The event that the setting service dispatches.- Throws:
Exception- eXo level API
- Experimental
-