Interface Calendar
- All Known Implementing Classes:
CalendarImpl
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 Summary
Modifier and TypeMethodDescriptionvoidaddEvent(CalendarEvent event) @Nullable StringThe entity model that this calendar is associated to.Returns all events from this calendar.getEvents(DateTimeValue date) Returns a list ofCalendarEvents that occur on the specified day.getEvents(DateTimeValue start, DateTimeValue end) Returns a list ofCalendarEvents of this calendar within the specified period (inclusive).@Nullable LonggetId()The name of the relation that links arbitary entities toCalendar_events of this calendar.org.joda.time.DateTimeZoneReturns the standard time zone used by this calender.Returns the name of this calendar.voidsetDescription(String description) voidsetTimeZone(@Nullable org.joda.time.DateTimeZone timeZone) Sets the default time zone for this calendar.
-
Method Details
-
getId
-
getUniqueId
String getUniqueId()Returns the name of this calendar. -
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 toCalendar_events of this calendar. It is the name fromCalendar_eventto another entity, for example:Calendar_event ---relationName--> Room -
getEvents
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
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. -
addEvent
-
setDescription
-
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. Anullvalue will set the time zone to UTC.
-