Class CalendarFeedIcsWriter
What it says about an event: its title, its time, its location and its
description — nothing else. The document is read by whoever holds the
URL, with no eXo account behind them, so nothing that names or acts for a
person goes in: no ORGANIZER, no ATTENDEE, no e-mail address,
no answer link, no conference or event address. The mail channel
(Utils.generateIcsFile(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.exoplatform.agenda.constant.EventAvailability, java.util.Locale, java.time.ZoneId)) and the CalDAV copy say more because each is
written for one known recipient; this one is written for nobody in
particular. A private event says less still: a block of busy time
titled "Busy", with its start and end and nothing else.
Recurrences arrive already expanded, one Event per occurrence
inside the window, exceptions applied — that is what
AgendaEventService.getEvents answers. Each occurrence is written as a
VEVENT of its own, with an identifier derived from its parent and its
original start, so it keeps the same UID across refreshes. Rebuilding
an RRULE with its EXDATEs and RECURRENCE-IDs would be
a second recurrence engine beside agenda's own; the window bounds the
expansion.
The same data writes the same bytes. Nothing in the document depends
on the moment it is written — DTSTAMP is the event's own last change,
except for a busy block, whose stamp is the constant NO_STAMP so
that it does not tell when the private event was edited — so the entity tag
computed over it lets a client that refreshes an unchanged calendar get a
304.
Times are written in UTC and all-day events as dates, so no
VTIMEZONE is needed and every client places an event at the same
instant.
-
Field Details
-
REFRESH_INTERVAL
How often a client is asked to refresh. Both the RFC 7986 property and the olderX-PUBLISHED-TTLthat Outlook reads carry it. -
MAX_DOCUMENT_CHARS
public static final int MAX_DOCUMENT_CHARSMost characters of event data one document carries. A safety stop against a calendar of very long descriptions served to an anonymous caller; events past it are left out, earliest kept.- See Also:
-
BUSY_SUMMARY
The title a private event is published under.- See Also:
-
-
Method Details
-
write
public static String write(String calendarName, List<org.exoplatform.agenda.model.Event> events, Predicate<org.exoplatform.agenda.model.Event> isPrivate, String uidHost) Writes the document.- Parameters:
calendarName- name the subscribing application shows for the calendar, blank for noneevents- the events to publish, occurrences expanded, earliest firstisPrivate- which events are published as busy time onlyuidHost- host name used to qualify event identifiers- Returns:
- the iCalendar document, CRLF line endings, folded
-