org.exoplatform.commons.api.settings
Class SettingListener

java.lang.Object
  extended by org.exoplatform.container.component.BaseComponentPlugin
      extended by org.exoplatform.services.listener.Listener<SettingService,SettingData>
          extended by org.exoplatform.commons.api.settings.SettingListener
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

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.


Field Summary
 
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name
 
Constructor Summary
SettingListener()
           
 
Method Summary
 void onEvent(org.exoplatform.services.listener.Event<SettingService,SettingData> event)
          Calls back a function when the setting service dispatches an event.
abstract  void onRemoveContext(org.exoplatform.services.listener.Event<SettingService,SettingData> event)
          Calls back a function when all setting properties in a context are removed.
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).
abstract  void onRemoveScope(org.exoplatform.services.listener.Event<SettingService,SettingData> event)
          Calls back a function when all setting properties in a scope are removed.
abstract  void onSet(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, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettingListener

public SettingListener()
Method Detail

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.

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.

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.

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.

onEvent

public void onEvent(org.exoplatform.services.listener.Event<SettingService,SettingData> event)
             throws Exception
Calls back a function when the setting service dispatches an event.

Specified by:
onEvent in class org.exoplatform.services.listener.Listener<SettingService,SettingData>
Parameters:
event - The event that the setting service dispatches.
Throws:
Exception


Copyright © 2003–2014 eXo Platform SAS. All rights reserved.