Represents a single calendar as a CalDAV collection resource, listing its events as children and serving the calendar and event management pages for both the website and admin UI. A CalendarFolder sits under a CalendarHomeFolder in the resource tree and answers CalDAV PROPFIND/REPORT requests via CalendarResource and ReportableResource. Form posts to this resource create new events, update calendar settings such as colour and timezone, and change which groups can see the calendar. Uploading an .ics file to this folder creates a new event directly from the iCalendar data.

Group: Resources

Extends: BranchFolder

Implements: CalendarResource, ReportableResource, DeletableResource, PutableResource, GetableResource, WebsiteBranchResource


Properties

PropertyReturnsDescription
allGroupsList<Group>All groups within this calendar's organisation, offered as candidates when choosing which groups can see the calendar.
calendarCalendarThe underlying Calendar entity that this resource represents.
calendarDescriptionStringFree-text description of this calendar, as set in the calendar's settings.
calendarOrderStringDisplay order value for this calendar, used to sort calendars in a list. Empty string if no order has been set.
childrenResourceList<CommonResource>This calendar's events, plus any browseable pages registered by installed apps. Built and cached on first access.
colorStringColour used to render this calendar and its events, as a CSS colour value.
cTagStringCalDAV collection change tag for this calendar, used by CalDAV clients to detect when its contents have changed.
domainNameStringDomain name of the website this calendar is served from.
externalUrlStringPublic URL of this calendar on its website.
selectedGroupsList<Group>Groups that currently have visibility of this calendar. Empty if the calendar has no group restrictions set.
supportedComponentSetSupportedCalendarComponentListThe iCalendar component types this calendar supports, advertised to CalDAV clients. Always events and to-dos.
themeThemeThe visual theme for this calendar's website, used to render the calendar and event pages. Returns null when the calendar is not associated with a website.
timezoneStringDefault timezone for events on this calendar, taken from the owning organisation's setting. Falls back to Europe/London if the organisation has no timezone set.
timezoneIdListList<String>The list of timezone identifiers offered when configuring this calendar.
titleStringDisplay title for this calendar: the calendar's title if one is set, otherwise its name.
upcomingEventsList<CalEvent>Events on this calendar starting from now through to 30 days ahead, ordered by start date.

Methods

getTheme() · getUpcomingEvents() · getUpcomingEvents(Date startDate, Date endDate) · getUpcomingAfter(int afterDays) · getUpcomingEvents(int afterDays) · findEventsFor(Profile attendee) · getAllGroups() · isSelected(Group g) · getSelectedGroups() · getTitle() · getCalendar() · getCalendarDescription() · getColor() · getCTag() · getSupportedComponentSet() · getCalendarOrder() · getTimezoneIdList() · getTimezone() · getExternalUrl() · getDomainName() · getChildren() · findEvents(Date from, Date to)

getTheme()

Returns: Theme

The visual theme for this calendar's website, used to render the calendar and event pages. Returns null when the calendar is not associated with a website.

getUpcomingEvents()

Returns: List<CalEvent>

Events on this calendar starting from now through to 30 days ahead, ordered by start date.

getUpcomingEvents(Date startDate, Date endDate)

Returns: List<CalEvent>

Events on this calendar between the given dates. If the start date is in the past it is clamped to now, so this always returns events from the present onward. A null end date means there is no upper bound.

ParameterDescription
startDatethe earliest start date to include, clamped to now if it is in the past
endDatethe latest start date to include, or null for no upper bound

getUpcomingAfter(int afterDays)

Returns: List<CalEvent>

Events on this calendar from now through to the given number of days ahead.

ParameterDescription
afterDaysthe number of days ahead to search

getUpcomingEvents(int afterDays)

Returns: List<CalEvent>

Events on this calendar from now through to the given number of days ahead, as CalEvent entities rather than resource objects.

ParameterDescription
afterDaysthe number of days ahead to search

findEventsFor(Profile attendee)

Returns: List<CalEvent>

Events on this calendar that the given profile is invited to as an attendee, across all dates.

ParameterDescription
attendeethe profile whose invitations are being looked up

getAllGroups()

Returns: List<Group>

All groups within this calendar's organisation, offered as candidates when choosing which groups can see the calendar.

isSelected(Group g)

Returns: boolean

Whether the given group currently has visibility of this calendar.

ParameterDescription
gthe group to check

getSelectedGroups()

Returns: List<Group>

Groups that currently have visibility of this calendar. Empty if the calendar has no group restrictions set.

getTitle()

Returns: String

Display title for this calendar: the calendar's title if one is set, otherwise its name.

getCalendar()

Returns: Calendar

The underlying Calendar entity that this resource represents.

getCalendarDescription()

Returns: String

Free-text description of this calendar, as set in the calendar's settings.

getColor()

Returns: String

Colour used to render this calendar and its events, as a CSS colour value.

getCTag()

Returns: String

CalDAV collection change tag for this calendar, used by CalDAV clients to detect when its contents have changed.

getSupportedComponentSet()

Returns: SupportedCalendarComponentList

The iCalendar component types this calendar supports, advertised to CalDAV clients. Always events and to-dos.

getCalendarOrder()

Returns: String

Display order value for this calendar, used to sort calendars in a list. Empty string if no order has been set.

getTimezoneIdList()

Returns: List<String>

The list of timezone identifiers offered when configuring this calendar.

getTimezone()

Returns: String

Default timezone for events on this calendar, taken from the owning organisation's setting. Falls back to Europe/London if the organisation has no timezone set.

getExternalUrl()

Returns: String

Public URL of this calendar on its website.

getDomainName()

Returns: String

Domain name of the website this calendar is served from.

getChildren()

Returns: ResourceList<CommonResource>

This calendar's events, plus any browseable pages registered by installed apps. Built and cached on first access.

findEvents(Date from, Date to)

Returns: List<CalEvent>

Events on this calendar between the given dates.

ParameterDescription
fromthe earliest start date to include, or null for no lower bound
tothe latest start date to include, or null for no upper bound
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.