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/nodes/BasicNode.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/nodes/BasicNode.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/nodes/BasicNode.java
index 1fb1481..fe0c444 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/nodes/BasicNode.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/nodes/BasicNode.java
@@ -57,6 +57,10 @@
   private String[] referral;
   private int numSubOrdinates;
 
+  // This is required for the case where there is an undefined number of
+  // subordinates (for instance in the case of the changelog).
+  private boolean hasSubOrdinates;
+
   private String displayName;
   private Icon icon;
   private int fontStyle;
@@ -76,6 +80,7 @@
     isLeaf = true;
     refreshNeededOnExpansion = true;
     numSubOrdinates = -1;
+    hasSubOrdinates = false;
     displayName = "";
   }
 
@@ -277,6 +282,23 @@
   }
 
   /**
+   * Returns whether the entry has subordinates or not.
+   * @return {@code true} if the entry has subordinates and {@code false}
+   * otherwise.
+   */
+  public boolean hasSubOrdinates() {
+    return hasSubOrdinates;
+  }
+
+  /**
+   * Sets the whether the entry has subordinates or not.
+   * @param hasSubOrdinates whether the entry has subordinates or not.
+   */
+  public void setHasSubOrdinates(boolean hasSubOrdinates) {
+    this.hasSubOrdinates = hasSubOrdinates;
+  }
+
+  /**
    * Returns the referrals of the entry. Returns <CODE>null</CODE> if this node
    * is not a referral.
    * @return the referrals of the entry. Returns <CODE>null</CODE> if this node

--
Gitblit v1.10.0