class PolicyV1Filter implements Filter {

    @Override
    public Promise<QueryResponse, ResourceException> filterQuery(final Context context,
            final QueryRequest request, final QueryResourceHandler handler, final RequestHandler next) {
        return next.handleQuery(context, request, new QueryResourceHandler() {
            @Override
            public boolean handleResource(ResourceResponse resource) {
                final JsonValue jsonValue = resource.getContent();
                jsonValue.remove(RESOURCE_TYPE_UUID);
                return handler.handleResource(resource);
            }
        });
    }

    @Inject public  PolicyV1Filter(final ApplicationServiceFactory applicationServiceFactory,
                          final ExceptionMappingHandler<EntitlementException, ResourceException> resourceErrorHandler,
                          final ContextHelper contextHelper,
                          @Named("frRest") final Debug debug);

}