class ResourceSetRegistrationEndpoint extends ServerResource {

    @Delete
    public Representation deleteResourceSet() throws NotFoundException, ServerException {

        if (!isConditionalRequest()) {
            throw new ResourceException(512, "precondition_failed", "Require If-Match header to delete Resource Set",
                    null);
        }

        ResourceSetStore store = providerSettingsFactory.get(requestFactory.create(getRequest())).getResourceSetStore();
        ResourceSetDescription resourceSetDescription = store.read(getResourceSetId(), getResourceOwnerId());
        OAuth2Request oAuth2Request = requestFactory.create(getRequest());

        for (ResourceSetRegistrationHook hook : hooks) {
            hook.resourceSetDeleted(oAuth2Request.<String>getParameter("realm"), resourceSetDescription);
        }
        labelRegistration.updateLabelsForDeletedResourceSet(resourceSetDescription);
        store.delete(getResourceSetId(), getResourceOwnerId());

        return createEmptyResponse();
    }

    @Inject public  ResourceSetRegistrationEndpoint(OAuth2ProviderSettingsFactory providerSettingsFactory,
            ResourceSetDescriptionValidator validator, OAuth2RequestFactory<?, Request> requestFactory,
            Set<ResourceSetRegistrationHook> hooks, ResourceSetLabelRegistration labelRegistration,
            ExtensionFilterManager extensionFilterManager, ExceptionHandler exceptionHandler,
            UmaLabelsStore umaLabelsStore, JacksonRepresentationFactory jacksonRepresentationFactory);

}