Search in sources :

Example 31 with IntegerArgument

use of com.unboundid.util.args.IntegerArgument in project ldapsdk by pingidentity.

the class SummarizeAccessLog method addToolArguments.

/**
 * Adds the command-line arguments supported for use with this tool to the
 * provided argument parser.  The tool may need to retain references to the
 * arguments (and/or the argument parser, if trailing arguments are allowed)
 * to it in order to obtain their values for use in later processing.
 *
 * @param  parser  The argument parser to which the arguments are to be added.
 *
 * @throws  ArgumentException  If a problem occurs while adding any of the
 *                             tool-specific arguments to the provided
 *                             argument parser.
 */
@Override()
public void addToolArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    // We need to save a reference to the argument parser so that we can get
    // the trailing arguments later.
    argumentParser = parser;
    // Add an argument that makes it possible to read a JSON-formatted access
    // log file.
    String description = "Indicates that the log file contains " + "JSON-formatted log messages rather than text-formatted messages.";
    json = new BooleanArgument(null, "json", description);
    parser.addArgument(json);
    // Add an argument that makes it possible to read a compressed log file.
    // Note that this argument is no longer needed for dealing with compressed
    // files, since the tool will automatically detect whether a file is
    // compressed.  However, the argument is still provided for the purpose of
    // backward compatibility.
    description = "Indicates that the log file is compressed.";
    isCompressed = new BooleanArgument('c', "isCompressed", description);
    isCompressed.addLongIdentifier("is-compressed", true);
    isCompressed.addLongIdentifier("compressed", true);
    isCompressed.setHidden(true);
    parser.addArgument(isCompressed);
    // Add an argument that indicates that the tool should read the encryption
    // passphrase from a file.
    description = "Indicates that the log file is encrypted and that the " + "encryption passphrase is contained in the specified file.  If " + "the log data is encrypted and this argument is not provided, then " + "the tool will interactively prompt for the encryption passphrase.";
    encryptionPassphraseFile = new FileArgument(null, "encryptionPassphraseFile", false, 1, null, description, true, true, true, false);
    encryptionPassphraseFile.addLongIdentifier("encryption-passphrase-file", true);
    encryptionPassphraseFile.addLongIdentifier("encryptionPasswordFile", true);
    encryptionPassphraseFile.addLongIdentifier("encryption-password-file", true);
    parser.addArgument(encryptionPassphraseFile);
    // Add an argument that indicates the number of values to display for each
    // item being summarized.
    description = "The number of values to display for each item being " + "summarized.  A value of zero indicates that all items should be " + "displayed.  If this is not provided, a default value of 20 will " + "be used.";
    reportCount = new IntegerArgument(null, "reportCount", false, 0, null, description, 0, Integer.MAX_VALUE, 20);
    reportCount.addLongIdentifier("report-count", true);
    reportCount.addLongIdentifier("maximumCount", true);
    reportCount.addLongIdentifier("maximum-count", true);
    reportCount.addLongIdentifier("maxCount", true);
    reportCount.addLongIdentifier("max-count", true);
    reportCount.addLongIdentifier("count", true);
    parser.addArgument(reportCount);
    // Add an argument that indicates that the output should not be anonymized.
    description = "Do not anonymize the output, but include actual attribute " + "values in filters and DNs.  This will also have the effect of " + "de-generifying those values, so output including the most common " + "filters and DNs in some category will be specific instances of " + "those filters and DNs instead of generic patterns.";
    doNotAnonymize = new BooleanArgument(null, "doNotAnonymize", 1, description);
    doNotAnonymize.addLongIdentifier("do-not-anonymize", true);
    doNotAnonymize.addLongIdentifier("deAnonymize", true);
    doNotAnonymize.addLongIdentifier("de-anonymize", true);
    parser.addArgument(doNotAnonymize);
}
Also used : BooleanArgument(com.unboundid.util.args.BooleanArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) FileArgument(com.unboundid.util.args.FileArgument)

Example 32 with IntegerArgument

use of com.unboundid.util.args.IntegerArgument in project ldapsdk by pingidentity.

