@@ -0,0 +1,2346 @@
+package com.kodcu.rapid.path;%0A%0Aimport com.kodcu.rapid.config.DockerClient;%0A%0Aimport javax.json.JsonObject;%0Aimport javax.ws.rs.DELETE;%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.POST;%0Aimport javax.ws.rs.Path;%0Aimport javax.ws.rs.PathParam;%0Aimport javax.ws.rs.QueryParam;%0Aimport javax.ws.rs.client.WebTarget;%0Aimport javax.ws.rs.core.Response;%0Aimport java.util.Objects;%0Aimport java.util.concurrent.ExecutionException;%0A%0A/**%0A * Created by hakan on 15/02/2017.%0A */%0A@Path(%22nodes%22)%0Apublic class Node extends DockerClient %7B%0A%0A    @GET%0A    public String listNodes(@QueryParam(%22filters%22) String filters)%0A            throws ExecutionException, InterruptedException %7B%0A%0A        WebTarget target = resource().path(%22nodes%22);%0A%0A        if (Objects.nonNull(filters))%0A            target = target.queryParam(%22filters%22, filters);%0A%0A        Response response = getResponse(target);%0A        String entity = response.readEntity(String.class);%0A        response.close();%0A        return entity;%0A    %7D%0A%0A    @GET%0A    @Path(%22%7Bid%7D%22)%0A    public String getNode(@PathParam(%22id%22) String id)%0A            throws ExecutionException, InterruptedException %7B%0A%0A        WebTarget target = resource().path(%22nodes%22).path(id);%0A%0A        Response response = getResponse(target);%0A        String entity = response.readEntity(String.class);%0A        response.close();%0A        return entity;%0A    %7D%0A%0A%0A    @DELETE%0A    @Path(%22%7Bid%7D%22)%0A    public String deleteNode(@PathParam(%22id%22) String id)%0A            throws ExecutionException, InterruptedException %7B%0A%0A        WebTarget target = resource().path(%22nodes%22).path(id);%0A%0A        Response response = deleteResponse(target);%0A        String entity = response.readEntity(String.class);%0A        response.close();%0A        return entity;%0A    %7D%0A%0A    @POST%0A    @Path(%22%7Bid%7D/update%22)%0A    public String updateNode(@PathParam(%22id%22) String id,%0A                             @QueryParam(%22version%22) String version,%0A                             JsonObject content)%0A            throws ExecutionException, InterruptedException %7B%0A%0A        WebTarget target = resource().path(%22nodes%22).path(id).path(%22update%22);%0A%0A        if (Objects.nonNull(version))%0A            target = target.queryParam(%22version%22, version);%0A%0A        Response response = postResponse(target, content);%0A        String entity = response.readEntity(String.class);%0A        response.close();%0A        return entity;%0A    %7D%0A%7D%0A

add node queries