Search in sources :

Example 31 with PrismValue

use of com.evolveum.midpoint.prism.PrismValue in project midpoint by Evolveum.

the class CredentialPolicyEvaluator method hasValueDelta.

private <F extends FocusType> boolean hasValueDelta(ObjectDelta<UserType> focusDelta, ItemPath credentialsPath) {
    if (focusDelta == null) {
        return false;
    }
    for (PartiallyResolvedDelta<PrismValue, ItemDefinition> partialDelta : focusDelta.findPartial(credentialsPath)) {
        if (LOGGER.isTraceEnabled()) {
            LOGGER.trace("Residual delta:\n{}", partialDelta.debugDump());
        }
        ItemPath residualPath = partialDelta.getResidualPath();
        if (residualPath == null || residualPath.isEmpty()) {
            continue;
        }
        LOGGER.trace("PATH: {}", residualPath);
        QName name = ItemPath.getFirstName(residualPath);
        LOGGER.trace("NAME: {}", name);
        if (isValueElement(name)) {
            return true;
        }
    }
    return false;
}
Also used : QName(javax.xml.namespace.QName) ItemDefinition(com.evolveum.midpoint.prism.ItemDefinition) PrismValue(com.evolveum.midpoint.prism.PrismValue) ItemPath(com.evolveum.midpoint.prism.path.ItemPath)

Aggregations

PrismValue (com.evolveum.midpoint.prism.PrismValue)31 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)12 PipelineItem (com.evolveum.midpoint.model.api.PipelineItem)8 ScriptExecutionException (com.evolveum.midpoint.model.api.ScriptExecutionException)8 PrismPropertyValue (com.evolveum.midpoint.prism.PrismPropertyValue)8 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)8 Item (com.evolveum.midpoint.prism.Item)6 ItemDefinition (com.evolveum.midpoint.prism.ItemDefinition)6 ArrayList (java.util.ArrayList)6 PrismObjectValue (com.evolveum.midpoint.prism.PrismObjectValue)5 PrismReferenceValue (com.evolveum.midpoint.prism.PrismReferenceValue)5 ItemDelta (com.evolveum.midpoint.prism.delta.ItemDelta)5 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)5 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)5 QName (javax.xml.namespace.QName)5 PrismObject (com.evolveum.midpoint.prism.PrismObject)4 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)4 PipelineData (com.evolveum.midpoint.model.impl.scripting.PipelineData)2 Objectable (com.evolveum.midpoint.prism.Objectable)2 PrismContainerValue (com.evolveum.midpoint.prism.PrismContainerValue)2