Checkpoint for OPENDJ-1303 "opendj-cli"
- Replaced some argument names by their long identifier.toLowerCase() (in CommonArguments ).
- Replaced "trustAll" -> CommonArguments.getTrustAll()
- Replaced "showUsage"/"help" -> CommonArguments.getShowUsage()
- Renamed sslBlindTrust by trustAll in LDAPPasswordModify.java
- Added OPTION_LONG_RESTART to ArgumentConstants.
- Replaced "restart" string in StopDS.java by OPTION_LONG_RESTART.
- Replaced argument declaration by CommonArguments.getRestart().
| | |
| | | * The value for the long option ignore errors. |
| | | */ |
| | | public static final String OPTION_LONG_IGNORE_ERRORS = "ignoreErrors"; |
| | | |
| | | /** |
| | | * Value for the restart option long form. |
| | | */ |
| | | public static final String OPTION_LONG_RESTART = "restart"; |
| | | |
| | | // Prevent instantiation. |
| | | private ArgumentConstants() { |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the "show usage" boolean argument. |
| | | * Returns the "show usage / help" boolean argument. |
| | | * |
| | | * @return The "show usage" argument. |
| | | * @throws ArgumentException |
| | | * If there is a problem with any of the parameters used to create this argument. |
| | | */ |
| | | public static BooleanArgument getShowUsage() throws ArgumentException { |
| | | return new BooleanArgument("showUsage", OPTION_SHORT_HELP, OPTION_LONG_HELP, INFO_DESCRIPTION_SHOWUSAGE.get()); |
| | | return new BooleanArgument(OPTION_LONG_HELP.toLowerCase(), OPTION_SHORT_HELP, OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_SHOWUSAGE.get()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * If there is a problem with any of the parameters used to create this argument. |
| | | */ |
| | | public static BooleanArgument getVerbose() throws ArgumentException { |
| | | final BooleanArgument verbose = new BooleanArgument("verbose", OPTION_SHORT_VERBOSE, "verbose", |
| | | INFO_DESCRIPTION_VERBOSE.get()); |
| | | final BooleanArgument verbose = new BooleanArgument(OPTION_LONG_VERBOSE.toLowerCase(), OPTION_SHORT_VERBOSE, |
| | | OPTION_LONG_VERBOSE, INFO_DESCRIPTION_VERBOSE.get()); |
| | | verbose.setPropertyName("verbose"); |
| | | return verbose; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the "port" integer argument. |
| | | * Returns the "port" integer argument. <br> |
| | | * <i> N.B : the 'p' short option is also used by skipdecode(DBTest), |
| | | * propertiesFile(JavaPropertiesToolArguments).</i> |
| | | * |
| | | * @param defaultPort |
| | | * The default port number. |
| | |
| | | */ |
| | | public static IntegerArgument getPort(final int defaultPort, final LocalizableMessage description) |
| | | throws ArgumentException { |
| | | return new IntegerArgument("port", OPTION_SHORT_PORT, OPTION_LONG_PORT, false, false, true, |
| | | INFO_PORT_PLACEHOLDER.get(), defaultPort, OPTION_LONG_PORT, true, 1, true, 65535, |
| | | return new IntegerArgument(OPTION_LONG_PORT.toLowerCase(), OPTION_SHORT_PORT, OPTION_LONG_PORT, false, false, |
| | | true, INFO_PORT_PLACEHOLDER.get(), defaultPort, OPTION_LONG_PORT, true, 1, true, 65535, |
| | | description != null ? description : INFO_DESCRIPTION_ADMIN_PORT.get()); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the "get properties file" string argument. |
| | | * Returns the "propertiesFilePath" string argument. |
| | | * |
| | | * @return The "get properties file" argument. |
| | | * @return The "propertiesFilePath" argument. |
| | | * @throws ArgumentException |
| | | * If there is a problem with any of the parameters used to create this argument. |
| | | */ |
| | | public static StringArgument getPropertiesFile() throws ArgumentException { |
| | | return new StringArgument("propertiesFilePath", null, OPTION_LONG_PROP_FILE_PATH, false, false, true, |
| | | INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | return new StringArgument(OPTION_LONG_PROP_FILE_PATH.toLowerCase(), null, OPTION_LONG_PROP_FILE_PATH, false, |
| | | false, true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, INFO_DESCRIPTION_PROP_FILE_PATH.get()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * If there is a problem with any of the parameters used to create this argument. |
| | | */ |
| | | public static BooleanArgument getNoPropertiesFile() throws ArgumentException { |
| | | return new BooleanArgument("noPropertiesFile", null, OPTION_LONG_NO_PROP_FILE, |
| | | return new BooleanArgument(OPTION_LONG_NO_PROP_FILE.toLowerCase(), null, OPTION_LONG_NO_PROP_FILE, |
| | | INFO_DESCRIPTION_NO_PROP_FILE.get()); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the "no-op" boolean argument. |
| | | * Returns the "no-op" boolean argument. <br> |
| | | * <i> N.B : the 'n' short option is also used by backendid, newGroupName, newPassword, no-prompt.</i> |
| | | * |
| | | * @return The "no-op" argument. |
| | | * @throws ArgumentException |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the "no-prompt" boolean argument. |
| | | * Returns the "no-prompt" boolean argument. <br> |
| | | * <i> N.B : the 'n' short option is also used by backendid, newGroupName, newPassword, no-prompt.</i> |
| | | * |
| | | * @return The "no-prompt" argument. |
| | | * @throws ArgumentException |
| | |
| | | * If there is a problem with any of the parameters used to create this argument. |
| | | */ |
| | | public static BooleanArgument getRestart() throws ArgumentException { |
| | | final BooleanArgument restart = new BooleanArgument("restart", 'R', "restart", INFO_DESCRIPTION_RESTART.get()); |
| | | restart.setPropertyName("restart"); |
| | | final BooleanArgument restart = new BooleanArgument(OPTION_LONG_RESTART.toLowerCase(), 'R', |
| | | OPTION_LONG_RESTART, INFO_DESCRIPTION_RESTART.get()); |
| | | restart.setPropertyName(OPTION_LONG_RESTART); |
| | | return restart; |
| | | } |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | 0, INFO_DSCORE_DESCRIPTION_TIMEOUT.get()); |
| | | argParser.addArgument(timeout); |
| | | |
| | | displayUsage = new BooleanArgument("help", 'H', "help", |
| | | INFO_DSCORE_DESCRIPTION_USAGE.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | |
| | | import javax.swing.JEditorPane; |
| | | import javax.swing.JFrame; |
| | | import javax.swing.JScrollPane; |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.io.ASN1; |
| | | import org.forgerock.opendj.io.ASN1Reader; |
| | | |
| | | 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.*; |
| | |
| | | INFO_PROFILEVIEWER_DESCRIPTION_USE_GUI.get()); |
| | | argParser.addArgument(useGUI); |
| | | |
| | | displayUsage = new BooleanArgument( |
| | | "help", 'H', "help", |
| | | INFO_PROFILEVIEWER_DESCRIPTION_USAGE.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | 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; |
| | | |
| | | import static org.opends.messages.ToolMessages.*; |
| | |
| | | argParser.addArgument(signHash); |
| | | |
| | | |
| | | displayUsage = |
| | | new BooleanArgument( |
| | | "help", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | 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; |
| | |
| | | INFO_CONFIGDS_DESCRIPTION_ROOT_PW_FILE.get()); |
| | | argParser.addArgument(rootPasswordFile); |
| | | |
| | | showUsage = new BooleanArgument("showusage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage); |
| | | |
| | |
| | | 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.*; |
| | |
| | | INFO_CONFIGURE_WINDOWS_SERVICE_DESCRIPTION_CLEANUP.get()); |
| | | argParser.addArgument(cleanupService); |
| | | |
| | | showUsage = new BooleanArgument("showusage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_CONFIGURE_WINDOWS_SERVICE_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } |
| | |
| | | import com.forgerock.opendj.cli.ArgumentParser; |
| | | 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 static org.opends.messages.ToolMessages.*; |
| | |
| | | argParser.addArgument(javaArgs); |
| | | |
| | | |
| | | showUsage = new BooleanArgument("help", 'H', "help", |
| | | INFO_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage); |
| | | } |
| | |
| | | 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; |
| | |
| | | configFile.setHidden(true); |
| | | |
| | | |
| | | showUsageArgument = |
| | | new BooleanArgument("help", OPTION_SHORT_HELP, OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | showUsageArgument = CommonArguments.getShowUsage(); |
| | | |
| | | // Register the global arguments. |
| | | parser.addGlobalArgument(showUsageArgument); |
| | |
| | | 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; |
| | | |
| | |
| | | argParser.addArgument(useCompareResultCode); |
| | | |
| | | |
| | | showUsage = new BooleanArgument("usage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } |
| | |
| | | |
| | | 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.ClientException; |
| | |
| | | argParser.addArgument(signHash); |
| | | |
| | | |
| | | displayUsage = |
| | | new BooleanArgument("help", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | |
| | | 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.ClientException; |
| | |
| | | argParser.addArgument(quietMode); |
| | | |
| | | |
| | | displayUsage = |
| | | new BooleanArgument("help", OPTION_SHORT_HELP, OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | | |
| | | trustAll = new BooleanArgument("trustAll", 'X', "trustAll", |
| | | INFO_DESCRIPTION_TRUSTALL.get()); |
| | | trustAll.setPropertyName("trustAll"); |
| | | trustAll = CommonArguments.getTrustAll(); |
| | | argParser.addArgument(trustAll); |
| | | |
| | | keyStorePath = new StringArgument("keyStorePath", |
| | |
| | | verbose = CommonArguments.getVerbose(); |
| | | argParser.addArgument(verbose); |
| | | |
| | | showUsage = new BooleanArgument("showUsage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | |
| | | useCompareResultCode = |
| | |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | | |
| | | trustAll = new BooleanArgument("trustAll", 'X', "trustAll", |
| | | INFO_DESCRIPTION_TRUSTALL.get()); |
| | | trustAll.setPropertyName("trustAll"); |
| | | trustAll = CommonArguments.getTrustAll(); |
| | | argParser.addArgument(trustAll); |
| | | |
| | | keyStorePath = new StringArgument("keyStorePath", |
| | |
| | | verbose = CommonArguments.getVerbose(); |
| | | argParser.addArgument(verbose); |
| | | |
| | | showUsage = new BooleanArgument("showUsage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } catch (ArgumentException ae) |
| | |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | | |
| | | trustAll = new BooleanArgument("trustAll", 'X', "trustAll", |
| | | INFO_DESCRIPTION_TRUSTALL.get()); |
| | | trustAll.setPropertyName("trustAll"); |
| | | trustAll = CommonArguments.getTrustAll(); |
| | | argParser.addArgument(trustAll); |
| | | |
| | | keyStorePath = new StringArgument("keyStorePath", |
| | |
| | | verbose = CommonArguments.getVerbose(); |
| | | argParser.addArgument(verbose); |
| | | |
| | | showUsage = new BooleanArgument("showUsage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } catch (ArgumentException ae) |
| | |
| | | import org.forgerock.opendj.ldap.ByteStringBuilder; |
| | | import org.opends.server.util.EmbeddedUtils; |
| | | import org.opends.server.util.PasswordReader; |
| | | |
| | | 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; |
| | |
| | | // Create the arguments that will be used by this program. |
| | | BooleanArgument provideDNForAuthzID; |
| | | BooleanArgument showUsage; |
| | | BooleanArgument sslBlindTrust; |
| | | BooleanArgument trustAll; |
| | | BooleanArgument useSSL; |
| | | BooleanArgument useStartTLS; |
| | | FileBasedArgument bindPWFile; |
| | |
| | | argParser.addArgument(currentPWFile); |
| | | |
| | | |
| | | sslBlindTrust = |
| | | new BooleanArgument("blindtrust", 'X', "trustAll", |
| | | INFO_LDAPPWMOD_DESCRIPTION_BLIND_TRUST.get()); |
| | | sslBlindTrust.setPropertyName("trustAll"); |
| | | argParser.addArgument(sslBlindTrust); |
| | | trustAll = CommonArguments.getTrustAll(); |
| | | argParser.addArgument(trustAll); |
| | | |
| | | |
| | | sslKeyStore = |
| | |
| | | argParser.addArgument(connectTimeout); |
| | | |
| | | |
| | | showUsage = new BooleanArgument("help", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } |
| | |
| | | clientAlias = null; |
| | | } |
| | | SSLConnectionFactory sslConnectionFactory = new SSLConnectionFactory(); |
| | | sslConnectionFactory.init(sslBlindTrust.isPresent(), |
| | | sslConnectionFactory.init(trustAll.isPresent(), |
| | | sslKeyStore.getValue(), keyPIN, clientAlias, |
| | | sslTrustStore.getValue(), trustPIN); |
| | | connectionOptions.setSSLConnectionFactory(sslConnectionFactory); |
| | |
| | | saslOptions.setPropertyName(OPTION_LONG_SASLOPTION); |
| | | argParser.addArgument(saslOptions); |
| | | |
| | | trustAll = new BooleanArgument("trustAll", 'X', "trustAll", |
| | | INFO_DESCRIPTION_TRUSTALL.get()); |
| | | trustAll.setPropertyName("trustAll"); |
| | | trustAll = CommonArguments.getTrustAll(); |
| | | argParser.addArgument(trustAll); |
| | | |
| | | keyStorePath = new StringArgument("keyStorePath", |
| | |
| | | verbose = CommonArguments.getVerbose(); |
| | | argParser.addArgument(verbose); |
| | | |
| | | showUsage = new BooleanArgument("showUsage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } catch (ArgumentException ae) |
| | |
| | | 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.*; |
| | |
| | | configClass.setHidden(true); |
| | | argParser.addArgument(configClass); |
| | | |
| | | showUsage = new BooleanArgument("showusage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | |
| | | useCompareResultCode = |
| | |
| | | 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.*; |
| | |
| | | argParser.addArgument(targetFile); |
| | | |
| | | |
| | | showUsage = new BooleanArgument("help", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_LDIFMODIFY_DESCRIPTION_HELP.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage); |
| | | } |
| | |
| | | argParser.addArgument(timeLimit); |
| | | |
| | | |
| | | showUsage = new BooleanArgument( |
| | | "help", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | |
| | | import java.io.OutputStream; |
| | | import java.io.PrintStream; |
| | | import java.util.Iterator; |
| | |
| | | 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 org.opends.server.util.table.TableBuilder; |
| | |
| | | argParser.addArgument(baseDN); |
| | | |
| | | |
| | | displayUsage = new BooleanArgument( |
| | | "help", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_LISTBACKENDS_DESCRIPTION_HELP.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage, out); |
| | | } |
| | |
| | | INFO_PWPSTATE_DESCRIPTION_SASLOPTIONS.get()); |
| | | argParser.addGlobalArgument(saslOption); |
| | | |
| | | trustAll = new BooleanArgument("trustall", 'X', "trustAll", |
| | | INFO_PWPSTATE_DESCRIPTION_TRUST_ALL.get()); |
| | | trustAll = CommonArguments.getTrustAll(); |
| | | argParser.addGlobalArgument(trustAll); |
| | | |
| | | keyStoreFile = new StringArgument("keystorefile", |
| | |
| | | verbose = CommonArguments.getVerbose(); |
| | | argParser.addGlobalArgument(verbose); |
| | | |
| | | showUsage = new BooleanArgument( |
| | | "showusage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_PWPSTATE_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addGlobalArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | |
| | |
| | | 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; |
| | | |
| | | import org.opends.server.util.args.LDAPConnectionArgumentParser; |
| | |
| | | INFO_TASKINFO_SUMMARY_ARG_DESCRIPTION.get()); |
| | | argParser.addArgument(summary); |
| | | |
| | | noPrompt = new BooleanArgument( |
| | | OPTION_LONG_NO_PROMPT, |
| | | OPTION_SHORT_NO_PROMPT, |
| | | OPTION_LONG_NO_PROMPT, |
| | | INFO_DESCRIPTION_NO_PROMPT.get()); |
| | | noPrompt = CommonArguments.getNoPrompt(); |
| | | argParser.addArgument(noPrompt); |
| | | |
| | | BooleanArgument displayUsage = new BooleanArgument( |
| | | "help", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | BooleanArgument displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | |
| | | 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 org.opends.server.util.args.LDAPConnectionArgumentParser; |
| | |
| | | null, INFO_REBUILDINDEX_DESCRIPTION_TEMP_DIRECTORY.get()); |
| | | argParser.addArgument(tmpDirectory); |
| | | |
| | | BooleanArgument displayUsage = |
| | | new BooleanArgument("help", 'H', "help", INFO_DESCRIPTION_USAGE.get()); |
| | | final BooleanArgument displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | 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; |
| | | |
| | | import org.opends.server.util.args.LDAPConnectionArgumentParser; |
| | |
| | | argParser.addArgument(verifyOnly); |
| | | |
| | | |
| | | displayUsage = |
| | | new BooleanArgument("help", OPTION_SHORT_HELP, OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | 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; |
| | |
| | | windowsNetStop.setHidden(true); |
| | | argParser.addArgument(windowsNetStop); |
| | | |
| | | restart = new BooleanArgument("restart", 'R', "restart", |
| | | INFO_STOPDS_DESCRIPTION_RESTART.get()); |
| | | restart.setPropertyName("restart"); |
| | | restart = CommonArguments.getRestart(); |
| | | argParser.addArgument(restart); |
| | | |
| | | stopTimeStr = new StringArgument("stoptime", 't', "stopTime", false, |
| | |
| | | stopTimeStr.setPropertyName("stopTime"); |
| | | argParser.addArgument(stopTimeStr); |
| | | |
| | | trustAll = new BooleanArgument("trustall", 'X', "trustAll", |
| | | INFO_STOPDS_DESCRIPTION_TRUST_ALL.get()); |
| | | trustAll.setPropertyName("trustAll"); |
| | | trustAll = CommonArguments.getTrustAll(); |
| | | argParser.addArgument(trustAll); |
| | | |
| | | keyStoreFile = new StringArgument("keystorefile", |
| | |
| | | quietMode.setPropertyName(OPTION_LONG_QUIET); |
| | | argParser.addArgument(quietMode); |
| | | |
| | | showUsage = new BooleanArgument("showusage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | | INFO_STOPDS_DESCRIPTION_SHOWUSAGE.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage, out); |
| | | } |
| | |
| | | } |
| | | |
| | | BooleanArgument restart = |
| | | (BooleanArgument)argParser.getArgumentForLongID("restart"); |
| | | (BooleanArgument)argParser.getArgumentForLongID(OPTION_LONG_RESTART); |
| | | boolean restartPresent = restart.isPresent(); |
| | | BooleanArgument windowsNetStop = |
| | | (BooleanArgument)argParser.getArgumentForLongID("windowsnetstop"); |
| | |
| | | boolean stopThroughProtocol = false; |
| | | for (Argument arg: list) |
| | | { |
| | | if (!"restart".equals(arg.getName()) && |
| | | !"quiet".equals(arg.getName()) && |
| | | !"showusage".equals(arg.getName()) && |
| | | if (!OPTION_LONG_RESTART.toLowerCase().equals(arg.getName()) && |
| | | !OPTION_LONG_QUIET.equals(arg.getName()) && |
| | | !OPTION_LONG_HELP.toLowerCase().equals(arg.getName()) && |
| | | !"checkstoppability".equals(arg.getName()) && |
| | | !"windowsnetstop".equals(arg.getName()) && |
| | | ! OPTION_LONG_NO_PROP_FILE.equals(arg.getLongIdentifier())) |
| | |
| | | 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; |
| | | |
| | | |
| | |
| | | INFO_VERIFYINDEX_DESCRIPTION_COUNT_ERRORS.get()); |
| | | argParser.addArgument(countErrors); |
| | | |
| | | displayUsage = |
| | | new BooleanArgument("help", OPTION_SHORT_HELP, OPTION_LONG_HELP, |
| | | INFO_DESCRIPTION_USAGE.get()); |
| | | displayUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(displayUsage); |
| | | argParser.setUsageArgument(displayUsage); |
| | | } |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.JDKLogging; |
| | | import org.opends.server.types.NullOutputStream; |
| | | import com.forgerock.opendj.cli.ConsoleApplication; |
| | | |
| | | import com.forgerock.opendj.cli.*; |
| | | |
| | |
| | | |
| | | // Not used in this class, but required by the start-ds script |
| | | // (see issue #3814) |
| | | quietMode = new BooleanArgument("quiet", 'Q', "quiet", |
| | | INFO_DESCRIPTION_QUIET.get()); |
| | | quietMode = CommonArguments.getQuiet(); |
| | | argParser.addArgument(quietMode); |
| | | |
| | | showUsage = new BooleanArgument("help", 'H', "help", |
| | | INFO_WAIT4DEL_DESCRIPTION_HELP.get()); |
| | | showUsage = CommonArguments.getShowUsage(); |
| | | argParser.addArgument(showUsage); |
| | | argParser.setUsageArgument(showUsage); |
| | | } |
| | |
| | | private void initializeGlobalArguments(String[] args) |
| | | throws ArgumentException { |
| | | if (globalArgumentsInitialized == false) { |
| | | |
| | | verboseArgument = CommonArguments.getVerbose(); |
| | | |
| | | quietArgument = new BooleanArgument( |
| | | OPTION_LONG_QUIET, |
| | | OPTION_SHORT_QUIET, |
| | | OPTION_LONG_QUIET, |
| | | INFO_DESCRIPTION_QUIET.get()); |
| | | quietArgument.setPropertyName(OPTION_LONG_QUIET); |
| | | |
| | | scriptFriendlyArgument = new BooleanArgument("script-friendly", |
| | | OPTION_SHORT_SCRIPT_FRIENDLY, OPTION_LONG_SCRIPT_FRIENDLY, |
| | | INFO_DESCRIPTION_SCRIPT_FRIENDLY.get()); |
| | | scriptFriendlyArgument.setPropertyName(OPTION_LONG_SCRIPT_FRIENDLY); |
| | | |
| | | noPromptArgument = new BooleanArgument( |
| | | OPTION_LONG_NO_PROMPT, |
| | | OPTION_SHORT_NO_PROMPT, |
| | | OPTION_LONG_NO_PROMPT, |
| | | INFO_DESCRIPTION_NO_PROMPT.get()); |
| | | |
| | | advancedModeArgument = new BooleanArgument(OPTION_LONG_ADVANCED, |
| | | null, OPTION_LONG_ADVANCED, |
| | | INFO_DSCFG_DESCRIPTION_ADVANCED.get()); |
| | | advancedModeArgument.setPropertyName(OPTION_LONG_ADVANCED); |
| | | |
| | | showUsageArgument = new BooleanArgument("showUsage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, INFO_DSCFG_DESCRIPTION_SHOW_GROUP_USAGE_SUMMARY |
| | | .get()); |
| | | quietArgument = CommonArguments.getQuiet(); |
| | | scriptFriendlyArgument = CommonArguments.getScriptFriendly(); |
| | | noPromptArgument = CommonArguments.getNoPrompt(); |
| | | advancedModeArgument = CommonArguments.getAdvancedMode(); |
| | | showUsageArgument = CommonArguments.getShowUsage(); |
| | | |
| | | batchFileArgument = new StringArgument(OPTION_LONG_BATCH_FILE_PATH, |
| | | OPTION_SHORT_BATCH_FILE_PATH, OPTION_LONG_BATCH_FILE_PATH, |
| | |
| | | OPTION_LONG_DISPLAY_EQUIVALENT, |
| | | null, OPTION_LONG_DISPLAY_EQUIVALENT, |
| | | INFO_DSCFG_DESCRIPTION_DISPLAY_EQUIVALENT.get()); |
| | | advancedModeArgument.setPropertyName( |
| | | OPTION_LONG_DISPLAY_EQUIVALENT); |
| | | |
| | | equivalentCommandFileArgument = new StringArgument( |
| | | OPTION_LONG_EQUIVALENT_COMMAND_FILE_PATH, null, |
| | |
| | | if (handlerFactory == null) { |
| | | handlerFactory = new SubCommandHandlerFactory(parser); |
| | | |
| | | Comparator<SubCommand> c = new Comparator<SubCommand>() { |
| | | final Comparator<SubCommand> c = new Comparator<SubCommand>() { |
| | | |
| | | @Override |
| | | public int compare(SubCommand o1, SubCommand o2) { |