Class VEvent

All Implemented Interfaces:
VAttendee<VEvent>, VComponent, VDateTimeEnd<VEvent>, VDescribable<VEvent>, VDescribable2<VEvent>, VDuration<VEvent>, VLastModified<VEvent>, VRepeatable<VEvent>, VChild, VElement, VParent

public class VEvent extends VLocatable<VEvent> implements VDateTimeEnd<VEvent>, VDescribable2<VEvent>, VRepeatable<VEvent>
VEVENT Event Component RFC 5545, 3.6.1, page 52 Description: A "VEVENT" calendar component is a grouping of component properties, possibly including "VALARM" calendar components, that represents a scheduled amount of time on a calendar. For example, it can be an activity; such as a one-hour long, department meeting from 8:00 AM to 9:00 AM, tomorrow. Generally, an event will take up time on an individual calendar. Hence, the event will appear as an opaque interval in a search for busy time. Alternately, the event can have its Time Transparency set to "TRANSPARENT" in order to prevent blocking of the event in searches for busy time. The "VEVENT" is also the calendar component used to specify an anniversary or daily reminder within a calendar. These events have a DATE value type for the "DTSTART" property instead of the default value type of DATE-TIME. If such a "VEVENT" has a "DTEND" property, it MUST be specified as a DATE value also. The anniversary type of "VEVENT" can span more than one date (i.e., "DTEND" property value is set to a calendar date after the "DTSTART" property value). If such a "VEVENT" has a "DURATION" property, it MUST be specified as a "dur-day" or "dur-week" value. The "DTSTART" property for a "VEVENT" specifies the inclusive start of the event. For recurring events, it also specifies the very first instance in the recurrence set. The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event. For cases where a "VEVENT" calendar component specifies a "DTSTART" property with a DATE value type but no "DTEND" nor "DURATION" property, the event's duration is taken to be one day. For cases where a "VEVENT" calendar component specifies a "DTSTART" property with a DATE-TIME value type but no "DTEND" property, the event ends on the same calendar date and time of day specified by the "DTSTART" property. The "VEVENT" calendar component cannot be nested within another calendar component. However, "VEVENT" calendar components can be related to each other or to a "VTODO" or to a "VJOURNAL" calendar component with the "RELATED-TO" property. Example: The following is an example of the "VEVENT" calendar component used to represent a meeting that will also be opaque to searches for busy time: BEGIN:VEVENT UID:19970901T130000Z-123401@example.com DTSTAMP:19970901T130000Z DTSTART:19970903T163000Z DTEND:19970903T190000Z SUMMARY:Annual Employee Review CLASS:PRIVATE CATEGORIES:BUSINESS,HUMAN RESOURCES END:VEVENT
  • Field Details

    • dateTimeEnd

      private DateTimeEnd dateTimeEnd
    • timeTransparency

      private TimeTransparency timeTransparency
      TRANSP Time Transparency RFC 5545 iCalendar 3.8.2.7. page 101 This property defines whether or not an event is transparent to busy time searches. Events that consume actual time SHOULD be recorded as OPAQUE. Other events, which do not take up time SHOULD be recorded as TRANSPARENT. Example: TRANSP:TRANSPARENT
  • Constructor Details

    • VEvent

      public VEvent()
    • VEvent

      public VEvent(VEvent source)
      Copy constructor
  • Method Details

    • getDateTimeEnd

      public DateTimeEnd getDateTimeEnd()
      DTEND Date-Time End RFC 5545, 3.8.2.2, page 95 This property specifies when the calendar component ends. The value type of this property MUST be the same as the "DTSTART" property, and its value MUST be later in time than the value of the "DTSTART" property. Example: DTEND;VALUE=DATE:19980704
      Specified by:
      getDateTimeEnd in interface VDateTimeEnd<VEvent>
    • setDateTimeEnd

      public void setDateTimeEnd(DateTimeEnd dateTimeEnd)
      Specified by:
      setDateTimeEnd in interface VDateTimeEnd<VEvent>
    • getTimeTransparency

      public TimeTransparency getTimeTransparency()
    • setTimeTransparency

      public void setTimeTransparency(String timeTransparency)
    • setTimeTransparency

      public void setTimeTransparency(TimeTransparency timeTransparency)
    • setTimeTransparency

      public void setTimeTransparency(TimeTransparency.TimeTransparencyType timeTransparency)
    • withTimeTransparency

      public VEvent withTimeTransparency(TimeTransparency timeTransparency)
    • withTimeTransparency

      public VEvent withTimeTransparency(TimeTransparency.TimeTransparencyType timeTransparencyType)
    • withTimeTransparency

      public VEvent withTimeTransparency(String timeTransparency)
    • getActualDuration

      public TemporalAmount getActualDuration()
      Description copied from class: VLocatable
      A convenience method that returns either Duration property value, or a calculated duration based on start and end values
      Specified by:
      getActualDuration in class VLocatable<VEvent>
    • setEndOrDuration

      public void setEndOrDuration(Temporal startRecurrence, Temporal endRecurrence)
      Description copied from class: VLocatable
      A convenience method that sets DTEND, DURATION (VEvent) or DUE (VTodo) depending on which ever is already set to new value calculated by the duration or period between input parameters (depending on if the parameters are LocalDate or a date/time type (i.e. ZonedDateTime)) Note: In order to set DTEND, DTSTART must be assigned a value. DURATION and DUE doesn't require a DTSTART value.
      Specified by:
      setEndOrDuration in class VLocatable<VEvent>
      Parameters:
      startRecurrence -
      endRecurrence -
    • errors

      public List<String> errors()
      Description copied from interface: VElement
      Produces a list of error messages indicating problems with calendar element VElement.errors() is invoked recursively to return errors of child elements in addition to errors in parent
      Specified by:
      errors in interface VElement
      Overrides:
      errors in class VLocatable<VEvent>
      Returns:
      - list of error messages
    • calendarList

      public List<VEvent> calendarList()
      Specified by:
      calendarList in interface VComponent
    • eraseDateTimeProperties

      @Deprecated public void eraseDateTimeProperties()
      Deprecated.
      Description copied from class: VDisplayable
      Erase all date/time properties such as DTSTART, DTEND, DURATION, and DUE (which ever exist). This is necessary to prepare a CANCEL iTIP message for one recurrence instance.
      Overrides:
      eraseDateTimeProperties in class VLocatable<VEvent>
    • parse

      public static VEvent parse(String content)
      Creates a new VEvent calendar component by parsing a String of iCalendar content lines
      Parameters:
      content - the text to parse, not null
      Returns:
      the parsed VEvent