the class CollectSupportData method addNonLDAPArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    this.parser = parser;
    // Output-related arguments.
    outputPathArg = new FileArgument(null, "outputPath", false, 1, null, INFO_CSD_ARG_DESC_OUTPUT_PATH.get(), false, true, false, false);
    outputPathArg.addLongIdentifier("output-path", true);
    outputPathArg.addLongIdentifier("outputFile", true);
    outputPathArg.addLongIdentifier("output-file", true);
    outputPathArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_OUTPUT.get());
    parser.addArgument(outputPathArg);
    encryptArg = new BooleanArgument(null, "encrypt", 1, INFO_CSD_ARG_DESC_ENCRYPT.get());
    encryptArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_OUTPUT.get());
    parser.addArgument(encryptArg);
    passphraseFileArg = new FileArgument(null, "passphraseFile", false, 1, null, INFO_CSD_ARG_DESC_PASSPHRASE_FILE.get(), false, true, true, false);
    passphraseFileArg.addLongIdentifier("passphrase-file", true);
    passphraseFileArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_OUTPUT.get());
    parser.addArgument(passphraseFileArg);
    generatePassphraseArg = new BooleanArgument(null, "generatePassphrase", 1, INFO_CSD_ARG_DESC_GENERATE_PASSPHRASE.get());
    generatePassphraseArg.addLongIdentifier("generate-passphrase", true);
    generatePassphraseArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_OUTPUT.get());
    parser.addArgument(generatePassphraseArg);
    decryptArg = new FileArgument(null, "decrypt", false, 1, null, INFO_CSD_ARG_DESC_DECRYPT.get(), false, true, true, false);
    decryptArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_OUTPUT.get());
    parser.addArgument(decryptArg);
    // Collection-related arguments.
    collectExpensiveDataArg = new BooleanArgument(null, "collectExpensiveData", 1, INFO_CSD_ARG_DESC_COLLECT_EXPENSIVE_DATA.get());
    collectExpensiveDataArg.addLongIdentifier("collect-expensive-data", true);
    collectExpensiveDataArg.addLongIdentifier("includeExpensiveData", true);
    collectExpensiveDataArg.addLongIdentifier("include-expensive-data", true);
    collectExpensiveDataArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(collectExpensiveDataArg);
    collectReplicationStateDumpArg = new BooleanArgument(null, "collectReplicationStateDump", 1, INFO_CSD_ARG_DESC_COLLECT_REPL_STATE.get());
    collectReplicationStateDumpArg.addLongIdentifier("collect-replication-state-dump", true);
    collectReplicationStateDumpArg.addLongIdentifier("collectReplicationState", true);
    collectReplicationStateDumpArg.addLongIdentifier("collect-replication-state", true);
    collectReplicationStateDumpArg.addLongIdentifier("includeReplicationStateDump", true);
    collectReplicationStateDumpArg.addLongIdentifier("include-replication-state-dump", true);
    collectReplicationStateDumpArg.addLongIdentifier("includeReplicationState", true);
    collectReplicationStateDumpArg.addLongIdentifier("include-replication-state", true);
    collectReplicationStateDumpArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(collectReplicationStateDumpArg);
    includeBinaryFilesArg = new BooleanArgument(null, "includeBinaryFiles", 1, INFO_CSD_ARG_DESC_INCLUDE_BINARY_FILES.get());
    includeBinaryFilesArg.addLongIdentifier("include-binary-files", true);
    includeBinaryFilesArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(includeBinaryFilesArg);
    archiveExtensionSourceArg = new BooleanArgument(null, "archiveExtensionSource", 1, INFO_CSD_ARG_DESC_ARCHIVE_EXTENSION_SOURCE.get());
    archiveExtensionSourceArg.addLongIdentifier("archive-extension-source", true);
    archiveExtensionSourceArg.addLongIdentifier("includeExtensionSource", true);
    archiveExtensionSourceArg.addLongIdentifier("include-extension-source", true);
    archiveExtensionSourceArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(archiveExtensionSourceArg);
    sequentialArg = new BooleanArgument(null, "sequential", 1, INFO_CSD_ARG_DESC_SEQUENTIAL.get());
    sequentialArg.addLongIdentifier("sequentialMode", true);
    sequentialArg.addLongIdentifier("sequential-mode", true);
    sequentialArg.addLongIdentifier("useSequentialMode", true);
    sequentialArg.addLongIdentifier("use-sequential-mode", true);
    sequentialArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(sequentialArg);
    securityLevelArg = new StringArgument(null, "securityLevel", false, 1, INFO_CSD_ARG_PLACEHOLDER_SECURITY_LEVEL.get(), INFO_CSD_ARG_DESC_SECURITY_LEVEL.get(), StaticUtils.setOf(CollectSupportDataSecurityLevel.NONE.getName(), CollectSupportDataSecurityLevel.OBSCURE_SECRETS.getName(), CollectSupportDataSecurityLevel.MAXIMUM.getName()));
    securityLevelArg.addLongIdentifier("security-level", true);
    securityLevelArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(securityLevelArg);
    jstackCountArg = new IntegerArgument(null, "jstackCount", false, 1, INFO_CSD_ARG_PLACEHOLDER_COUNT.get(), INFO_CSD_ARG_DESC_JSTACK_COUNT.get(), 0, Integer.MAX_VALUE);
    jstackCountArg.addLongIdentifier("jstack-count", true);
    jstackCountArg.addLongIdentifier("maxJstacks", true);
    jstackCountArg.addLongIdentifier("max-jstacks", true);
    jstackCountArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(jstackCountArg);
    reportCountArg = new IntegerArgument(null, "reportCount", false, 1, INFO_CSD_ARG_PLACEHOLDER_COUNT.get(), INFO_CSD_ARG_DESC_REPORT_COUNT.get(), 0, Integer.MAX_VALUE);
    reportCountArg.addLongIdentifier("report-count", true);
    reportCountArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(reportCountArg);
    reportIntervalSecondsArg = new IntegerArgument(null, "reportIntervalSeconds", false, 1, INFO_CSD_ARG_PLACEHOLDER_SECONDS.get(), INFO_CSD_ARG_DESC_REPORT_INTERVAL_SECONDS.get(), 1, Integer.MAX_VALUE);
    reportIntervalSecondsArg.addLongIdentifier("report-interval-seconds", true);
    reportIntervalSecondsArg.addLongIdentifier("reportInterval", true);
    reportIntervalSecondsArg.addLongIdentifier("report-interval", true);
    reportIntervalSecondsArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(reportIntervalSecondsArg);
    logTimeRangeArg = new StringArgument(null, "logTimeRange", false, 1, INFO_CSD_ARG_PLACEHOLDER_TIME_RANGE.get(), INFO_CSD_ARG_DESC_TIME_RANGE.get());
    logTimeRangeArg.addLongIdentifier("log-time-range", true);
    logTimeRangeArg.addLongIdentifier("timeRange", true);
    logTimeRangeArg.addLongIdentifier("time-range", true);
    logTimeRangeArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(logTimeRangeArg);
    logDurationArg = new DurationArgument(null, "logDuration", false, null, INFO_CSD_ARG_DESC_DURATION.get());
    logDurationArg.addLongIdentifier("log-duration", true);
    logDurationArg.addLongIdentifier("duration", true);
    logDurationArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(logDurationArg);
    logFileHeadCollectionSizeKBArg = new IntegerArgument(null, "logFileHeadCollectionSizeKB", false, 1, INFO_CSD_ARG_PLACEHOLDER_SIZE_KB.get(), INFO_CSD_ARG_DESC_LOG_HEAD_SIZE_KB.get(), 0, Integer.MAX_VALUE);
    logFileHeadCollectionSizeKBArg.addLongIdentifier("log-file-head-collection-size-kb", true);
    logFileHeadCollectionSizeKBArg.addLongIdentifier("logFileHeadSizeKB", true);
    logFileHeadCollectionSizeKBArg.addLongIdentifier("log-file-head-size-kb", true);
    logFileHeadCollectionSizeKBArg.addLongIdentifier("logHeadCollectionSizeKB", true);
    logFileHeadCollectionSizeKBArg.addLongIdentifier("log-head-collection-size-kb", true);
    logFileHeadCollectionSizeKBArg.addLongIdentifier("logHeadSizeKB", true);
    logFileHeadCollectionSizeKBArg.addLongIdentifier("log-head-size-kb", true);
    logFileHeadCollectionSizeKBArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(logFileHeadCollectionSizeKBArg);
    logFileTailCollectionSizeKBArg = new IntegerArgument(null, "logFileTailCollectionSizeKB", false, 1, INFO_CSD_ARG_PLACEHOLDER_SIZE_KB.get(), INFO_CSD_ARG_DESC_LOG_TAIL_SIZE_KB.get(), 0, Integer.MAX_VALUE);
    logFileTailCollectionSizeKBArg.addLongIdentifier("log-file-tail-collection-size-kb", true);
    logFileTailCollectionSizeKBArg.addLongIdentifier("logFileTailSizeKB", true);
    logFileTailCollectionSizeKBArg.addLongIdentifier("log-file-tail-size-kb", true);
    logFileTailCollectionSizeKBArg.addLongIdentifier("logTailCollectionSizeKB", true);
    logFileTailCollectionSizeKBArg.addLongIdentifier("log-tail-collection-size-kb", true);
    logFileTailCollectionSizeKBArg.addLongIdentifier("logTailSizeKB", true);
    logFileTailCollectionSizeKBArg.addLongIdentifier("log-tail-size-kb", true);
    logFileTailCollectionSizeKBArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(logFileTailCollectionSizeKBArg);
    pidArg = new IntegerArgument(null, "pid", false, 0, INFO_CSD_ARG_PLACEHOLDER_PID.get(), INFO_CSD_ARG_DESC_PID.get());
    pidArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(pidArg);
    commentArg = new StringArgument(null, "comment", false, 1, null, INFO_CSD_ARG_DESC_COMMENT.get());
    commentArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COLLECTION.get());
    parser.addArgument(commentArg);
    // Communication-related arguments.
    useRemoteServerArg = new BooleanArgument(null, "useRemoteServer", 1, INFO_CSD_ARG_DEC_USE_REMOTE_SERVER.get());
    useRemoteServerArg.addLongIdentifier("use-remote-server", true);
    useRemoteServerArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COMMUNICATION.get());
    parser.addArgument(useRemoteServerArg);
    useAdministrativeSessionArg = new BooleanArgument(null, "useAdministrativeSession", 1, INFO_CSD_ARG_DESC_USE_ADMIN_SESSION.get());
    useAdministrativeSessionArg.addLongIdentifier("use-administrative-session", true);
    useAdministrativeSessionArg.addLongIdentifier("useAdminSession", true);
    useAdministrativeSessionArg.addLongIdentifier("use-admin-session", true);
    useAdministrativeSessionArg.addLongIdentifier("administrativeSession", true);
    useAdministrativeSessionArg.addLongIdentifier("administrative-session", true);
    useAdministrativeSessionArg.addLongIdentifier("adminSession", true);
    useAdministrativeSessionArg.addLongIdentifier("admin-session", true);
    useAdministrativeSessionArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COMMUNICATION.get());
    parser.addArgument(useAdministrativeSessionArg);
    proxyToServerAddressArg = new StringArgument(null, "proxyToServerAddress", false, 1, INFO_CSD_ARG_PLACEHOLDER_ADDRESS.get(), INFO_CSD_ARG_DESC_PROXY_TO_ADDRESS.get());
    proxyToServerAddressArg.addLongIdentifier("proxy-to-server-address", true);
    proxyToServerAddressArg.addLongIdentifier("proxyToAddress", true);
    proxyToServerAddressArg.addLongIdentifier("proxy-to-address", true);
    proxyToServerAddressArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COMMUNICATION.get());
    parser.addArgument(proxyToServerAddressArg);
    proxyToServerPortArg = new IntegerArgument(null, "proxyToServerPort", false, 1, INFO_CSD_ARG_PLACEHOLDER_PORT.get(), INFO_CSD_ARG_DESC_PROXY_TO_PORT.get(), 1, 65535);
    proxyToServerPortArg.addLongIdentifier("proxy-to-server-port", true);
    proxyToServerPortArg.addLongIdentifier("proxyToPort", true);
    proxyToServerPortArg.addLongIdentifier("proxy-to-port", true);
    proxyToServerPortArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COMMUNICATION.get());
    parser.addArgument(proxyToServerPortArg);
    noLDAPArg = new BooleanArgument(null, "noLDAP", 1, INFO_CSD_ARG_DESC_NO_LDAP.get());
    noLDAPArg.addLongIdentifier("no-ldap", true);
    noLDAPArg.setArgumentGroupName(INFO_CSD_ARG_GROUP_COMMUNICATION.get());
    parser.addArgument(noLDAPArg);
    // Other arguments.
    noPromptArg = new BooleanArgument('n', "noPrompt", 1, INFO_CSD_ARG_DESC_NO_PROMPT.get());
    noPromptArg.addLongIdentifier("no-prompt", true);
    parser.addArgument(noPromptArg);
    dryRunArg = new BooleanArgument(null, "dryRun", 1, INFO_CSD_ARG_DESC_DRY_RUN.get());
    dryRunArg.addLongIdentifier("dry-run", true);
    dryRunArg.addLongIdentifier("noOperation", true);
    dryRunArg.addLongIdentifier("no-operation", true);
    dryRunArg.addLongIdentifier("noOp", true);
    dryRunArg.addLongIdentifier("no-op", true);
    parser.addArgument(dryRunArg);
    scriptFriendlyArg = new BooleanArgument(null, "scriptFriendly", 1, INFO_CSD_ARG_DESC_SCRIPT_FRIENDLY.get());
    scriptFriendlyArg.addLongIdentifier("script-friendly", true);
    scriptFriendlyArg.setHidden(true);
    parser.addArgument(scriptFriendlyArg);
    // If the --useRemoteServer argument is provided, then none of the --pid,
    // --decrypt, --noLDAP, or --scriptFriendly arguments may be given.
    parser.addExclusiveArgumentSet(useRemoteServerArg, pidArg);
    parser.addExclusiveArgumentSet(useRemoteServerArg, decryptArg);
    parser.addExclusiveArgumentSet(useRemoteServerArg, noLDAPArg);
    parser.addExclusiveArgumentSet(useRemoteServerArg, scriptFriendlyArg);
    // The --useAdministrativeSession argument can only be provided if the
    // --useRemoteServer argument is also given.
    parser.addDependentArgumentSet(useAdministrativeSessionArg, useRemoteServerArg);
    // If the --proxyToServerAddress or --proxyToServerPort argument is given,
    // then the other must be provided as well.
    parser.addMutuallyDependentArgumentSet(proxyToServerAddressArg, proxyToServerPortArg);
    // The --proxyToServerAddress and --proxyToServerPort arguments can only
    // be used if the --useRemoteServer argument is given.
    parser.addDependentArgumentSet(proxyToServerAddressArg, useRemoteServerArg);
    parser.addDependentArgumentSet(proxyToServerPortArg, useRemoteServerArg);
    // The --logTimeRange and --logDuration arguments cannot be used together.
    parser.addExclusiveArgumentSet(logTimeRangeArg, logDurationArg);
    // Neither the --logFileHeadCollectionSizeKB argument nor the
    // --logFileTailCollectionSizeKB argument can be used in conjunction with
    // either the --logTimeRange or --logDuration argument.
    parser.addExclusiveArgumentSet(logFileHeadCollectionSizeKBArg, logTimeRangeArg, logDurationArg);
    parser.addExclusiveArgumentSet(logFileTailCollectionSizeKBArg, logTimeRangeArg, logDurationArg);
    // The --generatePassphrase argument can only be used if both the
    // --encrypt and --passphraseFile arguments are provided.
    parser.addDependentArgumentSet(generatePassphraseArg, encryptArg);
    parser.addDependentArgumentSet(generatePassphraseArg, passphraseFileArg);
    // The --encrypt and --decrypt arguments cannot be used together.
    parser.addExclusiveArgumentSet(encryptArg, decryptArg);
    // --useRemoteServer argument.
    for (final String argumentIdentifier : Arrays.asList("promptForBindPassword", "promptForKeyStorePassword", "promptForTrustStorePassword", "enableSSLDebugging", "useSASLExternal")) {
        final Argument arg = parser.getNamedArgument(argumentIdentifier);
        parser.addDependentArgumentSet(arg, useRemoteServerArg);
    }
}
Also used : DurationArgument(com.unboundid.util.args.DurationArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) DurationArgument(com.unboundid.util.args.DurationArgument) Argument(com.unboundid.util.args.Argument) BooleanArgument(com.unboundid.util.args.BooleanArgument) TimestampArgument(com.unboundid.util.args.TimestampArgument) FileArgument(com.unboundid.util.args.FileArgument) StringArgument(com.unboundid.util.args.StringArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) ASN1OctetString(com.unboundid.asn1.ASN1OctetString) FileArgument(com.unboundid.util.args.FileArgument) StringArgument(com.unboundid.util.args.StringArgument)

