biweekly.component
Class VEvent

java.lang.Object
  extended by biweekly.component.ICalComponent
      extended by biweekly.component.VEvent

public class VEvent
extends ICalComponent

Defines a scheduled activity, such as a meeting that's two hours long.

Examples:

 VEvent event = new VEvent();
 Date start = ...
 event.setDateStart(start);
 Date end = ...
 event.setDateEnd(end);
 event.setSummary("Team Meeting");
 event.setLocation("Room 21C");
 event.setCreated(new Date());
 event.setRecurrenceRule(new Recurrence.Builder(Frequency.WEEKLY).build());
 

Author:
Michael Angstadt
Specification Reference:
RFC 5545 p.52-5

Field Summary
 
Fields inherited from class biweekly.component.ICalComponent
components, properties
 
Constructor Summary
VEvent()
           Creates a new event.
 
Method Summary
 void addAlarm(VAlarm alarm)
          Adds an alarm to this event.
 void addAttachment(Attachment attachment)
          Adds an attachment to the event.
 void addAttendee(Attendee attendee)
          Adds a person who is attending the event.
 Attendee addAttendee(String email)
          Adds a person who is attending the event.
 void addCategories(Categories categories)
          Adds a list of "tags" or "keywords" that describe the event.
 Categories addCategories(List<String> categories)
          Adds a list of "tags" or "keywords" that describe the event.
 Categories addCategories(String... categories)
          Adds a list of "tags" or "keywords" that describe the event.
 void addComment(Comment comment)
          Adds a comment to the event.
 Comment addComment(String comment)
          Adds a comment to the event.
 void addContact(Contact contact)
          Adds a contact to the event.
 Contact addContact(String contact)
          Adds a contact to the event.
 void addExceptionDates(ExceptionDates exceptionDates)
          Adds a list of exceptions to the recurrence rule defined in the event (if one is defined).
 void addExceptionRule(ExceptionRule exceptionRule)
           Adds an exception for the RecurrenceRule property.
 ExceptionRule addExceptionRule(Recurrence recur)
           Adds an exception for the RecurrenceRule property.
 void addRecurrenceDates(RecurrenceDates recurrenceDates)
          Adds a list of dates/periods that help define the recurrence rule of this event (if one is defined).
 void addRelatedTo(RelatedTo relatedTo)
          Adds a component that the event is related to.
 RelatedTo addRelatedTo(String uid)
          Adds a component that the event is related to.
 Resources addResources(List<String> resources)
          Adds a list of resources that are needed for the event.
 void addResources(Resources resources)
          Adds a list of resources that are needed for the event.
 Resources addResources(String... resources)
          Adds a list of resources that are needed for the event.
 List<VAlarm> getAlarms()
          Gets the alarms that are assigned to this event.
 List<Attachment> getAttachments()
          Gets any attachments that are associated with the event.
 List<Attendee> getAttendees()
          Gets the people who are attending the event.
 List<Categories> getCategories()
          Gets a list of "tags" or "keywords" that describe the event.
 Classification getClassification()
          Gets the level of sensitivity of the event data.
 List<Comment> getComments()
          Gets the comments attached to the event.
 List<Contact> getContacts()
          Gets the contacts associated with the event.
 Created getCreated()
          Gets the date-time that the event was initially created.
 DateEnd getDateEnd()
          Gets the date that the event ends.
 DateStart getDateStart()
          Gets the date that the event starts.
 DateTimeStamp getDateTimeStamp()
          Gets either (a) the creation date of the iCalendar object (if the Method property is defined) or (b) the date that the event was last modified (the LastModified property also holds this information).
 Description getDescription()
          Gets a detailed description of the event.
 DurationProperty getDuration()
          Gets the duration of the event.
 List<ExceptionDates> getExceptionDates()
          Gets the list of exceptions to the recurrence rule defined in the event (if one is defined).
 List<ExceptionRule> getExceptionRules()
           Gets the exceptions for the RecurrenceRule property.
 Geo getGeo()
          Gets a set of geographical coordinates.
 LastModified getLastModified()
          Gets the date-time that the event was last changed.
 Location getLocation()
          Gets the physical location of the event.
 Organizer getOrganizer()
          Gets the organizer of the event.
 Priority getPriority()
          Gets the priority of the event.
 List<RecurrenceDates> getRecurrenceDates()
          Gets the list of dates/periods that help define the recurrence rule of this event (if one is defined).
 RecurrenceId getRecurrenceId()
          Gets the original value of the DateStart property if the event is recurring and has been modified.
 RecurrenceRule getRecurrenceRule()
          Gets how often the event repeats.
 List<RelatedTo> getRelatedTo()
          Gets the components that the event is related to.
 RequestStatus getRequestStatus()
          Gets the response to a scheduling request.
 List<Resources> getResources()
          Gets the resources that are needed for the event.
 Sequence getSequence()
          Gets the revision number of the event.
 Status getStatus()
          Gets the status of the event.
 Summary getSummary()
          Gets the summary of the event.
 Transparency getTransparency()
          Gets whether an event is visible to free/busy time searches.
 Uid getUid()
          Gets the unique identifier for this event.
 Url getUrl()
          Gets a URL to a resource that contains additional information about the event.
 void incrementSequence()
          Increments the revision number of the event.
 void setClassification(Classification classification)
          Sets the level of sensitivity of the event data.
 Classification setClassification(String classification)
          Sets the level of sensitivity of the event data.
 void setCreated(Created created)
          Sets the date-time that the event was initially created.
 Created setCreated(Date created)
          Sets the date-time that the event was initially created.
 DateEnd setDateEnd(Date dateEnd)
          Sets the date that the event ends.
 void setDateEnd(DateEnd dateEnd)
          Sets the date that the event ends.
 DateStart setDateStart(Date dateStart)
          Sets the date that the event starts (required if no Method property is defined).
 void setDateStart(DateStart dateStart)
          Sets the date that the event starts (required if no Method property is defined).
 DateTimeStamp setDateTimeStamp(Date dateTimeStamp)
          Sets either (a) the creation date of the iCalendar object (if the Method property is defined) or (b) the date that the event was last modified (the LastModified property also holds this information).
 void setDateTimeStamp(DateTimeStamp dateTimeStamp)
          Sets either (a) the creation date of the iCalendar object (if the Method property is defined) or (b) the date that the event was last modified (the LastModified property also holds this information).
 void setDescription(Description description)
          Sets a detailed description of the event.
 Description setDescription(String description)
          Sets a detailed description of the event.
 DurationProperty setDuration(Duration duration)
          Sets the duration of the event.
 void setDuration(DurationProperty duration)
          Sets the duration of the event.
 void setGeo(Geo geo)
          Sets a set of geographical coordinates.
 LastModified setLastModified(Date lastModified)
          Sets the date-time that the event was last changed.
 void setLastModified(LastModified lastModified)
          Sets the date-time that event was last changed.
 void setLocation(Location location)
          Sets the physical location of the event.
 Location setLocation(String location)
          Sets the physical location of the event.
 void setOrganizer(Organizer organizer)
          Sets the organizer of the event.
 Organizer setOrganizer(String email)
          Sets the organizer of the event.
 Priority setPriority(Integer priority)
          Sets the priority of the event.
 void setPriority(Priority priority)
          Sets the priority of the event.
 RecurrenceId setRecurrenceId(Date originalStartDate)
          Sets the original value of the DateStart property if the event is recurring and has been modified.
 void setRecurrenceId(RecurrenceId recurrenceId)
          Sets the original value of the DateStart property if the event is recurring and has been modified.
 RecurrenceRule setRecurrenceRule(Recurrence recur)
          Sets how often the event repeats.
 void setRecurrenceRule(RecurrenceRule recurrenceRule)
          Sets how often the event repeats.
 void setRequestStatus(RequestStatus requestStatus)
          Sets the response to a scheduling request.
 Sequence setSequence(Integer sequence)
          Sets the revision number of the event.
 void setSequence(Sequence sequence)
          Sets the revision number of the event.
 void setStatus(Status status)
          Sets the status of the event.
 Summary setSummary(String summary)
          Sets the summary of the event.
 void setSummary(Summary summary)
          Sets the summary of the event.
 Transparency setTransparency(Boolean transparent)
          Sets whether an event is visible to free/busy time searches.
 void setTransparency(Transparency transparency)
          Sets whether an event is visible to free/busy time searches.
 Uid setUid(String uid)
          Sets the unique identifier for this event.
 void setUid(Uid uid)
          Sets the unique identifier for this event.
 Url setUrl(String url)
          Sets a URL to a resource that contains additional information about the event.
 void setUrl(Url url)
          Sets a URL to a resource that contains additional information about the event.
