use of org.commonjava.indy.implrepo.data.ImpliedReposStoreDataManagerDecorator.IMPLIED_REPO_ORIGIN in project indy by Commonjava.
the class ImpliedReposQueryDelegate method maybeFilter.
private List<ArtifactStore> maybeFilter(String groupName, List<ArtifactStore> delegateResult) {
Logger logger = LoggerFactory.getLogger(getClass());
if (delegateResult == null || delegateResult.isEmpty() || config.isEnabledForGroup(groupName)) {
logger.trace("Implied repositories are enabled for group: '{}'. Returning all membership from delegate result.", groupName);
return delegateResult;
}
logger.trace("Filtering stores with metadata: '{}' value of '{}' from membership results", METADATA_ORIGIN, IMPLIED_REPO_ORIGIN);
List<ArtifactStore> result = new ArrayList<>();
delegateResult.stream().filter((store) -> !IMPLIED_REPO_ORIGIN.equals(store.getMetadata(METADATA_ORIGIN))).forEach((store) -> result.add(store));
return result;
}
Aggregations