From 5be072c20e46f0921bb00401ff26d0defb3e8991 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 05 Dec 2006 21:41:50 +0000
Subject: [PATCH] Update the base DN registration process to address a number of issues:

---
 opends/src/server/org/opends/server/backends/RootDSEBackend.java |   85 ++++++++++++++++--------------------------
 1 files changed, 33 insertions(+), 52 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/RootDSEBackend.java b/opends/src/server/org/opends/server/backends/RootDSEBackend.java
index 5611e60..17aac64 100644
--- a/opends/src/server/org/opends/server/backends/RootDSEBackend.java
+++ b/opends/src/server/org/opends/server/backends/RootDSEBackend.java
@@ -502,21 +502,42 @@
 
 
     // Add the "namingContexts" attribute.
-    Attribute namingContextAttr =
+    Attribute publicNamingContextAttr =
          createDNAttribute(ATTR_NAMING_CONTEXTS, ATTR_NAMING_CONTEXTS_LC,
-                           DirectoryServer.getSuffixes().keySet());
-    ArrayList<Attribute> namingContextAttrs = new ArrayList<Attribute>(1);
-    namingContextAttrs.add(namingContextAttr);
+                           DirectoryServer.getPublicNamingContexts().keySet());
+    ArrayList<Attribute> publicNamingContextAttrs = new ArrayList<Attribute>(1);
+    publicNamingContextAttrs.add(publicNamingContextAttr);
     if (showAllAttributes ||
-        (! namingContextAttr.getAttributeType().isOperational()))
+        (! publicNamingContextAttr.getAttributeType().isOperational()))
     {
-      dseUserAttrs.put(namingContextAttr.getAttributeType(),
-                       namingContextAttrs);
+      dseUserAttrs.put(publicNamingContextAttr.getAttributeType(),
+                       publicNamingContextAttrs);
     }
     else
     {
-      dseOperationalAttrs.put(namingContextAttr.getAttributeType(),
-                              namingContextAttrs);
+      dseOperationalAttrs.put(publicNamingContextAttr.getAttributeType(),
+                              publicNamingContextAttrs);
+    }
+
+
+    // Add the "ds-private-naming-contexts" attribute.
+    Attribute privateNamingContextAttr =
+         createDNAttribute(ATTR_PRIVATE_NAMING_CONTEXTS,
+                           ATTR_PRIVATE_NAMING_CONTEXTS,
+                           DirectoryServer.getPrivateNamingContexts().keySet());
+    ArrayList<Attribute> privateNamingContextAttrs =
+         new ArrayList<Attribute>(1);
+    privateNamingContextAttrs.add(privateNamingContextAttr);
+    if (showAllAttributes ||
+        (! privateNamingContextAttr.getAttributeType().isOperational()))
+    {
+      dseUserAttrs.put(privateNamingContextAttr.getAttributeType(),
+                       privateNamingContextAttrs);
+    }
+    else
+    {
+      dseOperationalAttrs.put(privateNamingContextAttr.getAttributeType(),
+                              privateNamingContextAttrs);
     }
 
 
@@ -858,7 +879,7 @@
     Map<DN,Backend> baseMap;
     if (subordinateBaseDNs == null)
     {
-      baseMap = DirectoryServer.getSuffixes();
+      baseMap = DirectoryServer.getPublicNamingContexts();
     }
     else
     {
@@ -1043,7 +1064,7 @@
         Map<DN,Backend> baseMap;
         if (subordinateBaseDNs == null)
         {
-          baseMap = DirectoryServer.getSuffixes();
+          baseMap = DirectoryServer.getPublicNamingContexts();
         }
         else
         {
@@ -1072,7 +1093,7 @@
       case SUBORDINATE_SUBTREE:
         if (subordinateBaseDNs == null)
         {
-          baseMap = DirectoryServer.getSuffixes();
+          baseMap = DirectoryServer.getPublicNamingContexts();
         }
         else
         {
@@ -1158,26 +1179,6 @@
 
 
   /**
-   * Indicates whether this backend supports the specified control.
-   *
-   * @param  controlOID  The OID of the control for which to make the
-   *                     determination.
-   *
-   * @return  <CODE>true</CODE> if this backend does support the requested
-   *          control, or <CODE>false</CODE>
-   */
-  public boolean supportsControl(String controlOID)
-  {
-    assert debugEnter(CLASS_NAME, "supportsControl",
-                      String.valueOf(controlOID));
-
-    // This backend does not provide any special control support.
-    return false;
-  }
-
-
-
-  /**
    * Retrieves the OIDs of the features that may be supported by this backend.
    *
    * @return  The OIDs of the features that may be supported by this backend.
@@ -1192,26 +1193,6 @@
 
 
   /**
-   * Indicates whether this backend supports the specified feature.
-   *
-   * @param  featureOID  The OID of the feature for which to make the
-   *                     determination.
-   *
-   * @return  <CODE>true</CODE> if this backend does support the requested
-   *          feature, or <CODE>false</CODE>
-   */
-  public boolean supportsFeature(String featureOID)
-  {
-    assert debugEnter(CLASS_NAME, "supportsFeature",
-                      String.valueOf(featureOID));
-
-    // This backend does not provide any special feature support.
-    return false;
-  }
-
-
-
-  /**
    * Indicates whether this backend provides a mechanism to export the data it
    * contains to an LDIF file.
    *

--
Gitblit v1.10.0