From 3bcc70c3d28164434f018c3c8e9f775be7100708 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Thu, 27 May 2010 09:41:54 +0000
Subject: [PATCH] Several minor fixes in command line utilities and with the Monitoring backend

---
 opends/src/server/org/opends/server/backends/MonitorBackend.java |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/MonitorBackend.java b/opends/src/server/org/opends/server/backends/MonitorBackend.java
index 2e9bd01..9fd6d86 100644
--- a/opends/src/server/org/opends/server/backends/MonitorBackend.java
+++ b/opends/src/server/org/opends/server/backends/MonitorBackend.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Copyright 2006-2010 Sun Microsystems, Inc.
  */
 package org.opends.server.backends;
 
@@ -674,8 +674,26 @@
                                                            true);
     monitorClasses.put(monitorOC, OC_MONITOR_BRANCH);
 
+    HashMap<AttributeType,List<Attribute>> monitorUserAttrs =
+      new LinkedHashMap<AttributeType,List<Attribute>>();
+
+    RDN rdn = dn.getRDN();
+    if (rdn != null)
+    {
+      // Add the RDN values
+      for (int i=0; i<rdn.getNumValues(); i++)
+      {
+        AttributeType attributeType = rdn.getAttributeType(i);
+        AttributeValue value = rdn.getAttributeValue(attributeType);
+        Attribute attr = Attributes.create(attributeType, value);
+        List<Attribute> attrList = new ArrayList<Attribute>(1);
+        attrList.add(attr);
+        monitorUserAttrs.put(attributeType, attrList);
+      }
+    }
+
     // Construct and return the entry.
-    Entry  e = new Entry(dn, monitorClasses, null, null);
+    Entry  e = new Entry(dn, monitorClasses, monitorUserAttrs, null);
     e.processVirtualAttributes();
     return e;
   }

--
Gitblit v1.10.0