Package org.exoplatform.agenda.service
Interface AgendaEventReminderService
public interface AgendaEventReminderService
-
Method Summary
Modifier and TypeMethodDescriptiongetEventReminders(long eventId) Retrieves list of reminders of an event.getEventReminders(long eventId, long userIdentityId) Retrieves list of reminders of an event for a user.longvoidremoveEventReminders(long eventId) Removes all reminders of a givenEventvoidremoveUserReminders(long eventId, long identityId) Deletes all reminders of a user on a given event identified by its identifier.voidsaveEventReminders(Event event, List<EventReminder> reminders) saveEventReminders(Event event, List<EventReminder> reminders, long userIdentityId) Updates the list ofEventReminderassociated to a user on a selected eventvoidsaveUpcomingEventReminders(long eventId, ZonedDateTime occurrenceId, List<EventReminder> reminders, long userIdentityId) Save reminders for an upcoming of an occurrence of a recurring event for a specific uservoidSend reminders of upcoming events of next minutevoidsetReminderComputingPeriod(long reminderComputingPeriod)
-
Method Details
-
getEventReminders
Retrieves list of reminders of an event for a user. If there is no specific reminder, the default user reminders will be used. (Combined between User Settings and default values)- Parameters:
eventId-Eventtechnical identifieruserIdentityId- User technical identifier (Identity.getId())- Returns:
ListofEventRemindercorresponding to user preferences.
-
getEventReminders
Retrieves list of reminders of an event. If there is no specific reminder, the default user reminders will be used. (Combined between User Settings and default values)- Parameters:
eventId-Eventtechnical identifier- Returns:
ListofEventReminder.
-
saveEventReminders
Set<AgendaEventModificationType> saveEventReminders(Event event, List<EventReminder> reminders, long userIdentityId) throws IllegalAccessException, AgendaException Updates the list ofEventReminderassociated to a user on a selected event- Parameters:
event-Eventon which the reminder will be attachedreminders-ListofEventReminderuserIdentityId- User technical identifier (Identity.getId()) updating his/her reminders on the event- Returns:
SetofAgendaEventModificationTypecontaining modifications made on event reminders- Throws:
IllegalAccessException- when user isn't an attendee of the eventAgendaException- when a reminder datetime can't be computed
-
saveEventReminders
- Parameters:
event-Eventfor which saving remindersreminders-ListofEventReminder
-
saveUpcomingEventReminders
void saveUpcomingEventReminders(long eventId, ZonedDateTime occurrenceId, List<EventReminder> reminders, long userIdentityId) throws AgendaException Save reminders for an upcoming of an occurrence of a recurring event for a specific user- Parameters:
eventId- technical identifier ofEventoccurrenceId-Eventoccurrence identifier on which the modification will be appliedreminders-ListofEventReminderuserIdentityId- User technical identifier (Identity.getId()) updating his/her reminders on the event- Throws:
AgendaException- when an error occurs while saving reminders
-
getReminderComputingPeriod
long getReminderComputingPeriod()- Returns:
- period used to compute reminder of occurrences of a recurrent event in days
-
setReminderComputingPeriod
void setReminderComputingPeriod(long reminderComputingPeriod) - Parameters:
reminderComputingPeriod- value of period used to compute reminder of occurrences of a recurrent event in days
-
removeUserReminders
void removeUserReminders(long eventId, long identityId) Deletes all reminders of a user on a given event identified by its identifier.- Parameters:
eventId- technical identifier ofEventidentityId- technical identifier ofIdentity
-
removeEventReminders
void removeEventReminders(long eventId) Removes all reminders of a givenEvent- Parameters:
eventId- technical identifier ofEvent
-
sendReminders
void sendReminders()Send reminders of upcoming events of next minute
-