Class AgendaCalendarShareServiceImpl
- All Implemented Interfaces:
org.exoplatform.agenda.service.AgendaCalendarShareService
Sharing is the owner's: a personal calendar — its owner is a user, not a space — that is not a subscription (EXO-90278). A space calendar is read by its members already, and sharing one is a later decision. The sharee is a usable user of this deployment other than the owner.
Delivery: the record is written first and stands whatever the
channels answer. Each registered CalendarShareChannelPlugin is asked
to carry the share; the first that delivers is recorded on the row, a
failure is logged at WARN and leaves the row undelivered — the owner is told
nothing and nothing is retried on its own — and a channel that says the
share is none of its business leaves the row eXo-only. A grant a channel
holds for a colleague that eXo has no record of is recorded silently, as an
adopted share, when the owner lists their shares. The plugins are collected
from the Spring context at the moment they are asked, so an add-on booting
after agenda is found all the same — the idiom of
AgendaRemoteCopyService.
Revoking withdraws from the channel first, then deletes the row whatever the channel answered: a grant the channel could not remove shows up under the external shares, with its own removal, rather than keeping a colleague on the eXo record the owner asked to end.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMost shares one "shared with me" listing reads.Fields inherited from interface org.exoplatform.agenda.service.AgendaCalendarShareService
CALENDAR_SHARE_LEVEL_CHANGED_EVENT, CALENDAR_SHARED_EVENT, CALENDAR_UNSHARED_EVENT, INVALID_CALENDAR, LEVEL_MANDATORY, LEVEL_NOT_NARROWED, NO_CHANNEL, SHARE_NOT_FOUND, SHARE_NOT_REMOVED, SHAREE_DISABLED, SHAREE_IS_OWNER, SHAREE_UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionAgendaCalendarShareServiceImpl(CalendarShareStorage calendarShareStorage, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.services.listener.ListenerService listenerService, org.springframework.context.ApplicationContext applicationContext) Builds the service. -
Method Summary
Modifier and TypeMethodDescriptionvoidclearDelivery(long ownerIdentityId, String channelId) countShareesByCalendar(String ownerUsername) voiddeleteShares(long calendarId) voiddeleteSharesOfUser(long identityId) org.exoplatform.agenda.model.ChannelSharesgetChannelShares(long calendarId, String ownerUsername) List<org.exoplatform.agenda.model.ExternalShare> getExternalShares(long calendarId, String ownerUsername) getSharedCalendarIds(long viewerIdentityId) List<org.exoplatform.agenda.model.CalendarShare> getSharedWithMe(String username) org.exoplatform.agenda.constant.CalendarShareLevelgetShareLevel(long calendarId, long viewerIdentityId) getShareLevels(long viewerIdentityId) List<org.exoplatform.agenda.model.CalendarShare> booleanholdsMeetingCopies(long calendarId, String ownerUsername) booleanisSharedWith(long calendarId, long viewerIdentityId) voidremoveExternalShare(long calendarId, String channelId, String externalId, String ownerUsername) voidorg.exoplatform.agenda.model.CalendarSharesetLevel(long calendarId, long shareeIdentityId, org.exoplatform.agenda.constant.CalendarShareLevel level, String ownerUsername) org.exoplatform.agenda.model.CalendarShareshare(long calendarId, String shareeUsername, org.exoplatform.agenda.constant.CalendarShareLevel level, String ownerUsername) void
-
Field Details
-
MAX_SHARED_WITH_ME
public static final int MAX_SHARED_WITH_MEMost shares one "shared with me" listing reads.- See Also:
-
-
Constructor Details
-
Method Details
-
holdsMeetingCopies
public boolean holdsMeetingCopies(long calendarId, String ownerUsername) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException A channel that throws is read as copying nothing: the confirmation is a courtesy to the owner, not a gate, and a channel that cannot answer must not stop the share.
- Specified by:
holdsMeetingCopiesin interfaceorg.exoplatform.agenda.service.AgendaCalendarShareService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
setHidden
public void setHidden(long calendarId, String username, boolean hidden) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
setHiddenin interfaceorg.exoplatform.agenda.service.AgendaCalendarShareService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
clearDelivery
- Specified by:
clearDeliveryin interfaceorg.exoplatform.agenda.service.AgendaCalendarShareService