Class CaldavCalendarShareChannelPlugin
- All Implemented Interfaces:
org.exoplatform.agenda.plugin.CalendarShareChannelPlugin
CaldavCalendarShareService
and every check it makes, and the grant is taken away when agenda revokes
the share.
Agenda owns the share; this add-on delivers it
Whether a share exists is agenda's record and agenda's ACL. This plugin
answers what happened on the server, and agenda keeps the record whatever
the answer. A share the server has nothing to do with — the owner has no
account, the calendar is not exported, the server offers no sharing eXo
can confirm, the colleague has no account on that server — is the normal
eXo-only case, answered as not applicable. Every other refusal of the
share service is a genuine delivery failure (NOT_READ_ONLY,
SERVER_UNREACHABLE, ...): agenda logs it and keeps the record
undelivered; the owner is told nothing.
Channel identifiers
The plugin is one bean and answers id() caldav; a delivery
is stamped caldav:<serverId> so the record says which server holds
the grant, and agenda resolves the channel by that prefix.
No business logic here
Every rule — who owns what, which collection, what the server allows — is the share service's. This class resolves the owner and the colleague to logins, transfers the call, and maps the outcome onto agenda's answers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringchannelIdOf(long serverId) The channel identifier of a delivery on one server: what a share record carries asdeliveredTo, and what a disconnect clears by.org.exoplatform.agenda.model.ChannelDeliveryGrants the colleague read access to the calendar's collection on the owner's server, as the share service does it, and answers where the grant now lives — the server and the collection — or why it could not be made.booleanholdsMeetingCopies(long calendarId, String ownerUsername) Whether the calendar is where this add-on writes the owner's eXo meeting copies — the mirror of a connected account — so agenda asks before sharing it.id()List<org.exoplatform.agenda.model.ExternalShare> listExternalShares(long calendarId, String ownerUsername, List<Long> recordedShareeIds) The grants the server holds on the calendar's collection that agenda has no record of, read live: a colleague granted from another client, someone outside eXo, everyone, a published link.org.exoplatform.agenda.model.ChannelShareslistShares(long calendarId, String ownerUsername, List<Long> recordedShareeIds) Both of agenda's questions from one read of the server (EXO-90385): the grants it holds that agenda has no record of, and whether this calendar is where eXo writes the owner's meeting copies.booleanremoveExternalShare(long calendarId, String externalId, String ownerUsername) Removes a colleague's read grant from the server: the external identifier is their login, aslistExternalShares(long, java.lang.String, java.util.List<java.lang.Long>)gave it.booleanTakes the colleague's access away on the server, whatever its level, as the share service does it.
-
Field Details
-
CHANNEL_ID
Whatid()answers, and the prefix of every delivery reference.- See Also:
-
-
Constructor Details
-
CaldavCalendarShareChannelPlugin
public CaldavCalendarShareChannelPlugin()
-
-
Method Details
-
id
- Specified by:
idin interfaceorg.exoplatform.agenda.plugin.CalendarShareChannelPlugin
-
holdsMeetingCopies
Whether the calendar is where this add-on writes the owner's eXo meeting copies — the mirror of a connected account — so agenda asks before sharing it.- Specified by:
holdsMeetingCopiesin interfaceorg.exoplatform.agenda.plugin.CalendarShareChannelPlugin- Parameters:
calendarId- the agenda calendarownerUsername- the owner's login- Returns:
- true when the calendar receives the meeting copies; false when it does not, is not on the server, or cannot be told
-
channelIdOf
The channel identifier of a delivery on one server: what a share record carries asdeliveredTo, and what a disconnect clears by.- Parameters:
serverId- the server key- Returns:
caldav:<serverId>
-