Serializable
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);
Modifier and Type | Class | Description |
---|---|---|
static class |
VToDo.Factory |
EMPTY_VALIDATOR
AVAILABLE, BEGIN, END, EXPERIMENTAL_PREFIX, properties, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VTIMEZONE, VTODO, VVENUE
Constructor | Description |
---|---|
VToDo() |
Default constructor.
|
VToDo(boolean initialise) |
|
VToDo(Temporal start,
String summary) |
Constructs a new VTODO instance starting at the specified time with the specified summary.
|
VToDo(Temporal start,
TemporalAmount duration,
String summary) |
Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified
summary.
|
VToDo(Temporal start,
Temporal due,
String summary) |
Constructs a new VTODO instance starting and ending at the specified times with the specified summary.
|
VToDo(PropertyList properties) |
Constructor.
|
VToDo(PropertyList properties,
ComponentList<VAlarm> alarms) |
Modifier and Type | Method | Description |
---|---|---|
VToDo |
copy() |
Overrides default copy method to add support for copying alarm sub-components.
|
boolean |
equals(Object arg0) |
|
ComponentList<VAlarm> |
getAlarms() |
Returns the list of alarms for this todo.
|
Optional<Clazz> |
getClassification() |
Deprecated.
|
Optional<Created> |
getCreated() |
Deprecated.
|
Optional<Completed> |
getDateCompleted() |
Deprecated.
|
Optional<DtStamp> |
getDateStamp() |
Deprecated.
|
Optional<Description> |
getDescription() |
Deprecated.
|
Optional<Due<?>> |
getDue() |
Deprecated.
|
Optional<Duration> |
getDuration() |
Deprecated.
|
Optional<Geo> |
getGeographicPos() |
Deprecated.
|
Optional<LastModified> |
getLastModified() |
Deprecated.
|
Optional<Location> |
getLocation() |
Deprecated.
|
Optional<Organizer> |
getOrganizer() |
Deprecated.
|
Optional<PercentComplete> |
getPercentComplete() |
Deprecated.
|
Optional<Priority> |
getPriority() |
Deprecated.
|
Optional<RecurrenceId<?>> |
getRecurrenceId() |
Deprecated.
|
Optional<Sequence> |
getSequence() |
Deprecated.
|
Optional<DtStart<?>> |
getStartDate() |
Deprecated.
|
Optional<Status> |
getStatus() |
Deprecated.
|
Optional<Summary> |
getSummary() |
Deprecated.
|
Optional<Uid> |
getUid() |
Deprecated.
|
Optional<Url> |
getUrl() |
Deprecated.
|
int |
hashCode() |
|
protected ComponentFactory<VToDo> |
newFactory() |
Returns a new component factory used to create deep copies.
|
String |
toString() |
|
void |
validate(boolean recurse) |
Perform validation on a component.
|
void |
validate(Method method) |
Performs method-specific ITIP validation.
|
validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequest
add, calculateRecurrenceSet, getName, getProperties, getProperties, getProperty, getRequiredProperty, getValue, remove, removeAll, replace, setProperties, validate, validateProperties
public VToDo()
public VToDo(boolean initialise)
public VToDo(PropertyList properties)
properties
- a list of propertiespublic VToDo(PropertyList properties, ComponentList<VAlarm> alarms)
public VToDo(Temporal start, String summary)
start
- the start date of the new todosummary
- the todo summarypublic VToDo(Temporal start, Temporal due, String summary)
start
- the start date of the new tododue
- the due date of the new todosummary
- the todo summarypublic VToDo(Temporal start, TemporalAmount duration, String summary)
start
- the start date of the new tododuration
- the duration of the new todosummary
- the todo summarypublic final ComponentList<VAlarm> 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 statepublic void validate(Method method) throws ValidationException
validate
in class CalendarComponent
method
- the applicable methodValidationException
- where the component does not comply with RFC2446@Deprecated public final Optional<Clazz> getClassification()
Component.getProperty(String)
@Deprecated public final Optional<Completed> getDateCompleted()
Component.getProperty(String)
@Deprecated public final Optional<Created> getCreated()
Component.getProperty(String)
@Deprecated public final Optional<Description> getDescription()
Component.getProperty(String)
@Deprecated public final Optional<DtStart<?>> getStartDate()
Component.getProperty(String)
@Deprecated public final Optional<Geo> getGeographicPos()
Component.getProperty(String)
@Deprecated public final Optional<LastModified> getLastModified()
Component.getProperty(String)
@Deprecated public final Optional<Location> getLocation()
Component.getProperty(String)
@Deprecated public final Optional<Organizer> getOrganizer()
Component.getProperty(String)
@Deprecated public final Optional<PercentComplete> getPercentComplete()
Component.getProperty(String)
@Deprecated public final Optional<Priority> getPriority()
Component.getProperty(String)
@Deprecated public final Optional<DtStamp> getDateStamp()
Component.getProperty(String)
@Deprecated public final Optional<Sequence> getSequence()
Component.getProperty(String)
@Deprecated public final Optional<Status> getStatus()
Component.getProperty(String)
@Deprecated public final Optional<Summary> getSummary()
Component.getProperty(String)
@Deprecated public final Optional<Url> getUrl()
Component.getProperty(String)
@Deprecated public final Optional<RecurrenceId<?>> getRecurrenceId()
Component.getProperty(String)
@Deprecated public final Optional<Duration> getDuration()
Component.getProperty(String)
@Deprecated public final Optional<Due<?>> getDue()
Component.getProperty(String)
@Deprecated public final Optional<Uid> getUid()
Component.getProperty(String)
public VToDo copy()
copy
in class Component
Component.copy()
protected ComponentFactory<VToDo> newFactory()
Component
newFactory
in class Component