Interface CalendarEvent

All Superinterfaces:
Cloneable, Comparable<CalendarEvent>
All Known Subinterfaces:
RecurringEvent
All Known Implementing Classes:
CalendarEventImpl, FullDayRecurringEvent, RecurringEventImpl

public interface CalendarEvent extends Cloneable, Comparable<CalendarEvent>

This is a simple calendar event that has a start date and optionally and end date. If no end date is specified and the start date is of type "date" (no time information), the event lasts the whole day.

Start and end date must have the same time zone and must be of same type - which means either both are date-only values, or both are date-time values.

Its "natural" ordering is defined by the start dates of the event.

  • Method Details

    • getId

      UUID getId()
      The unique id of a calendar event. This is unique across all calendar events of all calendars.
    • getCalendar

      @Nullable @Nullable Calendar getCalendar()
      If this event is attached to a calendar, this returns the calender that this event belongs to.
    • getLabel

      String getLabel()
      A short summary of this event.
    • setLabel

      void setLabel(String label)
    • getDescription

      @Nullable @Nullable String getDescription()
      The full description.
    • setDescription

      void setDescription(String descr)
    • created

      org.joda.time.Instant created()
      Returns:
      the timestamp when this event has been created.
    • isAllDay

      boolean isAllDay()
      Returns whether this is an allday event. Allday events have only a start value.
    • getStart

      DateTimeValue getStart()
      Returns:
      the start of this event
    • setStartAndEnd

      void setStartAndEnd(DateTimeValue start, @Nullable @Nullable DateTimeValue end)
      Sets start and end date and checks for valid values.
    • setStart

      void setStart(DateTimeValue start)
    • setEnd

      void setEnd(@Nullable @Nullable DateTimeValue end)
    • getEnd

      @Nullable @Nullable DateTimeValue getEnd()
    • getTimeZone

      org.joda.time.DateTimeZone getTimeZone()
      A shortcut for #getStart().getTimeZone()
    • isOccurrence

      boolean isOccurrence()
      Returns:
      whether this calendar event is part of a recurrence set that has been generated
    • setOccurrence

      void setOccurrence(boolean occurrence)
    • clone

      Creates a deep copy of this event.
      Throws:
      CloneNotSupportedException
    • resolveRelation

      Relation resolveRelation(@Nullable @Nullable Context ctx) throws CalendarDataAccessException

      Resolves the relation from this calendar event entity. The relation is defined on the calendar of this event.

      Throws:
      CalendarDataAccessException
    • resolveRelation

      Relation resolveRelation(String relationName, @Nullable @Nullable Context ctx) throws CalendarDataAccessException
      Throws:
      CalendarDataAccessException
    • getTargetEntity

      Entity getTargetEntity(@Nullable @Nullable Context ctx) throws CalendarDataAccessException

      Resolves and returns the target entity of the relation defined from this calendar event entity. The relation is defined on the calendar of this event.

      Throws:
      CalendarDataAccessException
    • getTargetEntity

      Entity getTargetEntity(String relationName, @Nullable @Nullable Context ctx) throws CalendarDataAccessException
      Throws:
      CalendarDataAccessException
    • saveAndLink

      void saveAndLink(String relationName, Entity target)
      Saves this calendar event into the database and links it to the specified target entity. The event must be associated to a calender which is saved if not already present in the database, too.
    • save

      void save()
      Saves all properties of this event to the database.
    • saveAndRelateCalendar

      void saveAndRelateCalendar()
    • getEntity

      @Nullable @Nullable Entity getEntity(@Nullable @Nullable Context ctx)
      Returns:
      the entity representing this calendar event, or null if none is found
    • setLocation

      void setLocation(String location)
    • getLocation

      String getLocation()
    • setOnlineMeetingUrl

      void setOnlineMeetingUrl(URI onlineMeetingUrl)
    • getOnlineMeetingUrl

      URI getOnlineMeetingUrl()