Class AgendaEventReminderServiceImpl

java.lang.Object
org.exoplatform.agenda.service.AgendaEventReminderServiceImpl
All Implemented Interfaces:
org.exoplatform.agenda.service.AgendaEventReminderService

public class AgendaEventReminderServiceImpl extends Object implements org.exoplatform.agenda.service.AgendaEventReminderService
  • Constructor Details

    • AgendaEventReminderServiceImpl

      public AgendaEventReminderServiceImpl(AgendaEventReminderStorage reminderStorage, AgendaEventStorage eventStorage, AgendaEventAttendeeStorage attendeeStorage, org.exoplatform.agenda.service.AgendaUserSettingsService agendaUserSettingsService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.container.xml.InitParams initParams)
  • Method Details

    • getEventReminders

      public List<org.exoplatform.agenda.model.EventReminder> getEventReminders(long eventId, long userIdentityId)
      Specified by:
      getEventReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
    • getEventReminders

      public List<org.exoplatform.agenda.model.EventReminder> getEventReminders(long eventId)
      Specified by:
      getEventReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
    • saveEventReminders

      public void saveEventReminders(org.exoplatform.agenda.model.Event event, List<org.exoplatform.agenda.model.EventReminder> reminders)
      Specified by:
      saveEventReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
    • saveUpcomingEventReminders

      public void saveUpcomingEventReminders(long eventId, ZonedDateTime occurrenceId, List<org.exoplatform.agenda.model.EventReminder> reminders, long identityId) throws IllegalAccessException, org.exoplatform.agenda.exception.AgendaException
      Saves the reminders of the remaining occurrences of a recurrent event.

      The subscription guard below is unreachable today and deliberately kept: the importer writes every occurrence of a feed as its own singleton and never sets a recurrence, so a subscribed event fails the recurrence test above before reaching it. It guards the coupling, not today's caller — the day a feed's RRULE is imported as a recurrence instead of being expanded, this path opens, and the read-only contract must not depend on that accident (EXO-90373).

      Specified by:
      saveUpcomingEventReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
      Parameters:
      eventId - technical identifier of the recurrent event
      occurrenceId - the occurrence the reminders apply from
      reminders - the reminders to save, may be null
      identityId - identity identifier of the user asking
      Throws:
      IllegalAccessException - when the user may not set them
      org.exoplatform.agenda.exception.AgendaException - when a reminder is invalid
    • saveEventReminders

      public Set<org.exoplatform.agenda.constant.AgendaEventModificationType> saveEventReminders(org.exoplatform.agenda.model.Event event, List<org.exoplatform.agenda.model.EventReminder> reminders, long identityId) throws IllegalAccessException, org.exoplatform.agenda.exception.AgendaException
      Specified by:
      saveEventReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
      Throws:
      IllegalAccessException
      org.exoplatform.agenda.exception.AgendaException
    • setAgendaCalendarService

      public void setAgendaCalendarService(org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService)
      Replaces how the calendar of an event is read, for the tests; the default resolves the Kernel component on first use.
      Parameters:
      agendaCalendarService - the calendar service
    • setAgendaEventService

      public void setAgendaEventService(org.exoplatform.agenda.service.AgendaEventService agendaEventService)
      Replaces how an event's access is looked up, for tests: the default resolves the event service from the container on first use.
      Parameters:
      agendaEventService - the event service
    • sendReminders

      public void sendReminders()
      Specified by:
      sendReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
    • removeEventReminders

      public void removeEventReminders(long eventId)
      Specified by:
      removeEventReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
    • removeUserReminders

      public void removeUserReminders(long eventId, long identityId)
      Specified by:
      removeUserReminders in interface org.exoplatform.agenda.service.AgendaEventReminderService
    • getReminderComputingPeriod

      public long getReminderComputingPeriod()
      Specified by:
      getReminderComputingPeriod in interface org.exoplatform.agenda.service.AgendaEventReminderService
    • setReminderComputingPeriod

      public void setReminderComputingPeriod(long reminderComputingPeriod)
      Specified by:
      setReminderComputingPeriod in interface org.exoplatform.agenda.service.AgendaEventReminderService