use of com.b2international.snowowl.core.validation.whitelist.ValidationWhiteListSearchRequestBuilder in project snow-owl by b2ihealthcare.
the class ValidateRequest method fetchWhiteListEntries.
private Multimap<String, ComponentIdentifier> fetchWhiteListEntries(BranchContext context, final Set<String> ruleIds) {
// fetch all white list entries to determine whether an issue is whitelisted already or not
final Multimap<String, ComponentIdentifier> whiteListedEntries = HashMultimap.create();
ValidationWhiteListSearchRequestBuilder whiteListReq = ValidationRequests.whiteList().prepareSearch();
// fetch whitelist entries associated with the defined rules
if (!CompareUtils.isEmpty(ruleIds)) {
whiteListReq.filterByRuleIds(ruleIds);
}
whiteListReq.all().build().execute(context).stream().forEach(whitelist -> whiteListedEntries.put(whitelist.getRuleId(), whitelist.getComponentIdentifier()));
return whiteListedEntries;
}
Aggregations