#1098: VEventUtils.kt

projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/VEventUtils.kt Utility / iCal VEvent Conversion, projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/VEventUtils.kt 234 lines · 166 code · 46 comments · 22 blank
Central utility for converting between ical4j VEvent objects and ProjectForge's TeamEventDO model. convertToEventDO() parses a VEvent into TeamEventDO, extracting summary, location, description, date-times (all-day detection via LocalDate check), recurrence rule, exdates, organizer, sequence, and UID. Optionally stores the original ICS string. convertToVEvent() goes the other direction: preserves original ICS if available, otherwise builds VEvent from dates (LocalDate for all-day, ZonedDateTime otherwise), adding location, description, organizer, and RRULE. temporalToUTCDate() converts any Temporal to a UTC Date. Also provides: parseVEventFromIcs() (wrapper around CalendarBuilder for single event), createSetupEvent() for empty calendars, createAllDayEvent()/createEvent() for simple events, setUid(), addLocation(), addDescription(), getPropertyValue(), getRRuleString(), and extractExdates(). Enables relaxed iCal parsing via CompatibilityHints.

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
c5c2c356d Ical4j: migration stuff...
c193e8288 Ical4j: migration stuff... (all tests OK)
61966790f Ical4j: migration stuff...