From 02d3bf611bd9d4c33d8ae74d320790cfb0495d8e Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 03 May 2007 09:37:28 +0000
Subject: [PATCH] Three introspection related changes required in order to support the CLI:

---
 opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java b/opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java
index 8f8a8a3..d95a896 100644
--- a/opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java
+++ b/opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java
@@ -128,7 +128,8 @@
     public Collection<?> getDefaultPropertyValues(
         ManagedObjectPath path, String propertyName)
         throws OperationsException, PropertyNotFoundException {
-      ManagedObject<?> mo = readEntry(dirContext, path, path
+      ManagedObjectPath<?, ?> tmp = path;
+      ManagedObject<?> mo = readEntry(dirContext, tmp, tmp
           .getManagedObjectDefinition());
       ManagedObjectDefinition<?, ?> mod = mo
           .getManagedObjectDefinition();
@@ -202,7 +203,7 @@
       ManagedObjectDefinition<?, ?> d) {
     ArrayList<String> attrIds = new ArrayList<String>();
 
-    for (PropertyDefinition<?> pd : d.getPropertyDefinitions()) {
+    for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
       String attrId = LDAPProfile.getInstance().getAttributeName(d,
           pd);
       attrIds.add(attrId);
@@ -348,7 +349,7 @@
   private final DirContext dirContext;
 
   // The path associated with this managed object.
-  private final ManagedObjectPath path;
+  private final ManagedObjectPath<?, ?> path;
 
   // LDAP profile associated with this connection.
   private final LDAPProfile profile;
@@ -382,7 +383,7 @@
     ManagedObjectDefinition<C, ?> d = getManagedObjectDefinition();
     LDAPChangeBuilder builder = new LDAPChangeBuilder(dirContext,
         path, d);
-    for (PropertyDefinition<?> pd : d.getPropertyDefinitions()) {
+    for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
       // FIXME: should throw an error when there are missing mandatory
       // properties.
       Property<?> p = properties.getProperty(pd);
@@ -696,7 +697,7 @@
     attributes.put(rdn.getType(), rdn.getValue().toString());
 
     // Create the remaining attributes.
-    for (PropertyDefinition<?> pd : d.getPropertyDefinitions()) {
+    for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) {
       String attrID = profile.getAttributeName(d, pd);
       Attribute attribute = new BasicAttribute(attrID);
       encodeProperty(attribute, pd, properties);

--
Gitblit v1.10.0