Interface Calendar

All Known Implementing Classes:
CalendarImpl

public interface Calendar

A calendar is the main entity storing a set of calendar-events.

A calendar has a default time zone attached, which is UTC if nothing is specified explicitely. This time zone can be used to interpret calendar events that have no additional time zone specified.

  • Method Details

    • getId

      @Nullable @Nullable Long getId()
    • getUniqueId

      String getUniqueId()
      Returns the name of this calendar.
    • getDescription

      @Nullable @Nullable String getDescription()
    • getEntityType

      String getEntityType()
      The entity model that this calendar is associated to.
    • getRelationName

      String getRelationName()
      The name of the relation that links arbitary entities to Calendar_events of this calendar. It is the name from Calendar_event to another entity, for example:
      
         Calendar_event ---relationName--> Room
       
    • getEvents

      List<CalendarEvent> getEvents(DateTimeValue start, DateTimeValue end)

      Returns a list of CalendarEvents of this calendar within the specified period (inclusive). This will resolve recurring events to its recurrence set.

      If both, start and end date, are of type date and denote the same point in time, this method returns the same result as getEvents(DateTimeValue).

    • getEvents

      List<CalendarEvent> getEvents(DateTimeValue date)

      Returns a list of CalendarEvents that occur on the specified day. The calendar is searched for events from the start until the end of the day specified by the argument.

      Recurring events are resolved to its recurrence set.

    • getEvents

      List<CalendarEvent> getEvents()
      Returns all events from this calendar. This will not resolve recurring events to its recurrence set.
    • getCalendarEvent

      @Nullable @Nullable CalendarEvent getCalendarEvent(UUID id)
      Returns an event with the specified id.
    • addEvent

      void addEvent(CalendarEvent event)
    • setDescription

      void setDescription(String descr)
    • getTimeZone

      org.joda.time.DateTimeZone getTimeZone()
      Returns the standard time zone used by this calender. If no timezone has been explicitely set, UTC is returned.
    • setTimeZone

      void setTimeZone(@Nullable @Nullable org.joda.time.DateTimeZone timeZone)
      Sets the default time zone for this calendar. A null value will set the time zone to UTC.