Search in sources :

Example 1 with NoSuchDataAccessRequestException

use of org.obiba.mica.access.NoSuchDataAccessRequestException in project mica2 by obiba.

the class DataAccessRequestResource method delete.

@DELETE
public Response delete(@PathParam("id") String id) {
    subjectAclService.checkPermission("/data-access-request", "DELETE", id);
    try {
        dataAccessRequestService.delete(id);
        // remove associated comments
        commentsService.delete(DataAccessRequest.class.getSimpleName(), id);
        eventBus.post(new ResourceDeletedEvent("/data-access-request", id));
        eventBus.post(new ResourceDeletedEvent("/data-access-request/" + id, "_status"));
    } catch (NoSuchDataAccessRequestException e) {
    // ignore
    }
    return Response.noContent().build();
}
Also used : DataAccessRequest(org.obiba.mica.access.domain.DataAccessRequest) NoSuchDataAccessRequestException(org.obiba.mica.access.NoSuchDataAccessRequestException) ResourceDeletedEvent(org.obiba.mica.security.event.ResourceDeletedEvent) DELETE(javax.ws.rs.DELETE)

Aggregations

DELETE (javax.ws.rs.DELETE)1 NoSuchDataAccessRequestException (org.obiba.mica.access.NoSuchDataAccessRequestException)1 DataAccessRequest (org.obiba.mica.access.domain.DataAccessRequest)1 ResourceDeletedEvent (org.obiba.mica.security.event.ResourceDeletedEvent)1