@Test public void listsTemplateFiles() { final TemplatesConfig config = TemplatesConfig.builder() .promotionTemplate(template("person.html")) .searchResultTemplate(template("person.html")) .searchResultTemplate(template("document.html")) .build(); assertThat(config.listTemplateFiles(), containsInAnyOrder("person.html", "document.html")); }
@JsonIgnore public Set<String> listTemplateFiles() { return Stream.of(searchResult, promotion, previewPanel, documentFacts, entitySearch, entityFacts, entityFactsDetail) .flatMap(Collection::stream) .map(Template::getFile) .collect(Collectors.toSet()); }
TemplatesConfig extends AbstractConfig<TemplatesConfig> { @JsonIgnore public Set<String> listTemplateFiles() { return Stream.of(searchResult, promotion, previewPanel, documentFacts, entitySearch, entityFacts, entityFactsDetail) .flatMap(Collection::stream) .map(Template::getFile) .collect(Collectors.toSet()); } }
TemplatesConfig extends AbstractConfig<TemplatesConfig> { @JsonIgnore public Set<String> listTemplateFiles() { return Stream.of(searchResult, promotion, previewPanel, documentFacts, entitySearch, entityFacts, entityFactsDetail) .flatMap(Collection::stream) .map(Template::getFile) .collect(Collectors.toSet()); }  }
TemplatesConfig extends AbstractConfig<TemplatesConfig> { @JsonIgnore public Set<String> listTemplateFiles() { return Stream.of(searchResult, promotion, previewPanel, documentFacts, entitySearch, entityFacts, entityFactsDetail) .flatMap(Collection::stream) .map(Template::getFile) .collect(Collectors.toSet()); }  @Override TemplatesConfig merge(final TemplatesConfig other); @Override void basicValidate(final String section); @JsonIgnore Set<String> listTemplateFiles(); }
TemplatesConfig extends AbstractConfig<TemplatesConfig> { @JsonIgnore public Set<String> listTemplateFiles() { return Stream.of(searchResult, promotion, previewPanel, documentFacts, entitySearch, entityFacts, entityFactsDetail) .flatMap(Collection::stream) .map(Template::getFile) .collect(Collectors.toSet()); }  @Override TemplatesConfig merge(final TemplatesConfig other); @Override void basicValidate(final String section); @JsonIgnore Set<String> listTemplateFiles();  }