From d56976462ee0ecdd405e45e0154eb5fb48e4488b Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 27 Nov 2009 23:53:01 +0000
Subject: [PATCH] Consolidate some of the code used to display the equivalent command-line in the control panel.
---
opends/src/guitools/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java
index caf520e..3413a3c 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/ImportLDIFPanel.java
@@ -71,7 +71,6 @@
import org.opends.server.tools.dsreplication.ReplicationCliException;
import org.opends.server.tools.dsreplication.ReplicationCliMain;
import org.opends.server.types.DN;
-import org.opends.server.util.cli.CommandBuilder;
/**
* The panel where the user can import the contents of an LDIF file to the
@@ -1021,9 +1020,7 @@
private String getCommandLineToInitializeAll()
{
- StringBuilder sb = new StringBuilder();
String cmdLineName = getCommandLinePath("dsreplication");
- sb.append(cmdLineName);
ArrayList<String> args = new ArrayList<String>();
args.add(
ReplicationCliArgumentParser.INITIALIZE_ALL_REPLICATION_SUBCMD_NAME);
@@ -1044,11 +1041,7 @@
args.add("--trustAll");
args.add("--no-prompt");
- for (String arg : args)
- {
- sb.append(" "+CommandBuilder.escapeValue(arg));
- }
- return sb.toString();
+ return Task.getEquivalentCommandLine(cmdLineName, args);
}
};
}
--
Gitblit v1.10.0