From a8acbe04e4b88640113fcaa72e83372453616311 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Mon, 31 May 2010 09:26:15 +0000
Subject: [PATCH] Fix the Control-Panel to list properly All Base-DNs

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
index cca4b07..094849d 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
+++ b/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();

--
Gitblit v1.10.0