Package org.exoplatform.agenda.listener
Class AgendaSpaceSubscriptionColorListener
java.lang.Object
org.exoplatform.agenda.listener.AgendaSpaceSubscriptionColorListener
- All Implemented Interfaces:
org.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.Calendar,Object>
@Component
public class AgendaSpaceSubscriptionColorListener
extends Object
implements org.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.Calendar,Object>
Keeps a space's subscribed calendars in the colour of the space's calendar
(EXO-90373): a manager changing the colour in the space settings, or the
space's calendar being created with one, recolours the events the space's
subscriptions import. Glue only: the rule is the subscription service's.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAgendaSpaceSubscriptionColorListener(org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.agenda.service.AgendaCalendarSubscriptionService subscriptionService) Builds the listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Registers the listener on the calendar creation and update events.voidonEvent(org.exoplatform.services.listener.Event<org.exoplatform.agenda.model.Calendar, Object> event) Hands the saved calendar to the subscription service, unless it is itself a subscribed calendar: recolouring one broadcasts its update too.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_CREATED_EVENT
Broadcast byAgendaCalendarStorageonce a calendar row is created.- See Also:
-
CALENDAR_UPDATED_EVENT
Broadcast byAgendaCalendarStorageonce a calendar row is updated.- See Also:
-
-
Constructor Details
-
AgendaSpaceSubscriptionColorListener
@Autowired public AgendaSpaceSubscriptionColorListener(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 creation and update events. -
onEvent
public void onEvent(org.exoplatform.services.listener.Event<org.exoplatform.agenda.model.Calendar, Object> event) Hands the saved calendar to the subscription service, unless it is itself a subscribed calendar: recolouring one broadcasts its update too.- Specified by:
onEventin interfaceorg.exoplatform.services.listener.ListenerBase<org.exoplatform.agenda.model.Calendar,Object> - Parameters:
event- the event, whose source is the saved calendar
-