Class IcsEventMapper
Kept apart from IcsParser on purpose: the parser answers "what does
this object say", this answers "what does agenda hold for it". The first is
about a protocol, the second about a platform, and mixing them is how a
quirk of one ends up encoded in the other.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionoccurrenceOf(String value, String zoneId) A raw RFC 5545 date or date-time as the occurrence agenda names.occurrenceOf(org.exoplatform.caldav.model.IcsEvent source) The occurrence an override amends, in the event's own zone.org.exoplatform.agenda.model.EventtoEvent(org.exoplatform.caldav.model.IcsEvent source, long calendarId) The agenda event standing for one parsed object.
-
Constructor Details
-
IcsEventMapper
public IcsEventMapper()
-
-
Method Details
-
toEvent
public org.exoplatform.agenda.model.Event toEvent(org.exoplatform.caldav.model.IcsEvent source, long calendarId) The agenda event standing for one parsed object.Identity is deliberately absent: no id, no calendar, no creator. Those belong to the caller placing the event, not to the object being read, and an event carrying an id it invented would overwrite whatever holds it.
The description is what the organiser typed, not what the object says — see
descriptionOf(IcsEvent)for what is taken off it, on which objects, and what that can cost.- Parameters:
source- the parsed objectcalendarId- the eXo calendar the event belongs in- Returns:
- the event to create or update
-
occurrenceOf
A raw RFC 5545 date or date-time as the occurrence agenda names.EXDATE values arrive as the object spelled them — with a zone, in UTC, or as a bare date for an all-day series — so they are read the same way a RECURRENCE-ID is, and anchored on the event's own zone.
- Parameters:
value- the raw valuezoneId- the zone the event is anchored on- Returns:
- the occurrence identifier, or null when the value cannot be read
-
occurrenceOf
The occurrence an override amends, in the event's own zone.- Parameters:
source- the parsed override- Returns:
- the occurrence identifier, or null when the object is not one
-