public class VToDo extends CalendarComponent
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);
EMPTY_VALIDATOR
Constructor and Description |
---|
VToDo()
Default constructor.
|
VToDo(Date start,
Date due,
java.lang.String summary)
Constructs a new VTODO instance starting and ending at the specified times with the specified summary.
|
VToDo(Date start,
Dur duration,
java.lang.String summary)
Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified
summary.
|
VToDo(Date start,
java.lang.String summary)
Constructs a new VTODO instance starting at the specified time with the specified summary.
|
VToDo(PropertyList properties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Component |
copy()
Overrides default copy method to add support for copying alarm sub-components.
|
boolean |
equals(java.lang.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() |
java.lang.String |
toString() |
void |
validate(boolean recurse)
Perform validation on a component.
|
validate, validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequest
calculateRecurrenceSet, getName, getProperties, getProperties, getProperty, validate, validateProperties
public VToDo()
public VToDo(PropertyList properties)
properties
- a list of propertiespublic VToDo(Date start, java.lang.String summary)
start
- the start date of the new todosummary
- the todo summarypublic VToDo(Date start, Date due, java.lang.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, java.lang.String summary)
start
- the start date of the new tododuration
- the duration of the new todosummary
- the todo summarypublic final ComponentList getAlarms()
public final void validate(boolean recurse) throws ValidationException
validate
in class Component
recurse
- indicates whether to validate the component's propertiesValidationException
- where the component is not in a valid stateprotected Validator getValidator(Method method)
getValidator
in class CalendarComponent
method
- a method to validate onpublic 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 Component copy() throws java.text.ParseException, java.io.IOException, java.net.URISyntaxException
copy
in class Component
java.text.ParseException
- where an error occurs parsing datajava.io.IOException
- where an error occurs reading datajava.net.URISyntaxException
- where an invalid URI is encounteredComponent.copy()
Copyright © 2004-2015 Micronode. All Rights Reserved.