class ResourceSetResource implements CollectionResourceProvider {

    @Override
    public Promise<ActionResponse, ResourceException> actionCollection(Context context, ActionRequest request) {

        if ("revokeAll".equalsIgnoreCase(request.getAction())) {
            String realm = getRealm(context);
            String resourceOwnerId = getUserId(context);
            return resourceSetService.revokeAllPolicies(context, realm, resourceOwnerId)
                    .thenAsync(new AsyncFunction<Void, ActionResponse, ResourceException>() {
                        @Override
                        public Promise<ActionResponse, ResourceException> apply(Void value) throws ResourceException {
                            return newResultPromise(newActionResponse(json(object())));
                        }
                    });
        } else {
            return new NotSupportedException("Action " + request.getAction() + " not supported").asPromise();
        }
    }

    @Inject public  ResourceSetResource(ResourceSetService resourceSetService, ContextHelper contextHelper,
            UmaLabelsStore umaLabelsStore, ResourceSetDescriptionValidator validator,
            ExtensionFilterManager extensionFilterManager);

}