Class Utils
java.lang.Object
ch.tocco.nice2.optional.calendar.impl.ical.util.Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic RecurrenceInfo
buildRecurrenceInfo
(String recurrence, @Nullable String exceptionDates) static List
<CalendarEvent> createEventsFromICal
(net.fortuna.ical4j.model.Period 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.VEvent
createICalEvent
(CalendarEvent event) Creates an ical VEvent object from the specifiedCalendarEvent
.static net.fortuna.ical4j.model.Calendar
getICal
(String calendarName, @Nullable String calendarDescription, Iterable<CalendarEvent> events) Creates an ical Calendar object with the specified collection ofCalendarEvent
s.static net.fortuna.ical4j.model.Date
toICalDate
(DateTimeValue value) Returns either icals datetime or date.static net.fortuna.ical4j.model.Period
toPeriod
(DateTimeValue start, DateTimeValue end) Creates an ical-period object that uses the specifiedDateTimeValue
s.
-
Method Details
-
toPeriod
Creates an ical-period object that uses the specifiedDateTimeValue
s. 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 ofCalendarEvent
s.- 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 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)
-