@Test(dependsOnMethods = "testDeployApplication") public void testListEntities() { Set<EntitySummary> entities = client().resource("/v1/applications/simple-app/entities") .get(new GenericType<Set<EntitySummary>>() {}); assertEquals(entities.size(), 2); EntitySummary entity = Iterables.find(entities, withName("simple-ent"), null); EntitySummary group = Iterables.find(entities, withName("simple-group"), null); Assert.assertNotNull(entity); Assert.assertNotNull(group); client().resource(entity.getLinks().get("self")).get(ClientResponse.class); Set<EntitySummary> children = client().resource(entity.getLinks().get("children")) .get(new GenericType<Set<EntitySummary>>() {}); assertEquals(children.size(), 0); }
@Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); } }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }  }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }  @Deprecated @Override JsonNode applicationTree(); @Override JsonNode fetch(String entityIds); @Override List<ApplicationSummary> list(String typeRegex); @Override ApplicationSummary get(String application); Response create(ApplicationSpec applicationSpec); @Override Response createFromYaml(String yaml); @Override Response createPoly(byte[] inputToAutodetectType); @Override Response createFromForm(String contents); @Override Response delete(String application); @Override List<EntitySummary> getDescendants(String application, String typeRegex); @Override Map<String, Object> getDescendantsSensor(String application, String sensor, String typeRegex); static Map<String, Object> getSensorMap(String sensor, Iterable<Entity> descs); }
ApplicationResource extends AbstractBrooklynRestResource implements ApplicationApi { @Override public ApplicationSummary get(String application) { return ApplicationTransformer.summaryFromApplication(brooklyn().getApplication(application)); }  @Deprecated @Override JsonNode applicationTree(); @Override JsonNode fetch(String entityIds); @Override List<ApplicationSummary> list(String typeRegex); @Override ApplicationSummary get(String application); Response create(ApplicationSpec applicationSpec); @Override Response createFromYaml(String yaml); @Override Response createPoly(byte[] inputToAutodetectType); @Override Response createFromForm(String contents); @Override Response delete(String application); @Override List<EntitySummary> getDescendants(String application, String typeRegex); @Override Map<String, Object> getDescendantsSensor(String application, String sensor, String typeRegex); static Map<String, Object> getSensorMap(String sensor, Iterable<Entity> descs);  }