use of org.apache.archiva.rest.api.model.GroupIdList in project archiva by apache.
the class DefaultSearchService method getAllGroupIds.
@Override
public GroupIdList getAllGroupIds(List<String> selectedRepos) throws ArchivaRestServiceException {
List<String> observableRepos = getObservableRepos();
List<String> repos = ListUtils.intersection(observableRepos, selectedRepos);
if (repos == null || repos.isEmpty()) {
return new GroupIdList(Collections.<String>emptyList());
}
try {
return new GroupIdList(new ArrayList<>(repositorySearch.getAllGroupIds(getPrincipal(), repos)));
} catch (RepositorySearchException e) {
log.error(e.getMessage(), e);
throw new ArchivaRestServiceException(e.getMessage(), e);
}
}
Aggregations