Skip to content

Commit

Permalink
Another cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Aug 24, 2016
1 parent 5838cc4 commit beee6a5
Showing 1 changed file with 15 additions and 12 deletions.
Expand Up @@ -31,6 +31,7 @@
import com.evolveum.midpoint.prism.match.MatchingRuleRegistry;
import com.evolveum.midpoint.prism.util.ItemPathUtil;
import com.evolveum.midpoint.prism.util.PrismUtil;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -93,29 +94,29 @@ public class ObjectTemplateProcessor {

private static final Trace LOGGER = TraceManager.getTrace(ObjectTemplateProcessor.class);

@Autowired(required = true)
@Autowired
private MappingFactory mappingFactory;

@Autowired(required = true)
@Autowired
private PrismContext prismContext;

@Autowired(required = true)
@Autowired
private PasswordPolicyProcessor passwordPolicyProcessor;

@Autowired(required = true)
@Autowired
private ModelObjectResolver modelObjectResolver;

@Autowired(required = true)
@Autowired
private ActivationComputer activationComputer;

@Autowired(required = true)
@Autowired
private ExpressionFactory expressionFactory;

@Autowired(required = true)
@Autowired
@Qualifier("cacheRepositoryService")
private transient RepositoryService cacheRepositoryService;

@Autowired(required = true)
@Autowired
private MappingEvaluator mappingEvaluator;

@Autowired
Expand All @@ -142,8 +143,8 @@ public <F extends FocusType> void processTemplate(LensContext<F> context, Object
ObjectDeltaObject<F> focusOdo = focusContext.getObjectDeltaObject();
PrismObjectDefinition<F> focusDefinition = getFocusDefinition(focusContext.getObjectTypeClass());

LOGGER.trace("Applying {} to {}, iteration {} ({}), phase {}",
new Object[]{objectTemplate, focusContext.getObjectNew(), iteration, iterationToken, phase});
LOGGER.trace("Applying {} to {}, iteration {} ({}), phase {}",
objectTemplate, focusContext.getObjectNew(), iteration, iterationToken, phase);

Map<ItemPath,DeltaSetTriple<? extends ItemValueWithOrigin<?,?>>> outputTripleMap = new HashMap<>();

Expand Down Expand Up @@ -222,7 +223,7 @@ private Map<ItemPath, ObjectTemplateItemDefinitionType> collectItemDefinitionsFr
}

<F extends FocusType> Collection<ItemDelta<?,?>> computeItemDeltas(Map<ItemPath, DeltaSetTriple<? extends ItemValueWithOrigin<?,?>>> outputTripleMap,
Map<ItemPath,ObjectTemplateItemDefinitionType> itemDefinitionsMap, // may be null
@Nullable Map<ItemPath,ObjectTemplateItemDefinitionType> itemDefinitionsMap,
ObjectDeltaObject<F> focusOdo, PrismObjectDefinition<F> focusDefinition, String contextDesc) throws ExpressionEvaluationException, PolicyViolationException, SchemaException {

Collection<ItemDelta<?,?>> itemDeltas = new ArrayList<>();
Expand All @@ -242,9 +243,11 @@ <F extends FocusType> Collection<ItemDelta<?,?>> computeItemDeltas(Map<ItemPath,
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Computed triple for {}:\n{}", itemPath, outputTriple.debugDump());
}
ObjectTemplateItemDefinitionType templateItemDefinition = null;
final ObjectTemplateItemDefinitionType templateItemDefinition;
if (itemDefinitionsMap != null) {
templateItemDefinition = ItemPathUtil.getFromMap(itemDefinitionsMap, itemPath);
} else {
templateItemDefinition = null;
}
boolean isNonTolerant = templateItemDefinition != null && Boolean.FALSE.equals(templateItemDefinition.isTolerant());

Expand Down

0 comments on commit beee6a5

Please sign in to comment.