Interface CalendarShareChannelPlugin
Agenda owns the share; a channel delivers it
Sharing a calendar with a colleague is an eXo fact, recorded by agenda and enforced by agenda's own ACL, for every owner — including one who never connected a CalDAV account. A channel is asked, after the record is written, to carry the same share where it can; its answer never decides whether the share exists. A channel that fails leaves the record standing, undelivered: agenda logs the failure at WARN and tells the owner nothing, and nothing is retried on its own. A channel that says the share is none of its business leaves the record eXo-only. A grant a channel holds for a colleague of this deployment that agenda has no record of is recorded silently, as an adopted share, the moment the owner lists their shares.
How it is registered
As a Spring @Service bean, non-final, in the contributing add-on's
own context: agenda collects every bean of this type at the moment it asks,
so an add-on whose WAR boots after agenda's is found just the same, and a
deployment without the add-on simply has none. Same idiom as
RemoteEventCopyPlugin.
No business logic here
An implementation transfers the call to its own service layer and answers;
it decides nothing about who may share what. It may throw: agenda reads an
exception as a ChannelDelivery.Status.FAILED delivery, or as a
withdrawal that did not happen, and carries on with the eXo record.
-
Method Summary
Modifier and TypeMethodDescriptiondeliver(CalendarShare share, String ownerUsername) Makes this channel's grant match a share record: carries a share the owner just recorded, shared again while it was still undelivered, or levelled (EXO-90378).default booleanholdsMeetingCopies(long calendarId, String ownerUsername) Whether this channel writes copies of the owner's eXo meetings into the calendar — the mirror calendar of a connected account.id()The channel's identifier —caldav.listExternalShares(long calendarId, String ownerUsername, List<Long> recordedShareeIds) The shares of a calendar that exist on this channel's server without an eXo record, read live.default ChannelShareslistShares(long calendarId, String ownerUsername, List<Long> recordedShareeIds) Everything this channel has to say about a calendar when the owner opens the Share drawer (EXO-90385):listExternalShares(long, java.lang.String, java.util.List<java.lang.Long>)andholdsMeetingCopies(long, java.lang.String), in one ask.booleanremoveExternalShare(long calendarId, String externalId, String ownerUsername) Removes an external share on the server, at the owner's request.booleanwithdraw(CalendarShare share, String ownerUsername) Withdraws a share this channel carried, before agenda deletes the record.
-
Method Details
-
id
String id()The channel's identifier —caldav. Stable across restarts. A delivery may qualify it with the server that holds the grant,caldav:<serverId>, on the record'sdeliveredTo: agenda resolves the channel by that prefix when it withdraws the share.- Returns:
- the identifier, never blank
-
holdsMeetingCopies
Whether this channel writes copies of the owner's eXo meetings into the calendar — the mirror calendar of a connected account. Sharing such a calendar exposes the titles, descriptions and spaces of every meeting the owner attends, private spaces included, so the drawer asks once before sharing it (EXO-90345). A channel that copies nothing answers false, the default.- Parameters:
calendarId- technical identifier of the calendarownerUsername- the owner of the calendar- Returns:
- true when the calendar receives meeting copies from this channel
-