protected  void validate(List<ICalComponent> components, List<String> warnings)
          Checks the component for data consistency problems or deviations from the spec.
 
Methods inherited from class biweekly.component.ICalComponent
addComponent, addExperimentalComponent, addExperimentalProperty, addExperimentalProperty, addProperty, checkOptionalCardinality, checkRequiredCardinality, getComponent, getComponents, getComponents, getExperimentalComponent, getExperimentalComponents, getExperimentalComponents, getExperimentalProperties, getExperimentalProperties, getExperimentalProperty, getProperties, getProperties, getProperty, removeExperimentalComponents, removeExperimentalProperty, removeProperties, setComponent, setComponent, setExperimentalComponents, setExperimentalProperty, setExperimentalProperty, setProperty, setProperty, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VEvent

public VEvent()

Creates a new event.

The following properties are auto-generated on object creation. These properties must be present in order for the event to be valid:

Method Detail

getUid

public Uid getUid()
Gets the unique identifier for this event. This component object comes populated with a UID on creation. This is a required property.

Returns:
the UID or null if not set
Specification Reference:
RFC 5545 p.117-8

setUid

public void setUid(Uid uid)
Sets the unique identifier for this event. This component object comes populated with a UID on creation. This is a required property.

Parameters:
uid - the UID or null to remove
Specification Reference:
RFC 5545 p.117-8

