class ConvocationRestController {

    @JsonView(Views.ConvocationInternal.class)
    @PostMapping
    public ResponseEntity<?> create(
            @RequestAttribute("STELA-Current-Profile-Rights") Set<Right> rights,
            @RequestAttribute("STELA-Current-Local-Authority-UUID") String currentLocalAuthUuid,
            @RequestAttribute("STELA-Current-Profile-UUID") String currentProfileUuid,
            @Valid @RequestBody Convocation params) {

        validateAccess(currentLocalAuthUuid, null, currentProfileUuid, null, rights,
                Collections.singletonList(Right.CONVOCATION_DEPOSIT), false);

        try {
            Convocation convocation = convocationService.create(params, currentLocalAuthUuid, currentProfileUuid);
            return new ResponseEntity<>(convocation, HttpStatus.CREATED);
        } catch (ConvocationException e) {
            return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);
        }
    }

    @Autowired public  ConvocationRestController(
            ConvocationService convocationService,
            RecipientService recipientService);

}