Package org.exoplatform.agenda.service
Interface AgendaEventReminderService
-
public interface AgendaEventReminderService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<EventReminder>getEventReminders(long eventId)Retrieves list of reminders of an event.List<EventReminder>getEventReminders(long eventId, long userIdentityId)Retrieves list of reminders of an event for a user.longgetReminderComputingPeriod()voidremoveEventReminders(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)Set<AgendaEventModificationType>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 uservoidsendReminders()Send reminders of upcoming events of next minutevoidsetReminderComputingPeriod(long reminderComputingPeriod)
-
-
-
Method Detail
-
getEventReminders
List<EventReminder> getEventReminders(long eventId, long userIdentityId)
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
List<EventReminder> getEventReminders(long eventId)
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
void saveEventReminders(Event event, List<EventReminder> reminders)
- Parameters:
event-Eventfor which saving remindersreminders-ListofEventReminder
-
saveUpcomingEventReminders
void saveUpcomingEventReminders(long eventId, ZonedDateTime occurrenceId, List<EventReminder> reminders, long userIdentityId) throws AgendaExceptionSave 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
-
-