@Test public void testGetContainer() { String containerName = "someContainer"; Main.getWorkMgr().initNetwork(containerName, null); try (Response response = getNetworkTarget(containerName).get()) { assertThat(response.getStatus(), equalTo(OK.getStatusCode())); assertThat( response.readEntity(new GenericType<Container>() {}).getName(), equalTo(containerName)); } }
@GET public Response getContainer() { _logger.infof("WMS2: getNetwork '%s'\n", _name); Container container = Main.getWorkMgr().getContainer(_name); return Response.ok(container).build(); }
NetworkResource { @GET public Response getContainer() { _logger.infof("WMS2: getNetwork '%s'\n", _name); Container container = Main.getWorkMgr().getContainer(_name); return Response.ok(container).build(); } }
NetworkResource { @GET public Response getContainer() { _logger.infof("WMS2: getNetwork '%s'\n", _name); Container container = Main.getWorkMgr().getContainer(_name); return Response.ok(container).build(); } NetworkResource(String apiKey, String name); }
NetworkResource { @GET public Response getContainer() { _logger.infof("WMS2: getNetwork '%s'\n", _name); Container container = Main.getWorkMgr().getContainer(_name); return Response.ok(container).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 { @GET public Response getContainer() { _logger.infof("WMS2: getNetwork '%s'\n", _name); Container container = Main.getWorkMgr().getContainer(_name); return Response.ok(container).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);  }