setUid

public Uid setUid(String uid)
Sets the unique identifier for this event. This component object comes populated with a UID on creation. This is a required property.

Parameters:
uid - the UID or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.117-8

getDateTimeStamp

public DateTimeStamp getDateTimeStamp()
Gets either (a) the creation date of the iCalendar object (if the Method property is defined) or (b) the date that the event was last modified (the LastModified property also holds this information). This event object comes populated with a DateTimeStamp property that is set to the current time. This is a required property.

Returns:
the date time stamp or null if not set
Specification Reference:
RFC 5545 p.137-8

setDateTimeStamp

public void setDateTimeStamp(DateTimeStamp dateTimeStamp)
Sets either (a) the creation date of the iCalendar object (if the Method property is defined) or (b) the date that the event was last modified (the LastModified property also holds this information). This event object comes populated with a DateTimeStamp property that is set to the current time. This is a required property.

Parameters:
dateTimeStamp - the date time stamp or null to remove
Specification Reference:
RFC 5545 p.137-8

setDateTimeStamp

public DateTimeStamp setDateTimeStamp(Date dateTimeStamp)
Sets either (a) the creation date of the iCalendar object (if the Method property is defined) or (b) the date that the event was last modified (the LastModified property also holds this information). This event object comes populated with a DateTimeStamp property that is set to the current time. This is a required property.

Parameters:
dateTimeStamp - the date time stamp or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.137-8

getDateStart

public DateStart getDateStart()
Gets the date that the event starts.

Returns:
the start date or null if not set
Specification Reference:
RFC 5545 p.97-8

setDateStart

public void setDateStart(DateStart dateStart)
Sets the date that the event starts (required if no Method property is defined).

Parameters:
dateStart - the start date or null to remove
Specification Reference:
RFC 5545 p.97-8

setDateStart

public DateStart setDateStart(Date dateStart)
Sets the date that the event starts (required if no Method property is defined).

Parameters:
dateStart - the start date or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.97-8

getClassification

public Classification getClassification()
Gets the level of sensitivity of the event data. If not specified, the data within the event should be considered "public".

Returns:
the classification level or null if not set
Specification Reference:
RFC 5545 p.82-3

setClassification

public void setClassification(Classification classification)
Sets the level of sensitivity of the event data. If not specified, the data within the event should be considered "public".

Parameters:
classification - the classification level or null to remove
Specification Reference:
RFC 5545 p.82-3

