Class PexipRecurrenceUtils

java.lang.Object
org.exoplatform.webconferencing.pexip.util.PexipRecurrenceUtils

public final class PexipRecurrenceUtils extends Object
Converts an eXo Agenda recurrence (the JSON of org.exoplatform.agenda.rest.model.EventRecurrenceEntity) to the recurrence of a Pexip scheduler encounter.
  • Field Details

  • Method Details

    • formatRecurrence

      public static org.json.JSONObject formatRecurrence(org.json.JSONObject recurrenceJson)
      Parameters:
      recurrenceJson - eXo Agenda recurrence
      Returns:
      the Pexip encounter recurrence object: 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 encounter end_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 recurrence
      firstOccurrenceDate - day of the first occurrence, in the encounter time zone
      Returns:
      the day of the count-th occurrence when set, else the until day when set, else null for a series without end; count comes first, as in the Agenda