|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.component.ICalComponent
biweekly.component.VFreeBusy
public class VFreeBusy
Defines a collection of time ranges that describe when the person is available or unavailable.
Examples:
VFreeBusy freebusy = new VFreeBusy(); Date start = ... Date end = ... freebusy.addFreeBusy(FreeBusyType.FREE, start, end); start = ... Duration duration = Duration.builder().hours(2).build(); freebusy.addFreeBusy(FreeBusyType.BUSY, start, duration);
Field Summary |
---|
Fields inherited from class biweekly.component.ICalComponent |
---|
components, properties |
Constructor Summary | |
---|---|
VFreeBusy()
Creates a new free/busy component. |
Method Summary | |
---|---|
void |
addAttendee(Attendee attendee)
Adds a person who is involved in the free/busy entry. |
void |
addComment(Comment comment)
Adds a comment to the free/busy entry. |
Comment |
addComment(String comment)
Adds a comment to the free/busy entry. |
Contact |
addContact(String contact)
Sets the contact for the free/busy entry. |
void |
addFreeBusy(FreeBusy freeBusy)
Adds a list of time periods for which the person is free or busy (for example, "free" between 1pm-3pm and 4pm-5pm). |
FreeBusy |
addFreeBusy(FreeBusyType type,
Date start,
Date end)
Adds a single time period for which the person is free or busy (for example, "free" between 1pm-3pm). |
FreeBusy |
addFreeBusy(FreeBusyType type,
Date start,
Duration duration)
Adds a single time period for which the person is free or busy (for example, "free" for 2 hours after 1pm). |
List<Attendee> |
getAttendees()
Gets the people who are involved in the free/busy entry. |
List<Comment> |
getComments()
Gets the comments attached to the free/busy entry. |
Contact |
getContact()
Gets the contact associated with the free/busy entry. |
DateEnd |
getDateEnd()
Gets the date that the free/busy entry ends. |
DateStart |
getDateStart()
Gets the date that the free/busy entry 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 free/busy
entry was last modified (the LastModified property also holds
this information). |
List<FreeBusy> |
getFreeBusy()
Gets the person's availabilities over certain time periods (for example, "free" between 1pm-3pm, but "busy" between 3pm-4pm). |
Organizer |
getOrganizer()
Gets the person requesting the free/busy time. |
RequestStatus |
getRequestStatus()
Gets the response to a scheduling request. |
Uid |
getUid()
Gets the unique identifier for this free/busy entry. |
Url |
getUrl()
Gets a URL to a resource that contains additional information about the free/busy entry. |
void |
setContact(Contact contact)
Sets the contact for the free/busy entry. |
DateEnd |
setDateEnd(Date dateEnd)
Sets the date that the free/busy entry ends. |
void |
setDateEnd(DateEnd dateEnd)
Sets the date that the free/busy entry ends. |
DateStart |
setDateStart(Date dateStart)
Sets the date that the free/busy entry starts. |
void |
setDateStart(DateStart dateStart)
Sets the date that the free/busy entry starts. |
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 free/busy
entry 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 free/busy
entry was last modified (the LastModified property also holds
this information). |
void |
setOrganizer(Organizer organizer)
Sets the person requesting the free/busy time. |
Organizer |
setOrganizer(String email)
Sets the person requesting the free/busy time. |
void |
setRequestStatus(RequestStatus requestStatus)
Sets the response to a scheduling request. |
Uid |
setUid(String uid)
Sets the unique identifier for this free/busy entry. |
void |
setUid(Uid uid)
Sets the unique identifier for this free/busy entry. |
Url |
setUrl(String url)
Sets a URL to a resource that contains additional information about the free/busy entry. |
void |
setUrl(Url url)
Sets a URL to a resource that contains additional information about the free/busy entry. |
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 VFreeBusy()
Creates a new free/busy component.
The following properties are auto-generated on object creation. These properties must be present in order for the free/busy component 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 free/busy
entry was last modified (the LastModified
property also holds
this information). This free/busy 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 free/busy
entry was last modified (the LastModified
property also holds
this information). This free/busy 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 free/busy
entry was last modified (the LastModified
property also holds
this information). This free/busy 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 Contact getContact()
public void setContact(Contact contact)
contact
- the contact or null to removepublic Contact addContact(String contact)
contact
- the contact (e.g. "ACME Co - (123) 555-1234")
public DateStart getDateStart()
public void setDateStart(DateStart dateStart)
dateStart
- the start date or null to removepublic DateStart setDateStart(Date dateStart)
dateStart
- the start date or null to remove
public DateEnd getDateEnd()
public void setDateEnd(DateEnd dateEnd)
dateEnd
- the end date or null to removepublic DateEnd setDateEnd(Date dateEnd)
dateEnd
- the end date or null to remove
public Organizer getOrganizer()
public void setOrganizer(Organizer organizer)
organizer
- the person requesting the free/busy time or null to
removepublic Organizer setOrganizer(String email)
email
- the email address of the person requesting the free/busy
time (e.g. "johndoe@example.com") 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 List<Attendee> getAttendees()
public void addAttendee(Attendee attendee)
attendee
- the attendeepublic List<Comment> getComments()
public void addComment(Comment comment)
comment
- the comment to addpublic Comment addComment(String comment)
comment
- the comment to add
public List<FreeBusy> getFreeBusy()
public void addFreeBusy(FreeBusy freeBusy)
FreeBusy
property can contain multiple time periods, but only one
availability type (e.g. "busy").
freeBusy
- the availabilitiespublic FreeBusy addFreeBusy(FreeBusyType type, Date start, Date end)
FreeBusyType
and add the time period
to it, or create a new property is one cannot be found.
type
- the availability type (e.g. "free" or "busy")start
- the start date-timeend
- the end date-time
public FreeBusy addFreeBusy(FreeBusyType type, Date start, Duration duration)
FreeBusyType
and add the
time period to it, or create a new property is one cannot be found.
type
- the availability type (e.g. "free" or "busy")start
- the start date-timeduration
- the length of time
public RequestStatus getRequestStatus()
public void setRequestStatus(RequestStatus requestStatus)
requestStatus
- the responseprotected 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 |