From 6411dcff8da8710f140a8782967ddf0876f52b81 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Mon, 31 May 2010 09:55:31 +0000
Subject: [PATCH] Provide the necessary operational attributes for External Changelog entries, to make them LDAP compliant and to allow browsing them through the Control-Panel. Improve browsing in the Control-Panel to make use of hasSubordinates as well as numSubordinates operational attributes. Improve Control-Panel look and feel when browsing the ECL

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 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 094849d..ef6520e 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/AbstractBrowseEntriesPanel.java
@@ -756,11 +756,19 @@
         }
         else if (!added && !displayAll)
         {
-          BasicNode rootNode =
-            (BasicNode)controller.getTree().getModel().getRoot();
-          if (controller.findChildNode(rootNode, s) == -1)
+          if (isChangeLog(theDN))
           {
-            controller.addNodeUnderRoot(s);
+            // Consider it a suffix
+            controller.addSuffix(s, null);
+          }
+          else
+          {
+            BasicNode rootNode =
+              (BasicNode)controller.getTree().getModel().getRoot();
+            if (controller.findChildNode(rootNode, s) == -1)
+            {
+              controller.addNodeUnderRoot(s);
+            }
           }
         }
       }
@@ -776,6 +784,21 @@
     }
   }
 
+  private boolean isChangeLog(DN theDN)
+  {
+    try
+    {
+      return theDN.equals(
+          DN.decode(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT));
+    }
+    catch (Throwable t)
+    {
+      // Bug
+      t.printStackTrace();
+    }
+    return false;
+  }
+
   /**
    * Returns the LDAP filter built based in the parameters provided by the user.
    * @return the LDAP filter built based in the parameters provided by the user.

--
Gitblit v1.10.0