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 and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| public | VToDo(final Temporal
the start date of the new todo start, final TemporalAmount the duration of the new todo duration, final String the todo summary summary)Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified summary. |
| Modifier and Type | Method and Description |
|---|---|
| public VToDo | copy()
Overrides net. Implements net. Create a (deep) copy of this component. |
| public boolean | equals(final Object
the reference object with which to compare. arg0)Overrides net. Indicates whether some other object is "equal to" this one. |
| public ComponentList | Returns: Returns the underlying component list.Implements net.
|
| public final Optional | Returns: the optional date completed property
Deprecated
use
DateTimePropertyAccessor#getDateTimeCompleted()
|
| public final Optional | Returns: the date-stamp property
Deprecated
use
ChangeManagementPropertyAccessor#getDateTimeStamp()
|
| public final <T extends Temporal> Optional | |
| public final <T extends Temporal> Optional | Returns: The DtStart object representation of the start Date
Deprecated
use
DateTimePropertyAccessor#getDateTimeStart()
Convenience method to pull the DTSTART out of the property list. |
| public int | hashCode()
Overrides net. Returns a hash code value for this object. |
| protected ComponentFactory | newFactory()
Implements abstract net. Returns a new component factory used to create deep copies. |
| public void | setComponentList(ComponentList<Component> components)
Implements net.
|
| public ValidationResult | validate(final boolean
indicates whether to validate the component's properties recurse)Implements abstract net. Perform validation on a component. |
| public ValidationResult | validate(Method
the applicable method method)Overrides net. Performs method-specific ITIP validation. |
| methodValidators | back to summary |
|---|---|
| private static final Map<Method, Validator<VToDo>> methodValidators | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides net. | |
| VToDo | back to summary |
|---|---|
| public VToDo() Default constructor. | |
| VToDo | back to summary |
|---|---|
| public VToDo(boolean initialise) | |
| VToDo | back to summary |
|---|---|
| public VToDo(final PropertyList properties) Constructor.
| |
| VToDo | back to summary |
|---|---|
| public VToDo(PropertyList properties, ComponentList<VAlarm> alarms) | |
| VToDo | back to summary |
|---|---|
| public VToDo(final Temporal start, final String summary) Constructs a new VTODO instance starting at the specified time with the specified summary. | |
| VToDo | back to summary |
|---|---|
| public VToDo(final Temporal start, final Temporal due, final String summary) Constructs a new VTODO instance starting and ending at the specified times with the specified summary. | |
| VToDo | back to summary |
|---|---|
| public VToDo(final Temporal start, final TemporalAmount duration, final String summary) Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified summary.
| |
| copy | back to summary |
|---|---|
| public VToDo copy() Overrides net. Implements net. Doc from net. Create a (deep) copy of this component. | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object arg0) Overrides net. Doc from net. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getComponentList | back to summary |
|---|---|
| public ComponentList Implements net.
| |
| getDateCompleted | back to summary |
|---|---|
| public final Optional Deprecated | |
| getDateStamp | back to summary |
|---|---|
| public final Optional Deprecated | |
| getDue | back to summary |
|---|---|
| public final <T extends Temporal> Optional Deprecated | |
| getStartDate | back to summary |
|---|---|
| public final <T extends Temporal> Optional Deprecated Convenience method to pull the DTSTART out of the property list. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides net. Doc from net. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| newFactory | back to summary |
|---|---|
| protected ComponentFactory Implements abstract net. Doc from net. Returns a new component factory used to create deep copies.
| |
| setComponentList | back to summary |
|---|---|
| public void setComponentList(ComponentList<Component> components) Implements net.
| |
| validate | back to summary |
|---|---|
| public ValidationResult validate(final boolean recurse) throws ValidationException Implements abstract net. Doc from net. Perform validation on a component.
| |
| validate | back to summary |
|---|---|
| public ValidationResult validate(Method method) throws ValidationException Overrides net. Performs method-specific ITIP validation.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public VToDo | |
| public VToDo | createComponent(PropertyList properties)
Implements net.
|
| public VToDo | createComponent(PropertyList properties, ComponentList<?> subComponents)
Overrides default net.
|
| Factory | back to summary |
|---|---|
| public Factory() | |
| createComponent | back to summary |
|---|---|
| public VToDo createComponent() Implements net.
| |
| createComponent | back to summary |
|---|---|
| public VToDo createComponent(PropertyList properties) Implements net.
| |
| createComponent | back to summary |
|---|---|
| public VToDo createComponent(PropertyList properties, ComponentList<?> subComponents) Overrides default net.
| |