use of com.khartec.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.ACTOR, EntityKind.APPLICATION, EntityKind.APP_GROUP, EntityKind.CHANGE_INITIATIVE, EntityKind.ORG_UNIT, EntityKind.MEASURABLE, EntityKind.PERSON)).userId("admin").build();
String[] searchTerms = { "cat", "admin", "test", "enhance", "ceo", "equities" };
Arrays.stream(searchTerms).forEach(term -> {
System.out.println("-------------------");
System.out.printf("Searching for '%s'\n", term);
System.out.println("-------------------");
printResults(searchService.search(term, searchOptions));
});
}
Aggregations