class CatalogRest {

    @GET
    @Path("record-types")
    @Produces(MediaType.APPLICATION_JSON)
    @RolesAllowed("user")
    @ApiOperation("Retrieves all the available record types.")
    public Response getRecordTypes() {
        try {
            return Response.ok(mapper.valueToTree(getRecordFactories().keySet()).toString()).build();
        } catch (MobiException ex) {
            throw ErrorUtils.sendError(ex, ex.getMessage(), Response.Status.BAD_REQUEST);
        }
    }

}