biweekly.parameter
Class ICalParameters

java.lang.Object
  extended by biweekly.util.ListMultimap<String,String>
      extended by biweekly.parameter.ICalParameters
All Implemented Interfaces:
Iterable<Map.Entry<String,List<String>>>

public class ICalParameters
extends ListMultimap<String,String>

Contains the list of parameters that belong to a property.

Author:
Michael Angstadt

Field Summary
static String ALTREP
           
static String CN
           
static String CUTYPE
           
static String DELEGATED_FROM
           
static String DELEGATED_TO
           
static String DIR
           
static String ENCODING
           
static String FBTYPE
           
static String FMTTYPE
           
static String LANGUAGE
           
static String MEMBER
           
static String PARTSTAT
           
static String RANGE
           
static String RELATED
           
static String RELTYPE
           
static String ROLE
           
static String RSVP
           
static String SENT_BY
           
static String TZID
           
static String VALUE
           
 
Constructor Summary
ICalParameters()
          Creates a parameters list.
ICalParameters(ICalParameters parameters)
          Copies an existing parameters list.
 
Method Summary
 void addDelegatedFrom(String uri)
          Adds a person who has delegated his or her responsibility to an attendee.
 void addDelegatedTo(String uri)
          Adds a person to which an attendee has delegated his or her responsibility.
 void addMember(String uri)
          Adds a group that an attendee is a member of.
 String getAltRepresentation()
          Gets a URI pointing to additional information about the entity represented by the property.
 CalendarUserType getCalendarUserType()
          Gets the type of user an attendee is (for example, an "individual" or a "room").
 String getCommonName()
          Gets the display name of a person.
 List<String> getDelegatedFrom()
          Gets the people who have delegated their responsibility to an attendee.
 List<String> getDelegatedTo()
          Gets the people to which an attendee has delegated his or her responsibility.
 String getDirectoryEntry()
          Gets a URI that contains additional information about the person.
 Encoding getEncoding()
          Gets the encoding of the property value (for example, "base64").
 String getFormatType()
          Gets the content-type of the property's value.
 FreeBusyType getFreeBusyType()
          Gets the person's status over the time periods that are specified in a FreeBusy property (for example, "free" or "busy").
 String getLanguage()
          Gets the language that the property value is written in.
 List<String> getMembers()
          Gets the groups that an attendee is a member of.
 ParticipationStatus getParticipationStatus()
          Gets an attendee's level of participation.
 Range getRange()
          Gets the effective range of recurrence instances from the instance specified by a RecurrenceId property.
 Related getRelated()
          Gets the date-time field that the duration in a Trigger property is relative to.
 RelationshipType getRelationshipType()
          Gets the relationship type of a RelatedTo property.
 Role getRole()
          Gets an attendee's role (for example, "chair" or "required participant").
 Boolean getRsvp()
          Gets whether the organizer requests a response from an attendee.
 String getSentBy()
          Gets a person that is acting on behalf of the person defined in the property.
 String getTimezoneId()
          Gets the timezone identifier.
 ICalDataType getValue()
          Gets the data type of the property's value (for example, "text" or "datetime").
 void removeDelegatedFrom()
          Removes everyone who has delegated his or her responsibility to an attendee.
 void removeDelegatedFrom(String uri)
          Removes a person who has delegated his or her responsibility to an attendee.
 void removeDelegatedTo()
          Removes everyone to which an attendee has delegated his or her responsibility.
 void removeDelegatedTo(String uri)
          Removes a person to which an attendee has delegated his or her responsibility.
 void removeMember(String uri)
          Removes a group that an attendee is a member of.
 void removeMembers()
          Removes all groups that an attendee is a member of.
protected  String sanitizeKey(String key)
          Modifies a given key before it is used to interact with the internal map.
 void setAltRepresentation(String uri)
          Sets a URI pointing to additional information about the entity represented by the property.
 void setCalendarUserType(CalendarUserType cutype)
          Sets the type of user an attendee is (for example, an "individual" or a "room").
 void setCommonName(String cn)
          Sets the display name of a person.
 void setDirectoryEntry(String uri)
          Sets a URI that contains additional information about the person.
 void setEncoding(Encoding encoding)
          Sets the encoding of the property value (for example, "base64").
 void setFormatType(String formatType)
          Sets the content-type of the property's value.
 void setFreeBusyType(FreeBusyType fbType)
          Sets the person's status over the time periods that are specified in a FreeBusy property (for example, "free" or "busy").
 void setLanguage(String language)
          Sets the language that the property value is written in.
 void setParticipationStatus(ParticipationStatus status)
          Sets an attendee's level of participation.
 void setRange(Range range)
          Sets the effective range of recurrence instances from the instance specified by a RecurrenceId property.
 void setRelated(Related related)
          Sets the date-time field that the duration in a Trigger property is relative to.
 void setRelationshipType(RelationshipType relationshipType)
          Sets the relationship type of a RelatedTo property.
 void setRole(Role role)
          Sets an attendee's role (for example, "chair" or "required participant").
 void setRsvp(Boolean rsvp)
          Sets whether the organizer requests a response from an attendee.
 void setSentBy(String uri)
          Sets a person that is acting on behalf of the person defined in the property.
 void setTimezoneId(String timezoneId)
          Sets the timezone identifier.
 void setValue(ICalDataType value)
          Sets the data type of the property's value (for example, "text" or "datetime").
 List<String> validate()
          Checks this parameters list for data consistency problems or deviations from the spec.
 
