Class PexipRecurrenceUtils
java.lang.Object
org.exoplatform.webconferencing.pexip.util.PexipRecurrenceUtils
Converts an eXo Agenda recurrence (the JSON of
org.exoplatform.agenda.rest.model.EventRecurrenceEntity) to the
recurrence of a Pexip scheduler encounter.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intA series ending later than this many years after its first occurrence is sent to Pexip as a series without end.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalDatecomputeRecurrenceEndDate(org.json.JSONObject recurrenceJson, LocalDate firstOccurrenceDate) Computes the last day of the series, which Pexip reads from the encounterend_date.static org.json.JSONObjectformatRecurrence(org.json.JSONObject recurrenceJson)
-
Field Details
-
BY_DAY
- See Also:
-
BY_MONTH_DAY
- See Also:
-
BY_MONTH
- See Also:
-
FREQUENCY
- See Also:
-
INTERVAL
- See Also:
-
UNTIL
- See Also:
-
COUNT
- See Also:
-
MAX_SERIES_YEARS
public static final int MAX_SERIES_YEARSA series ending later than this many years after its first occurrence is sent to Pexip as a series without end. It also bounds the occurrence counting loops against an arbitrarily largecount.- See Also:
-
-
Method Details
-
formatRecurrence
public static org.json.JSONObject formatRecurrence(org.json.JSONObject recurrenceJson) - Parameters:
recurrenceJson- eXo Agenda recurrence- Returns:
- the Pexip encounter
recurrenceobject: type, interval and weekdays
-
computeRecurrenceEndDate
public static LocalDate computeRecurrenceEndDate(org.json.JSONObject recurrenceJson, LocalDate firstOccurrenceDate) Computes the last day of the series, which Pexip reads from the encounterend_date. Occurrences are counted the way the Agenda expands the series: a day missing from a month or a year (the 31st, 29 February) is skipped, not moved.- Parameters:
recurrenceJson- eXo Agenda recurrencefirstOccurrenceDate- day of the first occurrence, in the encounter time zone- Returns:
- the day of the
count-th occurrence when set, else theuntilday when set, elsenullfor a series without end;countcomes first, as in the Agenda
-