setClassification

public Classification setClassification(String classification)
Sets the level of sensitivity of the event data. If not specified, the data within the event should be considered "public".

Parameters:
classification - the classification level (e.g. "CONFIDENTIAL") or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.82-3

getDescription

public Description getDescription()
Gets a detailed description of the event. The description should be more detailed than the one provided by the Summary property.

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

setDescription

public void setDescription(Description description)
Sets a detailed description of the event. The description should be more detailed than the one provided by the Summary property.

Parameters:
description - the description or null to remove
Specification Reference:
RFC 5545 p.84-5

setDescription

public Description setDescription(String description)
Sets a detailed description of the event. The description should be more detailed than the one provided by the Summary property.

Parameters:
description - the description or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.84-5

getGeo

public Geo getGeo()
Gets a set of geographical coordinates.

Returns:
the geographical coordinates or null if not set
Specification Reference:
RFC 5545 p.85-7

setGeo

public void setGeo(Geo geo)
Sets a set of geographical coordinates.

Parameters:
geo - the geographical coordinates or null to remove
Specification Reference:
RFC 5545 p.85-7

getLocation

public Location getLocation()
Gets the physical location of the event.

Returns:
the location or null if not set
Specification Reference:
RFC 5545 p.87-8

setLocation

public void setLocation(Location location)
Sets the physical location of the event.

Parameters:
location - the location or null to remove
Specification Reference:
RFC 5545 p.87-8

setLocation

public Location setLocation(String location)
Sets the physical location of the event.

Parameters:
location - the location (e.g. "Room 101") or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.87-8

getPriority

public Priority getPriority()
Gets the priority of the event.

Returns:
the priority or null if not set
Specification Reference:
RFC 5545 p.89-90

setPriority

public void setPriority(Priority priority)
Sets the priority of the event.

Parameters:
priority - the priority or null to remove
Specification Reference:
RFC 5545 p.89-90

setPriority

public Priority setPriority(Integer priority)
Sets the priority of the event.

Parameters:
priority - the priority ("0" is undefined, "1" is the highest, "9" is the lowest) or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.89-90

getStatus

public Status getStatus()
Gets the status of the event.

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

setStatus

public void setStatus(Status status)
Sets the status of the event.

Valid event status codes are:

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

getSummary

public Summary getSummary()
Gets the summary of the event.

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

setSummary

public void setSummary(Summary summary)
Sets the summary of the event.

Parameters:
summary - the summary or null to remove
Specification Reference:
RFC 5545 p.93-4

setSummary

public Summary setSummary(String summary)
Sets the summary of the event.

Parameters:
summary - the summary or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.93-4

getTransparency

public Transparency getTransparency()
Gets whether an event is visible to free/busy time searches. If the event does not have this property, it should be considered visible ("opaque").

Returns:
the transparency or null if not set
Specification Reference:
RFC 5545 p.101-2

setTransparency

public void setTransparency(Transparency transparency)
Sets whether an event is visible to free/busy time searches.

Parameters:
transparency - the transparency or null to remove
Specification Reference:
RFC 5545 p.101-2

setTransparency

public Transparency setTransparency(Boolean transparent)
Sets whether an event is visible to free/busy time searches.

Parameters:
transparent - true to hide the event, false to make it visible it, or null to remove the property
Returns:
the property that was created
Specification Reference:
RFC 5545 p.101-2

getOrganizer

public Organizer getOrganizer()
Gets the organizer of the event.

Returns:
the organizer or null if not set
Specification Reference:
RFC 5545 p.111-2

setOrganizer

public void setOrganizer(Organizer organizer)
Sets the organizer of the event.

Parameters:
organizer - the organizer or null to remove
Specification Reference:
RFC 5545 p.111-2

setOrganizer

public Organizer setOrganizer(String email)
Sets the organizer of the event.

Parameters:
email - the organizer's email address (e.g. "johndoe@example.com") or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.111-2

getRecurrenceId

public RecurrenceId getRecurrenceId()
Gets the original value of the DateStart property if the event is recurring and has been modified. Used in conjunction with the Uid and Sequence properties to uniquely identify a recurrence instance.