Example 33 with IntegerArgument

use of com.unboundid.util.args.IntegerArgument in project ldapsdk by pingidentity.

the class LDAPSearch method addNonLDAPArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    this.parser = parser;
    baseDN = new DNArgument('b', "baseDN", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_BASE_DN.get());
    baseDN.addLongIdentifier("base-dn", true);
    baseDN.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(baseDN);
    scope = new ScopeArgument('s', "scope", false, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_SCOPE.get(), SearchScope.SUB);
    scope.addLongIdentifier("searchScope", true);
    scope.addLongIdentifier("search-scope", true);
    scope.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(scope);
    sizeLimit = new IntegerArgument('z', "sizeLimit", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_SIZE_LIMIT.get(), 0, Integer.MAX_VALUE, 0);
    sizeLimit.addLongIdentifier("size-limit", true);
    sizeLimit.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(sizeLimit);
    timeLimitSeconds = new IntegerArgument('l', "timeLimitSeconds", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_TIME_LIMIT.get(), 0, Integer.MAX_VALUE, 0);
    timeLimitSeconds.addLongIdentifier("timeLimit", true);
    timeLimitSeconds.addLongIdentifier("time-limit-seconds", true);
    timeLimitSeconds.addLongIdentifier("time-limit", true);
    timeLimitSeconds.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(timeLimitSeconds);
    final Set<String> derefAllowedValues = StaticUtils.setOf("never", "always", "search", "find");
    dereferencePolicy = new StringArgument('a', "dereferencePolicy", false, 1, "{never|always|search|find}", INFO_LDAPSEARCH_ARG_DESCRIPTION_DEREFERENCE_POLICY.get(), derefAllowedValues, "never");
    dereferencePolicy.addLongIdentifier("dereference-policy", true);
    dereferencePolicy.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(dereferencePolicy);
    typesOnly = new BooleanArgument('A', "typesOnly", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_TYPES_ONLY.get());
    typesOnly.addLongIdentifier("types-only", true);
    typesOnly.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(typesOnly);
    requestedAttribute = new StringArgument(null, "requestedAttribute", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_REQUESTED_ATTR.get());
    requestedAttribute.addLongIdentifier("requested-attribute", true);
    requestedAttribute.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(requestedAttribute);
    filter = new FilterArgument(null, "filter", false, 0, INFO_PLACEHOLDER_FILTER.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_FILTER.get());
    filter.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(filter);
    filterFile = new FileArgument('f', "filterFile", false, 0, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_FILTER_FILE.get(), true, true, true, false);
    filterFile.addLongIdentifier("filename", true);
    filterFile.addLongIdentifier("filter-file", true);
    filterFile.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(filterFile);
    ldapURLFile = new FileArgument(null, "ldapURLFile", false, 0, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_LDAP_URL_FILE.get(), true, true, true, false);
    ldapURLFile.addLongIdentifier("ldap-url-file", true);
    ldapURLFile.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(ldapURLFile);
    followReferrals = new BooleanArgument(null, "followReferrals", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_FOLLOW_REFERRALS.get());
    followReferrals.addLongIdentifier("follow-referrals", true);
    followReferrals.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(followReferrals);
    retryFailedOperations = new BooleanArgument(null, "retryFailedOperations", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_RETRY_FAILED_OPERATIONS.get());
    retryFailedOperations.addLongIdentifier("retry-failed-operations", true);
    retryFailedOperations.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(retryFailedOperations);
    continueOnError = new BooleanArgument('c', "continueOnError", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_CONTINUE_ON_ERROR.get());
    continueOnError.addLongIdentifier("continue-on-error", true);
    continueOnError.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(continueOnError);
    ratePerSecond = new IntegerArgument('r', "ratePerSecond", false, 1, INFO_PLACEHOLDER_NUM.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_RATE_PER_SECOND.get(), 1, Integer.MAX_VALUE);
    ratePerSecond.addLongIdentifier("rate-per-second", true);
    ratePerSecond.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(ratePerSecond);
    useAdministrativeSession = new BooleanArgument(null, "useAdministrativeSession", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_USE_ADMIN_SESSION.get());
    useAdministrativeSession.addLongIdentifier("use-administrative-session", true);
    useAdministrativeSession.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(useAdministrativeSession);
    dryRun = new BooleanArgument('n', "dryRun", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_DRY_RUN.get());
    dryRun.addLongIdentifier("dry-run", true);
    dryRun.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    parser.addArgument(dryRun);
    wrapColumn = new IntegerArgument(null, "wrapColumn", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_WRAP_COLUMN.get(), 0, Integer.MAX_VALUE);
    wrapColumn.addLongIdentifier("wrap-column", true);
    wrapColumn.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(wrapColumn);
    dontWrap = new BooleanArgument('T', "dontWrap", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_DONT_WRAP.get());
    dontWrap.addLongIdentifier("doNotWrap", true);
    dontWrap.addLongIdentifier("dont-wrap", true);
    dontWrap.addLongIdentifier("do-not-wrap", true);
    dontWrap.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(dontWrap);
    suppressBase64EncodedValueComments = new BooleanArgument(null, "suppressBase64EncodedValueComments", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_SUPPRESS_BASE64_COMMENTS.get());
    suppressBase64EncodedValueComments.addLongIdentifier("suppress-base64-encoded-value-comments", true);
    suppressBase64EncodedValueComments.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(suppressBase64EncodedValueComments);
    countEntries = new BooleanArgument(null, "countEntries", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_COUNT_ENTRIES.get());
    countEntries.addLongIdentifier("count-entries", true);
    countEntries.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_OPS.get());
    countEntries.setHidden(true);
    parser.addArgument(countEntries);
    outputFile = new FileArgument(null, "outputFile", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_OUTPUT_FILE.get(), false, true, true, false);
    outputFile.addLongIdentifier("output-file", true);
    outputFile.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(outputFile);
    compressOutput = new BooleanArgument(null, "compressOutput", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_COMPRESS_OUTPUT.get());
    compressOutput.addLongIdentifier("compress-output", true);
    compressOutput.addLongIdentifier("compress", true);
    compressOutput.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(compressOutput);
    encryptOutput = new BooleanArgument(null, "encryptOutput", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_ENCRYPT_OUTPUT.get());
    encryptOutput.addLongIdentifier("encrypt-output", true);
    encryptOutput.addLongIdentifier("encrypt", true);
    encryptOutput.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(encryptOutput);
    encryptionPassphraseFile = new FileArgument(null, "encryptionPassphraseFile", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_ENCRYPTION_PW_FILE.get(), true, true, true, false);
    encryptionPassphraseFile.addLongIdentifier("encryption-passphrase-file", true);
    encryptionPassphraseFile.addLongIdentifier("encryptionPasswordFile", true);
    encryptionPassphraseFile.addLongIdentifier("encryption-password-file", true);
    encryptionPassphraseFile.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(encryptionPassphraseFile);
    separateOutputFilePerSearch = new BooleanArgument(null, "separateOutputFilePerSearch", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_SEPARATE_OUTPUT_FILES.get());
    separateOutputFilePerSearch.addLongIdentifier("separate-output-file-per-search", true);
    separateOutputFilePerSearch.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(separateOutputFilePerSearch);
    teeResultsToStandardOut = new BooleanArgument(null, "teeResultsToStandardOut", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_TEE.get("outputFile"));
    teeResultsToStandardOut.addLongIdentifier("tee-results-to-standard-out", true);
    teeResultsToStandardOut.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(teeResultsToStandardOut);
    final Set<String> outputFormatAllowedValues = StaticUtils.setOf("ldif", "json", "csv", "multi-valued-csv", "tab-delimited", "multi-valued-tab-delimited", "dns-only", "values-only");
    outputFormat = new StringArgument(null, "outputFormat", false, 1, "{ldif|json|csv|multi-valued-csv|tab-delimited|" + "multi-valued-tab-delimited|dns-only|values-only}", INFO_LDAPSEARCH_ARG_DESCRIPTION_OUTPUT_FORMAT.get(requestedAttribute.getIdentifierString(), ldapURLFile.getIdentifierString()), outputFormatAllowedValues, "ldif");
    outputFormat.addLongIdentifier("output-format", true);
    outputFormat.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(outputFormat);
    requireMatch = new BooleanArgument(null, "requireMatch", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_REQUIRE_MATCH.get(getToolName(), String.valueOf(ResultCode.NO_RESULTS_RETURNED)));
    requireMatch.addLongIdentifier("require-match", true);
    requireMatch.addLongIdentifier("requireMatchingEntry", true);
    requireMatch.addLongIdentifier("require-matching-entry", true);
    requireMatch.addLongIdentifier("requireMatchingEntries", true);
    requireMatch.addLongIdentifier("require-matching-entries", true);
    requireMatch.addLongIdentifier("requireEntry", true);
    requireMatch.addLongIdentifier("require-entry", true);
    requireMatch.addLongIdentifier("requireEntries", true);
    requireMatch.addLongIdentifier("require-entries", true);
    requireMatch.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(requireMatch);
    terse = new BooleanArgument(null, "terse", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_TERSE.get());
    terse.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(terse);
    verbose = new BooleanArgument('v', "verbose", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_VERBOSE.get());
    verbose.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_DATA.get());
    parser.addArgument(verbose);
    bindControl = new ControlArgument(null, "bindControl", false, 0, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_BIND_CONTROL.get());
    bindControl.addLongIdentifier("bind-control", true);
    bindControl.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(bindControl);
    searchControl = new ControlArgument('J', "control", false, 0, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_SEARCH_CONTROL.get());
    searchControl.addLongIdentifier("searchControl", true);
    searchControl.addLongIdentifier("search-control", true);
    searchControl.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(searchControl);
    authorizationIdentity = new BooleanArgument('E', "authorizationIdentity", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_AUTHZ_IDENTITY.get());
    authorizationIdentity.addLongIdentifier("reportAuthzID", true);
    authorizationIdentity.addLongIdentifier("authorization-identity", true);
    authorizationIdentity.addLongIdentifier("report-authzid", true);
    authorizationIdentity.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(authorizationIdentity);
    assertionFilter = new FilterArgument(null, "assertionFilter", false, 1, INFO_PLACEHOLDER_FILTER.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_ASSERTION_FILTER.get());
    assertionFilter.addLongIdentifier("assertion-filter", true);
    assertionFilter.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(assertionFilter);
    accountUsable = new BooleanArgument(null, "accountUsable", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_ACCOUNT_USABLE.get());
    accountUsable.addLongIdentifier("account-usable", true);
    accountUsable.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(accountUsable);
    excludeBranch = new DNArgument(null, "excludeBranch", false, 0, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_EXCLUDE_BRANCH.get());
    excludeBranch.addLongIdentifier("exclude-branch", true);
    excludeBranch.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(excludeBranch);
    getAuthorizationEntryAttribute = new StringArgument(null, "getAuthorizationEntryAttribute", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_GET_AUTHZ_ENTRY_ATTR.get());
    getAuthorizationEntryAttribute.addLongIdentifier("get-authorization-entry-attribute", true);
    getAuthorizationEntryAttribute.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(getAuthorizationEntryAttribute);
    getBackendSetID = new BooleanArgument(null, "getBackendSetID", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_GET_BACKEND_SET_ID.get());
    getBackendSetID.addLongIdentifier("get-backend-set-id", true);
    getBackendSetID.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(getBackendSetID);
    getEffectiveRightsAuthzID = new StringArgument('g', "getEffectiveRightsAuthzID", false, 1, INFO_PLACEHOLDER_AUTHZID.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_GET_EFFECTIVE_RIGHTS_AUTHZID.get("getEffectiveRightsAttribute"));
    getEffectiveRightsAuthzID.addLongIdentifier("get-effective-rights-authzid", true);
    getEffectiveRightsAuthzID.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(getEffectiveRightsAuthzID);
    getEffectiveRightsAttribute = new StringArgument('e', "getEffectiveRightsAttribute", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_GET_EFFECTIVE_RIGHTS_ATTR.get());
    getEffectiveRightsAttribute.addLongIdentifier("get-effective-rights-attribute", true);
    getEffectiveRightsAttribute.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(getEffectiveRightsAttribute);
    getRecentLoginHistory = new BooleanArgument(null, "getRecentLoginHistory", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_GET_RECENT_LOGIN_HISTORY.get());
    getRecentLoginHistory.addLongIdentifier("get-recent-login-history", true);
    getRecentLoginHistory.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(getRecentLoginHistory);
    getServerID = new BooleanArgument(null, "getServerID", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_GET_SERVER_ID.get());
    getServerID.addLongIdentifier("get-server-id", true);
    getServerID.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(getServerID);
    getUserResourceLimits = new BooleanArgument(null, "getUserResourceLimits", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_GET_USER_RESOURCE_LIMITS.get());
    getUserResourceLimits.addLongIdentifier("get-user-resource-limits", true);
    getUserResourceLimits.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(getUserResourceLimits);
    includeReplicationConflictEntries = new BooleanArgument(null, "includeReplicationConflictEntries", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_INCLUDE_REPL_CONFLICTS.get());
    includeReplicationConflictEntries.addLongIdentifier("include-replication-conflict-entries", true);
    includeReplicationConflictEntries.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(includeReplicationConflictEntries);
    final Set<String> softDeleteAllowedValues = StaticUtils.setOf("with-non-deleted-entries", "without-non-deleted-entries", "deleted-entries-in-undeleted-form");
    includeSoftDeletedEntries = new StringArgument(null, "includeSoftDeletedEntries", false, 1, "{with-non-deleted-entries|without-non-deleted-entries|" + "deleted-entries-in-undeleted-form}", INFO_LDAPSEARCH_ARG_DESCRIPTION_INCLUDE_SOFT_DELETED.get(), softDeleteAllowedValues);
    includeSoftDeletedEntries.addLongIdentifier("include-soft-deleted-entries", true);
    includeSoftDeletedEntries.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(includeSoftDeletedEntries);
    draftLDUPSubentries = new BooleanArgument(null, "draftLDUPSubentries", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_INCLUDE_DRAFT_LDUP_SUBENTRIES.get());
    draftLDUPSubentries.addLongIdentifier("draftIETFLDUPSubentries", true);
    draftLDUPSubentries.addLongIdentifier("includeSubentries", true);
    draftLDUPSubentries.addLongIdentifier("includeLDAPSubentries", true);
    draftLDUPSubentries.addLongIdentifier("draft-ldup-subentries", true);
    draftLDUPSubentries.addLongIdentifier("draft-ietf-ldup-subentries", true);
    draftLDUPSubentries.addLongIdentifier("include-subentries", true);
    draftLDUPSubentries.addLongIdentifier("include-ldap-subentries", true);
    draftLDUPSubentries.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(draftLDUPSubentries);
    rfc3672Subentries = new BooleanValueArgument(null, "rfc3672Subentries", false, INFO_LDAPSEARCH_ARG_PLACEHOLDER_INCLUDE_RFC_3672_SUBENTRIES.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_INCLUDE_RFC_3672_SUBENTRIES.get());
    rfc3672Subentries.addLongIdentifier("rfc-3672-subentries", true);
    rfc3672Subentries.addLongIdentifier("rfc3672-subentries", true);
    rfc3672Subentries.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(rfc3672Subentries);
    joinRule = new StringArgument(null, "joinRule", false, 1, "{dn:sourceAttr|reverse-dn:targetAttr|equals:sourceAttr:targetAttr|" + "contains:sourceAttr:targetAttr }", INFO_LDAPSEARCH_ARG_DESCRIPTION_JOIN_RULE.get());
    joinRule.addLongIdentifier("join-rule", true);
    joinRule.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(joinRule);
    joinBaseDN = new StringArgument(null, "joinBaseDN", false, 1, "{search-base|source-entry-dn|{dn}}", INFO_LDAPSEARCH_ARG_DESCRIPTION_JOIN_BASE_DN.get());
    joinBaseDN.addLongIdentifier("join-base-dn", true);
    joinBaseDN.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(joinBaseDN);
    joinScope = new ScopeArgument(null, "joinScope", false, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_JOIN_SCOPE.get());
    joinScope.addLongIdentifier("join-scope", true);
    joinScope.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(joinScope);
    joinSizeLimit = new IntegerArgument(null, "joinSizeLimit", false, 1, INFO_PLACEHOLDER_NUM.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_JOIN_SIZE_LIMIT.get(), 0, Integer.MAX_VALUE);
    joinSizeLimit.addLongIdentifier("join-size-limit", true);
    joinSizeLimit.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(joinSizeLimit);
    joinFilter = new FilterArgument(null, "joinFilter", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_JOIN_FILTER.get());
    joinFilter.addLongIdentifier("join-filter", true);
    joinFilter.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(joinFilter);
    joinRequestedAttribute = new StringArgument(null, "joinRequestedAttribute", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_JOIN_ATTR.get());
    joinRequestedAttribute.addLongIdentifier("join-requested-attribute", true);
    joinRequestedAttribute.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(joinRequestedAttribute);
    joinRequireMatch = new BooleanArgument(null, "joinRequireMatch", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_JOIN_REQUIRE_MATCH.get());
    joinRequireMatch.addLongIdentifier("join-require-match", true);
    joinRequireMatch.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(joinRequireMatch);
    manageDsaIT = new BooleanArgument(null, "manageDsaIT", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_MANAGE_DSA_IT.get());
    manageDsaIT.addLongIdentifier("manage-dsa-it", true);
    manageDsaIT.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(manageDsaIT);
    matchedValuesFilter = new FilterArgument(null, "matchedValuesFilter", false, 0, INFO_PLACEHOLDER_FILTER.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_MATCHED_VALUES_FILTER.get());
    matchedValuesFilter.addLongIdentifier("matched-values-filter", true);
    matchedValuesFilter.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(matchedValuesFilter);
    matchingEntryCountControl = new StringArgument(null, "matchingEntryCountControl", false, 1, "{examineCount=NNN[:alwaysExamine][:allowUnindexed]" + "[:skipResolvingExplodedIndexes]" + "[:fastShortCircuitThreshold=NNN]" + "[:slowShortCircuitThreshold=NNN][:extendedResponseData]" + "[:debug]}", INFO_LDAPSEARCH_ARG_DESCRIPTION_MATCHING_ENTRY_COUNT_CONTROL.get());
    matchingEntryCountControl.addLongIdentifier("matchingEntryCount", true);
    matchingEntryCountControl.addLongIdentifier("matching-entry-count-control", true);
    matchingEntryCountControl.addLongIdentifier("matching-entry-count", true);
    matchingEntryCountControl.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(matchingEntryCountControl);
    operationPurpose = new StringArgument(null, "operationPurpose", false, 1, INFO_PLACEHOLDER_PURPOSE.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_OPERATION_PURPOSE.get());
    operationPurpose.addLongIdentifier("operation-purpose", true);
    operationPurpose.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(operationPurpose);
    overrideSearchLimit = new StringArgument(null, "overrideSearchLimit", false, 0, INFO_LDAPSEARCH_NAME_VALUE_PLACEHOLDER.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_OVERRIDE_SEARCH_LIMIT.get());
    overrideSearchLimit.addLongIdentifier("overrideSearchLimits", true);
    overrideSearchLimit.addLongIdentifier("override-search-limit", true);
    overrideSearchLimit.addLongIdentifier("override-search-limits", true);
    overrideSearchLimit.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(overrideSearchLimit);
    persistentSearch = new StringArgument('C', "persistentSearch", false, 1, "ps[:changetype[:changesonly[:entrychgcontrols]]]", INFO_LDAPSEARCH_ARG_DESCRIPTION_PERSISTENT_SEARCH.get());
    persistentSearch.addLongIdentifier("persistent-search", true);
    persistentSearch.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(persistentSearch);
    permitUnindexedSearch = new BooleanArgument(null, "permitUnindexedSearch", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_PERMIT_UNINDEXED_SEARCH.get());
    permitUnindexedSearch.addLongIdentifier("permitUnindexedSearches", true);
    permitUnindexedSearch.addLongIdentifier("permitUnindexed", true);
    permitUnindexedSearch.addLongIdentifier("permitIfUnindexed", true);
    permitUnindexedSearch.addLongIdentifier("permit-unindexed-search", true);
    permitUnindexedSearch.addLongIdentifier("permit-unindexed-searches", true);
    permitUnindexedSearch.addLongIdentifier("permit-unindexed", true);
    permitUnindexedSearch.addLongIdentifier("permit-if-unindexed", true);
    permitUnindexedSearch.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(permitUnindexedSearch);
    proxyAs = new StringArgument('Y', "proxyAs", false, 1, INFO_PLACEHOLDER_AUTHZID.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_PROXY_AS.get());
    proxyAs.addLongIdentifier("proxy-as", true);
    proxyAs.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(proxyAs);
    proxyV1As = new DNArgument(null, "proxyV1As", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_PROXY_V1_AS.get());
    proxyV1As.addLongIdentifier("proxy-v1-as", true);
    proxyV1As.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(proxyV1As);
    rejectUnindexedSearch = new BooleanArgument(null, "rejectUnindexedSearch", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_REJECT_UNINDEXED_SEARCH.get());
    rejectUnindexedSearch.addLongIdentifier("rejectUnindexedSearches", true);
    rejectUnindexedSearch.addLongIdentifier("rejectUnindexed", true);
    rejectUnindexedSearch.addLongIdentifier("rejectIfUnindexed", true);
    rejectUnindexedSearch.addLongIdentifier("reject-unindexed-search", true);
    rejectUnindexedSearch.addLongIdentifier("reject-unindexed-searches", true);
    rejectUnindexedSearch.addLongIdentifier("reject-unindexed", true);
    rejectUnindexedSearch.addLongIdentifier("reject-if-unindexed", true);
    rejectUnindexedSearch.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(rejectUnindexedSearch);
    routeToBackendSet = new StringArgument(null, "routeToBackendSet", false, 0, INFO_LDAPSEARCH_ARG_PLACEHOLDER_ROUTE_TO_BACKEND_SET.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_ROUTE_TO_BACKEND_SET.get());
    routeToBackendSet.addLongIdentifier("route-to-backend-set", true);
    routeToBackendSet.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(routeToBackendSet);
    routeToServer = new StringArgument(null, "routeToServer", false, 1, INFO_LDAPSEARCH_ARG_PLACEHOLDER_ROUTE_TO_SERVER.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_ROUTE_TO_SERVER.get());
    routeToServer.addLongIdentifier("route-to-server", true);
    routeToServer.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(routeToServer);
    final Set<String> suppressOperationalAttributeUpdatesAllowedValues = StaticUtils.setOf("last-access-time", "last-login-time", "last-login-ip", "lastmod");
    suppressOperationalAttributeUpdates = new StringArgument(null, "suppressOperationalAttributeUpdates", false, -1, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_SUPPRESS_OP_ATTR_UPDATES.get(), suppressOperationalAttributeUpdatesAllowedValues);
    suppressOperationalAttributeUpdates.addLongIdentifier("suppress-operational-attribute-updates", true);
    suppressOperationalAttributeUpdates.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(suppressOperationalAttributeUpdates);
    usePasswordPolicyControl = new BooleanArgument(null, "usePasswordPolicyControl", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_PASSWORD_POLICY.get());
    usePasswordPolicyControl.addLongIdentifier("use-password-policy-control", true);
    usePasswordPolicyControl.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(usePasswordPolicyControl);
    realAttributesOnly = new BooleanArgument(null, "realAttributesOnly", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_REAL_ATTRS_ONLY.get());
    realAttributesOnly.addLongIdentifier("real-attributes-only", true);
    realAttributesOnly.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(realAttributesOnly);
    sortOrder = new StringArgument('S', "sortOrder", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_SORT_ORDER.get());
    sortOrder.addLongIdentifier("sort-order", true);
    sortOrder.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(sortOrder);
    simplePageSize = new IntegerArgument(null, "simplePageSize", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_PAGE_SIZE.get(), 1, Integer.MAX_VALUE);
    simplePageSize.addLongIdentifier("simple-page-size", true);
    simplePageSize.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(simplePageSize);
    virtualAttributesOnly = new BooleanArgument(null, "virtualAttributesOnly", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_VIRTUAL_ATTRS_ONLY.get());
    virtualAttributesOnly.addLongIdentifier("virtual-attributes-only", true);
    virtualAttributesOnly.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(virtualAttributesOnly);
    virtualListView = new StringArgument('G', "virtualListView", false, 1, "{before:after:index:count | before:after:value}", INFO_LDAPSEARCH_ARG_DESCRIPTION_VLV.get("sortOrder"));
    virtualListView.addLongIdentifier("vlv", true);
    virtualListView.addLongIdentifier("virtual-list-view", true);
    virtualListView.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_CONTROLS.get());
    parser.addArgument(virtualListView);
    excludeAttribute = new StringArgument(null, "excludeAttribute", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_EXCLUDE_ATTRIBUTE.get());
    excludeAttribute.addLongIdentifier("exclude-attribute", true);
    excludeAttribute.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(excludeAttribute);
    redactAttribute = new StringArgument(null, "redactAttribute", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_REDACT_ATTRIBUTE.get());
    redactAttribute.addLongIdentifier("redact-attribute", true);
    redactAttribute.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(redactAttribute);
    hideRedactedValueCount = new BooleanArgument(null, "hideRedactedValueCount", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_HIDE_REDACTED_VALUE_COUNT.get());
    hideRedactedValueCount.addLongIdentifier("hide-redacted-value-count", true);
    hideRedactedValueCount.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(hideRedactedValueCount);
    scrambleAttribute = new StringArgument(null, "scrambleAttribute", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_SCRAMBLE_ATTRIBUTE.get());
    scrambleAttribute.addLongIdentifier("scramble-attribute", true);
    scrambleAttribute.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(scrambleAttribute);
    scrambleJSONField = new StringArgument(null, "scrambleJSONField", false, 0, INFO_PLACEHOLDER_FIELD_NAME.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_SCRAMBLE_JSON_FIELD.get());
    scrambleJSONField.addLongIdentifier("scramble-json-field", true);
    scrambleJSONField.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(scrambleJSONField);
    scrambleRandomSeed = new IntegerArgument(null, "scrambleRandomSeed", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_SCRAMBLE_RANDOM_SEED.get());
    scrambleRandomSeed.addLongIdentifier("scramble-random-seed", true);
    scrambleRandomSeed.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(scrambleRandomSeed);
    renameAttributeFrom = new StringArgument(null, "renameAttributeFrom", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_RENAME_ATTRIBUTE_FROM.get());
    renameAttributeFrom.addLongIdentifier("rename-attribute-from", true);
    renameAttributeFrom.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(renameAttributeFrom);
    renameAttributeTo = new StringArgument(null, "renameAttributeTo", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_RENAME_ATTRIBUTE_TO.get());
    renameAttributeTo.addLongIdentifier("rename-attribute-to", true);
    renameAttributeTo.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(renameAttributeTo);
    moveSubtreeFrom = new DNArgument(null, "moveSubtreeFrom", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_MOVE_SUBTREE_FROM.get());
    moveSubtreeFrom.addLongIdentifier("move-subtree-from", true);
    moveSubtreeFrom.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(moveSubtreeFrom);
    moveSubtreeTo = new DNArgument(null, "moveSubtreeTo", false, 0, INFO_PLACEHOLDER_ATTR.get(), INFO_LDAPSEARCH_ARG_DESCRIPTION_MOVE_SUBTREE_TO.get());
    moveSubtreeTo.addLongIdentifier("move-subtree-to", true);
    moveSubtreeTo.setArgumentGroupName(INFO_LDAPSEARCH_ARG_GROUP_TRANSFORMATIONS.get());
    parser.addArgument(moveSubtreeTo);
    // The "--scriptFriendly" argument is provided for compatibility with legacy
    // ldapsearch tools, but is not actually used by this tool.
    final BooleanArgument scriptFriendly = new BooleanArgument(null, "scriptFriendly", 1, INFO_LDAPSEARCH_ARG_DESCRIPTION_SCRIPT_FRIENDLY.get());
    scriptFriendly.addLongIdentifier("script-friendly", true);
    scriptFriendly.setHidden(true);
    parser.addArgument(scriptFriendly);
    // The "-V" / "--ldapVersion" argument is provided for compatibility with
    // legacy ldapsearch tools, but is not actually used by this tool.
    final IntegerArgument ldapVersion = new IntegerArgument('V', "ldapVersion", false, 1, null, INFO_LDAPSEARCH_ARG_DESCRIPTION_LDAP_VERSION.get());
    ldapVersion.addLongIdentifier("ldap-version", true);
    ldapVersion.setHidden(true);
    parser.addArgument(ldapVersion);
    // The baseDN and ldapURLFile arguments can't be used together.
    parser.addExclusiveArgumentSet(baseDN, ldapURLFile);
    // The scope and ldapURLFile arguments can't be used together.
    parser.addExclusiveArgumentSet(scope, ldapURLFile);
    // The requestedAttribute and ldapURLFile arguments can't be used together.
    parser.addExclusiveArgumentSet(requestedAttribute, ldapURLFile);
    // The filter and ldapURLFile arguments can't be used together.
    parser.addExclusiveArgumentSet(filter, ldapURLFile);
    // The filterFile and ldapURLFile arguments can't be used together.
    parser.addExclusiveArgumentSet(filterFile, ldapURLFile);
    // The followReferrals and manageDsaIT arguments can't be used together.
    parser.addExclusiveArgumentSet(followReferrals, manageDsaIT);
    // The persistent search argument can't be used with either the filterFile
    // or ldapURLFile arguments.
    parser.addExclusiveArgumentSet(persistentSearch, filterFile);
    parser.addExclusiveArgumentSet(persistentSearch, ldapURLFile);
    // The draft-ietf-ldup-subentry and RFC 3672 subentries controls cannot be
    // used together.
    parser.addExclusiveArgumentSet(draftLDUPSubentries, rfc3672Subentries);
    // The realAttributesOnly and virtualAttributesOnly arguments can't be used
    // together.
    parser.addExclusiveArgumentSet(realAttributesOnly, virtualAttributesOnly);
    // The simplePageSize and virtualListView arguments can't be used together.
    parser.addExclusiveArgumentSet(simplePageSize, virtualListView);
    // The terse and verbose arguments can't be used together.
    parser.addExclusiveArgumentSet(terse, verbose);
    // The getEffectiveRightsAttribute argument requires the
    // getEffectiveRightsAuthzID argument.
    parser.addDependentArgumentSet(getEffectiveRightsAttribute, getEffectiveRightsAuthzID);
    // The virtualListView argument requires the sortOrder argument.
    parser.addDependentArgumentSet(virtualListView, sortOrder);
    // The rejectUnindexedSearch and permitUnindexedSearch arguments can't be
    // used together.
    parser.addExclusiveArgumentSet(rejectUnindexedSearch, permitUnindexedSearch);
    // The separateOutputFilePerSearch argument requires the outputFile
    // argument.  It also requires either the filter, filterFile or ldapURLFile
    // argument.
    parser.addDependentArgumentSet(separateOutputFilePerSearch, outputFile);
    parser.addDependentArgumentSet(separateOutputFilePerSearch, filter, filterFile, ldapURLFile);
    // The teeResultsToStandardOut argument requires the outputFile argument.
    parser.addDependentArgumentSet(teeResultsToStandardOut, outputFile);
    // The wrapColumn and dontWrap arguments must not be used together.
    parser.addExclusiveArgumentSet(wrapColumn, dontWrap);
    // All arguments that specifically pertain to join processing can only be
    // used if the joinRule argument is provided.
    parser.addDependentArgumentSet(joinBaseDN, joinRule);
    parser.addDependentArgumentSet(joinScope, joinRule);
    parser.addDependentArgumentSet(joinSizeLimit, joinRule);
    parser.addDependentArgumentSet(joinFilter, joinRule);
    parser.addDependentArgumentSet(joinRequestedAttribute, joinRule);
    parser.addDependentArgumentSet(joinRequireMatch, joinRule);
    // The countEntries argument must not be used in conjunction with the
    // filter, filterFile, LDAPURLFile, or persistentSearch arguments.
    parser.addExclusiveArgumentSet(countEntries, filter);
    parser.addExclusiveArgumentSet(countEntries, filterFile);
    parser.addExclusiveArgumentSet(countEntries, ldapURLFile);
    parser.addExclusiveArgumentSet(countEntries, persistentSearch);
    // The hideRedactedValueCount argument requires the redactAttribute
    // argument.
    parser.addDependentArgumentSet(hideRedactedValueCount, redactAttribute);
    // The scrambleJSONField and scrambleRandomSeed arguments require the
    // scrambleAttribute argument.
    parser.addDependentArgumentSet(scrambleJSONField, scrambleAttribute);
    parser.addDependentArgumentSet(scrambleRandomSeed, scrambleAttribute);
    // The renameAttributeFrom and renameAttributeTo arguments must be provided
    // together.
    parser.addDependentArgumentSet(renameAttributeFrom, renameAttributeTo);
    parser.addDependentArgumentSet(renameAttributeTo, renameAttributeFrom);
    // The moveSubtreeFrom and moveSubtreeTo arguments must be provided
    // together.
    parser.addDependentArgumentSet(moveSubtreeFrom, moveSubtreeTo);
    parser.addDependentArgumentSet(moveSubtreeTo, moveSubtreeFrom);
    // The compressOutput argument can only be used if an output file is
    // specified and results aren't going to be teed.
    parser.addDependentArgumentSet(compressOutput, outputFile);
    parser.addExclusiveArgumentSet(compressOutput, teeResultsToStandardOut);
    // The encryptOutput argument can only be used if an output file is
    // specified and results aren't going to be teed.
    parser.addDependentArgumentSet(encryptOutput, outputFile);
    parser.addExclusiveArgumentSet(encryptOutput, teeResultsToStandardOut);
    // The encryptionPassphraseFile argument can only be used if the
    // encryptOutput argument is also provided.
    parser.addDependentArgumentSet(encryptionPassphraseFile, encryptOutput);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument) DNArgument(com.unboundid.util.args.DNArgument) ScopeArgument(com.unboundid.util.args.ScopeArgument) FilterArgument(com.unboundid.util.args.FilterArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) ASN1OctetString(com.unboundid.asn1.ASN1OctetString) FileArgument(com.unboundid.util.args.FileArgument) BooleanValueArgument(com.unboundid.util.args.BooleanValueArgument) StringArgument(com.unboundid.util.args.StringArgument)

