Package org.exoplatform.agenda.listener
Class AgendaCalendarSubscriptionCleanupListener
java.lang.Object
org.exoplatform.agenda.listener.AgendaCalendarSubscriptionCleanupListener
- All Implemented Interfaces:
org.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.Calendar,Object>
@Component
public class AgendaCalendarSubscriptionCleanupListener
extends Object
implements org.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.Calendar,Object>
Removes the subscription of a calendar deleted by any other path than
unsubscribing (EXO-90278), so that no feed keeps being read into a calendar
that is gone. Glue only: the removal is the service's.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringBroadcast byAgendaCalendarStorageonce a calendar row is deleted. -
Constructor Summary
ConstructorsConstructorDescriptionAgendaCalendarSubscriptionCleanupListener(org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.agenda.service.AgendaCalendarSubscriptionService subscriptionService) Builds the listener. -
Method Summary
Methods 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
-
Field Details
-
CALENDAR_DELETED_EVENT
Broadcast byAgendaCalendarStorageonce a calendar row is deleted.- See Also:
-
-
Constructor Details
-
AgendaCalendarSubscriptionCleanupListener
@Autowired public AgendaCalendarSubscriptionCleanupListener(org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.agenda.service.AgendaCalendarSubscriptionService subscriptionService) Builds the listener.- Parameters:
listenerService- the platform event bussubscriptionService- the owner of calendar subscriptions
-
-
Method Details
-
init
@PostConstruct public void init()Registers the listener on the calendar deletion event. -
onEvent
public void onEvent(org.exoplatform.services.listener.Event<org.exoplatform.agenda.model.Calendar, Object> event) Removes the subscription of the deleted calendar, when it was a subscribed one.- Specified by:
onEventin interfaceorg.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.Calendar,Object> - Parameters:
event- the deletion event, whose source is the deleted calendar
-