|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.component.ICalComponent
biweekly.component.VEvent
public class VEvent
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());
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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:
Uid
- Set to a UUID.DateTimeStamp
- Set to the current date-time.
Method Detail |
---|
public Uid getUid()
public void setUid(Uid uid)
uid
- the UID or null to removepublic Uid setUid(String uid)
uid
- the UID or null to remove
public DateTimeStamp getDateTimeStamp()
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.
public void setDateTimeStamp(DateTimeStamp dateTimeStamp)
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.
dateTimeStamp
- the date time stamp or null to removepublic DateTimeStamp setDateTimeStamp(Date dateTimeStamp)
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.
dateTimeStamp
- the date time stamp or null to remove
public DateStart getDateStart()
public void setDateStart(DateStart dateStart)
Method
property is defined).
dateStart
- the start date or null to removepublic DateStart setDateStart(Date dateStart)
Method
property is defined).
dateStart
- the start date or null to remove
public Classification getClassification()
public void setClassification(Classification classification)
classification
- the classification level or null to removepublic Classification setClassification(String classification)
classification
- the classification level (e.g. "CONFIDENTIAL") or
null to remove
public Description getDescription()
Summary
property.
public void setDescription(Description description)
Summary
property.
description
- the description or null to removepublic Description setDescription(String description)
Summary
property.
description
- the description or null to remove
public Geo getGeo()
public void setGeo(Geo geo)
geo
- the geographical coordinates or null to removepublic Location getLocation()
public void setLocation(Location location)
location
- the location or null to removepublic Location setLocation(String location)
location
- the location (e.g. "Room 101") or null to remove
public Priority getPriority()
public void setPriority(Priority priority)
priority
- the priority or null to removepublic Priority setPriority(Integer priority)
priority
- the priority ("0" is undefined, "1" is the highest, "9"
is the lowest) or null to remove
public Status getStatus()
public void setStatus(Status status)
Valid event status codes are:
status
- the status or null to removepublic Summary getSummary()
public void setSummary(Summary summary)
summary
- the summary or null to removepublic Summary setSummary(String summary)
summary
- the summary or null to remove
public Transparency getTransparency()
public void setTransparency(Transparency transparency)
transparency
- the transparency or null to removepublic Transparency setTransparency(Boolean transparent)
transparent
- true to hide the event, false to make it visible it,
or null to remove the property
public Organizer getOrganizer()
public void setOrganizer(Organizer organizer)
organizer
- the organizer or null to removepublic Organizer setOrganizer(String email)
email
- the organizer's email address (e.g. "johndoe@example.com")
or null to remove
public RecurrenceId getRecurrenceId()
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.
public void setRecurrenceId(RecurrenceId recurrenceId)
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.
recurrenceId
- the recurrence ID or null to removepublic RecurrenceId setRecurrenceId(Date originalStartDate)
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.
originalStartDate
- the original start date or null to remove
public Url getUrl()
public void setUrl(Url url)
url
- the URL or null to removepublic Url setUrl(String url)
url
- the URL (e.g. "http://example.com/resource.ics") or null to
remove
public RecurrenceRule getRecurrenceRule()
public RecurrenceRule setRecurrenceRule(Recurrence recur)
recur
- the recurrence rule or null to remove
public void setRecurrenceRule(RecurrenceRule recurrenceRule)
recurrenceRule
- the recurrence rule or null to removepublic DateEnd getDateEnd()
public void setDateEnd(DateEnd dateEnd)
DurationProperty
is defined.
dateEnd
- the end date or null to removepublic DateEnd setDateEnd(Date dateEnd)
DurationProperty
is defined.
dateEnd
- the end date or null to remove
public DurationProperty getDuration()
public void setDuration(DurationProperty duration)
DateEnd
is defined.
duration
- the duration or null to removepublic DurationProperty setDuration(Duration duration)
DateEnd
is defined.
duration
- the duration or null to remove
public Created getCreated()
public void setCreated(Created created)
created
- the creation date-time or null to removepublic Created setCreated(Date created)
created
- the creation date-time or null to remove
public LastModified getLastModified()
public void setLastModified(LastModified lastModified)
lastModified
- the last modified date or null to removepublic LastModified setLastModified(Date lastModified)
lastModified
- the last modified date or null to remove
public Sequence getSequence()
public void setSequence(Sequence sequence)
sequence
- the sequence numberpublic Sequence setSequence(Integer sequence)
sequence
- the sequence number
public void incrementSequence()
public List<Attachment> getAttachments()
public void addAttachment(Attachment attachment)
attachment
- the attachment to addpublic List<Attendee> getAttendees()
public void addAttendee(Attendee attendee)
attendee
- the attendeepublic Attendee addAttendee(String email)
email
- the attendee's email address
public List<Categories> getCategories()
public void addCategories(Categories categories)
categories
- the categories to addpublic Categories addCategories(String... categories)
categories
- the categories to add
public Categories addCategories(List<String> categories)
categories
- the categories to add
public List<Comment> getComments()
public void addComment(Comment comment)
comment
- the comment to addpublic Comment addComment(String comment)
comment
- the comment to add
public List<Contact> getContacts()
public void addContact(Contact contact)
contact
- the contactpublic Contact addContact(String contact)
contact
- the contact (e.g. "ACME Co - (123) 555-1234")
public List<ExceptionDates> getExceptionDates()
public void addExceptionDates(ExceptionDates exceptionDates)
exceptionDates
- the list of exceptionspublic RequestStatus getRequestStatus()
public void setRequestStatus(RequestStatus requestStatus)
requestStatus
- the responsepublic List<RelatedTo> getRelatedTo()
public void addRelatedTo(RelatedTo relatedTo)
relatedTo
- the relationshippublic RelatedTo addRelatedTo(String uid)
uid
- the UID of the other component
public List<Resources> getResources()
public void addResources(Resources resources)
resources
- the resources to addpublic Resources addResources(String... resources)
resources
- the resources to add (e.g. "easel", "projector")
public Resources addResources(List<String> resources)
resources
- the resources to add (e.g. "easel", "projector")
public List<RecurrenceDates> getRecurrenceDates()
public void addRecurrenceDates(RecurrenceDates recurrenceDates)
recurrenceDates
- the recurrence datespublic List<VAlarm> getAlarms()
public void addAlarm(VAlarm alarm)
alarm
- the alarmpublic 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.
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.
recur
- the exception rule to add
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.
exceptionRule
- the exception rule to addprotected void validate(List<ICalComponent> components, List<String> warnings)
ICalComponent
validate
in class ICalComponent
components
- the hierarchy of components that the component belongs
towarnings
- the list to add the warnings to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |