Package org.exoplatform.agenda.rest
Class AgendaCalendarShareRest
java.lang.Object
org.exoplatform.agenda.rest.AgendaCalendarShareRest
Sharing a personal calendar with colleagues, and reading the calendars
shared with oneself (EXO-90357).
No rule lives here. Who may share, with whom, and what a sharee reads
are AgendaCalendarShareService's; this resource maps its exceptions
to statuses — not found, then forbidden, then bad request — and names the
people its answers carry. The asking user comes from the session, never from
a parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionAgendaCalendarShareRest(org.exoplatform.agenda.service.AgendaCalendarShareService calendarShareService, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.social.core.manager.IdentityManager identityManager) Builds the resource. -
Method Summary
Modifier and TypeMethodDescriptiongetShareCounts(jakarta.servlet.http.HttpServletRequest request) How many colleagues each of the user's calendars is shared with: what draws the shared sign on the personal calendar rows with one request.org.springframework.http.ResponseEntity<List<SharedCalendarEntity>> getSharedWithMe(jakarta.servlet.http.HttpServletRequest request) The calendars shared with the user, hidden ones included.getShares(jakarta.servlet.http.HttpServletRequest request, long calendarId) The colleagues a calendar is shared with, and the shares of it that exist on a channel's server without an eXo record.org.springframework.http.ResponseEntity<Void> removeExternalShare(jakarta.servlet.http.HttpServletRequest request, long calendarId, String channelId, String externalId) Removes a share that exists on a channel's server without an eXo record.org.springframework.http.ResponseEntity<Void> setHidden(jakarta.servlet.http.HttpServletRequest request, long calendarId, Map<String, Object> body) Hides, or shows again, a calendar shared with the user.org.springframework.http.ResponseEntity<Void> setLevel(jakarta.servlet.http.HttpServletRequest request, long calendarId, long shareeIdentityId, Map<String, String> body) Changes what a colleague may do with a calendar shared with them (EXO-90378).org.springframework.http.ResponseEntity<CalendarShareeEntity> Shares a calendar with a colleague.org.springframework.http.ResponseEntity<Void> unshare(jakarta.servlet.http.HttpServletRequest request, long calendarId, long shareeIdentityId) Stops sharing a calendar with a colleague.
-
Constructor Details
-
Method Details
-
setLevel
@PutMapping("calendars/{calendarId}/shares/{shareeIdentityId}") @Secured("users") public org.springframework.http.ResponseEntity<Void> setLevel(jakarta.servlet.http.HttpServletRequest request, @PathVariable("calendarId") long calendarId, @PathVariable("shareeIdentityId") long shareeIdentityId, @RequestBody Map<String, String> body) Changes what a colleague may do with a calendar shared with them (EXO-90378).- Parameters:
request- the authenticated requestcalendarId- technical identifier of the calendarshareeIdentityId- identity identifier of the colleaguebody-{"access": "VIEW"|"EDIT"}- Returns:
- no content
-
setHidden
@PutMapping("calendars/shared-with-me/{calendarId}/hidden") @Secured("users") public org.springframework.http.ResponseEntity<Void> setHidden(jakarta.servlet.http.HttpServletRequest request, @PathVariable("calendarId") long calendarId, @RequestBody Map<String, Object> body) Hides, or shows again, a calendar shared with the user.- Parameters:
request- the authenticated requestcalendarId- technical identifier of the calendarbody-{"hidden": true|false}- Returns:
- no content