From c3c4c197f6b582f1af7538e9ddcd92e3fc48c1db Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Mon, 23 Jul 2007 14:04:01 +0000
Subject: [PATCH] Fix for issue #2009 (dsframework needs to have  the default "all-servers" group)

---
 opendj-sdk/opends/src/ads/org/opends/admin/ads/ADSContext.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/ads/org/opends/admin/ads/ADSContext.java b/opendj-sdk/opends/src/ads/org/opends/admin/ads/ADSContext.java
index 43ebe03..02d55ba 100644
--- a/opendj-sdk/opends/src/ads/org/opends/admin/ads/ADSContext.java
+++ b/opendj-sdk/opends/src/ads/org/opends/admin/ads/ADSContext.java
@@ -194,10 +194,10 @@
   private static HashMap<String, ServerProperty> nameToServerProperty = null;
   /**
    * Get a ServerProperty associated to a name.
-   * @param name The name of the property to retreive.
+   * @param name The name of the property to retrieve.
    *
    * @return The corresponding ServerProperty or null if name
-   * doesn't matech with an existing property.
+   * doesn't match with an existing property.
    */
   public static ServerProperty getPropFromName(String name)
   {
@@ -223,6 +223,11 @@
   }
 
   /**
+   * The default server group which will contain all registered servers.
+   */
+  public static final String ALL_SERVERGROUP_NAME = "all-servers";
+
+  /**
    * Enumeration containing the different server group properties that are
    * stored in the ADS.
    */
@@ -841,6 +846,12 @@
     createAdministratorContainerEntry();
     createContainerEntry(getServerContainerDN());
     createContainerEntry(getServerGroupContainerDN());
+
+    // Add the default "all-servers" group
+    Map<ServerGroupProperty, Object> allServersGroupsMap =
+      new HashMap<ServerGroupProperty, Object>();
+    allServersGroupsMap.put(ServerGroupProperty.UID, ALL_SERVERGROUP_NAME);
+    createServerGroup(allServersGroupsMap);
   }
 
   /**

--
Gitblit v1.10.0