Methods inherited from class biweekly.util.ListMultimap
clear, containsKey, equals, first, get, getMap, hashCode, isEmpty, iterator, keySet, put, putAll, remove, removeAll, replace, replace, size, toString, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CN

public static final String CN
See Also:
Constant Field Values

ALTREP

public static final String ALTREP
See Also:
Constant Field Values

CUTYPE

public static final String CUTYPE
See Also:
Constant Field Values

DELEGATED_FROM

public static final String DELEGATED_FROM
See Also:
Constant Field Values

DELEGATED_TO

public static final String DELEGATED_TO
See Also:
Constant Field Values

DIR

public static final String DIR
See Also:
Constant Field Values

ENCODING

public static final String ENCODING
See Also:
Constant Field Values

FMTTYPE

public static final String FMTTYPE
See Also:
Constant Field Values

FBTYPE

public static final String FBTYPE
See Also:
Constant Field Values

LANGUAGE

public static final String LANGUAGE
See Also:
Constant Field Values

MEMBER

public static final String MEMBER
See Also:
Constant Field Values

PARTSTAT

public static final String PARTSTAT
See Also:
Constant Field Values

RANGE

public static final String RANGE
See Also:
Constant Field Values

RELATED

public static final String RELATED
See Also:
Constant Field Values

RELTYPE

public static final String RELTYPE
See Also:
Constant Field Values

ROLE

public static final String ROLE
See Also:
Constant Field Values

RSVP

public static final String RSVP
See Also:
Constant Field Values

SENT_BY

public static final String SENT_BY
See Also:
Constant Field Values

TZID

public static final String TZID
See Also:
Constant Field Values

VALUE

public static final String VALUE
See Also:
Constant Field Values
Constructor Detail

ICalParameters

public ICalParameters()
Creates a parameters list.


ICalParameters

public ICalParameters(ICalParameters parameters)
Copies an existing parameters list.

Parameters:
parameters - the list to copy
Method Detail

getAltRepresentation

public String getAltRepresentation()
Gets a URI pointing to additional information about the entity represented by the property.

Returns:
the URI or null if not set
Specification Reference:
RFC 5545 p.14-5

setAltRepresentation

public void setAltRepresentation(String uri)
Sets a URI pointing to additional information about the entity represented by the property.

Parameters:
uri - the URI or null to remove
Specification Reference:
RFC 5545 p.14-5

getCommonName

public String getCommonName()
Gets the display name of a person.

Returns:
the display name (e.g. "John Doe") or null if not set
Specification Reference:
RFC 5545 p.15-6

setCommonName

public void setCommonName(String cn)
Sets the display name of a person.

Parameters:
cn - the display name (e.g. "John Doe") or null to remove
Specification Reference:
RFC 5545 p.15-6

getCalendarUserType

public CalendarUserType getCalendarUserType()
Gets the type of user an attendee is (for example, an "individual" or a "room").

Returns:
the calendar user type or null if not set
Specification Reference:
RFC 5545 p.16

setCalendarUserType

public void setCalendarUserType(CalendarUserType cutype)
Sets the type of user an attendee is (for example, an "individual" or a "room").

Parameters:
cutype - the calendar user type or null to remove
Specification Reference:
RFC 5545 p.16

getDelegatedFrom

public List<String> getDelegatedFrom()
Gets the people who have delegated their responsibility to an attendee.

Returns:
the delegators (typically email URIs, e.g. "mailto:janedoe@example.com")
Specification Reference:
RFC 5545 p.17

addDelegatedFrom

public void addDelegatedFrom(String uri)
Adds a person who has delegated his or her responsibility to an attendee.

Parameters:
uri - the delegator (typically an email URI, e.g. "mailto:janedoe@example.com")
Specification Reference:
RFC 5545 p.17

removeDelegatedFrom

public void removeDelegatedFrom(String uri)
Removes a person who has delegated his or her responsibility to an attendee.

