package com.l7tech.server.identity.ldap;

import com.l7tech.identity.ldap.LdapGroup;
import com.l7tech.objectmodel.Goid;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import javax.naming.directory.Attributes;

final class e {
   private final Goid a;
   private final String b;
   private final String c;
   private final String d;
   private final Attributes e;
   private final long f = System.currentTimeMillis();
   private final Set<String> g = Collections.synchronizedSet(new HashSet<>());
   private final AtomicReference<Collection<LdapGroup>> h = new AtomicReference<>();

   private e(LdapGroup var1) {
      this(var1.getProviderId(), var1.getDn(), var1.getCn(), var1.getDescription(), var1.getAttributes());
   }

   private e(Goid var1, String var2, String var3, String var4, Attributes var5) {
      this.a = var1;
      this.b = var2;
      this.c = var3;
      this.d = var4;
      this.e = var5;
   }

   private LdapGroup a() {
      return LdapGroupManagerImpl.a(this.a, this.b, this.c, this.d, this.e);
   }

   public boolean isNonGroup(String var1) {
      return this.g.contains(var1);
   }

   public void addNonGroups(Collection<String> var1) {
      this.g.addAll(var1);
   }

   public Collection<LdapGroup> getSubgroups() {
      return this.h.get();
   }

   public void setSubgroups(Collection<LdapGroup> var1) {
      this.h.set(Collections.unmodifiableCollection(new ArrayList<>(var1)));
   }
}
