Class MailInvitationReader
The object is the sender's. It came in a mail from outside, so it is
bounded before ical4j reads it and narrowed after: the text's length, the
number of components, of excluded dates and of overridden occurrences are
capped, and an object over any cap is refused rather than read in part; the
title, location and description are kept as plain text, capped as a
subscribed feed's are (CalendarFeedParser); a rule that would cost
agenda more to expand than a feed is allowed to is refused. Attendees are
never read — the only person a landing acts for is the user who asked — and
neither are alarms, attachments or conference properties. The organiser is
read as a bare address, only to be compared with the organiser of an event
the user already holds.
One event per object. An invitation is about one UID (RFC 5546): an object naming another UID than the one the reader showed, or several, is refused, and so is one carrying only an occurrence of a series.
Every refusal is an IllegalArgumentException: the sender's content,
not an incident.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLongest object read, in characters.static final intMost VEVENT components an object may carry.static final intMost occurrences a series' EXDATEs may exclude.static final intMost occurrences an object may override.static final intLongest UID kept: it is stored beside the event and looked up by. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbareAddress(String address) An address as a landing compares it: trimmed, its ASCII letters lower-cased and every other character kept, refused when it does not look like a mail address.static MailInvitationEventReads the event an invitation describes.
-
Field Details
-
MAX_CHARS
public static final int MAX_CHARSLongest object read, in characters.- See Also:
-
MAX_UID
public static final int MAX_UIDLongest UID kept: it is stored beside the event and looked up by.- See Also:
-
MAX_COMPONENTS
public static final int MAX_COMPONENTSMost VEVENT components an object may carry.- See Also:
-
MAX_EXCLUSIONS
public static final int MAX_EXCLUSIONSMost occurrences a series' EXDATEs may exclude.- See Also:
-
MAX_OVERRIDES
public static final int MAX_OVERRIDESMost occurrences an object may override.- See Also:
-
-
Method Details
-
read
Reads the event an invitation describes.- Parameters:
icalendar- the object, as textexpectedUid- the UID the reader showed the user- Returns:
- the event, its exclusions and its overrides
- Throws:
IllegalArgumentException- when the object is over a cap, cannot be read, names another or more than one event, carries only an occurrence, has no start, or carries a rule agenda does not land
-
bareAddress
An address as a landing compares it: trimmed, its ASCII letters lower-cased and every other character kept, refused when it does not look like a mail address. A full lower-casing turns some non-ASCII letters into ASCII ones (the Kelvin sign intok), so a look-alike ORGANIZER would compare equal to the held event's: the mail reader folds theFromit checks against the ORGANIZER the same way.- Parameters:
address- the address, may be null- Returns:
- the bare address, null when there is none
-