CatalogResource extends AbstractBrooklynRestResource implements CatalogApi { @Override @Deprecated public List<CatalogEnricherSummary> listEnrichers(@ApiParam(name = "regex", value = "Regular expression to search for") @DefaultValue("") String regex, @ApiParam(name = "fragment", value = "Substring case-insensitive to search for") @DefaultValue("") String fragment, @ApiParam(name = "allVersions", value = "Include all versions (defaults false, only returning the best version)") @DefaultValue("false") boolean includeAllVersions) { Predicate<RegisteredType> filter = Predicates.and( RegisteredTypePredicates.IS_ENRICHER, RegisteredTypePredicates.disabled(false)); List<CatalogItemSummary> result = getCatalogItemSummariesMatchingRegexFragment(filter, regex, fragment, includeAllVersions); return castList(result, CatalogEnricherSummary.class); }  @Override @Beta Response createFromUpload(byte[] item, boolean forceUpdate); @Override @Deprecated Response create(String yaml, boolean forceUpdate); @SuppressWarnings("deprecation") @Override Response createFromYaml(String yaml, boolean forceUpdate); @Override @Beta Response createFromArchive(byte[] zipInput, boolean detail, boolean forceUpdate); @Override @Deprecated void deleteApplication(String symbolicName, String version); @Override @Deprecated void deleteEntity(String symbolicName, String version); @Override @Deprecated void deletePolicy(String policyId, String version); @Override @Deprecated void deleteLocation(String locationId, String version); @Override @Deprecated List<CatalogEntitySummary> listEntities(String regex, String fragment, boolean allVersions); @Override @Deprecated List<CatalogItemSummary> listApplications(String regex, String fragment, boolean allVersions); @Override @Deprecated CatalogEntitySummary getEntity(String symbolicName, String version); @Override @Deprecated CatalogEntitySummary getApplication(String symbolicName, String version); @Override @Deprecated List<CatalogPolicySummary> listPolicies(String regex, String fragment, boolean allVersions); @Override @Deprecated CatalogPolicySummary getPolicy(String policyId, String version); @Override @Deprecated List<CatalogLocationSummary> listLocations(String regex, String fragment, boolean allVersions); @Override @Deprecated CatalogLocationSummary getLocation(String locationId, String version); @Override Response getIcon(String itemId, String version); @Override @Deprecated void setDeprecated(String itemId, boolean deprecated); @Override @Deprecated void setDisabled(String itemId, boolean disabled); @Override @Deprecated List<CatalogEnricherSummary> listEnrichers(@ApiParam(name = "regex", value = "Regular expression to search for") @DefaultValue("") String regex, @ApiParam(name = "fragment", value = "Substring case-insensitive to search for") @DefaultValue("") String fragment, @ApiParam(name = "allVersions", value = "Include all versions (defaults false, only returning the best version)") @DefaultValue("false") boolean includeAllVersions); @Override @Deprecated CatalogEnricherSummary getEnricher(@ApiParam(name = "enricherId", value = "The ID of the enricher to retrieve", required = true) String enricherId, @ApiParam(name = "version", value = "The version identifier of the enricher to retrieve", required = true) String version); @Override @Deprecated void deleteEnricher(@ApiParam(name = "enricherId", value = "The ID of the enricher to delete", required = true) String enricherId, @ApiParam(name = "version", value = "The version identifier of the enricher to delete", required = true) String version);  }
@Test public void testListEnrichers() { Set<CatalogEnricherSummary> enrichers = client().path("/catalog/enrichers") .get(new GenericType<Set<CatalogEnricherSummary>>() {}); assertTrue(enrichers.size() > 0); CatalogEnricherSummary asp = null; for (CatalogEnricherSummary p : enrichers) { if (Aggregator.class.getName().equals(p.getType())) asp = p; } Assert.assertNotNull(asp, "didn't find Aggregator"); }