Example 34 with IntegerArgument

use of com.unboundid.util.args.IntegerArgument in project ldapsdk by pingidentity.

the class LDAPDiff method getServerHostPort.

/**
 * Retrieves a string representation of the address and port for the server
 * identified by the specified arguments.
 *
 * @param  hostnameArgName  The name of the argument used to specify the
 *                          hostname for the target server.  It must not be
 *                          {@code null}.
 * @param  portArgName      The name of the argument used to specify the port
 *                          of the target server.  It must not be
 *                          {@code null}.
 *
 * @return  A string representation of the address and port for the server
 *          identified by the specified arguments.
 */
@NotNull()
private String getServerHostPort(@NotNull final String hostnameArgName, @NotNull final String portArgName) {
    final StringArgument hostnameArg = parser.getStringArgument(hostnameArgName);
    final IntegerArgument portArg = parser.getIntegerArgument(portArgName);
    return hostnameArg.getValue() + ':' + portArg.getValue();
}
Also used : IntegerArgument(com.unboundid.util.args.IntegerArgument) StringArgument(com.unboundid.util.args.StringArgument) NotNull(com.unboundid.util.NotNull)

Example 35 with IntegerArgument

use of com.unboundid.util.args.IntegerArgument in project ldapsdk by pingidentity.

