From 13a63611d24de8c5727e62a215b26354c1a22278 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 19 Mar 2008 18:09:56 +0000
Subject: [PATCH] Fix for issue 2197 (dsconfig: interactive mode should display the effective dsconfig command)

---
 opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java b/opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java
index 15bf29d..4c89e6d 100644
--- a/opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java
+++ b/opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java
@@ -47,6 +47,7 @@
 import org.opends.server.util.args.Argument;
 import org.opends.server.util.args.ArgumentException;
 import org.opends.server.util.args.SubCommandArgumentParser;
+import org.opends.server.util.cli.CommandBuilder;
 import org.opends.server.util.cli.LDAPConnectionConsoleInteraction;
 import org.opends.server.util.cli.ConsoleApplication;
 
@@ -69,6 +70,9 @@
   // The management context.
   private ManagementContext context = null;
 
+  // The connection parameters command builder.
+  private CommandBuilder contextCommandBuilder;
+
   /**
    * Creates a new LDAP management context factory.
    */
@@ -89,6 +93,7 @@
         new LDAPConnectionConsoleInteraction(app, secureArgsList);
       ci.run();
       context = getManagementContext(app, ci);
+      contextCommandBuilder = ci.getCommandBuilder();
     }
     return context;
   }
@@ -105,6 +110,14 @@
   }
 
   /**
+   * {@inheritDoc}
+   */
+  public CommandBuilder getContextCommandBuilder()
+  {
+    return contextCommandBuilder;
+  }
+
+  /**
    * Gets the management context which sub-commands should use in
    * order to manage the directory server. Implementations can use the
    * application instance for retrieving passwords interactively.

--
Gitblit v1.10.0