Class Utils
java.lang.Object
ch.tocco.nice2.optional.calendar.impl.ical.util.Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic RecurrenceInfobuildRecurrenceInfo(String recurrence, @Nullable String exceptionDates) static DateTimeValuecreateDateTimeValue(ZonedDateTime dateTime, DateTimeValue base) static List<CalendarEvent> createEventsFromICal(net.fortuna.ical4j.model.Period<OffsetDateTime> p, net.fortuna.ical4j.model.Calendar ical, Map<UUID, CalendarEvent> eventMap) Iterates through all VEVENTs of the ical and adds them to a result list.static net.fortuna.ical4j.model.component.VEventcreateICalEvent(CalendarEvent event) Creates an ical VEvent object from the specifiedCalendarEvent.static net.fortuna.ical4j.model.CalendargetICal(String calendarName, @Nullable String calendarDescription, Iterable<CalendarEvent> events) Creates an ical Calendar object with the specified collection ofCalendarEvents.static net.fortuna.ical4j.model.DatetoICalDate(DateTimeValue value) Returns either icals datetime or date.static net.fortuna.ical4j.model.Period<OffsetDateTime> toPeriod(DateTimeValue originalStart, DateTimeValue originalEnd) Creates an ical-period object that uses the specifiedDateTimeValues.
-
Method Details
-
toPeriod
public static net.fortuna.ical4j.model.Period<OffsetDateTime> toPeriod(DateTimeValue originalStart, DateTimeValue originalEnd) Creates an ical-period object that uses the specifiedDateTimeValues. The values are converted into UTC milliseconds. -
toICalDate
Returns either icals datetime or date. -
createICalEvent
Creates an ical VEvent object from the specifiedCalendarEvent. -
getICal
public static net.fortuna.ical4j.model.Calendar getICal(String calendarName, @Nullable @Nullable String calendarDescription, Iterable<CalendarEvent> events) Creates an ical Calendar object with the specified collection ofCalendarEvents.- Parameters:
calendarName- the calendar namecalendarDescription- an optional calendar descriptionevents- the events thar are included in the calendar
-
createEventsFromICal
public static List<CalendarEvent> createEventsFromICal(net.fortuna.ical4j.model.Period<OffsetDateTime> p, net.fortuna.ical4j.model.Calendar ical, Map<UUID, CalendarEvent> eventMap) Iterates through all VEVENTs of the ical and adds them to a result list. The calendar events in the list are looked up from the specified eventMap. Recurring-events are resolved and added as normal CalendarEvents to the list. -
buildRecurrenceInfo
public static RecurrenceInfo buildRecurrenceInfo(String recurrence, @Nullable @Nullable String exceptionDates) -
createDateTimeValue
-