Interface CalendarShareChannel
- All Known Implementing Classes:
BlueMindShareChannel
ACL method — is not how the server's own users share, and whose
every change the contribution can confirm by reading it back.
How it is found. CalendarShareChannelRegistry collects every
bean implementing this interface, across web applications: a contributor
is a Spring @Service, never final. The mechanism a
collection gets is the one the host selects from what it advertises
(SharingMechanism.of(DavOptions)), unless a channel
applies(org.exoplatform.caldav.client.DavOptions, java.lang.String, org.exoplatform.caldav.client.SharingMechanism) to it, in which case it is that channel's
mechanism(); every operation on such a collection is then the
channel's. The host keeps every check that is not the server's: the
calendar, its owner, the pair, the sharee, the capability probe.
What happens without one. The host's own selection stands: a
BlueMind collection, which advertises Apple's sharing, selects
SharingMechanism.CALENDARSERVER_SHARE, which eXo does not offer,
so "Share" is not offered and every share operation is refused with
caldav.share.notSupported — never attempted through a mechanism
whose changes nobody reads back.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsCredentials(CalDavEndpoint endpoint) Whether the owner's configured credentials can open whatever session this channel reads the access list back through; the menu offers no "Share" otherwise.booleanapplies(DavOptions options, String collectionHref, SharingMechanism selected) Whether this channel is how a collection is shared, given what it advertises and what the host would select from that alone.org.exoplatform.caldav.model.CalendarSharesgrant(SharedCalendar calendar, ShareRecipient sharee, String ownerPrincipal, org.exoplatform.caldav.model.CalendarShares.ShareAccess access, ShareHost host) Gives a colleague access at the level asked for, confirmed by reading it back.booleanWhether a collection's path does not rule out the caller owning it — the cheap check a listing affords, before the access list is read.The mechanism this channel carries, as the host reports it in its logs and answers.voidrequireManager(SharedCalendar calendar, ShareHost host) Refuses an imported calendar the caller may not decide the access of on the server; an eXo-created one passes untouched.org.exoplatform.caldav.model.CalendarSharesrevoke(SharedCalendar calendar, ShareRecipient sharee, String ownerPrincipal, ShareHost host) Takes a colleague's access away, confirmed by reading it back.org.exoplatform.caldav.model.CalendarSharesshares(SharedCalendar calendar, ShareHost host) Who the calendar is shared with, read from the server now.
-
Method Details
-
mechanism
SharingMechanism mechanism()The mechanism this channel carries, as the host reports it in its logs and answers.- Returns:
- an offered mechanism other than
SharingMechanism.WEBDAV_ACL, which is the host's own, never null; a channel answering anything else is ignored, and so is a second channel for a mechanism an earlier one carries
-
applies
Whether this channel is how a collection is shared, given what it advertises and what the host would select from that alone.- Parameters:
options- what the collection answered, never nullcollectionHref- the collection's path, may be nullselected- what the host selects from the options alone- Returns:
- true when this channel takes the collection over
-
acceptsCredentials
Whether the owner's configured credentials can open whatever session this channel reads the access list back through; the menu offers no "Share" otherwise.- Parameters:
endpoint- the owner's endpoint- Returns:
- true when they can
-
mayOwn
Whether a collection's path does not rule out the caller owning it — the cheap check a listing affords, before the access list is read.- Parameters:
canonicalHref- the canonical collection hrefprincipal- the caller's recorded principal, never null- Returns:
- true when the path may be the caller's own calendar
-