Class ChatUserEventListener
- java.lang.Object
-
- org.silverpeas.core.notification.system.CDIResourceEventListener<UserEvent>
-
- org.silverpeas.core.chat.listeners.ChatUserEventListener
-
- All Implemented Interfaces:
ResourceEventListener<UserEvent>
@Technical @Service public class ChatUserEventListener extends CDIResourceEventListener<UserEvent>
Listen user modifications to clone them in Chat server- Author:
- remipassmoilesel
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.notification.system.CDIResourceEventListener
logger
-
-
Constructor Summary
Constructors Constructor Description ChatUserEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled()
Is this listener enabled?void
onCreation(UserEvent event)
A new user has been created in Silverpeas, then creates his account in the remote chat service.void
onDeletion(UserEvent event)
An existing user in Silverpeas has been deleted, then the account of the deleted user in the remote chat service is also deleted.-
Methods inherited from class org.silverpeas.core.notification.system.CDIResourceEventListener
onEvent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.notification.system.ResourceEventListener
dispatchEvent, onMove, onRecovery, onRemoving, onUnlock, onUpdate
-
-
-
-
Method Detail
-
onCreation
public void onCreation(UserEvent event)
A new user has been created in Silverpeas, then creates his account in the remote chat service. No account should be existing for this user in the chat service, otherwise an error is raised and the user account creation in Silverpeas fails.- Parameters:
event
- the event on the creation of a resource.
-
onDeletion
public void onDeletion(UserEvent event)
An existing user in Silverpeas has been deleted, then the account of the deleted user in the remote chat service is also deleted.- Parameters:
event
- the event on the deletion of a resource.
-
isEnabled
public boolean isEnabled()
Description copied from interface:ResourceEventListener
Is this listener enabled? When a listener is enabled, it processes then all the incoming events it listens for. Otherwise, nothing the event isn't consumed.By default, the listener is enabled. If the listener has to be enabled according to some conditions, then overrides this method.
- Returns:
- true if this listener has to consume the events it listens for. False otherwise. Returns true by default.
-
-