class CatalogRest {

    @POST
    @Path("{catalogId}/records/{recordId}/in-progress-commit")
    @RolesAllowed("user")
    @ApiOperation("Creates a InProgressCommit linked to a specific VersionedRDFRecord.")
    public Response createInProgressCommit(@Context ContainerRequestContext context,
                                    @PathParam("catalogId") String catalogId,
                                    @PathParam("recordId") String recordId) {
        try {
            User activeUser = getActiveUser(context, engineManager);
            InProgressCommit inProgressCommit = catalogManager.createInProgressCommit(activeUser);
            catalogManager.addInProgressCommit(vf.createIRI(catalogId), vf.createIRI(recordId), inProgressCommit);
            return Response.ok().build();
        } catch (IllegalArgumentException ex) {
            throw ErrorUtils.sendError(ex, ex.getMessage(), Response.Status.BAD_REQUEST);
        } catch (MobiException ex) {
            throw ErrorUtils.sendError(ex, ex.getMessage(), Response.Status.INTERNAL_SERVER_ERROR);
        }
    }

}