use of org.finos.waltz.service.entity_search.EntitySearchService in project waltz by khartec.
the class EntitySearchHarness method main.
public static void main(String[] args) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
EntitySearchService searchService = ctx.getBean(EntitySearchService.class);
EntitySearchOptions searchOptions = ImmutableEntitySearchOptions.builder().entityKinds(ListUtilities.newArrayList(// EntityKind.APPLICATION,
EntityKind.LOGICAL_DATA_ELEMENT)).searchQuery("desk").userId("admin").build();
String[] searchTerms = { "cat", "admin", "test", "enhance", "ceo", "equities" };
searchService.search(searchOptions).forEach(d -> System.out.println(d.name()));
System.exit(-1);
Arrays.stream(searchTerms).forEach(term -> {
System.out.println("-------------------");
System.out.printf("Searching for '%s'\n", term);
System.out.println("-------------------");
printResults(searchService.search(searchOptions));
});
}
Aggregations