class CatalogRest {

    @GET
    @Path("{catalogId}/records/{recordId}/distributions")
    @Produces(MediaType.APPLICATION_JSON)
    @RolesAllowed("user")
    @ApiOperation("Retrieves the list of Distributions associated with an UnversionedRecord.")
    public Response getUnversionedDistributions(@Context UriInfo uriInfo,
                                         @PathParam("catalogId") String catalogId,
                                         @PathParam("recordId") String recordId,
                                         @QueryParam("sort") String sort,
                                         @DefaultValue("0") @QueryParam("offset") int offset,
                                         @DefaultValue("100") @QueryParam("limit") int limit,
                                         @DefaultValue("true") @QueryParam("ascending") boolean asc) {
        try {
            validatePaginationParams(sort, SORT_RESOURCES, limit, offset);
            Set<Distribution> distributions = catalogManager.getUnversionedDistributions(vf.createIRI(catalogId),
                    vf.createIRI(recordId));
            return createPaginatedThingResponseJackson(uriInfo, distributions, vf.createIRI(sort), offset,
                    limit, asc, null,
                    Distribution.TYPE, transformer, bNodeService);
        } 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);
        }
    }

}