Search in sources :

Example 6 with ResourceObjectTypeDependencyType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectTypeDependencyType in project midpoint by Evolveum.

the class DependencyProcessor method findReverseDependecies.

private <F extends ObjectType> Collection<DependencyAndSource> findReverseDependecies(LensContext<F> context, LensProjectionContext targetProjectionContext) throws PolicyViolationException {
    Collection<DependencyAndSource> deps = new ArrayList<>();
    for (LensProjectionContext projectionContext : context.getProjectionContexts()) {
        for (ResourceObjectTypeDependencyType dependency : projectionContext.getDependencies()) {
            if (LensUtil.isDependencyTargetContext(projectionContext, targetProjectionContext, dependency)) {
                DependencyAndSource ds = new DependencyAndSource();
                ds.dependency = dependency;
                ds.sourceProjectionContext = projectionContext;
                deps.add(ds);
            }
        }
    }
    return deps;
}
Also used : ResourceObjectTypeDependencyType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectTypeDependencyType) LensProjectionContext(com.evolveum.midpoint.model.impl.lens.LensProjectionContext) ArrayList(java.util.ArrayList)

Aggregations

ResourceObjectTypeDependencyType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectTypeDependencyType)6 LensProjectionContext (com.evolveum.midpoint.model.impl.lens.LensProjectionContext)5 ResourceShadowDiscriminator (com.evolveum.midpoint.schema.ResourceShadowDiscriminator)4 PolicyViolationException (com.evolveum.midpoint.util.exception.PolicyViolationException)3 ResourceObjectTypeDependencyStrictnessType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectTypeDependencyStrictnessType)3 ObjectReferenceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType)1 ArrayList (java.util.ArrayList)1