private <T> void decideIfTolerate(LensProjectionContext projCtx,
RefinedAttributeDefinition<T> attributeDefinition,
Collection<PrismPropertyValue<T>> arePValues,
Collection<ItemValueWithOrigin<PrismPropertyValue<T>,PrismPropertyDefinition<T>>> shouldBePValues,
ValueMatcher<T> valueMatcher, boolean hasOtherNonWeakValues) throws SchemaException {
for (PrismPropertyValue<T> isPValue : arePValues) {
if (matchPattern(attributeDefinition.getTolerantValuePattern(), isPValue, valueMatcher)){
LOGGER.trace("Reconciliation: KEEPING value {} of the attribute {}: match with tolerant value pattern." , isPValue, attributeDefinition.getName().getLocalPart());
continue;
}
if (matchPattern(attributeDefinition.getIntolerantValuePattern(), isPValue, valueMatcher)){
recordDeleteDelta(isPValue, attributeDefinition, valueMatcher, projCtx, "it has matched with intolerant pattern");
continue;
}
if (!attributeDefinition.isTolerant()) {
if (!isInPvwoValues(valueMatcher, isPValue.getValue(), shouldBePValues, hasOtherNonWeakValues)) {
recordDeleteDelta(isPValue, attributeDefinition, valueMatcher, projCtx, "it is not given by any mapping and the attribute is not tolerant");
}
}
}
}