java.lang.Object
net.fortuna.ical4j.model.Content
net.fortuna.ical4j.model.Component
net.fortuna.ical4j.model.component.CalendarComponent
net.fortuna.ical4j.model.component.VToDo
- All Implemented Interfaces:
Serializable,Comparable<Component>,AlarmsAccessor,ChangeManagementPropertyAccessor,ComponentContainer<Component>,ComponentListAccessor<Component>,DateTimePropertyAccessor,DescriptivePropertyAccessor,FluentComponent,LocationsAccessor,ParticipantsAccessor,PropertyContainer,PropertyListAccessor,Prototype<Component>,RecurrenceSupport<VToDo>,RelationshipPropertyAccessor,ResourcesAccessor
public class VToDo
extends CalendarComponent
implements ComponentContainer<Component>, RecurrenceSupport<VToDo>, DescriptivePropertyAccessor, ChangeManagementPropertyAccessor, DateTimePropertyAccessor, RelationshipPropertyAccessor, AlarmsAccessor, ParticipantsAccessor, LocationsAccessor, ResourcesAccessor
$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);
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class net.fortuna.ical4j.model.component.CalendarComponent
EMPTY_VALIDATORFields inherited from class net.fortuna.ical4j.model.Component
AVAILABLE, BEGIN, components, END, EXPERIMENTAL_PREFIX, PARTICIPANT, properties, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VLOCATION, VRESOURCE, VTIMEZONE, VTODO, VVENUEFields inherited from interface net.fortuna.ical4j.model.PropertyContainer
ADD_IF_NOT_PRESENT -
Constructor Summary
ConstructorsConstructorDescriptionVToDo()Default constructor.VToDo(boolean initialise) 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.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) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a (deep) copy of this component.booleanDeprecated.Deprecated.getDue()Deprecated.Deprecated.inthashCode()protected ComponentFactory<VToDo>Returns a new component factory used to create deep copies.voidsetComponentList(ComponentList<Component> components) validate(boolean recurse) Perform validation on a component.Performs method-specific ITIP validation.Methods inherited from class net.fortuna.ical4j.model.component.CalendarComponent
validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequestMethods inherited from class net.fortuna.ical4j.model.Component
calculateRecurrenceSet, compareTo, getFluentTarget, getName, getProperties, getPropertyList, getUid, getValue, setPropertyList, toString, validate, validatePropertiesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.fortuna.ical4j.model.AlarmsAccessor
getAlarmsMethods inherited from interface net.fortuna.ical4j.model.ChangeManagementPropertyAccessor
getCreated, getDateTimeStamp, getLastModified, getSequenceMethods inherited from interface net.fortuna.ical4j.model.ComponentContainer
add, remove, replace, withMethods inherited from interface net.fortuna.ical4j.model.ComponentListAccessor
getComponent, getComponentsMethods inherited from interface net.fortuna.ical4j.model.DateTimePropertyAccessor
getDateTimeCompleted, getDateTimeDue, getDateTimeEnd, getDateTimeStart, getDuration, getFreeBusyTime, getTimeTransparencyMethods inherited from interface net.fortuna.ical4j.model.DescriptivePropertyAccessor
getAttachments, getCategories, getClassification, getComments, getDescription, getGeographicPos, getLocation, getPercentComplete, getPriority, getStatus, getSummaryMethods inherited from interface net.fortuna.ical4j.model.FluentComponent
withPropertyMethods inherited from interface net.fortuna.ical4j.model.LocationsAccessor
getLocationsMethods inherited from interface net.fortuna.ical4j.model.ParticipantsAccessor
getParticipantsMethods inherited from interface net.fortuna.ical4j.model.PropertyContainer
add, addAll, remove, removeAll, removeIf, replace, setPropertyList, withMethods inherited from interface net.fortuna.ical4j.model.PropertyListAccessor
getProperties, getProperty, getProperty, getPropertyList, getRequiredProperty, getRequiredPropertyMethods inherited from interface net.fortuna.ical4j.model.RecurrenceSupport
calculateRecurrenceSet, getOccurrencesMethods inherited from interface net.fortuna.ical4j.model.RelationshipPropertyAccessor
getAttendees, getContact, getOrganizer, getRecurrenceId, getRelatedTo, getUrlMethods inherited from interface net.fortuna.ical4j.model.ResourcesAccessor
getResources
-
Constructor Details
-
VToDo
public VToDo()Default constructor. -
VToDo
public VToDo(boolean initialise) -
VToDo
Constructor.- Parameters:
properties- a list of properties
-
VToDo
-
VToDo
Constructs a new VTODO instance starting at the specified time with the specified summary.- Parameters:
start- the start date of the new todosummary- the todo summary
-
VToDo
Constructs a new VTODO instance starting and ending at the specified times with the specified summary.- Parameters:
start- the start date of the new tododue- the due date of the new todosummary- the todo summary
-
VToDo
Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified summary.- Parameters:
start- the start date of the new tododuration- the duration of the new todosummary- the todo summary
-
-
Method Details
-
getComponentList
- Specified by:
getComponentListin interfaceComponentListAccessor<Component>- Returns:
- Returns the underlying component list.
-
setComponentList
- Specified by:
setComponentListin interfaceComponentContainer<Component>
-
validate
Perform validation on a component.- Specified by:
validatein classComponent- Parameters:
recurse- indicates whether to validate the component's properties- Throws:
ValidationException- where the component is not in a valid state
-
validate
Performs method-specific ITIP validation.- Overrides:
validatein classCalendarComponent- Parameters:
method- the applicable method- Throws:
ValidationException- where the component does not comply with RFC2446
-
getDateCompleted
Deprecated.- Returns:
- the optional date completed property
-
getStartDate
Deprecated.Convenience method to pull the DTSTART out of the property list.- Returns:
- The DtStart object representation of the start Date
-
getDateStamp
Deprecated.- Returns:
- the date-stamp property
-
getDue
Deprecated.- Returns:
- the optional due property
-
equals
-
hashCode
public int hashCode() -
newFactory
Description copied from class:ComponentReturns a new component factory used to create deep copies.- Specified by:
newFactoryin classComponent- Returns:
- a component factory instance
-
copy
Description copied from class:ComponentCreate a (deep) copy of this component.
-
DateTimePropertyAccessor.getDateTimeCompleted()