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 TypeMethodDescriptionvoid
addEvent
(CalendarEvent event) @Nullable String
The entity model that this calendar is associated to.Returns all events from this calendar.getEvents
(DateTimeValue date) Returns a list ofCalendarEvent
s that occur on the specified day.getEvents
(DateTimeValue start, DateTimeValue end) Returns a list ofCalendarEvent
s of this calendar within the specified period (inclusive).@Nullable Long
getId()
The name of the relation that links arbitary entities toCalendar_event
s of this calendar.org.joda.time.DateTimeZone
Returns the standard time zone used by this calender.Returns the name of this calendar.void
setDescription
(String description) void
setTimeZone
(@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_event
s of this calendar. It is the name fromCalendar_event
to another entity, for example:Calendar_event ---relationName--> Room
-
getEvents
Returns a list of
CalendarEvent
s 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
CalendarEvent
s 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. Anull
value will set the time zone to UTC.
-