public static void assertTripleEmpty(DeltaSetTriple<?> triple) { assert triple != null : "triple is null (expected it to be empty)"; assert triple.isEmpty() : "triple is not empty, it is: "+triple; }
public String toHumanReadableString() { if (target != null) { return "EvaluatedAssignment(" + target + ")"; } else if (!constructionTriple.isEmpty()) { return "EvaluatedAssignment(" + constructionTriple + ")"; } else if (!personaConstructionTriple.isEmpty()) { return "EvaluatedAssignment(" + personaConstructionTriple + ")"; } else { return toString(); } }
@Override public void shortDump(StringBuilder sb) { if (target != null) { sb.append(target); } else if (!constructionTriple.isEmpty()) { sb.append("construction("); constructionTriple.shortDump(sb); sb.append(")"); } else if (!personaConstructionTriple.isEmpty()) { sb.append("personaConstruction("); personaConstructionTriple.shortDump(sb); sb.append(")"); } else { sb.append(toString()); return; } if (!isValid()) { sb.append(" invalid "); } }
if (constructionTriple.isEmpty()) { DebugUtil.debugDumpWithLabel(sb, "Constructions", "(empty)", indent+1); } else { DebugUtil.debugDumpWithLabel(sb, "Constructions", constructionTriple, indent+1); if (!personaConstructionTriple.isEmpty()) { sb.append("\n"); DebugUtil.debugDumpWithLabel(sb, "Persona constructions", personaConstructionTriple, indent+1); if (!roles.isEmpty()) { sb.append("\n"); DebugUtil.debugDumpWithLabel(sb, "Roles", roles, indent+1);
private <T,V extends PrismValue> PropertyDelta<T> consolidateAttribute(RefinedObjectClassDefinition rOcDef, ResourceShadowDiscriminator discr, ObjectDelta<ShadowType> existingDelta, LensProjectionContext projCtx, boolean addUnchangedValues, QName itemName, DeltaSetTriple<ItemValueWithOrigin<PrismPropertyValue<T>,PrismPropertyDefinition<T>>> triple, StrengthSelector strengthSelector) throws SchemaException, ExpressionEvaluationException, PolicyViolationException { if (triple == null || triple.isEmpty()) { return null; } RefinedAttributeDefinition<T> attributeDefinition = triple.getAnyValue().getConstruction().findAttributeDefinition(itemName); ItemPath itemPath = ItemPath.create(ShadowType.F_ATTRIBUTES, itemName); if (attributeDefinition.isIgnored(LayerType.MODEL)) { LOGGER.trace("Skipping processing mappings for attribute {} because it is ignored", itemName); return null; } ValueMatcher<T> valueMatcher = ValueMatcher.createMatcher(attributeDefinition, matchingRuleRegistry); return (PropertyDelta<T>) consolidateItem(rOcDef, discr, existingDelta, projCtx, addUnchangedValues, attributeDefinition.isExlusiveStrong(), itemPath, attributeDefinition, triple, valueMatcher, null, strengthSelector, "attribute "+itemName); }
ConfigurationException, SecurityViolationException, ExpressionEvaluationException, PolicyViolationException, PreconditionViolationException { DeltaSetTriple<EvaluatedAssignmentImpl<F>> evaluatedAssignmentTriple = (DeltaSetTriple)context.getEvaluatedAssignmentTriple(); if (evaluatedAssignmentTriple == null || evaluatedAssignmentTriple.isEmpty()) { return HookOperationMode.FOREGROUND;
display("personaConstructionTriple", personaConstructionTriple); assertNotNull("No personaConstructionTriple", personaConstructionTriple); assertFalse("Empty personaConstructionTriple", personaConstructionTriple.isEmpty()); assertTrue("Unexpected personaConstructionTriple plus set", personaConstructionTriple.getPlusSet().isEmpty()); assertTrue("Unexpected personaConstructionTriple minus set", personaConstructionTriple.getMinusSet().isEmpty());