BrooklynRestResourceUtils { public BrooklynCatalog getCatalog() { return mgmt.getCatalog(); } BrooklynRestResourceUtils(ManagementContext mgmt); BrooklynTypeRegistry getTypeRegistry(); BrooklynCatalog getCatalog(); ClassLoader getCatalogClassLoader(); LocationRegistry getLocationRegistry(); Policy getPolicy(String application, String entity, String policy); EntityAdjunct getAdjunct(String application, String entity, String adjunct); Policy getPolicy(Entity entity, String policy); EntityAdjunct getAdjunct(Entity entity, String adjunct); Entity getEntity(String application, String entity); Application getApplication(String application); Entity searchForEntityNamed(Entity root, String entity); Application create(ApplicationSpec spec); Task<?> start(Application app, ApplicationSpec spec); Task<?> start(Application app, List<? extends Location> locations); List<Location> getLocationsManaged(ApplicationSpec spec); Task<?> destroy(final Application application); Task<?> expunge(final Entity entity, final boolean release); @Deprecated static String fixLocation(String locationId); Object getObjectValueForDisplay(Object value); String getStringValueForDisplay(Object value); boolean isUrlServerSideAndSafe(String url); Iterable<Entity> descendantsOfAnyType(String application, String entity); Iterable<Entity> descendantsOfType(String application, String entity, final String typeRegex); void reloadBrooklynProperties();  }
@Test @SuppressWarnings("deprecation") public void testCreateAppFromCatalogByTypeMultipleItems() { CatalogTemplateItemDto item = CatalogItemBuilder.newTemplate("app.noop", "0.0.2-SNAPSHOT") .javaType(SampleNoOpApplication.class.getName()) .build(); managementContext.getCatalog().addItem(item); createAppFromCatalog(SampleNoOpApplication.class.getName(), false); createAppFromCatalog("app.noop", true); }
@Test @SuppressWarnings("deprecation") public void testEntityAppFromCatalogByTypeMultipleItems() { CatalogTemplateItemDto item = CatalogItemBuilder.newTemplate("app.basic", "0.0.2-SNAPSHOT") .javaType(SampleNoOpApplication.class.getName()) .build(); managementContext.getCatalog().addItem(item); createEntityFromCatalog(BasicEntity.class.getName(), false); createEntityFromCatalog("app.basic", true); }