@Test public void testDeleteNetwork() { String network = "network1"; Main.getWorkMgr().initNetwork(network, null); try (Response response = getNetworkTarget(network).delete()) { assertThat(response.getStatus(), equalTo(OK.getStatusCode())); } }
@DELETE public Response deleteNetwork() { if (!Main.getWorkMgr().delNetwork(_name)) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok().build(); }
NetworkResource { @DELETE public Response deleteNetwork() { if (!Main.getWorkMgr().delNetwork(_name)) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok().build(); } }
NetworkResource { @DELETE public Response deleteNetwork() { if (!Main.getWorkMgr().delNetwork(_name)) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok().build(); } NetworkResource(String apiKey, String name); }
NetworkResource { @DELETE public Response deleteNetwork() { if (!Main.getWorkMgr().delNetwork(_name)) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok().build(); } NetworkResource(String apiKey, String name); @Path(RSC_ANALYSES) AnalysesResource getAnalysesResource(); @GET Response getContainer(); @Path(RSC_OBJECTS) NetworkObjectsResource getNetworkObjectsResource(); @Path(RSC_NODE_ROLES) NetworkNodeRolesResource getNodeRolesResource(); @Path(RSC_QUESTIONS) QuestionsResource getAdHocQuestionsResource(); @Path(RSC_REFERENCE_LIBRARY) ReferenceLibraryResource getReferenceLibraryResource(); @DELETE Response deleteNetwork(); @Path(RSC_SNAPSHOTS) SnapshotsResource getSnapshotsResource(); @Path(RSC_WORK) WorkResource getWorkResource(); @POST @Path(RSC_SNAPSHOTS + ":" + RSC_FORK) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response forkSnapshot(ForkSnapshotBean forkSnapshotBean); }
NetworkResource { @DELETE public Response deleteNetwork() { if (!Main.getWorkMgr().delNetwork(_name)) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok().build(); } NetworkResource(String apiKey, String name); @Path(RSC_ANALYSES) AnalysesResource getAnalysesResource(); @GET Response getContainer(); @Path(RSC_OBJECTS) NetworkObjectsResource getNetworkObjectsResource(); @Path(RSC_NODE_ROLES) NetworkNodeRolesResource getNodeRolesResource(); @Path(RSC_QUESTIONS) QuestionsResource getAdHocQuestionsResource(); @Path(RSC_REFERENCE_LIBRARY) ReferenceLibraryResource getReferenceLibraryResource(); @DELETE Response deleteNetwork(); @Path(RSC_SNAPSHOTS) SnapshotsResource getSnapshotsResource(); @Path(RSC_WORK) WorkResource getWorkResource(); @POST @Path(RSC_SNAPSHOTS + ":" + RSC_FORK) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response forkSnapshot(ForkSnapshotBean forkSnapshotBean);  }