public ResourceOptionsDto availableOperations(UriInfo context) {
ResourceOptionsDto dto = new ResourceOptionsDto();
UriBuilder baseUriBuilder = context.getBaseUriBuilder()
.path(relativeRootResourcePath)
.path(FilterRestService.PATH)
.path(resourceId);
URI baseUri = baseUriBuilder.build();
if (isAuthorized(READ)) {
dto.addReflexiveLink(baseUri, HttpMethod.GET, "self");
URI singleResultUri = baseUriBuilder.clone().path("/singleResult").build();
dto.addReflexiveLink(singleResultUri, HttpMethod.GET, "singleResult");
dto.addReflexiveLink(singleResultUri, HttpMethod.POST, "singleResult");
URI listUri = baseUriBuilder.clone().path("/list").build();
dto.addReflexiveLink(listUri, HttpMethod.GET, "list");
dto.addReflexiveLink(listUri, HttpMethod.POST, "list");
URI countUri = baseUriBuilder.clone().path("/count").build();
dto.addReflexiveLink(countUri, HttpMethod.GET, "count");
dto.addReflexiveLink(countUri, HttpMethod.POST, "count");
}
if (isAuthorized(DELETE)) {