class RestUtils {

    public static void validatePaginationParams(String sortIRI, Set<String> sortResources, int limit, int offset) {
        if (sortIRI != null && !sortResources.contains(sortIRI)) {
            throw ErrorUtils.sendError("Invalid sort property IRI", Response.Status.BAD_REQUEST);
        }
        LinksUtils.validateParams(limit, offset);
    }

}