mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
27.51.2007 ceef7ba098240a8b10aee4f36d1653795652481c
opends/src/statuspanel/org/opends/statuspanel/ConfigFromLDAP.java
@@ -59,8 +59,8 @@
    new HashSet<DatabaseDescriptor>();
  private HashSet<String> administrativeUsers = new HashSet<String>();
  private String errorMessage;
  private boolean synchronizationConfigured = false;
  private HashSet<String> synchronizedSuffixes = new HashSet<String>();
  private boolean replicationConfigured = false;
  private HashSet<String> replicatedSuffixes = new HashSet<String>();
  private HashMap<String, Integer> hmMissingChanges =
    new HashMap<String, Integer>();
  private HashMap<String, Integer> hmAgeOfOldestMissingChanges =
@@ -157,8 +157,8 @@
    listeners.clear();
    databases.clear();
    administrativeUsers.clear();
    synchronizationConfigured = false;
    synchronizedSuffixes.clear();
    replicationConfigured = false;
    replicatedSuffixes.clear();
    hmMissingChanges.clear();
    hmAgeOfOldestMissingChanges.clear();
    javaVersion = null;
@@ -169,7 +169,7 @@
      InitialLdapContext ctx = getDirContext();
      updateAdministrativeUsers(ctx);
      updateListeners(ctx);
      updateSynchronization(ctx);
      updateReplication(ctx);
      updateDatabases(ctx);
      javaVersion = getJavaVersion(ctx);
      openConnections = getOpenConnections(ctx);
@@ -341,12 +341,12 @@
  }
  /**
   * Updates the synchronization configuration data we expose to the user with
   * Updates the replication configuration data we expose to the user with
   * the provided InitialLdapContext.
   * @param ctx the InitialLdapContext to use to update the configuration.
   * @throws NamingException if there was an error.
   */
  private void updateSynchronization(InitialLdapContext ctx)
  private void updateReplication(InitialLdapContext ctx)
  throws NamingException
  {
    SearchControls ctls = new SearchControls();
@@ -371,7 +371,7 @@
        if ("true".equalsIgnoreCase(getFirstValue(sr,
          "ds-cfg-synchronization-provider-enabled")))
        {
          synchronizationConfigured = true;
          replicationConfigured = true;
        }
      }
    }
@@ -383,9 +383,9 @@
    ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
    ctls.setReturningAttributes(
        new String[] {
            "ds-cfg-synchronization-dn"
            "ds-cfg-replication-dn"
        });
    filter = "(objectclass=ds-cfg-synchronization-provider-config)";
    filter = "(objectclass=ds-cfg-replication-domain-config)";
    jndiName = new LdapName(
      "cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config");
@@ -398,7 +398,7 @@
      {
        SearchResult sr = (SearchResult)syncProviders.next();
        synchronizedSuffixes.addAll(getValues(sr, "ds-cfg-synchronization-dn"));
        replicatedSuffixes.addAll(getValues(sr, "ds-cfg-replication-dn"));
      }
    }
    catch (NameNotFoundException nse)
@@ -415,7 +415,7 @@
    jndiName = new LdapName("cn=monitor");
    if (synchronizedSuffixes.size() > 0)
    if (replicatedSuffixes.size() > 0)
    {
      try
      {
@@ -427,7 +427,7 @@
          String dn = getFirstValue(sr, "base-dn");
          for (String baseDn: synchronizedSuffixes)
          for (String baseDn: replicatedSuffixes)
          {
            if (Utils.areDnsEqual(dn, baseDn))
@@ -632,8 +632,8 @@
  }
  /**
   * Create the base DN descriptor.  Assumes that the synchronizedSuffixes Set
   * and synchronizationConfigured have already been initialized.
   * Create the base DN descriptor.  Assumes that the replicatedSuffixes Set
   * and replicationConfigured have already been initialized.
   */
  private BaseDNDescriptor getBaseDNDescriptor(InitialLdapContext ctx,
      String baseDn)
@@ -645,9 +645,9 @@
    String mapSuffixDn = null;
    boolean replicated = false;
    if (synchronizationConfigured)
    if (replicationConfigured)
    {
      for (String suffixDn: synchronizedSuffixes)
      for (String suffixDn: replicatedSuffixes)
      {
        if (Utils.areDnsEqual(baseDn, suffixDn))
        {
@@ -659,7 +659,7 @@
    }
    if (replicated)
    {
      type = BaseDNDescriptor.Type.SYNCHRONIZED;
      type = BaseDNDescriptor.Type.REPLICATED;
      Integer missing = hmMissingChanges.get(mapSuffixDn);
      Integer age = hmAgeOfOldestMissingChanges.get(mapSuffixDn);
@@ -676,7 +676,7 @@
    }
    else
    {
      type = BaseDNDescriptor.Type.NOT_SYNCHRONIZED;
      type = BaseDNDescriptor.Type.NOT_REPLICATED;
    }
    return new BaseDNDescriptor(type, baseDn, null, ageOfOldestMissingChange,