com.funambol.common.pim.model.calendar
Class CalendarContent

java.lang.Object
  extended by com.funambol.common.pim.model.calendar.CalendarContent
Direct Known Subclasses:
Event, Task

public abstract class CalendarContent
extends java.lang.Object

This class represents the common features of PIM events and tasks (todo's). It's an abstract class because its type can be defined only when one of its subclasses is instantiated.

Version:
$Id: CalendarContent.java,v 1.7 2008-07-17 15:53:15 luigiafassina Exp $

Field Summary
protected  Property accessClass
           
protected  java.lang.Boolean allDay
           
protected  java.util.List<Attendee> attendees
           
protected  java.lang.Short busyStatus
           
protected  Property categories
           
protected  Property contact
           
protected  PropertyWithTimeZone created
           
protected  PropertyWithTimeZone dalarm
           
protected  Property description
           
protected  PropertyWithTimeZone dtEnd
           
protected  PropertyWithTimeZone dtStamp
           
protected  PropertyWithTimeZone dtStart
           
protected  Property duration
           
protected  Property folder
           
protected  PropertyWithTimeZone lastModified
           
protected  Property latitude
           
protected  Property location
           
protected  Property longitude
           
protected  java.lang.Short meetingStatus
           
protected  java.lang.Integer mileage
           
protected  Property organizer
           
protected  PropertyWithTimeZone palarm
           
protected  Property priority
           
protected  RecurrencePattern recurrencePattern
           
protected  Reminder reminder
           
protected  Property sequence
           
protected  Property status
           
protected  Property summary
           
protected  Property uid
           
protected  Property url
           
protected  java.util.List<XTag> xTags
           
 
Constructor Summary
CalendarContent()
          Creates a new empty instance of CalendarContent.
 
Method Summary
 void addAttendee(Attendee attendee)
          Adds an attendee to the list.
 void addXTag(XTag xTag)
          Adds a custom X-tag to the xTags list.
 long[] extractInterval()
          Extracts a time interval roughly large enough to contain the whole event/task and, in case it's a recurrent one, all its occurrences.
 Property getAccessClass()
          Returns the access classification for a calendar component.
 java.lang.Boolean getAllDay()
          Deprecated. The null case does not have a clear semantics. Method isAllDay (returning a boolean instead of a Boolean) is clearer and must be used instead of this.
 java.util.List<Attendee> getAttendees()
          Gets the attendee list.
 java.lang.Short getBusyStatus()
          Returns the busy status of the calendar item.
 Property getCategories()
          Returns the categories this calendar item belongs to.
 Property getContact()
          Returns the contact information or alternately a reference to contact information associated with the calendar component.
 PropertyWithTimeZone getCreated()
          Returns the date and time that the calendar information was created.
 PropertyWithTimeZone getDAlarm()
          Deprecated. This information is too strictly related to a particular representation of the data than the data itself. The display reminder will be supported in a future version as a special case of the reminder property, represented by a Reminder object.
 Property getDescription()
          Returns the most complete description of the calendar component.
 PropertyWithTimeZone getDtEnd()
          Returns the end date and time for the event, or the due date and time for the task.
 PropertyWithTimeZone getDtStamp()
          Deprecated. This information is too strictly related to a particular representation of the data than the data itself. The created property can be used to indicate the creation time of the calendar item without any reference to the iCalendar format.
 PropertyWithTimeZone getDtStart()
          Returns the start date and time for the calendar item.
 Property getDuration()
          Returns the duration of the event or task.
 Property getFolder()
          Returns the folder where this calendar item has to be stored.
 PropertyWithTimeZone getLastModified()
          Returns the date and time of the last revision of this calendar item.
 Property getLatitude()
          Returns the latitude of the location of this event or task.
 Property getLocation()
          Returns the location of this calendar item.
 Property getLongitude()
          Returns the longitude of the location of this event or task.
 java.lang.Short getMeetingStatus()
          Returns the meeting status of the calendar item.
 java.lang.Integer getMileage()
          Returns the mileage attached to this calendar item.
 Property getOrganizer()
          Returns the organizer for the event or task.
 PropertyWithTimeZone getPAlarm()
          Deprecated. This information is too strictly related to a particular representation of the data than the data itself. The procedure reminder will be supported in a future version as a special case of the reminder property, represented by a Reminder object.
 Property getPriority()
          Returns the relative priority for the calendar item.
 RecurrencePattern getRecurrencePattern()
          Returns the calendar item's recurrence pattern.
 Reminder getReminder()
          Getter for property reminder.
 Property getSequence()
          Returns the revision sequence number.
 Property getStatus()
          Returns the status of the calendar item.
 Property getSummary()
          Returns the summary.
 Property getUid()
          Returns the unique ID of this calendar item.
 Property getUrl()
          Returns the url for the calendar item.
 java.util.List<XTag> getXTags()
          Returns a list of custom tags.
 boolean isAllDay()
          Returns the all-day flag of the calendar item.
 boolean isRecurrent()
          Returns whether this event is recurrent or not, i.e.
 void removeRecurrence()
          Makes this event not recurrent by removing its recurrence pattern.
 void resetAttendees()
          Clears the attendee list.
 void setAccessClass(Property accessClass)
          Setter for property accessClass.
 void setAllDay(boolean allDay)
          Sets the all-day flag.
 void setAllDay(java.lang.Boolean allDay)
          Setter for property allDay.
 void setBusyStatus(java.lang.Short busyStatus)
          Setter for property busyStatus.
 void setCategories(Property categories)
          Setter for property categories.
 void setContact(Property contact)
          Setter for property contact.
 void setCreated(Property created)
          Setter for property created.
 void setCreated(PropertyWithTimeZone created)
          Setter for property created.
 void setDAlarm(Property dalarm)
          Setter for property dalarm on the basis of a Property (without time zone).
 void setDAlarm(PropertyWithTimeZone dalarm)
          Setter for property dalarm.
 void setDescription(Property description)
          Setter for property description.
 void setDtEnd(Property dtEnd)
          Setter for property dtEnd.
 void setDtEnd(PropertyWithTimeZone dtEnd)
          Setter for property dtEnd.
 void setDtStamp(Property dtStamp)
          Setter for property dtStamp.
 void setDtStamp(PropertyWithTimeZone dtStamp)
          Setter for property dtStamp.
 void setDtStart(Property dtStart)
          Setter for property dtStart.
 void setDtStart(PropertyWithTimeZone dtStart)
          Setter for property dtStart.
 void setDuration(Property duration)
          Setter for property duration.
 void setFolder(Property folder)
          Setter for property folder.
 void setLastModified(Property lastModified)
          Setter for property lastModified.
 void setLastModified(PropertyWithTimeZone lastModified)
          Setter for property lastModified.
 void setLatitude(Property latitude)
          Setter for property latitude.
 void setLocation(Property location)
          Setter for property location.
 void setLongitude(Property longitude)
          Setter for property longitude.
 void setMeetingStatus(java.lang.Short meetingStatus)
          Setter for property meetingStatus.
 void setMileage(java.lang.Integer mileage)
          Setter for property mileage.
 void setOrganizer(Property organizer)
          Setter for property organizer.
 void setPAlarm(Property palarm)
          Setter for property palarm on the basis of a Property (without time zone).
 void setPAlarm(PropertyWithTimeZone palarm)
          Setter for property palarm.
 void setPriority(Property priority)
          Setter for property priority.
 void setRecurrencePattern(RecurrencePattern recurrencePattern)
          Setter for property recurrencePattern.
 void setReminder(Reminder reminder)
          Setter for property reminder.
 void setSequence(Property sequence)
          Setter for property sequence.
 void setStatus(Property status)
          Setter for property status.
 void setSummary(Property summary)
          Setter for property summary.
 void setUid(Property uid)
          Setter for property uid.
 void setUrl(Property url)
          Setter for property url.
 void setXTag(java.util.List xTags)
          Setter for property xTags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dalarm

protected PropertyWithTimeZone dalarm

palarm

protected PropertyWithTimeZone palarm

categories

protected Property categories

accessClass

protected Property accessClass

description

protected Property description

latitude

protected Property latitude

longitude

protected Property longitude

location

protected Property location

priority

protected Property priority

status

protected Property status

summary

protected Property summary

dtEnd

protected PropertyWithTimeZone dtEnd

dtStart

protected PropertyWithTimeZone dtStart

duration

protected Property duration

organizer

protected Property organizer

url

protected Property url

uid

protected Property uid

contact

protected Property contact

created

protected PropertyWithTimeZone created

dtStamp

protected PropertyWithTimeZone dtStamp

lastModified

protected PropertyWithTimeZone lastModified

sequence

protected Property sequence

folder

protected Property folder

xTags

protected java.util.List<XTag> xTags

allDay

protected java.lang.Boolean allDay

mileage

protected java.lang.Integer mileage

meetingStatus

protected java.lang.Short meetingStatus

busyStatus

protected java.lang.Short busyStatus

reminder

protected Reminder reminder

recurrencePattern

protected RecurrencePattern recurrencePattern

attendees

protected java.util.List<Attendee> attendees
Constructor Detail

CalendarContent

public CalendarContent()
Creates a new empty instance of CalendarContent.

Method Detail

getAccessClass

public Property getAccessClass()
Returns the access classification for a calendar component.

Returns:
the accessClass property

getCreated

public PropertyWithTimeZone getCreated()
Returns the date and time that the calendar information was created.

Returns:
the created property

getDescription

public Property getDescription()
Returns the most complete description of the calendar component.

Returns:
the description property

getDtStart

public PropertyWithTimeZone getDtStart()
Returns the start date and time for the calendar item.

Returns:
the dtStart property

getLatitude

public Property getLatitude()
Returns the latitude of the location of this event or task.

Returns:
the latitude property

getLongitude

public Property getLongitude()
Returns the longitude of the location of this event or task.

Returns:
the longitude property

getLastModified

public PropertyWithTimeZone getLastModified()
Returns the date and time of the last revision of this calendar item.

Returns:
the lastModified property

getLocation

public Property getLocation()
Returns the location of this calendar item.

Returns:
the location property

getOrganizer

public Property getOrganizer()
Returns the organizer for the event or task.

Returns:
the organizer property

getPriority

public Property getPriority()
Returns the relative priority for the calendar item.

Returns:
the priority property

getDtStamp

public PropertyWithTimeZone getDtStamp()
Deprecated. This information is too strictly related to a particular representation of the data than the data itself. The created property can be used to indicate the creation time of the calendar item without any reference to the iCalendar format.

Returns the date and time that the iCalendar representation of the calendar item was created.

Returns:
the dtStamp property

getSequence

public Property getSequence()
Returns the revision sequence number.

Returns:
the sequence property

getStatus

public Property getStatus()
Returns the status of the calendar item.

Returns:
the status property

getUid

public Property getUid()
Returns the unique ID of this calendar item. This is not the internal ID of the DS server, but an ID set by the original system where this item was created. Its uniqueness cannot actually be guaranteed across the synchronisation.

Returns:
the uid property

getUrl

public Property getUrl()
Returns the url for the calendar item.

Returns:
the url property

getDtEnd

public PropertyWithTimeZone getDtEnd()
Returns the end date and time for the event, or the due date and time for the task.

Returns:
the dtEnd property

getDuration

public Property getDuration()
Returns the duration of the event or task.

Returns:
the duration property

getSummary

public Property getSummary()
Returns the summary.

Returns:
the summary property

getCategories

public Property getCategories()
Returns the categories this calendar item belongs to.

Returns:
the categories property

getContact

public Property getContact()
Returns the contact information or alternately a reference to contact information associated with the calendar component.

Returns:
the contact property

getXTags

public java.util.List<XTag> getXTags()
Returns a list of custom tags.

Returns:
a List of XTag objects

getDAlarm

public PropertyWithTimeZone getDAlarm()
Deprecated. This information is too strictly related to a particular representation of the data than the data itself. The display reminder will be supported in a future version as a special case of the reminder property, represented by a Reminder object.

Returns the display reminder (i.e. a visual alarm).

Returns:
the dalarm property

getPAlarm

public PropertyWithTimeZone getPAlarm()
Deprecated. This information is too strictly related to a particular representation of the data than the data itself. The procedure reminder will be supported in a future version as a special case of the reminder property, represented by a Reminder object.

Returns the procedure reminder (i.e. an alarm that launches a procedure).

Returns:
the palarm property

isAllDay

public boolean isAllDay()
Returns the all-day flag of the calendar item.

Returns:
true if the event is all-day, false if it is timed; if the allDay property is not set, false is returned by default

getAllDay

public java.lang.Boolean getAllDay()
Deprecated. The null case does not have a clear semantics. Method isAllDay (returning a boolean instead of a Boolean) is clearer and must be used instead of this.

Getter for property allDay.

Returns:
the allDay property (may be null)

setAllDay

public void setAllDay(java.lang.Boolean allDay)
Setter for property allDay.

Parameters:
allDay - new value of property allDay

setAllDay

public void setAllDay(boolean allDay)
Sets the all-day flag.

Parameters:
allDay - a boolean that will be stored in the allDay property (a Boolean object)

getMeetingStatus

public java.lang.Short getMeetingStatus()
Returns the meeting status of the calendar item.

Returns:
value of property meetingStatus

setMeetingStatus

public void setMeetingStatus(java.lang.Short meetingStatus)
Setter for property meetingStatus.

Parameters:
meetingStatus - new value of property meetingStatus

getBusyStatus

public java.lang.Short getBusyStatus()
Returns the busy status of the calendar item.

Returns:
value of property busyStatus

setBusyStatus

public void setBusyStatus(java.lang.Short busyStatus)
Setter for property busyStatus.

Parameters:
busyStatus - new value of property busyStatus

getMileage

public java.lang.Integer getMileage()
Returns the mileage attached to this calendar item.

Returns:
value of property mileage

setMileage

public void setMileage(java.lang.Integer mileage)
Setter for property mileage.

Parameters:
mileage - new value of property mileage

getRecurrencePattern

public RecurrencePattern getRecurrencePattern()
Returns the calendar item's recurrence pattern.

Returns:
value of property recurrencePattern

setRecurrencePattern

public void setRecurrencePattern(RecurrencePattern recurrencePattern)
Setter for property recurrencePattern.

Parameters:
recurrencePattern - new value of property recurrencePattern

setCategories

public void setCategories(Property categories)
Setter for property categories.

Parameters:
categories - new value of property categories

setAccessClass

public void setAccessClass(Property accessClass)
Setter for property accessClass.

Parameters:
accessClass - new value of property accessClass

setDescription

public void setDescription(Property description)
Setter for property description.

Parameters:
description - new value of property description

setLatitude

public void setLatitude(Property latitude)
Setter for property latitude.

Parameters:
latitude - new value of property latitude

setLongitude

public void setLongitude(Property longitude)
Setter for property longitude.

Parameters:
longitude - new value of property longitude

setLocation

public void setLocation(Property location)
Setter for property location.

Parameters:
location - new value of property location

setPriority

public void setPriority(Property priority)
Setter for property priority.

Parameters:
priority - new value of property priority

setStatus

public void setStatus(Property status)
Setter for property status.

Parameters:
status - new value of property status

setSummary

public void setSummary(Property summary)
Setter for property summary.

Parameters:
summary - new value of property summary

setDtEnd

public void setDtEnd(PropertyWithTimeZone dtEnd)
Setter for property dtEnd.

Parameters:
dtEnd - new value of property dtEnd

setDtEnd

public void setDtEnd(Property dtEnd)
Setter for property dtEnd.

Parameters:
dtEnd - new value of property dtEnd

setDtStart

public void setDtStart(PropertyWithTimeZone dtStart)
Setter for property dtStart.

Parameters:
dtStart - new value of property dtStart

setDtStart

public void setDtStart(Property dtStart)
Setter for property dtStart.

Parameters:
dtStart - new value of property dtStart

setDuration

public void setDuration(Property duration)
Setter for property duration.

Parameters:
duration - new value of property duration

setOrganizer

public void setOrganizer(Property organizer)
Setter for property organizer.

Parameters:
organizer - new value of property organizer

setUrl

public void setUrl(Property url)
Setter for property url.

Parameters:
url - new value of property url

setUid

public void setUid(Property uid)
Setter for property uid.

Parameters:
uid - new value of property uid

setContact

public void setContact(Property contact)
Setter for property contact.

Parameters:
contact - new value of property contact

setCreated

public void setCreated(PropertyWithTimeZone created)
Setter for property created.

Parameters:
created - new value of property created

setCreated

public void setCreated(Property created)
Setter for property created.

Parameters:
created - new value of property created

setDtStamp

public void setDtStamp(PropertyWithTimeZone dtStamp)
Setter for property dtStamp.

Parameters:
dtStamp - new value of property dtStamp

setDtStamp

public void setDtStamp(Property dtStamp)
Setter for property dtStamp.

Parameters:
dtStamp - new value of property dtStamp

setLastModified

public void setLastModified(PropertyWithTimeZone lastModified)
Setter for property lastModified.

Parameters:
lastModified - new value of property lastModified

setLastModified

public void setLastModified(Property lastModified)
Setter for property lastModified.

Parameters:
lastModified - new value of property lastModified

setXTag

public void setXTag(java.util.List xTags)
Setter for property xTags.

Parameters:
xTags - new value of property xTags

setDAlarm

public void setDAlarm(PropertyWithTimeZone dalarm)
Setter for property dalarm.

Parameters:
dalarm - new value of property dalarm

setDAlarm

public void setDAlarm(Property dalarm)
Setter for property dalarm on the basis of a Property (without time zone).

Parameters:
dalarm - new value of property dalarm as a Property (the time zone is set to null)

setPAlarm

public void setPAlarm(PropertyWithTimeZone palarm)
Setter for property palarm.

Parameters:
palarm - new value of property palarm

setPAlarm

public void setPAlarm(Property palarm)
Setter for property palarm on the basis of a Property (without time zone).

Parameters:
palarm - new value of property palarm as a Property (the time zone is set to null)

setSequence

public void setSequence(Property sequence)
Setter for property sequence.

Parameters:
sequence - new value of property sequence

getReminder

public Reminder getReminder()
Getter for property reminder.

Returns:
Value of property reminder.

setReminder

public void setReminder(Reminder reminder)
Setter for property reminder.

Parameters:
reminder - new value of property reminder.

getFolder

public Property getFolder()
Returns the folder where this calendar item has to be stored.

Returns:
value of property folder

setFolder

public void setFolder(Property folder)
Setter for property folder.

Parameters:
folder - new value of property folder

getAttendees

public java.util.List<Attendee> getAttendees()
Gets the attendee list.

Returns:
a List of Attendee objects

isRecurrent

public boolean isRecurrent()
Returns whether this event is recurrent or not, i.e. if it has got a recurrence pattern or not.

Returns:
true if this event is recurrent, false otherwise

removeRecurrence

public void removeRecurrence()
Makes this event not recurrent by removing its recurrence pattern.


addXTag

public void addXTag(XTag xTag)
Adds a custom X-tag to the xTags list. If the list does not exist yet, it is created.

Parameters:
xTag - the tag to add

addAttendee

public void addAttendee(Attendee attendee)
Adds an attendee to the list.

Parameters:
attendee - the Attendee object to add

resetAttendees

public void resetAttendees()
Clears the attendee list.


extractInterval

public long[] extractInterval()
Extracts a time interval roughly large enough to contain the whole event/task and, in case it's a recurrent one, all its occurrences.

Returns:
an array of 2 long integers, the first one being the lower end of the interval and the other one being the upper end


Copyright © 2001-2009 Funambol.