use of org.kie.workbench.common.screens.library.api.index.LibraryValueFileExtensionIndexTerm in project kie-wb-common by kiegroup.
the class LibraryServiceImpl method buildProjectAssetsQuery.
private HashSet<ValueIndexTerm> buildProjectAssetsQuery(ProjectAssetsQuery query) {
final HashSet<ValueIndexTerm> queryTerms = new HashSet<>();
queryTerms.add(new LibraryValueModuleRootPathIndexTerm(query.getProject().getRootPath().toURI()));
if (query.hasFilter()) {
queryTerms.add(new LibraryValueFileNameIndexTerm("*" + query.getFilter() + "*", ValueIndexTerm.TermSearchType.WILDCARD));
}
if (query.hasExtension()) {
queryTerms.add(new LibraryValueFileExtensionIndexTerm(query.getExtensions()));
}
return queryTerms;
}
Aggregations