class LicenseResource extends AbstractResource {

    @DELETE
    @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
    @Path("/{name}")
    public Response delete(@Auth final DbCredential credential, @PathParam("name") final String name){
        if(!credential.getRoles().contains(AvailableRoles.DATA_DELETER)){
            throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
        }

        LOG.info("Got a delete license request.");
        getLicenseHandler().deleteLicense(name);
        cacheUtils.clear(CacheName.PROMOTION_REPORTS);
        return Response.ok("done").build();
    }

    public  LicenseResource(final RepositoryHandler repoHandler, final GrapesServerConfig dmConfig);

}