@DELETE @Path("{type}/{id}") public Response delete( @PathParam("type") final String typeStr, @PathParam("id") final String id) { final OrphanedTrustCertificate.Type type; try { type = OrphanedTrustCertificate.Type.valueOf(typeStr); } catch (IllegalArgumentException e) { return badRequest("Invalid type parameter: " + typeStr); } orphanedTrustDetector.deleteTrustCertificate(id, type); return ok("Deleted certificate with id: " + id); }
@GET public Response getIds() { return Response.ok( new OrphanedTrustEntityList(orphanedTrustDetector.findOrphanedTrustCertificates())) .build(); }