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

java.lang.Object
  extended by com.funambol.common.pim.model.calendar.Calendar

public class Calendar
extends java.lang.Object

An object representing a calendar item with all the information supported by Funambol it contains. This is the "foundational model" of a calendar item, used to exchange information about such items between server and connectors. It can also be used by clients.

Version:
$Id: Calendar.java,v 1.2 2007-11-28 11:14:04 nichele Exp $

Constructor Summary
Calendar()
          Creates an empty calendar with no calendar content.
Calendar(CalendarContent cc)
          Creates an empty calendar with the given calendar content.
 
Method Summary
 void addXTag(XTag xTag)
          Adder for xTags list.
 CalendarContent getCalendarContent()
          Gets the calendar content: either an Event or a Task.
 Property getCalScale()
          Returns the calendar scale of this calendar.
 Event getEvent()
          Returns the event contained in this calendar.
 Property getMethod()
          Returns the "object method or transaction semantics" of this calendar.
 Property getProdId()
          Returns the product ID of this calendar.
 Task getTask()
          Returns the task contained in this calendar.
 Property getVersion()
          Returns the version of this calendar.
 java.util.List<XTag> getXTags()
          Returns the XTag objects, representing custom properties, contained in this calendar.
 void setCalendarContent(CalendarContent cc)
          Sets the calendar content: either an Event or a Task.
 void setCalScale(Property calScale)
          Setter for property calScale.
 void setEvent(Event event)
          Setter for property event.
 void setMethod(Property method)
          Setter for property method.
 void setProdId(Property prodId)
          Setter for property prodId.
 void setTask(Task todo)
          Setter for property task.
 void setVersion(Property version)
          Setter for property version.
 void setXTags(java.util.List xTags)
          Setter for property xTags.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Calendar

public Calendar()
Creates an empty calendar with no calendar content.


Calendar

public Calendar(CalendarContent cc)
Creates an empty calendar with the given calendar content.

Parameters:
cc - the event or task contained
Method Detail

getProdId

public Property getProdId()
Returns the product ID of this calendar.

Returns:
the product ID of this calendar

getVersion

public Property getVersion()
Returns the version of this calendar.

Returns:
the version of this calendar

getCalScale

public Property getCalScale()
Returns the calendar scale of this calendar.

Returns:
the calendar scale of this calendar

getMethod

public Property getMethod()
Returns the "object method or transaction semantics" of this calendar.

Returns:
the "object method or transaction semantics" of this calendar

getEvent

public Event getEvent()
Returns the event contained in this calendar.

Returns:
the event contained in this calendar, if there is one; null otherwise

getTask

public Task getTask()
Returns the task contained in this calendar.

Returns:
the event contained in this calendar, if there is one; null otherwise

getXTags

public java.util.List<XTag> getXTags()
Returns the XTag objects, representing custom properties, contained in this calendar.

Returns:
a List of XTag objects

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setEvent

public void setEvent(Event event)
Setter for property event.

Parameters:
event - new value of property event.

setTask

public void setTask(Task todo)
Setter for property task.

Parameters:
todo - new value of property task.

setCalScale

public void setCalScale(Property calScale)
Setter for property calScale.

Parameters:
calScale - new value of property calScale

setMethod

public void setMethod(Property method)
Setter for property method.

Parameters:
method - new value of property method

setProdId

public void setProdId(Property prodId)
Setter for property prodId.

Parameters:
prodId - new value of property prodId

setVersion

public void setVersion(Property version)
Setter for property version.

Parameters:
version - new value of property version

setXTags

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

Parameters:
xTags - new value of property xTags (must be a List)

addXTag

public void addXTag(XTag xTag)
Adder for xTags list.

Parameters:
xTag - the tag to add

getCalendarContent

public CalendarContent getCalendarContent()
Gets the calendar content: either an Event or a Task.

Returns:
a CalendarContent object (Event or Task)

setCalendarContent

public void setCalendarContent(CalendarContent cc)
Sets the calendar content: either an Event or a Task. The other one is set to null.

Parameters:
cc - a CalendarContent object (Event or Task)


Copyright © 2001-2009 Funambol.