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

ludovicp
31.26.2010 a8acbe04e4b88640113fcaa72e83372453616311
Fix the Control-Panel to list properly All Base-DNs
3 files modified
26 ■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java 4 ●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java 18 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java 4 ●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
@@ -73,6 +73,7 @@
import org.opends.quicksetup.Constants;
import org.opends.server.config.ConfigConstants;
import org.opends.server.types.LDAPURL;
import org.opends.server.util.ServerConstants;
/**
 * This is the main class of the LDAP entry browser.  It is in charge of
@@ -1105,7 +1106,8 @@
          Utilities.areDnsEqual(dn, ConfigConstants.DN_MONITOR_ROOT) ||
          Utilities.areDnsEqual(dn, ConfigConstants.DN_TRUST_STORE_ROOT) ||
          Utilities.areDnsEqual(dn, ConfigConstants.DN_BACKUP_ROOT) ||
          Utilities.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
          Utilities.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN) ||
          Utilities.areDnsEqual(dn, ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT))
      {
        isConfigurationNode = true;
      }
opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
@@ -104,6 +104,7 @@
import org.opends.quicksetup.util.Utils;
import org.opends.server.protocols.ldap.LDAPFilter;
import org.opends.server.types.*;
import org.opends.server.util.ServerConstants;
/**
 * The abstract class used to refactor some code.  The classes that extend this
@@ -717,6 +718,7 @@
      controller.setFilter(filterValue);
      controller.setAutomaticExpand(!filterValue.equals(
          BrowserController.ALL_OBJECTS_FILTER));
      SortedSet<String> allSuffixes = new TreeSet<String>();
      if (controller.getConfigurationConnection() != null)
      {
        treePane.getTree().setRootVisible(displayAll);
@@ -733,14 +735,26 @@
              isBaseDN = true;
            }
            String dn = Utilities.unescapeUtf8(baseDN.getDn().toString());
            if (displayAll || isBaseDN)
            if (displayAll)
            {
              allSuffixes.add(dn);
            }
            else if (isBaseDN)
            {
              controller.addSuffix(dn, null);
              added = true;
            }
          }
        }
        if (!added && !displayAll)
        if (displayAll)
        {
          allSuffixes.add(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT);
          for (String dn : allSuffixes)
          {
            controller.addSuffix(dn, null);
          }
        }
        else if (!added && !displayAll)
        {
          BasicNode rootNode =
            (BasicNode)controller.getTree().getModel().getRoot();
opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
@@ -66,6 +66,7 @@
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.OpenDsException;
import org.opends.server.util.ServerConstants;
/**
 * This is the panel that contains all the different views to display an entry.
@@ -473,7 +474,8 @@
        DN.decode(ConfigConstants.DN_TASK_ROOT),
        DN.decode(ConfigConstants.DN_MONITOR_ROOT),
        DN.decode(ConfigConstants.DN_BACKUP_ROOT),
        DN.decode(Constants.REPLICATION_CHANGES_DN)
        DN.decode(Constants.REPLICATION_CHANGES_DN),
        DN.decode(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT)
      };
      nonDeletable = new DN[] {
          DN.decode(ConfigConstants.DN_CONFIG_ROOT),