Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.fortuna.ical4j.model.component
Class VToDo

    java.lang.Object
      net.fortuna.ical4j.model.Component
          net.fortuna.ical4j.model.component.CalendarComponent
              net.fortuna.ical4j.model.component.VToDo

All Implemented Interfaces:
  Serializable

    public class VToDo

extends CalendarComponent

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);

Author:
  Ben Fortuna
See Also:
  Serialized Form

Field Summary

Fields inherited from class net.fortuna.ical4j.model.Component
`BEGIN, END, EXPERIMENTAL_PREFIX, VALARM, VEVENT, VFREEBUSY, VJOURNAL, VTIMEZONE, VTODO`

Constructor Summary
`VToDo()` Default constructor.
`VToDo(Date start, Date due, String summary)` Constructs a new VTODO instance starting and ending at the specified times with the specified summary.
`VToDo(Date start, Dur duration, String summary)` Constructs a new VTODO instance starting at the specified times, for the specified duration, with the specified summary.
`VToDo(Date start, String summary)` Constructs a new VTODO instance starting at the specified time with the specified summary.
`VToDo(PropertyList properties)` Constructor.

Method Summary
`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()`
`String` | `toString()`
`void` | `validate(boolean recurse)` Perform validation on a component.

Methods inherited from class net.fortuna.ical4j.model.Component
`equals, getName, getProperties, getProperties, getProperty, hashCode, validate, validateProperties`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### VToDo

    public VToDo()

  Default constructor.

### VToDo

    public VToDo(PropertyList properties)

  Constructor.

  Parameters:
    `properties` - a list of properties

### VToDo

    public VToDo(Date 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 todo
    `summary` - the todo summary

### VToDo

    public VToDo(Date start,
                 Date 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 todo
    `due` - the due date of the new todo
    `summary` - the todo summary

### VToDo

    public VToDo(Date start,
                 Dur 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 todo
    `duration` - the duration of the new todo
    `summary` - the todo summary

Method Detail

### getAlarms

    public final ComponentList getAlarms()

  Returns the list of alarms for this todo.

  Returns:
    a component list

### toString

    public final String toString()

  Overrides:
    `toString` in class `Component`
  See Also:
    `Object.toString()`

### validate

    public final void validate(boolean recurse)
                        throws ValidationException

  Description copied from class: `Component`
  Perform validation on a component.

  Specified by:
    `validate` in class `Component`
  Parameters:
    `recurse` - indicates whether to validate the component's properties
  Throws:
    `ValidationException` - where the component is not in a valid state

### getClassification

    public final Clazz getClassification()

  Returns:
    the optional access classification property

### getDateCompleted

    public final Completed getDateCompleted()

  Returns:
    the optional date completed property

### getCreated

    public final Created getCreated()

  Returns:
    the optional creation-time property

### getDescription

    public final Description getDescription()

  Returns:
    the optional description property

### getStartDate

    public final DtStart getStartDate()

  Convenience method to pull the DTSTART out of the property list.

  Returns:
    The DtStart object representation of the start Date

### getGeographicPos

    public final Geo getGeographicPos()

  Returns:
    the optional geographic position property

### getLastModified

    public final LastModified getLastModified()

  Returns:
    the optional last-modified property

### getLocation

    public final Location getLocation()

  Returns:
    the optional location property

### getOrganizer

    public final Organizer getOrganizer()

  Returns:
    the optional organizer property

### getPercentComplete

    public final PercentComplete getPercentComplete()

  Returns:
    the optional percentage complete property

### getPriority

    public final Priority getPriority()

  Returns:
    the optional priority property

### getDateStamp

    public final DtStamp getDateStamp()

  Returns:
    the optional date-stamp property

### getSequence

    public final Sequence getSequence()

  Returns:
    the optional sequence number property

### getStatus

    public final Status getStatus()

  Returns:
    the optional status property

### getSummary

    public final Summary getSummary()

  Returns:
    the optional summary property

### getUrl

    public final Url getUrl()

  Returns:
    the optional URL property

### getRecurrenceId

    public final RecurrenceId getRecurrenceId()

  Returns:
    the optional recurrence identifier property

### getDuration

    public final Duration getDuration()

  Returns:
    the optional Duration property

### getDue

    public final Due getDue()

  Returns:
    the optional due property

### getUid

    public final Uid getUid()

  Returns the UID property of this component if available.

  Returns:
    a Uid instance, or null if no UID property exists

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2007 Modularity. All Rights Reserved.