the class ParallelUpdate method addNonLDAPArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    ldifFileArg = new FileArgument('l', "ldifFile", true, 1, null, INFO_PARALLEL_UPDATE_ARG_DESC_LDIF_FILE.get(), true, true, true, false);
    ldifFileArg.addLongIdentifier("ldif-file", true);
    ldifFileArg.addLongIdentifier("inputFile", true);
    ldifFileArg.addLongIdentifier("input-file", true);
    ldifFileArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(ldifFileArg);
    isCompressedArg = new BooleanArgument('c', "isCompressed", 1, INFO_PARALLEL_UPDATE_ARG_DESC_IS_COMPRESSED.get());
    isCompressedArg.addLongIdentifier("is-compressed", true);
    isCompressedArg.addLongIdentifier("compressed", true);
    isCompressedArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    isCompressedArg.setHidden(true);
    parser.addArgument(isCompressedArg);
    encryptionPassphraseFileArg = new FileArgument(null, "encryptionPassphraseFile", false, 1, null, INFO_PARALLEL_UPDATE_ARG_DESC_ENCRYPTION_PASSPHRASE_FILE.get(), true, true, true, false);
    encryptionPassphraseFileArg.addLongIdentifier("encryption-passphrase-file", true);
    encryptionPassphraseFileArg.addLongIdentifier("encryptionPasswordFile", true);
    encryptionPassphraseFileArg.addLongIdentifier("encryption-password-file", true);
    encryptionPassphraseFileArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(encryptionPassphraseFileArg);
    rejectFileArg = new FileArgument('R', "rejectFile", true, 1, null, INFO_PARALLEL_UPDATE_ARG_DESC_REJECT_FILE.get(), false, true, true, false);
    rejectFileArg.addLongIdentifier("reject-file", true);
    rejectFileArg.addLongIdentifier("rejectsFile", true);
    rejectFileArg.addLongIdentifier("rejects-file", true);
    rejectFileArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(rejectFileArg);
    useFirstRejectResultCodeAsExitCodeArg = new BooleanArgument(null, "useFirstRejectResultCodeAsExitCode", 1, INFO_PARALLEL_UPDATE_USE_FIRST_REJECT_RC.get());
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("use-first-reject-result-code-as-exit-code", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("useFirstRejectResultCode", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("use-first-reject-result-code", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("useFirstRejectResult", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("use-first-reject-result", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("useRejectResultCodeAsExitCode", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("use-reject-result-code-as-exit-code", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("useRejectResultCode", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("use-reject-result-code", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("useRejectResult", true);
    useFirstRejectResultCodeAsExitCodeArg.addLongIdentifier("use-reject-result", true);
    useFirstRejectResultCodeAsExitCodeArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(useFirstRejectResultCodeAsExitCodeArg);
    neverRetryArg = new BooleanArgument('r', "neverRetry", 1, INFO_PARALLEL_UPDATE_ARG_DESC_NEVER_RETRY.get());
    neverRetryArg.addLongIdentifier("never-retry", true);
    neverRetryArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(neverRetryArg);
    logFileArg = new FileArgument('L', "logFile", false, 1, null, INFO_PARALLEL_UPDATE_ARG_DESC_LOG_FILE.get(), false, true, true, false);
    logFileArg.addLongIdentifier("log-file", true);
    logFileArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(logFileArg);
    defaultAddArg = new BooleanArgument('a', "defaultAdd", 1, INFO_PARALLEL_UPDATE_ARG_DESC_DEFAULT_ADD.get());
    defaultAddArg.addLongIdentifier("default-add", true);
    defaultAddArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(defaultAddArg);
    followReferralsArg = new BooleanArgument(null, "followReferrals", 1, INFO_PARALLEL_UPDATE_ARG_DESC_FOLLOW_REFERRALS.get());
    followReferralsArg.addLongIdentifier("follow-referrals", true);
    followReferralsArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(followReferralsArg);
    numThreadsArg = new IntegerArgument('t', "numThreads", true, 1, null, INFO_PARALLEL_UPDATE_ARG_DESC_NUM_THREADS.get(), 1, Integer.MAX_VALUE, 8);
    numThreadsArg.addLongIdentifier("num-threads", true);
    numThreadsArg.addLongIdentifier("threads", true);
    numThreadsArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(numThreadsArg);
    ratePerSecondArg = new IntegerArgument('s', "ratePerSecond", false, 1, null, INFO_PARALLEL_UPDATE_ARG_DESC_RATE_PER_SECOND.get(), 1, Integer.MAX_VALUE);
    ratePerSecondArg.addLongIdentifier("rate-per-second", true);
    ratePerSecondArg.addLongIdentifier("requestsPerSecond", true);
    ratePerSecondArg.addLongIdentifier("requests-per-second", true);
    ratePerSecondArg.addLongIdentifier("operationsPerSecond", true);
    ratePerSecondArg.addLongIdentifier("operations-per-second", true);
    ratePerSecondArg.addLongIdentifier("opsPerSecond", true);
    ratePerSecondArg.addLongIdentifier("ops-per-second", true);
    ratePerSecondArg.addLongIdentifier("rate", true);
    ratePerSecondArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(ratePerSecondArg);
    usePermissiveModifyArg = new BooleanArgument('M', "usePermissiveModify", 1, INFO_PARALLEL_UPDATE_ARG_DESC_USE_PERMISSIVE_MODIFY.get());
    usePermissiveModifyArg.addLongIdentifier("use-permissive-modify", true);
    usePermissiveModifyArg.addLongIdentifier("permissiveModify", true);
    usePermissiveModifyArg.addLongIdentifier("permissive-modify", true);
    usePermissiveModifyArg.addLongIdentifier("permissive", true);
    usePermissiveModifyArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(usePermissiveModifyArg);
    ignoreNoUserModificationArg = new BooleanArgument(null, "ignoreNoUserModification", 1, INFO_PARALLEL_UPDATE_ARG_DESC_IGNORE_NO_USER_MOD.get());
    ignoreNoUserModificationArg.addLongIdentifier("ignore-no-user-modification", true);
    ignoreNoUserModificationArg.addLongIdentifier("ignoreNoUserMod", true);
    ignoreNoUserModificationArg.addLongIdentifier("ignore-no-user-mod", true);
    ignoreNoUserModificationArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(ignoreNoUserModificationArg);
    proxyAsArg = new StringArgument('Y', "proxyAs", false, 1, INFO_PARALLEL_UPDATE_ARG_PLACEHOLDER_PROXY_AS.get(), INFO_PARALLEL_UPDATE_ARG_DESC_PROXY_AS.get());
    proxyAsArg.addLongIdentifier("proxy-as", true);
    proxyAsArg.addLongIdentifier("proxyV2As", true);
    proxyAsArg.addLongIdentifier("proxy-v2-as", true);
    proxyAsArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(proxyAsArg);
    proxyV1AsArg = new DNArgument(null, "proxyV1As", false, 1, null, INFO_PARALLEL_UPDATE_ARG_DESC_PROXY_V1_AS.get());
    proxyV1AsArg.addLongIdentifier("proxy-v1-as", true);
    proxyV1AsArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(proxyV1AsArg);
    passwordUpdateBehaviorArg = new StringArgument(null, "passwordUpdateBehavior", false, 0, INFO_PARALLEL_UPDATE_ARG_PLACEHOLDER_PW_UPDATE_BEHAVIOR.get(), INFO_PARALLEL_UPDATE_ARG_DESC_PW_UPDATE_BEHAVIOR.get());
    passwordUpdateBehaviorArg.addLongIdentifier("password-update-behavior", true);
    passwordUpdateBehaviorArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(passwordUpdateBehaviorArg);
    operationPurposeArg = new StringArgument(null, "operationPurpose", false, 1, INFO_PARALLEL_UPDATE_ARG_PLACEHOLDER_OPERATION_PURPOSE.get(), INFO_PARALLEL_UPDATE_ARG_DESC_OPERATION_PURPOSE.get());
    operationPurposeArg.addLongIdentifier("operation-purpose", true);
    operationPurposeArg.addLongIdentifier("purpose", true);
    operationPurposeArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(operationPurposeArg);
    useManageDsaITArg = new BooleanArgument(null, "useManageDsaIT", 1, INFO_PARALLEL_UPDATE_ARG_DESC_USE_MANAGE_DSA_IT.get());
    useManageDsaITArg.addLongIdentifier("use-manage-dsa-it", true);
    useManageDsaITArg.addLongIdentifier("manageDsaIT", true);
    useManageDsaITArg.addLongIdentifier("manage-dsa-it", true);
    useManageDsaITArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(useManageDsaITArg);
    nameWithEntryUUIDArg = new BooleanArgument(null, "nameWithEntryUUID", 1, INFO_LDAPMODIFY_ARG_DESCRIPTION_NAME_WITH_ENTRY_UUID.get());
    nameWithEntryUUIDArg.addLongIdentifier("name-with-entryuuid", true);
    nameWithEntryUUIDArg.addLongIdentifier("name-with-entry-uuid", true);
    nameWithEntryUUIDArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(nameWithEntryUUIDArg);
    softDeleteArg = new BooleanArgument(null, "useSoftDelete", 1, INFO_PARALLEL_UPDATE_ARG_DESC_SOFT_DELETE.get());
    softDeleteArg.addLongIdentifier("use-soft-delete", true);
    softDeleteArg.addLongIdentifier("softDelete", true);
    softDeleteArg.addLongIdentifier("soft-delete", true);
    softDeleteArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(softDeleteArg);
    hardDeleteArg = new BooleanArgument(null, "useHardDelete", 1, INFO_PARALLEL_UPDATE_ARG_DESC_HARD_DELETE.get());
    hardDeleteArg.addLongIdentifier("use-hard-delete", true);
    hardDeleteArg.addLongIdentifier("hardDelete", true);
    hardDeleteArg.addLongIdentifier("hard-delete", true);
    hardDeleteArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(hardDeleteArg);
    allowUndeleteArg = new BooleanArgument(null, "allowUndelete", 1, INFO_PARALLEL_UPDATE_ARG_DESC_ALLOW_UNDELETE.get());
    allowUndeleteArg.addLongIdentifier("allow-undelete", true);
    allowUndeleteArg.addLongIdentifier("undelete", true);
    allowUndeleteArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(allowUndeleteArg);
    useAssuredReplicationArg = new BooleanArgument(null, "useAssuredReplication", 1, INFO_PWMOD_ARG_DESC_ASSURED_REPLICATION.get());
    useAssuredReplicationArg.addLongIdentifier("use-assured-replication", true);
    useAssuredReplicationArg.addLongIdentifier("assuredReplication", true);
    useAssuredReplicationArg.addLongIdentifier("assured-replication", true);
    useAssuredReplicationArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(useAssuredReplicationArg);
    assuredReplicationLocalLevelArg = new StringArgument(null, "assuredReplicationLocalLevel", false, 1, INFO_LDAPDELETE_ARG_PLACEHOLDER_ASSURED_REPLICATION_LOCAL_LEVEL.get(), INFO_LDAPDELETE_ARG_DESC_ASSURED_REPLICATION_LOCAL_LEVEL.get(), StaticUtils.setOf(ASSURED_REPLICATION_LOCAL_LEVEL_NONE, ASSURED_REPLICATION_LOCAL_LEVEL_RECEIVED_ANY_SERVER, ASSURED_REPLICATION_LOCAL_LEVEL_PROCESSED_ALL_SERVERS), (String) null);
    assuredReplicationLocalLevelArg.addLongIdentifier("assured-replication-local-level", true);
    assuredReplicationLocalLevelArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(assuredReplicationLocalLevelArg);
    assuredReplicationRemoteLevelArg = new StringArgument(null, "assuredReplicationRemoteLevel", false, 1, INFO_PARALLEL_UPDATE_ARG_PLACEHOLDER_ASSURED_REPLICATION_REMOTE_LEVEL.get(), INFO_PARALLEL_UPDATE_ARG_DESC_ASSURED_REPLICATION_REMOTE_LEVEL.get(), StaticUtils.setOf(ASSURED_REPLICATION_REMOTE_LEVEL_NONE, ASSURED_REPLICATION_REMOTE_LEVEL_RECEIVED_ANY_REMOTE_LOCATION, ASSURED_REPLICATION_REMOTE_LEVEL_RECEIVED_ALL_REMOTE_LOCATIONS, ASSURED_REPLICATION_REMOTE_LEVEL_PROCESSED_ALL_REMOTE_SERVERS), (String) null);
    assuredReplicationRemoteLevelArg.addLongIdentifier("assured-replication-remote-level", true);
    assuredReplicationRemoteLevelArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(assuredReplicationRemoteLevelArg);
    assuredReplicationTimeoutArg = new DurationArgument(null, "assuredReplicationTimeout", false, null, INFO_PWMOD_ARG_DESC_ASSURED_REPLICATION_TIMEOUT.get());
    assuredReplicationTimeoutArg.addLongIdentifier("assured-replication-timeout", true);
    assuredReplicationTimeoutArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(assuredReplicationTimeoutArg);
    replicationRepairArg = new BooleanArgument(null, "replicationRepair", 1, INFO_PARALLEL_UPDATE_ARG_DESC_USE_REPLICATION_REPAIR.get());
    replicationRepairArg.addLongIdentifier("replication-repair", true);
    replicationRepairArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(replicationRepairArg);
    suppressOperationalAttributeUpdatesArg = new StringArgument(null, "suppressOperationalAttributeUpdates", false, 0, INFO_PARALLEL_UPDATE_ARG_PLACEHOLDER_SUPPRESS_OP_ATTR_UPDATES.get(), INFO_PARALLEL_UPDATE_ARG_DESC_SUPPRESS_OP_ATTR_UPDATES.get(), StaticUtils.setOf(SUPPRESS_OP_ATTR_LAST_ACCESS_TIME, SUPPRESS_OP_ATTR_LAST_LOGIN_TIME, SUPPRESS_OP_ATTR_LAST_LOGIN_IP, SUPPRESS_OP_ATTR_LASTMOD), (String) null);
    suppressOperationalAttributeUpdatesArg.addLongIdentifier("suppress-operational-attribute-updates", true);
    suppressOperationalAttributeUpdatesArg.addLongIdentifier("suppressOperationalAttributeUpdate", true);
    suppressOperationalAttributeUpdatesArg.addLongIdentifier("suppress-operational-attribute-update", true);
    suppressOperationalAttributeUpdatesArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(suppressOperationalAttributeUpdatesArg);
    suppressReferentialIntegrityUpdatesArg = new BooleanArgument(null, "suppressReferentialIntegrityUpdates", 1, INFO_PARALLEL_UPDATE_ARG_DESC_SUPPRESS_REFERENTIAL_INTEGRITY_UPDATES.get());
    suppressReferentialIntegrityUpdatesArg.addLongIdentifier("suppress-referential-integrity-updates", true);
    suppressReferentialIntegrityUpdatesArg.addLongIdentifier("suppressReferentialIntegrityUpdate", true);
    suppressReferentialIntegrityUpdatesArg.addLongIdentifier("suppress-referential-integrity-update", true);
    suppressReferentialIntegrityUpdatesArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(suppressReferentialIntegrityUpdatesArg);
    addControlArg = new ControlArgument(null, "addControl", false, 0, null, INFO_PARALLEL_UPDATE_ARG_DESC_ADD_CONTROL.get());
    addControlArg.addLongIdentifier("add-control", true);
    addControlArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(addControlArg);
    bindControlArg = new ControlArgument(null, "bindControl", false, 0, null, INFO_PARALLEL_UPDATE_ARG_DESC_BIND_CONTROL.get());
    bindControlArg.addLongIdentifier("bind-control", true);
    bindControlArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(bindControlArg);
    deleteControlArg = new ControlArgument(null, "deleteControl", false, 0, null, INFO_PARALLEL_UPDATE_ARG_DESC_DELETE_CONTROL.get());
    deleteControlArg.addLongIdentifier("delete-control", true);
    deleteControlArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(deleteControlArg);
    modifyControlArg = new ControlArgument(null, "modifyControl", false, 0, null, INFO_PARALLEL_UPDATE_ARG_DESC_MODIFY_CONTROL.get());
    modifyControlArg.addLongIdentifier("modify-control", true);
    modifyControlArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(modifyControlArg);
    modifyDNControlArg = new ControlArgument(null, "modifyDNControl", false, 0, null, INFO_PARALLEL_UPDATE_ARG_DESC_MODIFY_DN_CONTROL.get());
    modifyDNControlArg.addLongIdentifier("modify-dn-control", true);
    modifyDNControlArg.setArgumentGroupName(INFO_PARALLEL_UPDATE_ARG_GROUP_CONTROLS.get());
    parser.addArgument(modifyDNControlArg);
    parser.addExclusiveArgumentSet(followReferralsArg, useManageDsaITArg);
    parser.addExclusiveArgumentSet(proxyAsArg, proxyV1AsArg);
    parser.addExclusiveArgumentSet(softDeleteArg, hardDeleteArg);
    parser.addDependentArgumentSet(assuredReplicationLocalLevelArg, useAssuredReplicationArg);
    parser.addDependentArgumentSet(assuredReplicationRemoteLevelArg, useAssuredReplicationArg);
    parser.addDependentArgumentSet(assuredReplicationTimeoutArg, useAssuredReplicationArg);
    parser.addExclusiveArgumentSet(useAssuredReplicationArg, replicationRepairArg);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument) DNArgument(com.unboundid.util.args.DNArgument) DurationArgument(com.unboundid.util.args.DurationArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) FileArgument(com.unboundid.util.args.FileArgument) StringArgument(com.unboundid.util.args.StringArgument)

Aggregations

IntegerArgument (com.unboundid.util.args.IntegerArgument)38 BooleanArgument (com.unboundid.util.args.BooleanArgument)35 StringArgument (com.unboundid.util.args.StringArgument)34 FileArgument (com.unboundid.util.args.FileArgument)29 DNArgument (com.unboundid.util.args.DNArgument)23 FilterArgument (com.unboundid.util.args.FilterArgument)13 ControlArgument (com.unboundid.util.args.ControlArgument)11 ScopeArgument (com.unboundid.util.args.ScopeArgument)9 ASN1OctetString (com.unboundid.asn1.ASN1OctetString)6 DurationArgument (com.unboundid.util.args.DurationArgument)6 LDAPException (com.unboundid.ldap.sdk.LDAPException)5 NotNull (com.unboundid.util.NotNull)5 ArgumentException (com.unboundid.util.args.ArgumentException)5 BooleanValueArgument (com.unboundid.util.args.BooleanValueArgument)5 TimestampArgument (com.unboundid.util.args.TimestampArgument)5 File (java.io.File)5 ASN1BitString (com.unboundid.asn1.ASN1BitString)4 DN (com.unboundid.ldap.sdk.DN)3 ArgumentParser (com.unboundid.util.args.ArgumentParser)3 SubCommand (com.unboundid.util.args.SubCommand)3