Returns:
the recurrence ID or null if not set
Specification Reference:
RFC 5545 p.112-4

setRecurrenceId

public void setRecurrenceId(RecurrenceId recurrenceId)
Sets the original value of the DateStart property if the event is recurring and has been modified. Used in conjunction with the Uid and Sequence properties to uniquely identify a recurrence instance.

Parameters:
recurrenceId - the recurrence ID or null to remove
Specification Reference:
RFC 5545 p.112-4

setRecurrenceId

public RecurrenceId setRecurrenceId(Date originalStartDate)
Sets the original value of the DateStart property if the event is recurring and has been modified. Used in conjunction with the Uid and Sequence properties to uniquely identify a recurrence instance.

Parameters:
originalStartDate - the original start date or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.112-4

getUrl

public Url getUrl()
Gets a URL to a resource that contains additional information about the event.

Returns:
the URL or null if not set
Specification Reference:
RFC 5545 p.116-7

setUrl

public void setUrl(Url url)
Sets a URL to a resource that contains additional information about the event.

Parameters:
url - the URL or null to remove
Specification Reference:
RFC 5545 p.116-7

setUrl

public Url setUrl(String url)
Sets a URL to a resource that contains additional information about the event.

Parameters:
url - the URL (e.g. "http://example.com/resource.ics") or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.116-7

getRecurrenceRule

public RecurrenceRule getRecurrenceRule()
Gets how often the event repeats.

Returns:
the recurrence rule or null if not set
Specification Reference:
RFC 5545 p.122-32

setRecurrenceRule

public RecurrenceRule setRecurrenceRule(Recurrence recur)
Sets how often the event repeats.

Parameters:
recur - the recurrence rule or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.122-32

setRecurrenceRule

public void setRecurrenceRule(RecurrenceRule recurrenceRule)
Sets how often the event repeats.

Parameters:
recurrenceRule - the recurrence rule or null to remove
Specification Reference:
RFC 5545 p.122-32

getDateEnd

public DateEnd getDateEnd()
Gets the date that the event ends.

Returns:
the end date or null if not set
Specification Reference:
RFC 5545 p.95-6

setDateEnd

public void setDateEnd(DateEnd dateEnd)
Sets the date that the event ends. This must NOT be set if a DurationProperty is defined.

Parameters:
dateEnd - the end date or null to remove
Specification Reference:
RFC 5545 p.95-6

setDateEnd

public DateEnd setDateEnd(Date dateEnd)
Sets the date that the event ends. This must NOT be set if a DurationProperty is defined.

Parameters:
dateEnd - the end date or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.95-6

getDuration

public DurationProperty getDuration()
Gets the duration of the event.

Returns:
the duration or null if not set
Specification Reference:
RFC 5545 p.99

setDuration

public void setDuration(DurationProperty duration)
Sets the duration of the event. This must NOT be set if a DateEnd is defined.

Parameters:
duration - the duration or null to remove
Specification Reference:
RFC 5545 p.99

setDuration

public DurationProperty setDuration(Duration duration)
Sets the duration of the event. This must NOT be set if a DateEnd is defined.

Parameters:
duration - the duration or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.99

getCreated

public Created getCreated()
Gets the date-time that the event was initially created.

Returns:
the creation date-time or null if not set
Specification Reference:
RFC 5545 p.136

setCreated

public void setCreated(Created created)
Sets the date-time that the event was initially created.

Parameters:
created - the creation date-time or null to remove
Specification Reference:
RFC 5545 p.136

setCreated

public Created setCreated(Date created)
Sets the date-time that the event was initially created.

Parameters:
created - the creation date-time or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.136

getLastModified

public LastModified getLastModified()
Gets the date-time that the event was last changed.

Returns:
the last modified date or null if not set
Specification Reference:
RFC 5545 p.138

setLastModified

public void setLastModified(LastModified lastModified)
Sets the date-time that event was last changed.

Parameters:
lastModified - the last modified date or null to remove
Specification Reference:
RFC 5545 p.138

setLastModified

public LastModified setLastModified(Date lastModified)
Sets the date-time that the event was last changed.

Parameters:
lastModified - the last modified date or null to remove
Returns:
the property that was created
Specification Reference:
RFC 5545 p.138

