@PUT @Consumes(MediaType.APPLICATION_JSON) public Response update(@RequestBody Container container) { service.update(container); return Response.status(200).build(); }
@POST @Consumes(MediaType.APPLICATION_JSON) public void create(@RequestBody Container container) { service.create(container); }
@DELETE public Response delete(@QueryParam("id") int id) { service.delete(Long.valueOf(id)); return Response.status(200).build(); }
@GET @Produces(MediaType.APPLICATION_JSON) public List<Container> getContainers() { return service.containers(); }