Parameters:
uri - the delegator to remove (typically an email URI, e.g. "mailto:janedoe@example.com")
Specification Reference:
RFC 5545 p.17

removeDelegatedFrom

public void removeDelegatedFrom()
Removes everyone who has delegated his or her responsibility to an attendee.

Specification Reference:
RFC 5545 p.17

getDelegatedTo

public List<String> getDelegatedTo()
Gets the people to which an attendee has delegated his or her responsibility.

Returns:
the delegatees (typically email URIs, e.g. "mailto:janedoe@example.com")
Specification Reference:
RFC 5545 p.17-8

addDelegatedTo

public void addDelegatedTo(String uri)
Adds a person to which an attendee has delegated his or her responsibility.

Parameters:
uri - the delegatee (typically an email URI, e.g. "mailto:janedoe@example.com")
Specification Reference:
RFC 5545 p.17-8

removeDelegatedTo

public void removeDelegatedTo(String uri)
Removes a person to which an attendee has delegated his or her responsibility.

Parameters:
uri - the delegatee to remove (typically an email URI, e.g. "mailto:janedoe@example.com")
Specification Reference:
RFC 5545 p.17-8

removeDelegatedTo

public void removeDelegatedTo()
Removes everyone to which an attendee has delegated his or her responsibility.

Specification Reference:
RFC 5545 p.17-8

getDirectoryEntry

public String getDirectoryEntry()
Gets a URI that contains additional information about the person.

Returns:
the URI (e.g. an LDAP URI) or null if not set
Specification Reference:
RFC 5545 p.18

setDirectoryEntry

public void setDirectoryEntry(String uri)
Sets a URI that contains additional information about the person.

Parameters:
uri - the URI (e.g. an LDAP URI) or null to remove
Specification Reference:
RFC 5545 p.18

getEncoding

public Encoding getEncoding()
Gets the encoding of the property value (for example, "base64").

Returns:
the encoding or null if not set
Specification Reference:
RFC 5545 p.18-9

setEncoding

public void setEncoding(Encoding encoding)
Sets the encoding of the property value (for example, "base64").

Parameters:
encoding - the encoding or null to remove
Specification Reference:
RFC 5545 p.18-9

getFormatType

public String getFormatType()
Gets the content-type of the property's value.

Returns:
the content type (e.g. "image/png") or null if not set
Specification Reference:
RFC 5545 p.19-20

setFormatType

public void setFormatType(String formatType)
Sets the content-type of the property's value.

Parameters:
formatType - the content type (e.g. "image/png") or null to remove
Specification Reference:
RFC 5545 p.19-20

getFreeBusyType

public FreeBusyType getFreeBusyType()
Gets the person's status over the time periods that are specified in a FreeBusy property (for example, "free" or "busy"). If not set, the user should be considered "busy".

Returns:
the type or null if not set
Specification Reference:
RFC 5545 p.20

setFreeBusyType

public void setFreeBusyType(FreeBusyType fbType)
Sets the person's status over the time periods that are specified in a FreeBusy property (for example, "free" or "busy"). If not set, the user should be considered "busy".

Parameters:
fbType - the type or null to remove
Specification Reference:
RFC 5545 p.20

getLanguage

public String getLanguage()
Gets the language that the property value is written in.

Returns:
the language (e.g. "en" for English) or null if not set
Specification Reference:
RFC 5545 p.21

setLanguage

public void setLanguage(String language)
Sets the language that the property value is written in.

Parameters:
language - the language (e.g. "en" for English) or null to remove
Specification Reference:
RFC 5545 p.21

addMember

public void addMember(String uri)
Adds a group that an attendee is a member of.

Parameters:
uri - the group URI (typically, an email address URI, e.g. "mailto:mailinglist@example.com")
Specification Reference:
RFC 5545 p.21-2

getMembers

public List<String> getMembers()
Gets the groups that an attendee is a member of.

Returns:
the group URIs (typically, these are email address URIs, e.g. "mailto:mailinglist@example.com")
Specification Reference:
RFC 5545 p.21-2

removeMember

public void removeMember(String uri)
Removes a group that an attendee is a member of.

Parameters:
uri - the group URI to remove (typically, an email address URI, e.g. "mailto:mailinglist@example.com")
Specification Reference:
RFC 5545 p.21-2

removeMembers

public void removeMembers()
Removes all groups that an attendee is a member of.

Specification Reference:
RFC 5545 p.21-2

getParticipationStatus

public ParticipationStatus getParticipationStatus()
Gets an attendee's level of participation.

Returns:
the participation status or null if not set
Specification Reference:
RFC 5545 p.22-3

setParticipationStatus

