Class NotificationUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPlugin id of "a colleague changed something in your calendar" (EXO-90378).static final StringPlugin id of "a calendar was shared with you" (EXO-90357).static final StringPlugin id of "your event has reached its capacity limit", sent to the creator of an event and the managers of its space when an answer fills its last seat (EXO-90320).static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringPlugin id of "your participation is confirmed", sent to an attendee who got a seat from the waiting list (EXO-90315).static final Stringstatic final Stringstatic final Stringstatic final StringName the CalDAV connector registers itself under in a user's connected accounts.static final org.exoplatform.commons.api.notification.model.PluginKeyPlugin key of "a colleague changed something in your calendar" (EXO-90378).static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.CalendarEditorChange> The change handed to the calendar-edited notification (EXO-90378).static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.CalendarShare> The share record handed to the calendar-shared notification (EXO-90357).static final org.exoplatform.commons.api.notification.model.PluginKeyPlugin key of "a calendar was shared with you" (EXO-90357).static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<Long> The identifier of the event row whose mark reports a pool of seats that reached its capacity, handed to the capacity-reached notification (EXO-90320): a series, for a date it carries or a confirmed stored date holding its limit and not over; the row of a date whose limit is its own, of a cancelled date or of a date over; or an event that is not recurring.static final org.exoplatform.commons.api.notification.model.PluginKeyPlugin key of "your event has reached its capacity limit" (EXO-90320).static final org.exoplatform.commons.api.notification.model.PluginKeystatic final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.Event> static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.EventReminder> static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<List> static final org.exoplatform.commons.api.notification.model.PluginKeystatic final org.exoplatform.commons.api.notification.model.PluginKeystatic final org.exoplatform.commons.api.notification.model.PluginKeystatic final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> static final org.exoplatform.commons.api.notification.model.PluginKeystatic final org.exoplatform.commons.api.notification.model.ArgumentLiteral<Long> static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<ZonedDateTime> static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<Long> static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.EventAttendeePromotion> The promotion handed to the participation-confirmed notification (EXO-90315).static final org.exoplatform.commons.api.notification.model.PluginKeystatic final org.exoplatform.commons.api.notification.model.PluginKeystatic final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.constant.EventAttendeeResponse> static final org.exoplatform.commons.api.notification.model.PluginKeyPlugin key of "your participation is confirmed" (EXO-90315).static final StringThe label the agenda shows its owner for a personal calendar never named, in locale.portlet.Agenda.static final Stringstatic final StringStored parameter: technical identifier of the shared calendar.static final StringStored parameter: name of the shared calendar.static final StringStored parameter: what the colleague did, ADDED, CHANGED or REMOVED (EXO-90378).static final StringStored parameter: the event's summary as it stood when the change was made (EXO-90378).static final String"true" on an all-day date, whose start and end are then stored as daysstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String"true" when the recipient is a guest without an accountstatic final Stringstatic final StringStored parameter: full name of the colleague who made the change (EXO-90378).static final String"true" when the dates promoted have no last onestatic final StringThe number of dates promoted after the first onestatic final StringStored parameter: full name of the calendar's owner.static final StringStored parameter: username of the calendar's owner.static final Stringstatic final StringTemplate variable: link to the agenda.static final StringTemplate variable: name of the shared calendar.static final StringTemplate variable: what the colleague did (EXO-90378).static final StringTemplate variable: the event's summary (EXO-90378).static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringTemplate variable: full name of the colleague who made the change (EXO-90378).static final StringTemplate variable: full name of the calendar's owner. -
Method Summary
Modifier and TypeMethodDescriptionstatic final org.exoplatform.commons.api.notification.model.MessageInfobuildMessageSubjectAndBody(org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext, org.exoplatform.commons.api.notification.model.NotificationInfo notification, String pushNotificationURL) static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateCalendarEditedParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification) The template context of the calendar-edited notification (EXO-90378): the colleague's name, what they did, the event's summary and the calendar's name, beside the footer, read state, identifier and date every agenda notification carries.static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateCalendarSharedParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification) The template context of "a calendar was shared with you" (EXO-90357): the calendar's name, its owner's, and the link to the agenda, beside the footer, read state, identifier and date every agenda notification carries.static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateCapacityReachedParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification) Builds the context of the "Event capacity reached" templates: the event's title and the link that opens it, on a recurring event at the date that filled up.static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateDatePollParameters(org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification) static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateParameters(String username, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone) static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateParticipationConfirmedParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone) Builds the context of the "Participation confirmation" templates.static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateReminderParameters(org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone) static final org.exoplatform.commons.api.notification.service.template.TemplateContextbuildTemplateReplyParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone, boolean isCreator) static StringThe absolute link that opens the agenda, where a calendar shared with the user sits under "Shared with me" (EXO-90357).static StringgetCalendarDisplayName(org.exoplatform.commons.api.notification.model.NotificationInfo notification, Locale locale) The name a notification gives the calendar of its event, the same the agenda shows its recipient: a space calendar by its space; a personal calendar by the name its owner gave it, else - for a calendar never named - by the agenda's own label in the recipient's language when the recipient owns it, by the owner's full name otherwise.static Stringstatic final longgetEventId(org.exoplatform.commons.api.notification.NotificationContext ctx) static final longgetEventReminderId(org.exoplatform.commons.api.notification.NotificationContext ctx) static StringgetEventURL(long eventId) The absolute link that opens one event in eXo.static StringgetEventURL(org.exoplatform.agenda.model.Event event) static StringgetEventURL(org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId) The absolute link that opens an event, or one date of a series.static StringgetRecurrenceDetails(org.exoplatform.agenda.model.Event event) static StringgetResponseURL(org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, long eventId, String username, org.exoplatform.agenda.constant.EventAttendeeResponse response) getSpaceManagersByOwnerId(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, long ownerId) The managers of the space owning a calendar, by username: who hears, with the event's creator, that an event of the space reached its capacity.static StringgetWebConferenceLink(org.exoplatform.agenda.model.Event event) static StringgetWebEventURL(org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId) The link, relative to the server, that opens an event, or one date of a series.static final voidsetEventReminderNotificationRecipients(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, Long... receiverIds) static final voidsetNotificationRecipients(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.social.core.space.spi.SpaceService spaceService, List<org.exoplatform.agenda.model.EventAttendee> eventAttendees, org.exoplatform.agenda.model.Event event, String typeModification, long modifierId) static booleanshouldAttachIcsFile(long recipientIdentityId, org.exoplatform.agenda.model.AgendaUserSettings recipientSettings) Whether theevent.icsfile must be attached to the notification built for this recipient, read from that recipient's own settings.static final voidstoreCapacityReachedParameters(org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId, String title, org.exoplatform.agenda.model.Calendar calendar) Stores what the "Event capacity reached" notification shows: the event and, on a recurring event, the date that filled up, which its links open.static final voidstoreEventParameters(org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, org.exoplatform.agenda.model.Calendar calendar) static final voidstoreEventParameters(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId, long participantId, org.exoplatform.agenda.constant.EventAttendeeResponse response, org.exoplatform.agenda.model.Calendar calendar, org.exoplatform.agenda.service.AgendaEventAttendeeService eventAttendeeService, org.exoplatform.social.core.space.spi.SpaceService spaceService) static final voidstoreEventParameters(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, org.exoplatform.agenda.model.Calendar calendar, String typeModification) static final voidstoreParticipationConfirmedParameters(org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, org.exoplatform.agenda.model.Event date, ZonedDateTime occurrenceId, org.exoplatform.agenda.model.Calendar calendar, org.exoplatform.agenda.model.EventAttendeePromotion promotion, boolean guest) Stores what the "Participation confirmation" notification shows: the event, and on a recurring event the first date promoted, which its links open, and the number of the other dates promoted.
-
Field Details
-
EVENT_AGENDA
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.Event> EVENT_AGENDA -
EVENT_ATTENDEE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<List> EVENT_ATTENDEE -
EVENT_MODIFIER
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<Long> EVENT_MODIFIER -
EVENT_MODIFICATION_TYPE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<String> EVENT_MODIFICATION_TYPE -
EVENT_AGENDA_REMINDER
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.EventReminder> EVENT_AGENDA_REMINDER -
EVENT_PARTICIPANT_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<Long> EVENT_PARTICIPANT_ID -
EVENT_RESPONSE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.constant.EventAttendeeResponse> EVENT_RESPONSE -
EVENT_OCCURRENCE_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<ZonedDateTime> EVENT_OCCURRENCE_ID -
AGENDA_EVENT_ADDED_NOTIFICATION_PLUGIN
- See Also:
-
AGENDA_EVENT_MODIFIED_NOTIFICATION_PLUGIN
- See Also:
-
AGENDA_EVENT_CANCELLED_NOTIFICATION_PLUGIN
- See Also:
-
AGENDA_REMINDER_NOTIFICATION_PLUGIN
- See Also:
-
AGENDA_REPLY_NOTIFICATION_PLUGIN
- See Also:
-
AGENDA_DATE_POLL_NOTIFICATION_PLUGIN
- See Also:
-
AGENDA_VOTE_NOTIFICATION_PLUGIN
- See Also:
-
AGENDA_CALENDAR_SHARED_NOTIFICATION_PLUGIN
Plugin id of "a calendar was shared with you" (EXO-90357).- See Also:
-
CALENDAR_SHARE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.CalendarShare> CALENDAR_SHAREThe share record handed to the calendar-shared notification (EXO-90357). -
AGENDA_CALENDAR_EDITED_NOTIFICATION_PLUGIN
Plugin id of "a colleague changed something in your calendar" (EXO-90378).- See Also:
-
CALENDAR_EDITOR_CHANGE
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.CalendarEditorChange> CALENDAR_EDITOR_CHANGEThe change handed to the calendar-edited notification (EXO-90378). -
AGENDA_PARTICIPATION_CONFIRMED_NOTIFICATION_PLUGIN
Plugin id of "your participation is confirmed", sent to an attendee who got a seat from the waiting list (EXO-90315).- See Also:
-
EVENT_PROMOTION
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<org.exoplatform.agenda.model.EventAttendeePromotion> EVENT_PROMOTIONThe promotion handed to the participation-confirmed notification (EXO-90315). -
AGENDA_CAPACITY_REACHED_NOTIFICATION_PLUGIN
Plugin id of "your event has reached its capacity limit", sent to the creator of an event and the managers of its space when an answer fills its last seat (EXO-90320).- See Also:
-
CAPACITY_REACHED_EVENT_ID
public static final org.exoplatform.commons.api.notification.model.ArgumentLiteral<Long> CAPACITY_REACHED_EVENT_IDThe identifier of the event row whose mark reports a pool of seats that reached its capacity, handed to the capacity-reached notification (EXO-90320): a series, for a date it carries or a confirmed stored date holding its limit and not over; the row of a date whose limit is its own, of a cancelled date or of a date over; or an event that is not recurring. -
STORED_PARAMETER_MODIFIER_NAME
Stored parameter: full name of the colleague who made the change (EXO-90378).- See Also:
-
STORED_PARAMETER_CHANGE_KIND
Stored parameter: what the colleague did, ADDED, CHANGED or REMOVED (EXO-90378).- See Also:
-
STORED_PARAMETER_CHANGED_EVENT_SUMMARY
Stored parameter: the event's summary as it stood when the change was made (EXO-90378).- See Also:
-
TEMPLATE_VARIABLE_MODIFIER_NAME
Template variable: full name of the colleague who made the change (EXO-90378).- See Also:
-
TEMPLATE_VARIABLE_CHANGE_KIND
Template variable: what the colleague did (EXO-90378).- See Also:
-
TEMPLATE_VARIABLE_CHANGED_EVENT_SUMMARY
Template variable: the event's summary (EXO-90378).- See Also:
-
STORED_PARAMETER_CALENDAR_ID
Stored parameter: technical identifier of the shared calendar.- See Also:
-
STORED_PARAMETER_CALENDAR_NAME
Stored parameter: name of the shared calendar.- See Also:
-
STORED_PARAMETER_OWNER_NAME
Stored parameter: full name of the calendar's owner.- See Also:
-
STORED_PARAMETER_OWNER_USERNAME
Stored parameter: username of the calendar's owner.- See Also:
-
TEMPLATE_VARIABLE_CALENDAR_NAME
Template variable: name of the shared calendar.- See Also:
-
TEMPLATE_VARIABLE_OWNER_NAME
Template variable: full name of the calendar's owner.- See Also:
-
TEMPLATE_VARIABLE_AGENDA_URL
Template variable: link to the agenda.- See Also:
-
EVENT_ADDED_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey EVENT_ADDED_KEY -
EVENT_MODIFIED_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey EVENT_MODIFIED_KEY -
EVENT_CANCELLED_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey EVENT_CANCELLED_KEY -
EVENT_REMINDER_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey EVENT_REMINDER_KEY -
EVENT_REPLY_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey EVENT_REPLY_KEY -
EVENT_DATE_POLL_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey EVENT_DATE_POLL_KEY -
EVENT_DATE_VOTE_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey EVENT_DATE_VOTE_KEY -
CALENDAR_SHARED_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey CALENDAR_SHARED_KEYPlugin key of "a calendar was shared with you" (EXO-90357). -
CALENDAR_EDITED_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey CALENDAR_EDITED_KEYPlugin key of "a colleague changed something in your calendar" (EXO-90378). -
PARTICIPATION_CONFIRMED_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey PARTICIPATION_CONFIRMED_KEYPlugin key of "your participation is confirmed" (EXO-90315). -
CAPACITY_REACHED_KEY
public static final org.exoplatform.commons.api.notification.model.PluginKey CAPACITY_REACHED_KEYPlugin key of "your event has reached its capacity limit" (EXO-90320). -
STORED_PARAMETER_EVENT_TITLE
- See Also:
-
STORED_PARAMETER_EVENT_CALENDAR_NAME
- See Also:
-
PERSONAL_CALENDAR_LABEL_KEY
The label the agenda shows its owner for a personal calendar never named, in locale.portlet.Agenda.- See Also:
-
STORED_PARAMETER_EVENT_DESCRIPTION
- See Also:
-
STORED_PARAMETER_EVENT_LOCATION
- See Also:
-
STORED_PARAMETER_EVENT_OWNER_ID
- See Also:
-
STORED_PARAMETER_EVENT_ID
- See Also:
-
STORED_PARAMETER_EVENT_MODIFIER
- See Also:
-
STORED_PARAMETER_EVENT_CREATOR
- See Also:
-
STORED_PARAMETER_EVENT_URL
- See Also:
-
STORED_PARAMETER_WEB_EVENT_URL
- See Also:
-
STORED_PARAMETER_EVENT_OCCURRENCE_ID
- See Also:
-
STORED_EVENT_MODIFICATION_TYPE
- See Also:
-
STORED_PARAMETER_MODIFIER_IDENTITY_ID
- See Also:
-
STORED_PARAMETER_EVENT_START_DATE
- See Also:
-
STORED_PARAMETER_EVENT_END_DATE
- See Also:
-
STORED_PARAMETER_EVENT_TIMEZONE_NAME
- See Also:
-
STORED_PARAMETER_EVENT_ATTENDEES
- See Also:
-
STORED_PARAMETER_EVENT_CONFERENCE
- See Also:
-
STORED_PARAMETER_EVENT_RECURRENT_DETAILS
- See Also:
-
STORED_PARAMETER_EVENT_PARTICIPANT_NAME
- See Also:
-
STORED_PARAMETER_EVENT_PARTICIPANT_AVATAR_URL
- See Also:
-
STORED_PARAMETER_EVENT_RESPONSE
- See Also:
-
STORED_PARAMETER_EVENT_STATUS
- See Also:
-
STORED_PARAMETER_EVENT_IS_CREATOR
- See Also:
-
STORED_PARAMETER_EVENT_ALL_DAY
"true" on an all-day date, whose start and end are then stored as days- See Also:
-
STORED_PARAMETER_OTHER_DATES
The number of dates promoted after the first one- See Also:
-
STORED_PARAMETER_OPEN_ENDED
"true" when the dates promoted have no last one- See Also:
-
STORED_PARAMETER_IS_GUEST
"true" when the recipient is a guest without an account- See Also:
-
TEMPLATE_VARIABLE_EVENT_ID
- See Also:
-
TEMPLATE_VARIABLE_EVENT_TITLE
- See Also:
-
TEMPLATE_VARIABLE_EVENT_LOCATION
- See Also:
-
TEMPLATE_VARIABLE_EVENT_DESCRIPTION
- See Also:
-
TEMPLATE_VARIABLE_EVENT_RECURRENT_DETAILS
- See Also:
-
CALDAV_PROVIDER_NAME
Name the CalDAV connector registers itself under in a user's connected accounts. Duplicated from the add-on's own constant on purpose: CalDAV depends on agenda, so the dependency cannot be taken the other way round.- See Also:
-
-
Method Details
-
getEventId
public static final long getEventId(org.exoplatform.commons.api.notification.NotificationContext ctx) -
getEventReminderId
public static final long getEventReminderId(org.exoplatform.commons.api.notification.NotificationContext ctx) -
setNotificationRecipients
public static final void setNotificationRecipients(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.social.core.space.spi.SpaceService spaceService, List<org.exoplatform.agenda.model.EventAttendee> eventAttendees, org.exoplatform.agenda.model.Event event, String typeModification, long modifierId) -
setEventReminderNotificationRecipients
public static final void setEventReminderNotificationRecipients(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, Long... receiverIds) -
storeEventParameters
public static final void storeEventParameters(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, org.exoplatform.agenda.model.Calendar calendar, String typeModification) -
storeEventParameters
public static final void storeEventParameters(org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, org.exoplatform.agenda.model.Calendar calendar) -
storeParticipationConfirmedParameters
public static final void storeParticipationConfirmedParameters(org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, org.exoplatform.agenda.model.Event date, ZonedDateTime occurrenceId, org.exoplatform.agenda.model.Calendar calendar, org.exoplatform.agenda.model.EventAttendeePromotion promotion, boolean guest) Stores what the "Participation confirmation" notification shows: the event, and on a recurring event the first date promoted, which its links open, and the number of the other dates promoted.- Parameters:
notification- the notificationevent- the event whose row holds the first date promoted: a series, the row of one of its dates, or an event that is not recurringdate- the first date promoted, as served: an occurrence of the series, or the event itselfoccurrenceId- the id of that date on a recurring event, null otherwisecalendar- the event's calendarpromotion- the seats the attendee gotguest- whether the recipient is a guest without an account
-
storeCapacityReachedParameters
public static final void storeCapacityReachedParameters(org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId, String title, org.exoplatform.agenda.model.Calendar calendar) Stores what the "Event capacity reached" notification shows: the event and, on a recurring event, the date that filled up, which its links open.- Parameters:
notification- the notificationevent- the event whose mark reports the pool of seats that filled up: a series, the row of a date whose limit is its own or that is over, or an event that is not recurringoccurrenceId- the id of the date that filled up on a recurring event, null otherwisetitle- the title shown: the date's own when the date that filled up is stored with one, else the event'scalendar- the event's calendar
-
getSpaceManagersByOwnerId
public static List<String> getSpaceManagersByOwnerId(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, long ownerId) The managers of the space owning a calendar, by username: who hears, with the event's creator, that an event of the space reached its capacity.- Parameters:
identityManager- the identity managerspaceService- the space serviceownerId- the identity identifier of the calendar's owner- Returns:
- the managers' usernames, none when the owner is not a space
-
storeEventParameters
public static final void storeEventParameters(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.commons.api.notification.model.NotificationInfo notification, org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId, long participantId, org.exoplatform.agenda.constant.EventAttendeeResponse response, org.exoplatform.agenda.model.Calendar calendar, org.exoplatform.agenda.service.AgendaEventAttendeeService eventAttendeeService, org.exoplatform.social.core.space.spi.SpaceService spaceService) -
getDefaultSite
-
buildTemplateParameters
public static final org.exoplatform.commons.api.notification.service.template.TemplateContext buildTemplateParameters(String username, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone) -
buildTemplateReminderParameters
public static final org.exoplatform.commons.api.notification.service.template.TemplateContext buildTemplateReminderParameters(org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone) -
buildTemplateParticipationConfirmedParameters
public static final org.exoplatform.commons.api.notification.service.template.TemplateContext buildTemplateParticipationConfirmedParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone) Builds the context of the "Participation confirmation" templates. On a recurring event, the first date promoted is given as a day and, on a timed event, a time, in the recipient's zone and language. A guest without an account is given no link to the event: the portal is closed to them.- Parameters:
templateProvider- the provider of the channel's templatenotification- the notificationtimeZone- the recipient's zone- Returns:
- the template context
-
buildTemplateCapacityReachedParameters
public static final org.exoplatform.commons.api.notification.service.template.TemplateContext buildTemplateCapacityReachedParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification) Builds the context of the "Event capacity reached" templates: the event's title and the link that opens it, on a recurring event at the date that filled up.- Parameters:
templateProvider- the provider of the channel's templatenotification- the notification- Returns:
- the template context
-
buildTemplateReplyParameters
public static final org.exoplatform.commons.api.notification.service.template.TemplateContext buildTemplateReplyParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification, ZoneId timeZone, boolean isCreator) -
buildTemplateDatePollParameters
public static final org.exoplatform.commons.api.notification.service.template.TemplateContext buildTemplateDatePollParameters(org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification) -
buildTemplateCalendarEditedParameters
public static final org.exoplatform.commons.api.notification.service.template.TemplateContext buildTemplateCalendarEditedParameters(org.exoplatform.commons.api.notification.channel.template.TemplateProvider templateProvider, org.exoplatform.commons.api.notification.model.NotificationInfo notification) The template context of the calendar-edited notification (EXO-90378): the colleague's name, what they did, the event's summary and the calendar's name, beside the footer, read state, identifier and date every agenda notification carries. Everything was stored when the notification was made, so nothing is read again — a deleted event has nothing left to read.- Parameters:
templateProvider- the channel's providernotification- the notification, with its stored parameters- Returns:
- the context
-
getAgendaURL
The absolute link that opens the agenda, where a calendar shared with the user sits under "Shared with me" (EXO-90357).- Returns:
- the link
-
buildMessageSubjectAndBody
public static final org.exoplatform.commons.api.notification.model.MessageInfo buildMessageSubjectAndBody(org.exoplatform.commons.api.notification.service.template.TemplateContext templateContext, org.exoplatform.commons.api.notification.model.NotificationInfo notification, String pushNotificationURL) -
getEventURL
The absolute link that opens one event in eXo.This is the single definition of the shape of that link, and it is the one every notification mail's deep link has always used. EXO-89751 made it an overload of its own so that the iCalendar documents eXo writes — the file attached to the invitation mail, and the copy pushed into a user's own calendar over CalDAV — can render the very same string as the mail body they arrive with, from the event alone, without a caller having to pass one in. That is the property the whole ticket turns on: a value derived from the event is the same on a browser push, on a sweep and on a repair, so the link is written once and never stripped by the next repair.
- Parameters:
eventId- technical identifier of the event- Returns:
- the absolute link, ending in
agenda?eventId=<id>
-
getEventURL
public static String getEventURL(org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId) The absolute link that opens an event, or one date of a series.- Parameters:
event- the event, a series or a stored date of a seriesoccurrenceId- the date to open, null for the event itself- Returns:
- the link, naming the series and the date when a date is given
-
getWebEventURL
public static String getWebEventURL(org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId) The link, relative to the server, that opens an event, or one date of a series.- Parameters:
event- the event, a series or a stored date of a seriesoccurrenceId- the date to open, null for the event itself- Returns:
- the link, naming the series and the date when a date is given
-
getEventURL
-
getResponseURL
-
getRecurrenceDetails
-
getCalendarDisplayName
public static String getCalendarDisplayName(org.exoplatform.commons.api.notification.model.NotificationInfo notification, Locale locale) The name a notification gives the calendar of its event, the same the agenda shows its recipient: a space calendar by its space; a personal calendar by the name its owner gave it, else - for a calendar never named - by the agenda's own label in the recipient's language when the recipient owns it, by the owner's full name otherwise.- Parameters:
notification- the notification carrying the event parameters, and in getTo() the recipient it is rendered forlocale- the language of the recipient- Returns:
- the calendar display name, empty when the owner is not found
-
getWebConferenceLink
-
shouldAttachIcsFile
public static boolean shouldAttachIcsFile(long recipientIdentityId, org.exoplatform.agenda.model.AgendaUserSettings recipientSettings) Whether theevent.icsfile must be attached to the notification built for this recipient, read from that recipient's own settings.This is the fallback, not the decision. Since EXO-90247 the question is put to the add-on that would write the recipient's synced copy, through
AgendaRemoteCopyServiceand itsRemoteEventCopyPlugin— because predicting another repository's decision from settings agenda happens to be able to read is what let the two drift apart, in both directions at once: the add-on's seeding pass wrote a copy where this predicted none (the meeting twice), and later declined one where this predicted one (the meeting nowhere). What is left here is the answer for a deployment where there is no add-on to ask, and for a cancellation whose event is already gone, so no add-on can be asked about it.A recipient who keeps a CalDAV account connected with meeting copies on ends up holding the same meeting twice: once as the copy eXo pushes into their "eXo Meetings" calendar, once if they open the file attached to their mail. The two documents carry different UIDs, so no client can tell they are the same meeting and neither replaces the other. The file is the redundant one — it is the poorer document (no ATTENDEE, no PARTSTAT, no recurrence, no alarms) and the copy arrives whether it is opened or not — so it is the one that goes.
This is a prediction, not an observation, and deliberately so. The invitation is dispatched synchronously inside event creation (
AgendaEventServiceImpl.createEventtoAgendaEventAttendeeServiceImpl.sendInvitations) while an attendee's copy is written only by the five-minute CalDAV sweep. At the moment this runs the copy does not exist yet — measured on the rig, notification at 21:36:19Z and copy at 21:40:16Z — so "does a copy exist" is unanswerable here and asking it would be a race. The question answered instead is "will this user hold a copy", read from the user's own settings. It is wrong for a user whose CalDAV server has been unreachable for a long time; that user loses the attachment, but they are already receiving none of their meetings, and they can still see the event in eXo and answer from the links in the mail, which this does not touch.A guest is never suppressed, under any condition: a guest has no copy by definition, and the attachment is their only way to get the meeting at all. Two independent things guarantee it here — a guest is a
AgendaGuestUserIdentityProvideridentity, so it never resolves to an organization identity and reaches this method with an id of 0; and having no connected account, its default settings fail the connector test as well.- Parameters:
recipientIdentityId- organization identity id of the recipient, 0 when the recipient is not an internal user (a guest)recipientSettings- agenda settings of that recipient, possibly null- Returns:
- true when the file must be attached, which is every case but the connected-with-copies one
-