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
| Property | Returns | Description |
|---|---|---|
| allGroups | List<Group> | All groups within this calendar's organisation, offered as candidates when choosing which groups can see the calendar. |
| calendar | Calendar | The underlying Calendar entity that this resource represents. |
| calendarDescription | String | Free-text description of this calendar, as set in the calendar's settings. |
| calendarOrder | String | Display order value for this calendar, used to sort calendars in a list. Empty string if no order has been set. |
| children | ResourceList<CommonResource> | This calendar's events, plus any browseable pages registered by installed apps. Built and cached on first access. |
| color | String | Colour used to render this calendar and its events, as a CSS colour value. |
| cTag | String | CalDAV collection change tag for this calendar, used by CalDAV clients to detect when its contents have changed. |
| domainName | String | Domain name of the website this calendar is served from. |
| externalUrl | String | Public URL of this calendar on its website. |
| selectedGroups | List<Group> | Groups that currently have visibility of this calendar. Empty if the calendar has no group restrictions set. |
| supportedComponentSet | SupportedCalendarComponentList | The iCalendar component types this calendar supports, advertised to CalDAV clients. Always events and to-dos. |
| theme | 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. |
| timezone | 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. |
| timezoneIdList | List<String> | The list of timezone identifiers offered when configuring this calendar. |
| title | String | Display title for this calendar: the calendar's title if one is set, otherwise its name. |
| upcomingEvents | List<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.
| Parameter | Description |
|---|---|
startDate | the earliest start date to include, clamped to now if it is in the past |
endDate | the 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.
| Parameter | Description |
|---|---|
afterDays | the 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.
| Parameter | Description |
|---|---|
afterDays | the 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.
| Parameter | Description |
|---|---|
attendee | the 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.
| Parameter | Description |
|---|---|
g | the 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.
| Parameter | Description |
|---|---|
from | the earliest start date to include, or null for no lower bound |
to | the latest start date to include, or null for no upper bound |