Class VToDo
- 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
,ComponentContainer<Component>
,PropertyContainer
public class VToDo extends CalendarComponent implements ComponentContainer<Component>
$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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VToDo.Factory
-
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, components, END, EXPERIMENTAL_PREFIX, PARTICIPANT, properties, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VLOCATION, VRESOURCE, VTIMEZONE, VTODO, VVENUE
-
-
Constructor Summary
Constructors 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)
-
Method Summary
-
Methods inherited from class net.fortuna.ical4j.model.component.CalendarComponent
validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequest
-
Methods inherited from class net.fortuna.ical4j.model.Component
calculateRecurrenceSet, copy, getName, getProperties, getPropertyList, getValue, setPropertyList, toString, validate, validateProperties
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.fortuna.ical4j.model.ComponentContainer
add, getComponent, getComponents, remove, replace
-
Methods inherited from interface net.fortuna.ical4j.model.PropertyContainer
add, getProperties, getProperty, getRequiredProperty, remove, removeAll, replace
-
-
-
-
Constructor Detail
-
VToDo
public VToDo()
Default constructor.
-
VToDo
public VToDo(boolean initialise)
-
VToDo
public VToDo(PropertyList properties)
Constructor.- Parameters:
properties
- a list of properties
-
VToDo
public VToDo(PropertyList properties, ComponentList<VAlarm> alarms)
-
VToDo
public VToDo(Temporal start, String summary)
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
public VToDo(Temporal start, Temporal due, String summary)
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
public 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.- Parameters:
start
- the start date of the new tododuration
- the duration of the new todosummary
- the todo summary
-
-
Method Detail
-
getAlarms
public final List<VAlarm> getAlarms()
Returns the list of alarms for this todo.- Returns:
- a component list
-
getParticipants
public final List<Participant> getParticipants()
-
getComponentList
public ComponentList<Component> getComponentList()
- Specified by:
getComponentList
in interfaceComponentContainer<Component>
- Returns:
- Returns the underlying component list.
-
setComponentList
public void setComponentList(ComponentList<Component> components)
- Specified by:
setComponentList
in interfaceComponentContainer<Component>
-
validate
public final void validate(boolean recurse) throws ValidationException
Perform validation on a component.- Specified by:
validate
in classComponent
- Parameters:
recurse
- indicates whether to validate the component's properties- Throws:
ValidationException
- where the component is not in a valid state
-
validate
public void validate(Method method) throws ValidationException
Performs method-specific ITIP validation.- Overrides:
validate
in classCalendarComponent
- Parameters:
method
- the applicable method- Throws:
ValidationException
- where the component does not comply with RFC2446
-
getClassification
@Deprecated public final Optional<Clazz> getClassification()
Deprecated.- Returns:
- the optional access classification property
-
getDateCompleted
@Deprecated public final Optional<Completed> getDateCompleted()
Deprecated.- Returns:
- the optional date completed property
-
getCreated
@Deprecated public final Optional<Created> getCreated()
Deprecated.- Returns:
- the optional creation-time property
-
getDescription
@Deprecated public final Optional<Description> getDescription()
Deprecated.- Returns:
- the optional description property
-
getStartDate
@Deprecated public final Optional<DtStart<?>> getStartDate()
Deprecated.Convenience method to pull the DTSTART out of the property list.- Returns:
- The DtStart object representation of the start Date
-
getGeographicPos
@Deprecated public final Optional<Geo> getGeographicPos()
Deprecated.- Returns:
- the optional geographic position property
-
getLastModified
@Deprecated public final Optional<LastModified> getLastModified()
Deprecated.- Returns:
- the optional last-modified property
-
getLocation
@Deprecated public final Optional<Location> getLocation()
Deprecated.- Returns:
- the optional location property
-
getOrganizer
@Deprecated public final Optional<Organizer> getOrganizer()
Deprecated.- Returns:
- the optional organizer property
-
getPercentComplete
@Deprecated public final Optional<PercentComplete> getPercentComplete()
Deprecated.- Returns:
- the optional percentage complete property
-
getPriority
@Deprecated public final Optional<Priority> getPriority()
Deprecated.- Returns:
- the optional priority property
-
getDateStamp
@Deprecated public final Optional<DtStamp> getDateStamp()
Deprecated.- Returns:
- the optional date-stamp property
-
getSequence
@Deprecated public final Optional<Sequence> getSequence()
Deprecated.- Returns:
- the optional sequence number property
-
getStatus
@Deprecated public final Optional<Status> getStatus()
Deprecated.- Returns:
- the optional status property
-
getSummary
@Deprecated public final Optional<Summary> getSummary()
Deprecated.- Returns:
- the optional summary property
-
getUrl
@Deprecated public final Optional<Url> getUrl()
Deprecated.- Returns:
- the optional URL property
-
getRecurrenceId
@Deprecated public final Optional<RecurrenceId<?>> getRecurrenceId()
Deprecated.- Returns:
- the optional recurrence identifier property
-
getDuration
@Deprecated public final Optional<Duration> getDuration()
Deprecated.- Returns:
- the optional Duration property
-
getDue
@Deprecated public final Optional<Due<?>> getDue()
Deprecated.- Returns:
- the optional due property
-
getUid
@Deprecated public final Optional<Uid> getUid()
Deprecated.Returns the UID property of this component if available.- Returns:
- a Uid instance, or null if no UID property exists
-
newFactory
protected ComponentFactory<VToDo> newFactory()
Description copied from class:Component
Returns a new component factory used to create deep copies.- Specified by:
newFactory
in classComponent
- Returns:
- a component factory instance
-
-