public void setParticipationStatus(ParticipationStatus status)
Sets an attendee's level of participation.

Parameters:
status - the participation status or null to remove
Specification Reference:
RFC 5545 p.22-3

getRange

public Range getRange()
Gets the effective range of recurrence instances from the instance specified by a RecurrenceId property.

Returns:
the range or null if not set
Specification Reference:
RFC 5545 p.23-4

setRange

public void setRange(Range range)
Sets the effective range of recurrence instances from the instance specified by a RecurrenceId property.

Parameters:
range - the range or null to remove
Specification Reference:
RFC 5545 p.23-4

getRelated

public Related getRelated()
Gets the date-time field that the duration in a Trigger property is relative to.

Returns:
the field or null if not set
Specification Reference:
RFC 5545 p.24

setRelated

public void setRelated(Related related)
Sets the date-time field that the duration in a Trigger property is relative to.

Parameters:
related - the field or null to remove
Specification Reference:
RFC 5545 p.24

getRelationshipType

public RelationshipType getRelationshipType()
Gets the relationship type of a RelatedTo property.

Returns:
the relationship type (e.g. "child") or null if not set
Specification Reference:
RFC 5545 p.25

setRelationshipType

public void setRelationshipType(RelationshipType relationshipType)
Sets the relationship type of a RelatedTo property.

Parameters:
relationshipType - the relationship type (e.g. "child") or null to remove
Specification Reference:
RFC 5545 p.25

getRole

public Role getRole()
Gets an attendee's role (for example, "chair" or "required participant").

Returns:
the role or null if not set
Specification Reference:
RFC 5545 p.25-6

setRole

public void setRole(Role role)
Sets an attendee's role (for example, "chair" or "required participant").

Parameters:
role - the role or null to remove
Specification Reference:
RFC 5545 p.25-6

getRsvp

public Boolean getRsvp()
Gets whether the organizer requests a response from an attendee.

Returns:
true if an RSVP is requested, false if not, null if not set
Throws:
IllegalStateException - if the parameter value is malformed and cannot be parsed
Specification Reference:
RFC 5545 p.26-7

setRsvp

public void setRsvp(Boolean rsvp)
Sets whether the organizer requests a response from an attendee.

Parameters:
rsvp - true if an RSVP has been requested, false if not, null to remove
Specification Reference:
RFC 5545 p.26-7

getSentBy

public String getSentBy()
Gets a person that is acting on behalf of the person defined in the property.

Returns:
a URI representing the person (typically, an email URI, e.g. "mailto:janedoe@example.com") or null if not set
Specification Reference:
RFC 5545 p.27

setSentBy

public void setSentBy(String uri)
Sets a person that is acting on behalf of the person defined in the property.

Parameters:
uri - a URI representing the person (typically, an email URI, e.g. "mailto:janedoe@example.com") or null to remove
Specification Reference:
RFC 5545 p.27

getTimezoneId

public String getTimezoneId()
Gets the timezone identifier. This either (a) references the TimezoneId property of a VTimezone component, or (b) specifies a globally-defined timezone (e.g. "America/New_York"). For a list of globally-defined timezones, see the TZ database.

Returns:
the timezone identifier or null if not set
Specification Reference:
RFC 5545 p.27-8

setTimezoneId

public void setTimezoneId(String timezoneId)
Sets the timezone identifier. This either (a) references the TimezoneId property of a VTimezone component, or (b) specifies a globally-defined timezone (e.g. "America/New_York"). For a list of globally-defined timezones, see the TZ database.

Parameters:
timezoneId - the timezone identifier or null to remove
Specification Reference:
RFC 5545 p.27-8

getValue

public ICalDataType getValue()
Gets the data type of the property's value (for example, "text" or "datetime").

Returns:
the data type or null if not set
Specification Reference:
RFC 5545 p.29-50

setValue

public void setValue(ICalDataType value)
Sets the data type of the property's value (for example, "text" or "datetime").

Parameters:
value - the data type or null to remove
Specification Reference:
RFC 5545 p.29-50

validate

public List<String> validate()
Checks this parameters list for data consistency problems or deviations from the spec. These problems will not prevent the iCalendar object from being written to a data stream, but may prevent it from being parsed correctly by the consuming application.

Returns:
a list of warnings or an empty list if no problems were found

sanitizeKey

protected String sanitizeKey(String key)
Description copied from class: ListMultimap
Modifies a given key before it is used to interact with the internal map. This method is meant to be overridden by child classes if necessary.

Overrides:
sanitizeKey in class ListMultimap<String,String>
Parameters:
key - the key
Returns:
the modified key (by default, the key is returned as-is)


Copyright © 2013 Michael Angstadt. All Rights Reserved.