getSequence

public Sequence getSequence()
Gets the revision number of the event. The organizer can increment this number every time he or she makes a significant change.

Returns:
the sequence number
Specification Reference:
RFC 5545 p.138-9

setSequence

public void setSequence(Sequence sequence)
Sets the revision number of the event. The organizer can increment this number every time he or she makes a significant change.

Parameters:
sequence - the sequence number
Specification Reference:
RFC 5545 p.138-9

setSequence

public Sequence setSequence(Integer sequence)
Sets the revision number of the event. The organizer can increment this number every time he or she makes a significant change.

Parameters:
sequence - the sequence number
Returns:
the property that was created
Specification Reference:
RFC 5545 p.138-9

incrementSequence

public void incrementSequence()
Increments the revision number of the event. The organizer can increment this number every time he or she makes a significant change.

Specification Reference:
RFC 5545 p.138-9

getAttachments

public List<Attachment> getAttachments()
Gets any attachments that are associated with the event.

Returns:
the attachments
Specification Reference:
RFC 5545 p.80-1

addAttachment

public void addAttachment(Attachment attachment)
Adds an attachment to the event.

Parameters:
attachment - the attachment to add
Specification Reference:
RFC 5545 p.80-1

getAttendees

public List<Attendee> getAttendees()
Gets the people who are attending the event.

Returns:
the attendees
Specification Reference:
RFC 5545 p.107-9

addAttendee

public void addAttendee(Attendee attendee)
Adds a person who is attending the event.

Parameters:
attendee - the attendee
Specification Reference:
RFC 5545 p.107-9

addAttendee

public Attendee addAttendee(String email)
Adds a person who is attending the event.

Parameters:
email - the attendee's email address
Returns:
the property that was created
Specification Reference:
RFC 5545 p.107-9

getCategories

public List<Categories> getCategories()
Gets a list of "tags" or "keywords" that describe the event.

Returns:
the categories
Specification Reference:
RFC 5545 p.81-2

addCategories

public void addCategories(Categories categories)
Adds a list of "tags" or "keywords" that describe the event. Note that a single property can hold multiple keywords.

Parameters:
categories - the categories to add
Specification Reference:
RFC 5545 p.81-2

addCategories

public Categories addCategories(String... categories)
Adds a list of "tags" or "keywords" that describe the event.

Parameters:
categories - the categories to add
Returns:
the property that was created
Specification Reference:
RFC 5545 p.81-2

addCategories

public Categories addCategories(List<String> categories)
Adds a list of "tags" or "keywords" that describe the event.

Parameters:
categories - the categories to add
Returns:
the property that was created
Specification Reference:
RFC 5545 p.81-2

getComments

public List<Comment> getComments()
Gets the comments attached to the event.

Returns:
the comments
Specification Reference:
RFC 5545 p.83-4

addComment

public void addComment(Comment comment)
Adds a comment to the event.

Parameters:
comment - the comment to add
Specification Reference:
RFC 5545 p.83-4

addComment

public Comment addComment(String comment)
Adds a comment to the event.

Parameters:
comment - the comment to add
Returns:
the property that was created
Specification Reference:
RFC 5545 p.83-4

getContacts

public List<Contact> getContacts()
Gets the contacts associated with the event.

Returns:
the contacts
Specification Reference:
RFC 5545 p.109-11

addContact

public void addContact(Contact contact)
Adds a contact to the event.

Parameters:
contact - the contact
Specification Reference:
RFC 5545 p.109-11

addContact

public Contact addContact(String contact)
Adds a contact to the event.

Parameters:
contact - the contact (e.g. "ACME Co - (123) 555-1234")
Returns:
the property that was created
Specification Reference:
RFC 5545 p.109-11

getExceptionDates

public List<ExceptionDates> getExceptionDates()
Gets the list of exceptions to the recurrence rule defined in the event (if one is defined).

Returns:
the list of exceptions
Specification Reference:
RFC 5545 p.118-20

addExceptionDates

public void addExceptionDates(ExceptionDates exceptionDates)
Adds a list of exceptions to the recurrence rule defined in the event (if one is defined). Note that this property can contain multiple dates.

