Class RecurrentEventHelper
java.lang.Object
org.ametys.plugins.workspaces.calendars.helper.RecurrentEventHelper
Helper for recurrent event operation
-
Method Summary
Modifier and TypeMethodDescriptionstatic ZonedDateTimegetNextDate(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 eventget the list of working days
-
Method Details
-
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
get the list of working days- Returns:
- a list of integer, matching
Calendardays
-
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
-