Package org.exoplatform.caldav.rest
Class CaldavShareRest
java.lang.Object
org.exoplatform.caldav.rest.CaldavShareRest
Sharing a user's own eXo calendar, read-only, with colleagues connected to
the same CalDAV server (EXO-90253).
The caller is read from the conversation state, never from the request, and
the request names only an agenda calendar id and a colleague's login: the
collection, the principals and the access list are all resolved and checked
by CaldavCalendarShareService. This layer maps the outcome onto a
status and nothing else: 404 for a calendar that does not exist, 403 for one
the caller does not own, 400 with the message code for a request that cannot
be honoured, and for a failure of the account or the server the code with
whatever the server said (409 for a state of the account or the server, 502
when the server could not be reached or did not apply what it accepted).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.exoplatform.caldav.model.CalendarShares.ShareUser> candidates(long calendarId, String query) The colleagues a calendar can be shared with.onShareFailure(CaldavShareException failure) Maps a failure of the account or the server onto a status, keeping its code, and what the server said, in the body.org.exoplatform.caldav.model.CalendarSharesshare(long calendarId, ShareCalendarRequest request) Gives a colleague read access to a calendar.The caller's calendars agenda may offer "Share" on.org.exoplatform.caldav.model.CalendarSharesshares(long calendarId) Who a calendar is shared with, read from the server now.org.exoplatform.caldav.model.CalendarSharesTakes a colleague's read access to a calendar away.
-
Constructor Details
-
CaldavShareRest
public CaldavShareRest()
-
-
Method Details
-
candidates
@GetMapping("/calendars/{calendarId}/share-candidates") @Secured("users") public List<org.exoplatform.caldav.model.CalendarShares.ShareUser> candidates(@PathVariable("calendarId") long calendarId, @RequestParam(name="q",required=false) String query) The colleagues a calendar can be shared with.- Parameters:
calendarId- the agenda calendarquery- text the login or full name must contain- Returns:
- the candidates