|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.fortuna.ical4j.model.Component
net.fortuna.ical4j.model.component.CalendarComponent
net.fortuna.ical4j.model.component.VToDo
public class VToDo
$Id$ [Apr 5, 2004] Defines an iCalendar VTODO component.
4.6.2 To-do Component Component Name: VTODO Purpose: Provide a grouping of calendar properties that describe a to-do. Formal Definition: A "VTODO" calendar component is defined by the following notation: todoc = "BEGIN" ":" "VTODO" CRLF todoprop *alarmc "END" ":" "VTODO" CRLF todoprop = *( ; the following are optional, ; but MUST NOT occur more than once class / completed / created / description / dtstamp / dtstart / geo / last-mod / location / organizer / percent / priority / recurid / seq / status / summary / uid / url / ; either 'due' or 'duration' may appear in ; a 'todoprop', but 'due' and 'duration' ; MUST NOT occur in the same 'todoprop' due / duration / ; the following are optional, ; and MAY occur more than once attach / attendee / categories / comment / contact / exdate / exrule / rstatus / related / resources / rdate / rrule / x-prop )Example 1 - Creating a todo of two (2) hour duration starting tomorrow:
java.util.Calendar cal = java.util.Calendar.getInstance();
// tomorrow..
cal.add(java.util.Calendar.DAY_OF_MONTH, 1);
cal.set(java.util.Calendar.HOUR_OF_DAY, 11);
cal.set(java.util.Calendar.MINUTE, 00);
VToDo documentation = new VEvent(cal.getTime(), 1000 * 60 * 60 * 2,
"Document calendar component usage");
// add timezone information..
VTimeZone tz = VTimeZone.getDefault();
TzId tzParam = new TzId(tz.getProperties().getProperty(Property.TZID)
.getValue());
documentation.getProperties().getProperty(Property.DTSTART).getParameters()
.add(tzParam);
Field Summary |
---|
Fields inherited from class net.fortuna.ical4j.model.component.CalendarComponent |
---|
EMPTY_VALIDATOR |
Fields inherited from class net.fortuna.ical4j.model.Component |
---|
AVAILABLE, BEGIN, END, EXPERIMENTAL_PREFIX, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VTIMEZONE, VTODO, VVENUE |
Constructor Summary | |
---|---|
VToDo()
Default constructor. |
|
VToDo(Date start,
Date due,
String summary)
Constructs a new VTODO instance starting and ending at the specified times with the specified summary. |
|
VToDo(Date start,
Dur duration,
String summary)
Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified summary. |
|
VToDo(Date start,
String summary)
Constructs a new VTODO instance starting at the specified time with the specified summary. |
|
VToDo(PropertyList properties)
Constructor. |
Method Summary | |
---|---|
Component |
copy()
Overrides default copy method to add support for copying alarm sub-components. |
boolean |
equals(Object arg0)
|
ComponentList |
getAlarms()
Returns the list of alarms for this todo. |
Clazz |
getClassification()
|
Created |
getCreated()
|
Completed |
getDateCompleted()
|
DtStamp |
getDateStamp()
|
Description |
getDescription()
|
Due |
getDue()
|
Duration |
getDuration()
|
Geo |
getGeographicPos()
|
LastModified |
getLastModified()
|
Location |
getLocation()
|
Organizer |
getOrganizer()
|
PercentComplete |
getPercentComplete()
|
Priority |
getPriority()
|
RecurrenceId |
getRecurrenceId()
|
Sequence |
getSequence()
|
DtStart |
getStartDate()
Convenience method to pull the DTSTART out of the property list. |
Status |
getStatus()
|
Summary |
getSummary()
|
Uid |
getUid()
Returns the UID property of this component if available. |
Url |
getUrl()
|
protected Validator |
getValidator(Method method)
|
int |
hashCode()
|
String |
toString()
|
void |
validate(boolean recurse)
Perform validation on a component. |
Methods inherited from class net.fortuna.ical4j.model.component.CalendarComponent |
---|
validate, validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequest |
Methods inherited from class net.fortuna.ical4j.model.Component |
---|
calculateRecurrenceSet, getName, getProperties, getProperties, getProperty, validate, validateProperties |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VToDo()
public VToDo(PropertyList properties)
properties
- a list of propertiespublic VToDo(Date start, String summary)
start
- the start date of the new todosummary
- the todo summarypublic VToDo(Date start, Date due, String summary)
start
- the start date of the new tododue
- the due date of the new todosummary
- the todo summarypublic VToDo(Date start, Dur duration, String summary)
start
- the start date of the new tododuration
- the duration of the new todosummary
- the todo summaryMethod Detail |
---|
public final ComponentList getAlarms()
public final String toString()
toString
in class Component
public final void validate(boolean recurse) throws ValidationException
validate
in class Component
recurse
- indicates whether to validate the component's properties
ValidationException
- where the component is not in a valid stateprotected Validator getValidator(Method method)
getValidator
in class CalendarComponent
method
- a method to validate on
public final Clazz getClassification()
public final Completed getDateCompleted()
public final Created getCreated()
public final Description getDescription()
public final DtStart getStartDate()
public final Geo getGeographicPos()
public final LastModified getLastModified()
public final Location getLocation()
public final Organizer getOrganizer()
public final PercentComplete getPercentComplete()
public final Priority getPriority()
public final DtStamp getDateStamp()
public final Sequence getSequence()
public final Status getStatus()
public final Summary getSummary()
public final Url getUrl()
public final RecurrenceId getRecurrenceId()
public final Duration getDuration()
public final Due getDue()
public final Uid getUid()
public boolean equals(Object arg0)
equals
in class Component
public int hashCode()
hashCode
in class Component
public Component copy() throws ParseException, IOException, URISyntaxException
copy
in class Component
ParseException
- where an error occurs parsing data
IOException
- where an error occurs reading data
URISyntaxException
- where an invalid URI is encounteredComponent.copy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |