opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/DSConfig.java
@@ -32,6 +32,7 @@ import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.dsconfig.DsconfigMessages.*; import static com.forgerock.opendj.util.StaticUtils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.forgerock.opendj.config.PropertyOption.*; import static org.forgerock.opendj.config.dsconfig.ArgumentExceptionFactory.*; @@ -113,7 +114,6 @@ import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommandBuilder; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.ConnectionFactoryProvider; import com.forgerock.opendj.cli.ConsoleApplication; import com.forgerock.opendj.cli.Menu; @@ -936,12 +936,12 @@ */ private void initializeGlobalArguments() throws ArgumentException { if (!globalArgumentsInitialized) { verboseArgument = CommonArguments.getVerbose(); quietArgument = CommonArguments.getQuiet(); scriptFriendlyArgument = CommonArguments.getScriptFriendly(); noPromptArgument = CommonArguments.getNoPrompt(); advancedModeArgument = CommonArguments.getAdvancedMode(); showUsageArgument = CommonArguments.getShowUsage(); verboseArgument = verboseArgument(); quietArgument = quietArgument(); scriptFriendlyArgument = scriptFriendlyArgument(); noPromptArgument = noPromptArgument(); advancedModeArgument = advancedModeArgument(); showUsageArgument = showUsageArgument(); batchArgument = BooleanArgument.builder(OPTION_LONG_BATCH) opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ControlPanelArgumentParser.java
@@ -28,6 +28,8 @@ import static org.opends.messages.ToolMessages.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.util.LinkedHashSet; import org.forgerock.i18n.LocalizableMessage; @@ -40,7 +42,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -109,33 +110,33 @@ */ public void initializeArguments() throws ArgumentException { hostNameArg = CommonArguments.getHostName(UserData.getDefaultHostName()); hostNameArg = hostNameArgument(UserData.getDefaultHostName()); addArgument(hostNameArg); portArg = CommonArguments.getPort(getDefaultAdministrationPort(), portArgument(getDefaultAdministrationPort(), INFO_DESCRIPTION_ADMIN_PORT.get()); addArgument(portArg); bindDnArg = CommonArguments.getBindDN(getDefaultBindDN()); bindDnArg = bindDNArgument(getDefaultBindDN()); addArgument(bindDnArg); bindPasswordArg = CommonArguments.getBindPassword(); bindPasswordArg = bindPasswordArgument(); addArgument(bindPasswordArg); bindPasswordFileArg = CommonArguments.getBindPasswordFile(); bindPasswordFileArg = bindPasswordFileArgument(); addArgument(bindPasswordFileArg); trustAllArg = CommonArguments.getTrustAll(); trustAllArg = trustAllArgument(); addArgument(trustAllArg); remoteArg = CommonArguments.getRemote(); remoteArg = remoteArgument(); addArgument(remoteArg); connectTimeoutArg = CommonArguments.getConnectTimeOut(); connectTimeoutArg = connectTimeOutArgument(); addArgument(connectTimeoutArg); showUsageArg = CommonArguments.getShowUsage(); showUsageArg = showUsageArgument(); addArgument(showUsageArg); setUsageArgument(showUsageArg); } opendj-server-legacy/src/main/java/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
@@ -29,6 +29,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.CliMessages.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.OutputStream; import java.util.ArrayList; @@ -44,7 +45,6 @@ import com.forgerock.opendj.cli.Argument; import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.ReturnCode; import com.forgerock.opendj.cli.StringArgument; @@ -104,8 +104,8 @@ throws ArgumentException { LinkedHashSet<Argument> args = new LinkedHashSet<>(); adminUidArg = CommonArguments.getAdminUid(INFO_DESCRIPTION_ADMIN_UID.get()); cliArg = CommonArguments.getCLI(); adminUidArg = adminUid(INFO_DESCRIPTION_ADMIN_UID.get()); cliArg = cliArgument(); args.add(cliArg); removeAllArg = @@ -157,7 +157,7 @@ .buildArgument(); args.add(removeLDIFFilesArg); noPromptArg = CommonArguments.getNoPrompt(); noPromptArg = noPromptArgument(); args.add(noPromptArg); forceOnErrorArg = @@ -167,7 +167,7 @@ .buildArgument(); args.add(forceOnErrorArg); quietArg = CommonArguments.getQuiet(); quietArg = quietArgument(); args.add(quietArg); ArrayList<Argument> defaultArgs = new ArrayList<>(createGlobalArguments(outStream, alwaysSSL)); opendj-server-legacy/src/main/java/org/opends/server/admin/client/cli/SecureConnectionCliArgs.java
@@ -29,6 +29,7 @@ import static com.forgerock.opendj.cli.CliMessages.*; import static com.forgerock.opendj.cli.ReturnCode.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.File; import java.io.FileInputStream; @@ -62,7 +63,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -212,7 +212,7 @@ { argList = new LinkedHashSet<>(); useSSLArg = CommonArguments.getUseSSL(); useSSLArg = useSSLArgument(); if (!alwaysSSL) { argList.add(useSSLArg); @@ -223,58 +223,58 @@ useSSLArg.setPresent(true); } useStartTLSArg = CommonArguments.getStartTLS(); useStartTLSArg = startTLSArgument(); if (!alwaysSSL) { argList.add(useStartTLSArg); } hostNameArg = CommonArguments.getHostName(getDefaultHostName()); hostNameArg = hostNameArgument(getDefaultHostName()); argList.add(hostNameArg); portArg = createPortArgument(AdministrationConnector.DEFAULT_ADMINISTRATION_CONNECTOR_PORT); argList.add(portArg); bindDnArg = CommonArguments.getBindDN(CliConstants.DEFAULT_ROOT_USER_DN); bindDnArg = bindDNArgument(CliConstants.DEFAULT_ROOT_USER_DN); argList.add(bindDnArg); // Classes that required admin UID to be not hidden must use CommonsArguments.getAdminUid(). adminUidHiddenArg = CommonArguments.getAdminUidHidden(INFO_DESCRIPTION_ADMIN_UID.get()); // Classes that required admin UID to be not hidden must use CommonsArguments.adminUid(). adminUidHiddenArg = adminUidHiddenArgument(INFO_DESCRIPTION_ADMIN_UID.get()); bindPasswordArg = CommonArguments.getBindPassword(); bindPasswordArg = bindPasswordArgument(); argList.add(bindPasswordArg); bindPasswordFileArg = CommonArguments.getBindPasswordFile(); bindPasswordFileArg = bindPasswordFileArgument(); argList.add(bindPasswordFileArg); saslOptionArg = CommonArguments.getSASL(); saslOptionArg = saslArgument(); argList.add(saslOptionArg); trustAllArg = CommonArguments.getTrustAll(); trustAllArg = trustAllArgument(); argList.add(trustAllArg); trustStorePathArg = CommonArguments.getTrustStorePath(); trustStorePathArg = trustStorePathArgument(); argList.add(trustStorePathArg); trustStorePasswordArg = CommonArguments.getTrustStorePassword(); trustStorePasswordArg = trustStorePasswordArgument(); argList.add(trustStorePasswordArg); trustStorePasswordFileArg = CommonArguments.getTrustStorePasswordFile(); trustStorePasswordFileArg = trustStorePasswordFileArgument(); argList.add(trustStorePasswordFileArg); keyStorePathArg = CommonArguments.getKeyStorePath(); keyStorePathArg = keyStorePathArgument(); argList.add(keyStorePathArg); keyStorePasswordArg = CommonArguments.getKeyStorePassword(); keyStorePasswordArg = keyStorePasswordArgument(); argList.add(keyStorePasswordArg); keyStorePasswordFileArg = CommonArguments.getKeyStorePasswordFile(); keyStorePasswordFileArg = keyStorePasswordFileArgument(); argList.add(keyStorePasswordFileArg); certNicknameArg = CommonArguments.getCertNickName(); certNicknameArg = certNickNameArgument(); argList.add(certNicknameArg); connectTimeoutArg = CommonArguments.getConnectTimeOut(); connectTimeoutArg = connectTimeOutArgument(); argList.add(connectTimeoutArg); return argList; @@ -644,7 +644,7 @@ try { portArg = createPortArgument(getPortFromConfig()); trustStorePathArg = CommonArguments.getTrustStorePathArgument(getTruststoreFileFromConfig()); trustStorePathArg = trustStorePathArgument(getTruststoreFileFromConfig()); parser.replaceArgument(portArg); parser.replaceArgument(trustStorePathArg); } @@ -657,7 +657,7 @@ private IntegerArgument createPortArgument(final int defaultValue) throws ArgumentException { return CommonArguments.getPort( return portArgument( defaultValue, alwaysSSL ? INFO_DESCRIPTION_ADMIN_PORT.get() : INFO_DESCRIPTION_PORT.get()); } } opendj-server-legacy/src/main/java/org/opends/server/admin/client/cli/SecureConnectionCliParser.java
@@ -22,7 +22,7 @@ * * * Copyright 2007-2010 Sun Microsystems, Inc. * Portions Copyright 2014-2015 ForgeRock AS * Portions Copyright 2014-2016 ForgeRock AS */ package org.opends.server.admin.client.cli; @@ -30,6 +30,7 @@ import static com.forgerock.opendj.cli.CliMessages.*; import static com.forgerock.opendj.cli.ReturnCode.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.IOException; import java.io.OutputStream; @@ -47,7 +48,6 @@ import com.forgerock.opendj.cli.ArgumentGroup; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.ConsoleApplication; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.StringArgument; @@ -244,18 +244,18 @@ secureArgsList = new SecureConnectionCliArgs(alwaysSSL); Set<Argument> set = secureArgsList.createGlobalArguments(); showUsageArg = CommonArguments.getShowUsage(); showUsageArg = showUsageArgument(); setUsageArgument(showUsageArg, outStream); set.add(showUsageArg); verboseArg = CommonArguments.getVerbose(); verboseArg = verboseArgument(); set.add(verboseArg); propertiesFileArg = CommonArguments.getPropertiesFile(); propertiesFileArg = propertiesFileArgument(); setFilePropertiesArgument(propertiesFileArg); set.add(propertiesFileArg); noPropertiesFileArg = CommonArguments.getNoPropertiesFile(); noPropertiesFileArg = noPropertiesFileArgument(); setNoPropertiesFileArgument(noPropertiesFileArg); set.add(noPropertiesFileArg); opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/BackendStat.java
@@ -30,6 +30,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.OutputStream; import java.io.PrintStream; @@ -74,7 +75,6 @@ import com.forgerock.opendj.cli.Argument; import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; import com.forgerock.opendj.cli.SubCommand; @@ -379,7 +379,7 @@ .valuePlaceholder(INFO_CONFIGFILE_PLACEHOLDER.get()) .buildArgument(); showUsageArgument = CommonArguments.getShowUsage(); showUsageArgument = showUsageArgument(); // Register the global arguments. parser.addGlobalArgument(showUsageArgument); opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java
@@ -26,6 +26,8 @@ */ package org.opends.server.core; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.forgerock.util.Reject.*; import static org.opends.messages.CoreMessages.*; import static org.opends.messages.ToolMessages.*; @@ -186,7 +188,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; import com.forgerock.opendj.cli.VersionHandler; @@ -6900,7 +6901,7 @@ .description(INFO_DSCORE_DESCRIPTION_NODETACH.get()) .buildAndAddToParser(argParser); quietMode = CommonArguments.getQuiet(); quietMode = quietArgument(); argParser.addArgument(quietMode); // Not used in this class, but required by the start-ds script (see issue #3814) @@ -6913,7 +6914,7 @@ .defaultValue(DEFAULT_TIMEOUT) .valuePlaceholder(INFO_SECONDS_PLACEHOLDER.get()) .buildAndAddToParser(argParser); displayUsage = CommonArguments.getShowUsage(); displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); argParser.setVersionHandler(new DirectoryServerVersionHandler()); opendj-server-legacy/src/main/java/org/opends/server/plugins/profiler/ProfileViewer.java
@@ -54,12 +54,12 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; import static org.opends.messages.PluginMessages.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.util.StaticUtils.*; import static com.forgerock.opendj.cli.CommonArguments.*; @@ -134,7 +134,7 @@ .description(INFO_PROFILEVIEWER_DESCRIPTION_USE_GUI.get()) .buildAndAddToParser(argParser); displayUsage = CommonArguments.getShowUsage(); displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/BackUpDB.java
@@ -33,6 +33,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.File; import java.io.OutputStream; @@ -77,7 +78,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -246,7 +246,7 @@ .description(INFO_BACKUPDB_DESCRIPTION_SIGN_HASH.get()) .buildAndAddToParser(argParser); final BooleanArgument displayUsage = CommonArguments.getShowUsage(); final BooleanArgument displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureDS.java
@@ -39,6 +39,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.File; import java.io.OutputStream; @@ -88,7 +89,6 @@ import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -492,7 +492,7 @@ .valuePlaceholder(INFO_FILE_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage); opendj-server-legacy/src/main/java/org/opends/server/tools/ConfigureWindowsService.java
@@ -28,6 +28,7 @@ import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.util.OperatingSystem.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; @@ -50,7 +51,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -194,7 +194,7 @@ .valuePlaceholder(INFO_SERVICE_NAME_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage, out); } opendj-server-legacy/src/main/java/org/opends/server/tools/CreateRCScript.java
@@ -33,6 +33,7 @@ import static org.opends.server.util.StaticUtils.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.File; import java.io.OutputStream; @@ -51,7 +52,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; import com.forgerock.opendj.util.OperatingSystem; @@ -147,7 +147,7 @@ .valuePlaceholder(INFO_ARGS_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/EncodePassword.java
@@ -29,6 +29,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.CliMessages.INFO_FILE_PLACEHOLDER; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ConfigMessages.*; import static org.opends.messages.ToolMessages.*; @@ -70,7 +71,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.StringArgument; @@ -231,7 +231,7 @@ .description(INFO_ENCPW_DESCRIPTION_USE_COMPARE_RESULT.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage, out); } opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java
@@ -32,6 +32,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.OutputStream; import java.io.PrintStream; @@ -74,7 +75,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -282,7 +282,7 @@ .hidden() // See issue #28 .buildAndAddToParser(argParser); displayUsage = CommonArguments.getShowUsage(); displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
@@ -82,7 +82,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDSArgumentParser.java
@@ -35,6 +35,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.util.OperatingSystem.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.util.Collection; import java.util.HashSet; @@ -56,7 +57,6 @@ import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -138,7 +138,7 @@ .buildArgument(); addArgument(testOnlyArg); cliArg = CommonArguments.getCLI(); cliArg = cliArgument(); addArgument(cliArg); progNameArg = StringArgument.builder("programName") @@ -150,13 +150,13 @@ .buildArgument(); addArgument(progNameArg); noPromptArg = CommonArguments.getNoPrompt(); noPromptArg = noPromptArgument(); addArgument(noPromptArg); quietArg = CommonArguments.getQuiet(); quietArg = quietArgument(); addArgument(quietArg); verboseArg = CommonArguments.getVerbose(); verboseArg = verboseArgument(); addArgument(verboseArg); propertiesFileArgument = @@ -405,13 +405,13 @@ .buildArgument(); addDefaultArgument(certNicknameArg); connectTimeoutArg = CommonArguments.getConnectTimeOutHidden(); connectTimeoutArg = connectTimeOutHiddenArgument(); addArgument(connectTimeoutArg); acceptLicense = CommonArguments.getAcceptLicense(); acceptLicense = acceptLicenseArgument(); addArgument(acceptLicense); showUsageArg = CommonArguments.getShowUsage(); showUsageArg = showUsageArgument(); addArgument(showUsageArg); setUsageArgument(showUsageArg); opendj-server-legacy/src/main/java/org/opends/server/tools/JavaPropertiesToolArgumentParser.java
@@ -28,6 +28,7 @@ import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.util.OperatingSystem.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; @@ -43,7 +44,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -81,7 +81,7 @@ */ public void initializeArguments() throws ArgumentException { quietArg = CommonArguments.getQuiet(); quietArg = quietArgument(); addArgument(quietArg); propertiesFileArg = @@ -104,7 +104,7 @@ .buildArgument(); addArgument(destinationFileArg); showUsageArg = CommonArguments.getShowUsage(); showUsageArg = showUsageArgument(); addArgument(showUsageArg); setUsageArgument(showUsageArg); } opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPCompare.java
@@ -29,6 +29,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.CliMessages.INFO_DESCRIPTION_BINDPASSWORDFILE; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.protocols.ldap.LDAPResultCode.*; @@ -67,7 +68,6 @@ import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -488,7 +488,7 @@ .valuePlaceholder(INFO_SASL_OPTION_PLACEHOLDER.get()) .buildAndAddToParser(argParser); trustAll = CommonArguments.getTrustAll(); trustAll = trustAllArgument(); argParser.addArgument(trustAll); keyStorePath = @@ -575,10 +575,10 @@ .description(INFO_DESCRIPTION_NOOP.get()) .buildAndAddToParser(argParser); verbose = CommonArguments.getVerbose(); verbose = verboseArgument(); argParser.addArgument(verbose); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); useCompareResultCode = opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPDelete.java
@@ -29,6 +29,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.CliMessages.INFO_DESCRIPTION_BINDPASSWORDFILE; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.protocols.ldap.LDAPResultCode.*; @@ -64,7 +65,6 @@ import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -404,7 +404,7 @@ .valuePlaceholder(INFO_SASL_OPTION_PLACEHOLDER.get()) .buildAndAddToParser(argParser); trustAll = CommonArguments.getTrustAll(); trustAll = trustAllArgument(); argParser.addArgument(trustAll); keyStorePath = @@ -491,10 +491,10 @@ .description(INFO_DESCRIPTION_NOOP.get()) .buildAndAddToParser(argParser); verbose = CommonArguments.getVerbose(); verbose = verboseArgument(); argParser.addArgument(verbose); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage, out); } catch (ArgumentException ae) opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPModify.java
@@ -30,6 +30,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.CliMessages.INFO_DESCRIPTION_BINDPASSWORDFILE; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.protocols.ldap.LDAPResultCode.*; @@ -81,7 +82,6 @@ import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -682,7 +682,7 @@ .valuePlaceholder(INFO_SASL_OPTION_PLACEHOLDER.get()) .buildAndAddToParser(argParser); trustAll = CommonArguments.getTrustAll(); trustAll = trustAllArgument(); argParser.addArgument(trustAll); keyStorePath = @@ -790,10 +790,10 @@ .description(INFO_DESCRIPTION_NOOP.get()) .buildAndAddToParser(argParser); verbose = CommonArguments.getVerbose(); verbose = verboseArgument(); argParser.addArgument(verbose); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage, out); } catch (ArgumentException ae) opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPPasswordModify.java
@@ -43,6 +43,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.OutputStream; import java.io.PrintStream; @@ -75,7 +76,6 @@ import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.ConsoleApplication; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; @@ -293,7 +293,7 @@ .valuePlaceholder(INFO_FILE_PLACEHOLDER.get()) .buildAndAddToParser(argParser); trustAll = CommonArguments.getTrustAll(); trustAll = trustAllArgument(); argParser.addArgument(trustAll); sslKeyStore = @@ -351,7 +351,7 @@ .valuePlaceholder(INFO_TIMEOUT_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage, out); } opendj-server-legacy/src/main/java/org/opends/server/tools/LDAPSearch.java
@@ -35,6 +35,7 @@ import static com.forgerock.opendj.cli.CliMessages.INFO_KEYSTORE_PWD_FILE_PLACEHOLDER; import static com.forgerock.opendj.cli.CliMessages.INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.protocols.ldap.LDAPConstants.*; @@ -66,7 +67,6 @@ import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CliConstants; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.MultiChoiceArgument; @@ -788,7 +788,7 @@ .valuePlaceholder(INFO_SASL_OPTION_PLACEHOLDER.get()) .buildAndAddToParser(argParser); trustAll = CommonArguments.getTrustAll(); trustAll = trustAllArgument(); argParser.addArgument(trustAll); keyStorePath = @@ -976,10 +976,10 @@ .description(INFO_DESCRIPTION_NOOP.get()) .buildAndAddToParser(argParser); verbose = CommonArguments.getVerbose(); verbose = verboseArgument(); argParser.addArgument(verbose); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage, out); } catch (ArgumentException ae) opendj-server-legacy/src/main/java/org/opends/server/tools/LDIFDiff.java
@@ -66,11 +66,11 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.protocols.ldap.LDAPResultCode.*; @@ -236,7 +236,7 @@ .valuePlaceholder(INFO_CONFIGCLASS_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); useCompareResultCode = opendj-server-legacy/src/main/java/org/opends/server/tools/LDIFModify.java
@@ -32,6 +32,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.File; import java.io.IOException; @@ -76,7 +77,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -473,7 +473,7 @@ .valuePlaceholder(INFO_LDIFFILE_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/LDIFSearch.java
@@ -30,6 +30,7 @@ import static com.forgerock.opendj.cli.CliMessages.INFO_SIZE_LIMIT_PLACEHOLDER; import static com.forgerock.opendj.cli.CliMessages.INFO_TIME_LIMIT_PLACEHOLDER; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.util.CollectionUtils.*; @@ -230,7 +231,7 @@ .valuePlaceholder(INFO_TIME_LIMIT_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/ListBackends.java
@@ -28,6 +28,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ConfigMessages.*; import static org.opends.messages.ToolMessages.*; @@ -60,7 +61,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; import com.forgerock.opendj.cli.TableBuilder; import com.forgerock.opendj.cli.TextTablePrinter; @@ -179,7 +179,7 @@ .valuePlaceholder(INFO_BASEDN_PLACEHOLDER.get()) .buildAndAddToParser(argParser); displayUsage = CommonArguments.getShowUsage(); displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage, out); } opendj-server-legacy/src/main/java/org/opends/server/tools/ManageAccount.java
@@ -33,6 +33,7 @@ import static com.forgerock.opendj.cli.CliMessages.INFO_PORT_PLACEHOLDER; import static com.forgerock.opendj.cli.CliMessages.INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.extensions.PasswordPolicyStateExtendedOperation.*; @@ -69,7 +70,6 @@ import com.forgerock.opendj.cli.Argument; import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.MultiChoiceArgument; @@ -905,7 +905,7 @@ .buildArgument(); argParser.addGlobalArgument(saslOption); trustAll = CommonArguments.getTrustAll(); trustAll = trustAllArgument(); argParser.addGlobalArgument(trustAll); keyStoreFile = @@ -964,10 +964,10 @@ .buildArgument(); argParser.addGlobalArgument(trustStorePWFile); verbose = CommonArguments.getVerbose(); verbose = verboseArgument(); argParser.addGlobalArgument(verbose); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addGlobalArgument(showUsage); argParser.setUsageArgument(showUsage, out); opendj-server-legacy/src/main/java/org/opends/server/tools/ManageTasks.java
@@ -43,7 +43,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.ConsoleApplication; import com.forgerock.opendj.cli.Menu; import com.forgerock.opendj.cli.MenuBuilder; @@ -67,6 +66,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; /** Tool for getting information and managing tasks in the Directory Server. */ public class ManageTasks extends ConsoleApplication { @@ -232,10 +232,10 @@ .description(INFO_TASKINFO_SUMMARY_ARG_DESCRIPTION.get()) .buildAndAddToParser(argParser); noPrompt = CommonArguments.getNoPrompt(); noPrompt = noPromptArgument(); argParser.addArgument(noPrompt); BooleanArgument displayUsage = CommonArguments.getShowUsage(); BooleanArgument displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/RebuildIndex.java
@@ -31,6 +31,7 @@ import static org.opends.server.util.StaticUtils.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.OutputStream; import java.io.PrintStream; @@ -69,7 +70,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -296,7 +296,7 @@ .valuePlaceholder(INFO_REBUILDINDEX_TEMP_DIR_PLACEHOLDER.get()) .buildAndAddToParser(argParser); final BooleanArgument displayUsage = CommonArguments.getShowUsage(); final BooleanArgument displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/RestoreDB.java
@@ -32,6 +32,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.OutputStream; import java.io.PrintStream; @@ -75,7 +76,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -208,7 +208,7 @@ .description(INFO_RESTOREDB_DESCRIPTION_VERIFY_ONLY.get()) .buildAndAddToParser(argParser); displayUsage = CommonArguments.getShowUsage(); displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/StopDS.java
@@ -32,6 +32,7 @@ import static com.forgerock.opendj.cli.CliMessages.INFO_PORT_PLACEHOLDER; import static com.forgerock.opendj.cli.CliMessages.INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.config.ConfigConstants.*; @@ -82,7 +83,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -286,7 +286,7 @@ .hidden() .buildAndAddToParser(argParser); restart = CommonArguments.getRestart(); restart = restartArgument(); argParser.addArgument(restart); stopTimeStr = @@ -296,7 +296,7 @@ .valuePlaceholder(INFO_STOP_TIME_PLACEHOLDER.get()) .buildAndAddToParser(argParser); trustAll = CommonArguments.getTrustAll(); trustAll = trustAllArgument(); argParser.addArgument(trustAll); keyStoreFile = @@ -342,10 +342,10 @@ .valuePlaceholder(INFO_TRUSTSTORE_PWD_FILE_PLACEHOLDER.get()) .buildAndAddToParser(argParser); quietMode = CommonArguments.getQuiet(); quietMode = quietArgument(); argParser.addArgument(quietMode); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage, out); } opendj-server-legacy/src/main/java/org/opends/server/tools/VerifyIndex.java
@@ -28,6 +28,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.util.StaticUtils.*; @@ -59,7 +60,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -168,7 +168,7 @@ .description(INFO_VERIFYINDEX_DESCRIPTION_COUNT_ERRORS.get()) .buildAndAddToParser(argParser); displayUsage = CommonArguments.getShowUsage(); displayUsage = showUsageArgument(); argParser.addArgument(displayUsage); argParser.setUsageArgument(displayUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/WaitForFileDelete.java
@@ -39,6 +39,7 @@ import static org.opends.messages.ToolMessages.*; import static org.opends.server.util.StaticUtils.*; import static com.forgerock.opendj.cli.Utils.filterExitCode; import static com.forgerock.opendj.cli.CommonArguments.*; /** * This program provides a simple tool that will wait for a specified file to be @@ -216,10 +217,10 @@ .buildAndAddToParser(argParser); // Not used in this class, but required by the start-ds script (see issue #3814) quietMode = CommonArguments.getQuiet(); quietMode = quietArgument(); argParser.addArgument(quietMode); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java
@@ -30,6 +30,7 @@ import static com.forgerock.opendj.cli.CliMessages.INFO_BINDPWD_FILE_PLACEHOLDER; import static com.forgerock.opendj.cli.CliMessages.INFO_PORT_PLACEHOLDER; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.AdminToolMessages.*; import static org.opends.messages.ToolMessages.*; @@ -431,7 +432,7 @@ .buildArgument(); defaultArgs.add(index++, baseDNsArg); adminUidArg = CommonArguments.getAdminUid( adminUidArg = adminUid( INFO_DESCRIPTION_REPLICATION_ADMIN_UID.get(ENABLE_REPLICATION_SUBCMD_NAME)); defaultArgs.add(index++, adminUidArg); @@ -453,37 +454,37 @@ defaultArgs.remove(verboseArg); quietArg = CommonArguments.getQuiet(); quietArg = quietArgument(); defaultArgs.add(index++, quietArg); noPromptArg = CommonArguments.getNoPrompt(); noPromptArg = noPromptArgument(); defaultArgs.add(index++, noPromptArg); displayEquivalentArgument = CommonArguments.getDisplayEquivalentCommand(); displayEquivalentArgument = displayEquivalentCommandArgument(); defaultArgs.add(index++, displayEquivalentArgument); equivalentCommandFileArgument = CommonArguments .getEquivalentCommandFile( .equivalentCommandFileArgument( INFO_REPLICATION_DESCRIPTION_EQUIVALENT_COMMAND_FILE_PATH.get()); defaultArgs.add(index++, equivalentCommandFileArgument); advancedArg = CommonArguments.getAdvancedMode(); advancedArg = advancedModeArgument(); defaultArgs.add(index++, advancedArg); configClassArg = CommonArguments.getConfigClass(ConfigFileHandler.class.getName()); configClassArgument(ConfigFileHandler.class.getName()); defaultArgs.add(index++, configClassArg); configFileArg = CommonArguments.getConfigFile(); configFileArg = configFileArgument(); defaultArgs.add(index++, configFileArg); this.propertiesFileArgument = CommonArguments.getPropertiesFile(); this.propertiesFileArgument = propertiesFileArgument(); defaultArgs.add(this.propertiesFileArgument); setFilePropertiesArgument(this.propertiesFileArgument); this.noPropertiesFileArgument = CommonArguments.getNoPropertiesFile(); this.noPropertiesFileArgument = noPropertiesFileArgument(); defaultArgs.add(this.noPropertiesFileArgument); setNoPropertiesFileArgument(this.noPropertiesFileArgument); opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -68,7 +68,6 @@ import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.TrustManager; import com.forgerock.opendj.cli.CommonArguments; import org.forgerock.i18n.LocalizableMessage; import org.forgerock.i18n.LocalizableMessageBuilder; import org.forgerock.i18n.LocalizableMessageDescriptor.Arg0; @@ -147,6 +146,7 @@ import static com.forgerock.opendj.cli.CliMessages.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.util.OperatingSystem.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static java.util.Collections.*; import static org.forgerock.util.Utils.*; @@ -8839,7 +8839,7 @@ { if (uData.getAdminUid() != null) { final StringArgument adminUID = CommonArguments.getAdminUid( final StringArgument adminUID = adminUid( INFO_DESCRIPTION_REPLICATION_ADMIN_UID.get(ENABLE_REPLICATION_SUBCMD_NAME)); adminUID.addValue(uData.getAdminUid()); commandBuilder.addArgument(adminUID); opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/MakeLDIF.java
@@ -30,6 +30,7 @@ import static com.forgerock.opendj.cli.CliMessages.INFO_MAKELDIF_DESCRIPTION_SEED; import static com.forgerock.opendj.cli.CliMessages.INFO_SEED_PLACEHOLDER; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.ToolMessages.*; import static org.opends.server.util.StaticUtils.*; @@ -56,7 +57,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.IntegerArgument; import com.forgerock.opendj.cli.StringArgument; @@ -214,7 +214,7 @@ .valuePlaceholder(INFO_SEED_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage); } opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCliArgumentParser.java
@@ -26,11 +26,12 @@ */ package org.opends.server.tools.status; import static com.forgerock.opendj.cli.CommonArguments.*; import static org.opends.messages.AdminToolMessages.*; import static org.opends.messages.ToolMessages.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.OutputStream; import java.util.ArrayList; @@ -92,18 +93,18 @@ defaultArgs.remove(verboseArg); defaultArgs.remove(noPropertiesFileArg); defaultArgs.remove(propertiesFileArg); noPromptArg = getNoPrompt(); noPromptArg = noPromptArgument(); defaultArgs.add(0, noPromptArg); scriptFriendlyArg = getScriptFriendly(); scriptFriendlyArg = scriptFriendlyArgument(); defaultArgs.add(1, scriptFriendlyArg); StringArgument propertiesFileArgument = getPropertiesFile(); StringArgument propertiesFileArgument = propertiesFileArgument(); defaultArgs.add(propertiesFileArgument); setFilePropertiesArgument(propertiesFileArgument); BooleanArgument noPropertiesFileArgument = getNoPropertiesFile(); BooleanArgument noPropertiesFileArgument = noPropertiesFileArgument(); defaultArgs.add(noPropertiesFileArgument); setNoPropertiesFileArgument(noPropertiesFileArgument); opendj-server-legacy/src/main/java/org/opends/server/tools/tasks/TaskTool.java
@@ -31,6 +31,7 @@ import static org.opends.server.util.StaticUtils.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.IOException; import java.io.PrintStream; @@ -60,7 +61,6 @@ import com.forgerock.opendj.cli.ArgumentGroup; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; /** @@ -142,12 +142,12 @@ try { StringArgument propertiesFileArgument = CommonArguments.getPropertiesFile(); propertiesFileArgument(); argParser.addArgument(propertiesFileArgument); argParser.setFilePropertiesArgument(propertiesFileArgument); BooleanArgument noPropertiesFileArgument = CommonArguments.getNoPropertiesFile(); noPropertiesFileArgument(); argParser.addArgument(noPropertiesFileArgument); argParser.setNoPropertiesFileArgument(noPropertiesFileArgument); opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeCli.java
@@ -27,6 +27,7 @@ import static com.forgerock.opendj.cli.ArgumentConstants.*; import static com.forgerock.opendj.cli.Utils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import static javax.security.auth.callback.TextOutputCallback.*; import static org.opends.messages.ToolMessages.*; @@ -55,7 +56,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.ConsoleApplication; import com.forgerock.opendj.cli.StringArgument; import com.forgerock.opendj.cli.SubCommandArgumentParser; @@ -224,11 +224,11 @@ { if (!globalArgumentsInitialized) { configClass = CommonArguments.getConfigClass(ConfigFileHandler.class.getName()); configFile = CommonArguments.getConfigFile(); noPrompt = CommonArguments.getNoPrompt(); verbose = CommonArguments.getVerbose(); quietMode = CommonArguments.getQuiet(); configClass = configClassArgument(ConfigFileHandler.class.getName()); configFile = configFileArgument(); noPrompt = noPromptArgument(); verbose = verboseArgument(); quietMode = quietArgument(); ignoreErrors = BooleanArgument.builder(OPTION_LONG_IGNORE_ERRORS) .description(INFO_UPGRADE_OPTION_IGNORE_ERRORS.get()) @@ -237,8 +237,8 @@ BooleanArgument.builder(OPTION_LONG_FORCE_UPGRADE) .description(INFO_UPGRADE_OPTION_FORCE.get(OPTION_LONG_NO_PROMPT)) .buildArgument(); acceptLicense = CommonArguments.getAcceptLicense(); showUsageArgument = CommonArguments.getShowUsage(); acceptLicense = acceptLicenseArgument(); showUsageArgument = showUsageArgument(); // Register the global arguments. opendj-server-legacy/src/main/java/org/opends/server/util/Base64.java
@@ -31,6 +31,8 @@ import static org.opends.messages.UtilityMessages.*; import static org.opends.server.util.StaticUtils.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; @@ -53,7 +55,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; import com.forgerock.opendj.cli.SubCommand; import com.forgerock.opendj.cli.SubCommandArgumentParser; @@ -528,7 +529,7 @@ subCommandList.add(decodeSubCommand); subCommandList.add(encodeSubCommand); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addGlobalArgument(showUsage); argParser.setUsageGroupArgument(showUsage, subCommandList); argParser.setUsageArgument(showUsage, NullOutputStream.printStream()); opendj-server-legacy/src/main/java/org/opends/server/util/EMailMessage.java
@@ -58,7 +58,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.ArgumentParser; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.StringArgument; import static org.opends.messages.ToolMessages.*; @@ -66,6 +65,8 @@ import static org.opends.server.util.ServerConstants.*; import static org.opends.server.util.StaticUtils.*; import static com.forgerock.opendj.cli.CommonArguments.*; /** @@ -581,7 +582,7 @@ .valuePlaceholder(INFO_PATH_PLACEHOLDER.get()) .buildAndAddToParser(argParser); showUsage = CommonArguments.getShowUsage(); showUsage = showUsageArgument(); argParser.addArgument(showUsage); argParser.setUsageArgument(showUsage); } opendj-server/src/main/java/org/forgerock/opendj/server/setup/cli/SetupCli.java
@@ -29,6 +29,7 @@ import static com.forgerock.opendj.cli.Utils.checkJavaVersion; import static com.forgerock.opendj.cli.CliMessages.*; import static com.forgerock.opendj.cli.CliConstants.*; import static com.forgerock.opendj.cli.CommonArguments.*; import java.io.PrintStream; import java.util.ArrayList; @@ -45,7 +46,6 @@ import com.forgerock.opendj.cli.ArgumentException; import com.forgerock.opendj.cli.BooleanArgument; import com.forgerock.opendj.cli.ClientException; import com.forgerock.opendj.cli.CommonArguments; import com.forgerock.opendj.cli.ConsoleApplication; import com.forgerock.opendj.cli.FileBasedArgument; import com.forgerock.opendj.cli.IntegerArgument; @@ -221,43 +221,43 @@ */ private void initializeArguments() throws ArgumentException { // Options. acceptLicense = addGlobal(CommonArguments.getAcceptLicense()); cli = addGlobal(CommonArguments.getCLI()); baseDN = addGlobal(CommonArguments.getBaseDN()); addBaseEntry = addGlobal(CommonArguments.getAddBaseEntry()); importLDIF = addGlobal(CommonArguments.getLDIFFile(INFO_DESCRIPTION_IMPORTLDIF.get())); rejectedImportFile = addGlobal(CommonArguments.getRejectedImportLdif()); skippedImportFile = addGlobal(CommonArguments.getSkippedImportFile()); sampleData = addGlobal(CommonArguments.getSampleData()); ldapPort = addGlobal(CommonArguments.getLDAPPort(DEFAULT_LDAP_PORT)); ldapsPort = addGlobal(CommonArguments.getLDAPSPort(DEFAULT_LDAPS_PORT)); adminConnectorPort = addGlobal(CommonArguments.getAdminLDAPPort(DEFAULT_ADMIN_PORT)); jmxPort = addGlobal(CommonArguments.getJMXPort(DEFAULT_JMX_PORT)); skipPortCheck = addGlobal(CommonArguments.getSkipPortCheck()); directoryManagerDN = addGlobal(CommonArguments.getRootDN()); directoryManagerPwdString = addGlobal(CommonArguments.getRootDNPwd()); directoryManagerPwdFile = addGlobal(CommonArguments.getRootDNPwdFile()); enableWindowsService = addGlobal(CommonArguments.getEnableWindowsService()); doNotStart = addGlobal(CommonArguments.getDoNotStart()); enableStartTLS = addGlobal(CommonArguments.getEnableTLS()); generateSelfSignedCertificate = addGlobal(CommonArguments.getGenerateSelfSigned()); hostName = addGlobal(CommonArguments.getHostName(Utils.getDefaultHostName())); usePkcs11 = addGlobal(CommonArguments.getUsePKCS11Keystore()); useJavaKeyStore = addGlobal(CommonArguments.getUseJavaKeyStore()); useJCEKS = addGlobal(CommonArguments.getUseJCEKS()); usePkcs12 = addGlobal(CommonArguments.getUsePKCS12KeyStore()); keyStorePassword = addGlobal(CommonArguments.getKeyStorePassword()); keyStorePasswordFile = addGlobal(CommonArguments.getKeyStorePasswordFile()); certNickname = addGlobal(CommonArguments.getCertNickName()); connectTimeout = CommonArguments.getConnectTimeOutHidden(); acceptLicense = addGlobal(acceptLicenseArgument()); cli = addGlobal(cliArgument()); baseDN = addGlobal(baseDNArgument()); addBaseEntry = addGlobal(addBaseEntryArgument()); importLDIF = addGlobal(ldifFileArgument(INFO_DESCRIPTION_IMPORTLDIF.get())); rejectedImportFile = addGlobal(rejectedImportLdifArgument()); skippedImportFile = addGlobal(skippedImportFileArgument()); sampleData = addGlobal(sampleDataArgument()); ldapPort = addGlobal(ldapPortArgument(DEFAULT_LDAP_PORT)); ldapsPort = addGlobal(ldapsPortArgument(DEFAULT_LDAPS_PORT)); adminConnectorPort = addGlobal(adminLdapPortArgument(DEFAULT_ADMIN_PORT)); jmxPort = addGlobal(jmxPortArgument(DEFAULT_JMX_PORT)); skipPortCheck = addGlobal(skipPortCheckArgument()); directoryManagerDN = addGlobal(rootDNArgument()); directoryManagerPwdString = addGlobal(rootDNPwdArgument()); directoryManagerPwdFile = addGlobal(rootDNPwdFileArgument()); enableWindowsService = addGlobal(enableWindowsServiceArgument()); doNotStart = addGlobal(doNotStartArgument()); enableStartTLS = addGlobal(enableTLSArgument()); generateSelfSignedCertificate = addGlobal(generateSelfSignedArgument()); hostName = addGlobal(hostNameArgument(Utils.getDefaultHostName())); usePkcs11 = addGlobal(usePKCS11KeystoreArgument()); useJavaKeyStore = addGlobal(useJavaKeyStoreArgument()); useJCEKS = addGlobal(useJCEKSArgument()); usePkcs12 = addGlobal(usePKCS12KeyStoreArgument()); keyStorePassword = addGlobal(keyStorePasswordArgument()); keyStorePasswordFile = addGlobal(keyStorePasswordFileArgument()); certNickname = addGlobal(certNickNameArgument()); connectTimeout = connectTimeOutHiddenArgument(); // Utility Input Output Options. noPrompt = addGlobal(CommonArguments.getNoPrompt()); quietMode = addGlobal(CommonArguments.getQuiet()); verbose = addGlobal(CommonArguments.getVerbose()); propertiesFile = addGlobal(CommonArguments.getPropertiesFile()); noPropertiesFile = addGlobal(CommonArguments.getNoPropertiesFile()); showUsage = addGlobal(CommonArguments.getShowUsage()); noPrompt = addGlobal(noPromptArgument()); quietMode = addGlobal(quietArgument()); verbose = addGlobal(verboseArgument()); propertiesFile = addGlobal(propertiesFileArgument()); noPropertiesFile = addGlobal(noPropertiesFileArgument()); showUsage = addGlobal(showUsageArgument()); //Sub-commands && their arguments final ArrayList<SubCommand> subCommandList = new ArrayList<>(2);