Class AgendaEventSplitRest
No rule lives here. Who may split, what the continuation keeps and
which answers start over are AgendaEventService's; this resource
reads the user from the session, turns the body into the split the Service
takes and maps its refusals to statuses.
It answers the continuation's identifier, which the event page then
reads from the event resource as it reads any event: that read builds its
identities through social's EntityBuilder, which needs the JAX-RS
request context a Spring MVC request does not have.
A refusal writes its own body, {"message": "<code>"}, as
AgendaEventAttendeeRest does, with the date that blocks when a limit
is below the Yes answers of one of the series' dates. No exception's text is
ever a body: it goes to the log.
-
Constructor Summary
ConstructorsConstructorDescriptionAgendaEventSplitRest(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService) Builds the resource. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Object> splitEvent(jakarta.servlet.http.HttpServletRequest request, long eventId, String timeZoneId, boolean confirmClose, org.exoplatform.agenda.rest.model.EventSplitEntity splitEntity) Splits a recurring event at one of its dates.org.springframework.http.ResponseEntity<Object> unreadableBody(org.springframework.http.converter.HttpMessageNotReadableException e) A body that cannot be read as a change is refused with a code, never with the parser's text.
-
Constructor Details
-
AgendaEventSplitRest
@Autowired public AgendaEventSplitRest(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService) Builds the resource.- Parameters:
identityManager- resolves the user of the session and the people the change adds or removesagendaEventService- holder of every rule of the splitagendaEventAttendeeService- reads the series' attendees, among whom the people removed are found
-
-
Method Details
-
splitEvent
@PostMapping(path="events/{eventId}/split", consumes="application/json", produces="application/json") @Secured("users") public org.springframework.http.ResponseEntity<Object> splitEvent(jakarta.servlet.http.HttpServletRequest request, @PathVariable("eventId") long eventId, @RequestParam(name="timeZoneId",required=false) String timeZoneId, @RequestParam(name="confirmClose",defaultValue="false") boolean confirmClose, @RequestBody(required=false) org.exoplatform.agenda.rest.model.EventSplitEntity splitEntity) Splits a recurring event at one of its dates.- Parameters:
request- the authenticated requesteventId- technical identifier of the recurring eventtimeZoneId- the zone the user read the event inconfirmClose- whether the user confirmed closing the event while people wait for a seatsplitEntity- the change- Returns:
{"id": <the continuing series>}, or a refusal
-
unreadableBody
@ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class) public org.springframework.http.ResponseEntity<Object> unreadableBody(org.springframework.http.converter.HttpMessageNotReadableException e) A body that cannot be read as a change is refused with a code, never with the parser's text.- Parameters:
e- the parser's failure- Returns:
- the refusal
-