use of org.candlepin.model.DeletedConsumer in project candlepin by candlepin.
the class ConsumerResource method removeDeletionRecord.
@ApiOperation(notes = "Removes the Deletion Record for a Consumer Allowed for a superadmin." + " The main use case for this would be if a user accidently deleted a " + "non-RHEL hypervisor, causing it to no longer be auto-detected via virt-who.", value = "removeDeletionRecord")
@ApiResponses({ @ApiResponse(code = 404, message = "") })
@DELETE
@Path("{consumer_uuid}/deletionrecord")
@Produces(MediaType.APPLICATION_JSON)
@Transactional
public void removeDeletionRecord(@PathParam("consumer_uuid") String uuid) {
DeletedConsumer dc = deletedConsumerCurator.findByConsumerUuid(uuid);
if (dc == null) {
throw new NotFoundException(i18n.tr("Deletion record for hypervisor \"{0}\" not found.", uuid));
}
deletedConsumerCurator.delete(dc);
}
Aggregations