Parameters:
exceptionDates - the list of exceptions
Specification Reference:
RFC 5545 p.118-20

getRequestStatus

public RequestStatus getRequestStatus()
Gets the response to a scheduling request.

Returns:
the response
Specification Reference:
RFC 5545 p.141-3

setRequestStatus

public void setRequestStatus(RequestStatus requestStatus)
Sets the response to a scheduling request.

Parameters:
requestStatus - the response
Specification Reference:
RFC 5545 p.141-3

getRelatedTo

public List<RelatedTo> getRelatedTo()
Gets the components that the event is related to.

Returns:
the relationships
Specification Reference:
RFC 5545 p.115-6

addRelatedTo

public void addRelatedTo(RelatedTo relatedTo)
Adds a component that the event is related to.

Parameters:
relatedTo - the relationship
Specification Reference:
RFC 5545 p.115-6

addRelatedTo

public RelatedTo addRelatedTo(String uid)
Adds a component that the event is related to.

Parameters:
uid - the UID of the other component
Returns:
the property that was created
Specification Reference:
RFC 5545 p.115-6

getResources

public List<Resources> getResources()
Gets the resources that are needed for the event.

Returns:
the resources
Specification Reference:
RFC 5545 p.91

addResources

public void addResources(Resources resources)
Adds a list of resources that are needed for the event. Note that a single property can hold multiple resources.

Parameters:
resources - the resources to add
Specification Reference:
RFC 5545 p.91

addResources

public Resources addResources(String... resources)
Adds a list of resources that are needed for the event.

Parameters:
resources - the resources to add (e.g. "easel", "projector")
Returns:
the property that was created
Specification Reference:
RFC 5545 p.91

addResources

public Resources addResources(List<String> resources)
Adds a list of resources that are needed for the event.

Parameters:
resources - the resources to add (e.g. "easel", "projector")
Returns:
the property that was created
Specification Reference:
RFC 5545 p.91

getRecurrenceDates

public List<RecurrenceDates> getRecurrenceDates()
Gets the list of dates/periods that help define the recurrence rule of this event (if one is defined).

Returns:
the recurrence dates
Specification Reference:
RFC 5545 p.120-2

addRecurrenceDates

public void addRecurrenceDates(RecurrenceDates recurrenceDates)
Adds a list of dates/periods that help define the recurrence rule of this event (if one is defined).

Parameters:
recurrenceDates - the recurrence dates
Specification Reference:
RFC 5545 p.120-2

getAlarms

public List<VAlarm> getAlarms()
Gets the alarms that are assigned to this event.

Returns:
the alarms
Specification Reference:
RFC 5545 p.71-6

addAlarm

public void addAlarm(VAlarm alarm)
Adds an alarm to this event.

Parameters:
alarm - the alarm
Specification Reference:
RFC 5545 p.71-6

getExceptionRules

public List<ExceptionRule> getExceptionRules()

Gets the exceptions for the RecurrenceRule property.

Note that this property has been removed from the latest version of the iCal specification. Its use should be avoided.

Returns:
the exception rules
Specification Reference:
RFC 2445 p.114-15

addExceptionRule

public ExceptionRule addExceptionRule(Recurrence recur)

Adds an exception for the RecurrenceRule property.

Note that this property has been removed from the latest version of the iCal specification. Its use should be avoided.

Parameters:
recur - the exception rule to add
Returns:
the property that was created
Specification Reference:
RFC 2445 p.114-15

addExceptionRule

public void addExceptionRule(ExceptionRule exceptionRule)

Adds an exception for the RecurrenceRule property.

Note that this property has been removed from the latest version of the iCal specification. Its use should be avoided.

Parameters:
exceptionRule - the exception rule to add
Specification Reference:
RFC 2445 p.114-15

validate

protected void validate(List<ICalComponent> components,
                        List<String> warnings)
Description copied from class: ICalComponent
Checks the component for data consistency problems or deviations from the spec. Meant to be overridden by child classes.

Overrides:
validate in class ICalComponent
Parameters:
components - the hierarchy of components that the component belongs to
warnings - the list to add the warnings to


Copyright © 2013 Michael Angstadt. All Rights Reserved.