Class SubscriptionPublicationEventListener
- java.lang.Object
-
- org.silverpeas.core.notification.system.CDIResourceEventListener<T>
-
- org.silverpeas.core.subscription.AbstractProfiledResourceSubscriptionListener<PublicationDetail,PublicationEvent>
-
- org.silverpeas.core.contribution.publication.subscription.SubscriptionPublicationEventListener
-
- All Implemented Interfaces:
ResourceEventListener<PublicationEvent>
@Bean @Singleton public class SubscriptionPublicationEventListener extends AbstractProfiledResourceSubscriptionListener<PublicationDetail,PublicationEvent>
Listener of events on the deletion of a node in a component instance to delete all subscriptions on that node.- Author:
- silveryocha
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.notification.system.CDIResourceEventListener
logger
-
-
Constructor Summary
Constructors Constructor Description SubscriptionPublicationEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SubscriptionResource
getSubscriptionResource(PublicationDetail resource)
protected boolean
isSubscriptionEnabled(PublicationDetail resource)
void
onDeletion(PublicationEvent event)
An event on the deletion of a resource has be listened.void
onUpdate(PublicationEvent event)
An event on the update of a resource has be listened.-
Methods inherited from class org.silverpeas.core.subscription.AbstractProfiledResourceSubscriptionListener
getSubscriptionService
-
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, isEnabled, onCreation, onMove, onRecovery, onRemoving, onUnlock
-
-
-
-
Method Detail
-
onDeletion
public void onDeletion(PublicationEvent event) throws Exception
Description copied from interface:ResourceEventListener
An event on the deletion of a resource has be listened. A deleted resource is nonexistent and nonrecoverable. By default, this method does nothing.- Specified by:
onDeletion
in interfaceResourceEventListener<PublicationEvent>
- Overrides:
onDeletion
in classAbstractProfiledResourceSubscriptionListener<PublicationDetail,PublicationEvent>
- Parameters:
event
- the event on the deletion of a resource.- Throws:
Exception
- if an error occurs while treating the event.
-
onUpdate
public void onUpdate(PublicationEvent event) throws Exception
Description copied from interface:ResourceEventListener
An event on the update of a resource has be listened. By default, this method does nothing.- Specified by:
onUpdate
in interfaceResourceEventListener<PublicationEvent>
- Overrides:
onUpdate
in classAbstractProfiledResourceSubscriptionListener<PublicationDetail,PublicationEvent>
- Parameters:
event
- the event on the update of a resource.- Throws:
Exception
- if an error occurs while treating the event.
-
getSubscriptionResource
protected SubscriptionResource getSubscriptionResource(PublicationDetail resource)
- Specified by:
getSubscriptionResource
in classAbstractProfiledResourceSubscriptionListener<PublicationDetail,PublicationEvent>
-
isSubscriptionEnabled
protected boolean isSubscriptionEnabled(PublicationDetail resource)
- Specified by:
isSubscriptionEnabled
in classAbstractProfiledResourceSubscriptionListener<PublicationDetail,PublicationEvent>
-
-