Class RecurrentEventHelper
- java.lang.Object
-
- org.ametys.plugins.workspaces.calendars.helper.RecurrentEventHelper
-
public final class RecurrentEventHelper extends Object
Helper for recurrent event operation
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ZonedDateTime
getNextDate(EventRecurrenceTypeEnum recurrenceType, ZonedDateTime eventStartDate, ZonedDateTime date)
Get the next occurrence datestatic List<ZonedDateTime>
getOccurrences(ZonedDateTime startDate, ZonedDateTime endDate, ZonedDateTime eventStartDate, ZonedDateTime originalOccurrenceStartDate, EventRecurrenceTypeEnum recurrenceType, List<ZonedDateTime> excludedOccurences, ZoneId zoneId, ZonedDateTime untilDate)
Compute the occurrence of an eventstatic List<Integer>
getWorkingDays()
get the list of working days
-
-
-
Method Detail
-
getNextDate
public static ZonedDateTime getNextDate(EventRecurrenceTypeEnum recurrenceType, ZonedDateTime eventStartDate, ZonedDateTime date)
Get the next occurrence date- Parameters:
recurrenceType
- recurrence typeeventStartDate
- the event start datedate
- the occurrence date- Returns:
- the next occurrence date
-
getWorkingDays
public static List<Integer> getWorkingDays()
get the list of working days- Returns:
- a list of integer, matching
Calendar
days
-
getOccurrences
public static List<ZonedDateTime> getOccurrences(ZonedDateTime startDate, ZonedDateTime endDate, ZonedDateTime eventStartDate, ZonedDateTime originalOccurrenceStartDate, EventRecurrenceTypeEnum recurrenceType, List<ZonedDateTime> excludedOccurences, ZoneId zoneId, ZonedDateTime untilDate)
Compute the occurrence of an event- Parameters:
startDate
- the start of the range to compute occurrencesendDate
- the end of the range to compute occurrenceseventStartDate
- the start date of the occurrenceoriginalOccurrenceStartDate
- the original start date of the occurrence (different as the eventStartDate when editing an occurrence)recurrenceType
- the recurrence typeexcludedOccurences
- the occurrences to excludezoneId
- the zoneId used for the datesuntilDate
- until date of the recurring event- Returns:
- a list of occurrence start dates
-
-