From 8f434776744e26ae11fe4d7e395837f62461dc59 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Wed, 29 Jan 2014 11:57:22 +0000
Subject: [PATCH] OPENDJ-1303 Split out CLI support from opendj-ldap-toolkit into a separate Maven module, "opendj-cli" - Add dependency to opendj-cli module. - Classes modified in order to take into account this change. - Fixed comments.
---
opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/ConnectionFactoryProvider.java | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/ConnectionFactoryProvider.java b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/ConnectionFactoryProvider.java
index 45ea5b3..1088b61 100644
--- a/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/ConnectionFactoryProvider.java
+++ b/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/ConnectionFactoryProvider.java
@@ -22,12 +22,11 @@
*
*
* Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2011-2013 ForgeRock AS
+ * Portions copyright 2011-2014 ForgeRock AS
*/
-
package com.forgerock.opendj.ldap.tools;
-import static com.forgerock.opendj.ldap.tools.ToolConstants.*;
+import static com.forgerock.opendj.cli.CliConstants.*;
import static com.forgerock.opendj.ldap.tools.ToolsMessages.*;
import java.io.File;
@@ -47,6 +46,16 @@
import javax.net.ssl.X509TrustManager;
import org.forgerock.i18n.LocalizableMessage;
+
+import com.forgerock.opendj.cli.ArgumentException;
+import com.forgerock.opendj.cli.ArgumentParser;
+import com.forgerock.opendj.cli.BooleanArgument;
+import com.forgerock.opendj.cli.CLIException;
+import com.forgerock.opendj.cli.ConsoleApplication;
+import com.forgerock.opendj.cli.FileBasedArgument;
+import com.forgerock.opendj.cli.IntegerArgument;
+import com.forgerock.opendj.cli.StringArgument;
+
import org.forgerock.opendj.ldap.ConnectionFactory;
import org.forgerock.opendj.ldap.KeyManagers;
import org.forgerock.opendj.ldap.LDAPConnectionFactory;
@@ -68,11 +77,6 @@
*/
final class ConnectionFactoryProvider {
/**
- * End Of Line.
- */
- static final String EOL = System.getProperty("line.separator");
-
- /**
* The Logger.
*/
static final Logger LOG = Logger.getLogger(ConnectionFactoryProvider.class.getName());
@@ -353,8 +357,8 @@
throw new ArgumentException(message);
}
- // Couldn't have at the same time trustAll and
- // trustStore related arg
+ /* Couldn't have at the same time trustAll and
+ trustStore related arg*/
if (trustAllArg.isPresent() && trustStorePathArg.isPresent()) {
final LocalizableMessage message =
ERR_TOOL_CONFLICTING_ARGS.get(trustAllArg.getLongIdentifier(),
@@ -374,8 +378,8 @@
throw new ArgumentException(message);
}
- // Couldn't have at the same time trustStorePasswordArg and
- // trustStorePasswordFileArg
+ /* Couldn't have at the same time trustStorePasswordArg and
+ trustStorePasswordFileArg*/
if (trustStorePasswordArg.isPresent() && trustStorePasswordFileArg.isPresent()) {
final LocalizableMessage message =
ERR_TOOL_CONFLICTING_ARGS.get(trustStorePasswordArg.getLongIdentifier(),
@@ -401,8 +405,7 @@
}
}
- // Couldn't have at the same time startTLSArg and
- // useSSLArg
+ // Couldn't have at the same time startTLSArg and useSSLArg
if (useStartTLSArg.isPresent() && useSSLArg.isPresent()) {
final LocalizableMessage message =
ERR_TOOL_CONFLICTING_ARGS.get(useStartTLSArg.getLongIdentifier(), useSSLArg
--
Gitblit v1.10.0