/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.EntityHeader
 *  com.l7tech.objectmodel.EntityHeaderSet
 *  com.l7tech.objectmodel.IdentityHeader
 */
package com.l7tech.server.identity.ldap;

import com.l7tech.objectmodel.EntityHeader;
import com.l7tech.objectmodel.EntityHeaderSet;
import com.l7tech.objectmodel.IdentityHeader;
import com.l7tech.server.identity.ldap.LdapGroupManagerImpl;
import com.l7tech.server.identity.ldap.LdapIdentityProvider;
import com.l7tech.server.identity.ldap.k;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchResult;

class r
extends k {
    final LdapIdentityProvider val$identityProvider;
    final EntityHeaderSet val$output;
    final DirContext val$searchContext;
    final LdapGroupManagerImpl this$0;

    r(LdapGroupManagerImpl ldapGroupManagerImpl, LdapIdentityProvider ldapIdentityProvider, EntityHeaderSet entityHeaderSet, DirContext dirContext) {
        this.this$0 = ldapGroupManagerImpl;
        this.val$identityProvider = ldapIdentityProvider;
        this.val$output = entityHeaderSet;
        this.val$searchContext = dirContext;
    }

    @Override
    boolean a(SearchResult searchResult) throws NamingException {
        block6: {
            IdentityHeader identityHeader = this.val$identityProvider.searchResultToHeader(searchResult);
            try {
                try {
                    try {
                        if (identityHeader == null || !this.val$output.add((EntityHeader)identityHeader)) break block6;
                    }
                    catch (NamingException namingException) {
                        throw r.a(namingException);
                    }
                    if (!this.this$0.c()) break block6;
                }
                catch (NamingException namingException) {
                    throw r.a(namingException);
                }
                this.this$0.a(this.val$searchContext, (EntityHeaderSet<IdentityHeader>)this.val$output, identityHeader, 2);
            }
            catch (NamingException namingException) {
                throw r.a(namingException);
            }
        }
        return true;
    }

    private static NamingException a(NamingException namingException) {
        return namingException;
    }
}

