Search in sources :

Example 11 with FilterArgument

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

the class IdentifyUniqueAttributeConflicts method addNonLDAPArguments.

/**
 * Adds the arguments needed by this command-line tool to the provided
 * argument parser which are not related to connecting or authenticating to
 * the directory server.
 *
 * @param  parser  The argument parser to which the arguments should be added.
 *
 * @throws ArgumentException  If a problem occurs while adding the arguments.
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    String description = "The search base DN(s) to use to find entries with " + "attributes for which to find uniqueness conflicts.  At least one " + "base DN must be specified.";
    baseDNArgument = new DNArgument('b', "baseDN", true, 0, "{dn}", description);
    baseDNArgument.addLongIdentifier("base-dn", true);
    parser.addArgument(baseDNArgument);
    description = "A filter that will be used to identify the set of " + "entries in which to identify uniqueness conflicts.  If this is not " + "specified, then all entries containing the target attribute(s) " + "will be examined.";
    filterArgument = new FilterArgument('f', "filter", false, 1, "{filter}", description);
    parser.addArgument(filterArgument);
    description = "The attributes for which to find uniqueness conflicts.  " + "At least one attribute must be specified, and each attribute " + "must be indexed for equality searches.";
    attributeArgument = new StringArgument('A', "attribute", true, 0, "{attr}", description);
    parser.addArgument(attributeArgument);
    description = "Indicates the behavior to exhibit if multiple unique " + "attributes are provided.  Allowed values are '" + BEHAVIOR_UNIQUE_WITHIN_ATTR + "' (indicates that each value only " + "needs to be unique within its own attribute type), '" + BEHAVIOR_UNIQUE_ACROSS_ATTRS_INCLUDING_SAME + "' (indicates that " + "each value needs to be unique across all of the specified " + "attributes), '" + BEHAVIOR_UNIQUE_ACROSS_ATTRS_EXCEPT_SAME + "' (indicates each value needs to be unique across all of the " + "specified attributes, except that multiple attributes in the same " + "entry are allowed to share the same value), and '" + BEHAVIOR_UNIQUE_IN_COMBINATION + "' (indicates that every " + "combination of the values of the specified attributes must be " + "unique across each entry).";
    final Set<String> allowedValues = StaticUtils.setOf(BEHAVIOR_UNIQUE_WITHIN_ATTR, BEHAVIOR_UNIQUE_ACROSS_ATTRS_INCLUDING_SAME, BEHAVIOR_UNIQUE_ACROSS_ATTRS_EXCEPT_SAME, BEHAVIOR_UNIQUE_IN_COMBINATION);
    multipleAttributeBehaviorArgument = new StringArgument('m', "multipleAttributeBehavior", false, 1, "{behavior}", description, allowedValues, BEHAVIOR_UNIQUE_WITHIN_ATTR);
    multipleAttributeBehaviorArgument.addLongIdentifier("multiple-attribute-behavior", true);
    parser.addArgument(multipleAttributeBehaviorArgument);
    description = "The maximum number of entries to retrieve at a time when " + "attempting to find uniqueness conflicts.  This requires that the " + "authenticated user have permission to use the simple paged results " + "control, but it can avoid problems with the server sending entries " + "too quickly for the client to handle.  By default, the simple " + "paged results control will not be used.";
    pageSizeArgument = new IntegerArgument('z', "simplePageSize", false, 1, "{num}", description, 1, Integer.MAX_VALUE);
    pageSizeArgument.addLongIdentifier("simple-page-size", true);
    parser.addArgument(pageSizeArgument);
    description = "The time limit in seconds that will be used for search " + "requests attempting to identify conflicts for each value of any of " + "the unique attributes.  This time limit is used to avoid sending " + "expensive unindexed search requests that can consume significant " + "server resources.  If any of these search operations fails in a " + "way that indicates the requested time limit was exceeded, the " + "tool will abort its processing.  A value of zero indicates that no " + "time limit will be enforced.  If this argument is not provided, a " + "default time limit of " + DEFAULT_TIME_LIMIT_SECONDS + " will be used.";
    timeLimitArgument = new IntegerArgument('l', "timeLimitSeconds", false, 1, "{num}", description, 0, Integer.MAX_VALUE, DEFAULT_TIME_LIMIT_SECONDS);
    timeLimitArgument.addLongIdentifier("timeLimit", true);
    timeLimitArgument.addLongIdentifier("time-limit-seconds", true);
    timeLimitArgument.addLongIdentifier("time-limit", true);
    parser.addArgument(timeLimitArgument);
}
Also used : DNArgument(com.unboundid.util.args.DNArgument) FilterArgument(com.unboundid.util.args.FilterArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) ASN1OctetString(com.unboundid.asn1.ASN1OctetString) StringArgument(com.unboundid.util.args.StringArgument)

Example 12 with FilterArgument

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

the class LDAPCompare method addNonLDAPArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    argumentParser = parser;
    // Compare operation processing arguments.
    dnFile = new FileArgument('f', "dnFile", false, 1, null, INFO_LDAPCOMPARE_ARG_DESCRIPTION_DN_FILE.get(), true, true, true, false);
    dnFile.addLongIdentifier("dn-file", true);
    dnFile.addLongIdentifier("filename", true);
    dnFile.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(dnFile);
    assertionFile = new FileArgument(null, "assertionFile", false, 1, null, INFO_LDAPCOMPARE_ARG_DESCRIPTION_ASSERTION_FILE.get(), true, true, true, false);
    assertionFile.addLongIdentifier("assertion-file", true);
    assertionFile.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(assertionFile);
    followReferrals = new BooleanArgument(null, "followReferrals", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_FOLLOW_REFERRALS.get());
    followReferrals.addLongIdentifier("follow-referrals", true);
    followReferrals.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(followReferrals);
    useAdministrativeSession = new BooleanArgument(null, "useAdministrativeSession", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_USE_ADMIN_SESSION.get());
    useAdministrativeSession.addLongIdentifier("use-administrative-session", true);
    useAdministrativeSession.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(useAdministrativeSession);
    continueOnError = new BooleanArgument('c', "continueOnError", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_CONTINUE_ON_ERROR.get());
    continueOnError.addLongIdentifier("continue-on-error", true);
    continueOnError.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(continueOnError);
    dryRun = new BooleanArgument('n', "dryRun", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_DRY_RUN.get());
    dryRun.addLongIdentifier("dry-run", true);
    dryRun.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_PROCESSING.get());
    parser.addArgument(dryRun);
    // Bind control arguments.
    bindControl = new ControlArgument(null, "bindControl", false, 0, null, INFO_LDAPCOMPARE_ARG_DESCRIPTION_BIND_CONTROL.get());
    bindControl.addLongIdentifier("bind-control", true);
    bindControl.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_BIND_CONTROLS.get());
    parser.addArgument(bindControl);
    authorizationIdentity = new BooleanArgument('E', "authorizationIdentity", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_AUTHZ_IDENTITY.get());
    authorizationIdentity.addLongIdentifier("authorization-identity", true);
    authorizationIdentity.addLongIdentifier("useAuthorizationIdentity", true);
    authorizationIdentity.addLongIdentifier("use-authorization-identity", true);
    authorizationIdentity.addLongIdentifier("useAuthorizationIdentityControl", true);
    authorizationIdentity.addLongIdentifier("use-authorization-identity-control", true);
    authorizationIdentity.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_BIND_CONTROLS.get());
    parser.addArgument(authorizationIdentity);
    usePasswordPolicyControl = new BooleanArgument(null, "usePasswordPolicyControl", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_USE_PW_POLICY_CONTROL.get());
    usePasswordPolicyControl.addLongIdentifier("use-password-policy-control", true);
    usePasswordPolicyControl.addLongIdentifier("passwordPolicyControl", true);
    usePasswordPolicyControl.addLongIdentifier("password-policy-control", true);
    usePasswordPolicyControl.addLongIdentifier("passwordPolicy", true);
    usePasswordPolicyControl.addLongIdentifier("password-policy", true);
    usePasswordPolicyControl.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_BIND_CONTROLS.get());
    parser.addArgument(usePasswordPolicyControl);
    getAuthorizationEntryAttribute = new StringArgument(null, "getAuthorizationEntryAttribute", false, 0, INFO_LDAPCOMPARE_ARG_PLACEHOLDER_ATTRIBUTE.get(), INFO_LDAPCOMPARE_ARG_DESCRIPTION_GET_AUTHZ_ENTRY_ATTR.get());
    getAuthorizationEntryAttribute.addLongIdentifier("get-authorization-entry-attribute", true);
    getAuthorizationEntryAttribute.addLongIdentifier("getAuthzEntryAttribute", true);
    getAuthorizationEntryAttribute.addLongIdentifier("get-authz-entry-attribute", true);
    getAuthorizationEntryAttribute.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_BIND_CONTROLS.get());
    parser.addArgument(getAuthorizationEntryAttribute);
    getUserResourceLimits = new BooleanArgument(null, "getUserResourceLimits", 1, INFO_LDAPCOMPARE_ARG_PLACEHOLDER_GET_USER_RESOURCE_LIMITS.get());
    getUserResourceLimits.addLongIdentifier("get-user-resource-limits", true);
    getUserResourceLimits.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_BIND_CONTROLS.get());
    parser.addArgument(getUserResourceLimits);
    // Compare control arguments.
    compareControl = new ControlArgument('J', "compareControl", false, 0, null, INFO_LDAPCOMPARE_ARG_DESCRIPTION_COMPARE_CONTROL.get());
    compareControl.addLongIdentifier("compare-control", true);
    compareControl.addLongIdentifier("control", true);
    compareControl.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_COMPARE_CONTROLS.get());
    parser.addArgument(compareControl);
    proxyAs = new StringArgument('Y', "proxyAs", false, 1, INFO_LDAPCOMPARE_ARG_PLACEHOLDER_AUTHZ_ID.get(), INFO_LDAPCOMPARE_ARG_DESCRIPTION_PROXY_AS.get());
    proxyAs.addLongIdentifier("proxy-as", true);
    proxyAs.addLongIdentifier("proxyV2As", true);
    proxyAs.addLongIdentifier("proxy-v2-as", true);
    proxyAs.addLongIdentifier("proxyV2", true);
    proxyAs.addLongIdentifier("proxy-v2", true);
    proxyAs.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_COMPARE_CONTROLS.get());
    parser.addArgument(proxyAs);
    proxyV1As = new DNArgument(null, "proxyV1As", false, 1, null, INFO_LDAPCOMPARE_ARG_DESCRIPTION_PROXY_V1_AS.get());
    proxyV1As.addLongIdentifier("proxy-v1-as", true);
    proxyV1As.addLongIdentifier("proxyV1", true);
    proxyV1As.addLongIdentifier("proxy-v1", true);
    proxyV1As.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_COMPARE_CONTROLS.get());
    parser.addArgument(proxyV1As);
    manageDsaIT = new BooleanArgument(null, "manageDsaIT", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_MANAGE_DSA_IT.get());
    manageDsaIT.addLongIdentifier("manage-dsa-it", true);
    manageDsaIT.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_COMPARE_CONTROLS.get());
    parser.addArgument(manageDsaIT);
    assertionFilter = new FilterArgument(null, "assertionFilter", false, 1, null, INFO_LDAPCOMPARE_ARG_DESCRIPTION_ASSERTION_FILTER.get());
    assertionFilter.addLongIdentifier("assertion-filter", true);
    assertionFilter.addLongIdentifier("assertionControlFilter", true);
    assertionFilter.addLongIdentifier("assertion-control-filter", true);
    assertionFilter.addLongIdentifier("useAssertionControl", true);
    assertionFilter.addLongIdentifier("use-assertion-control", true);
    assertionFilter.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_COMPARE_CONTROLS.get());
    parser.addArgument(assertionFilter);
    operationPurpose = new StringArgument(null, "operationPurpose", false, 1, INFO_LDAPCOMPARE_ARG_PLACEHOLDER_PURPOSE.get(), INFO_LDAPCOMPARE_ARG_DESCRIPTION_OPERATION_PURPOSE.get());
    operationPurpose.addLongIdentifier("operation-purpose", true);
    operationPurpose.addLongIdentifier("purpose", true);
    operationPurpose.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_COMPARE_CONTROLS.get());
    parser.addArgument(operationPurpose);
    // Output Arguments.
    outputFile = new FileArgument(null, "outputFile", false, 1, null, INFO_LDAPCOMPARE_ARG_DESCRIPTION_OUTPUT_FILE.get(), false, true, true, false);
    outputFile.addLongIdentifier("output-file", true);
    outputFile.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_OUTPUT.get());
    parser.addArgument(outputFile);
    teeOutput = new BooleanArgument(null, "teeOutput", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_TEE_OUTPUT.get());
    teeOutput.addLongIdentifier("tee-output", true);
    teeOutput.addLongIdentifier("tee", true);
    teeOutput.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_OUTPUT.get());
    parser.addArgument(teeOutput);
    outputFormat = new StringArgument(null, "outputFormat", false, 1, INFO_LDAPCOMPARE_ARG_PLACEHOLDER_FORMAT.get(), INFO_LDAPCOMPARE_ARG_DESCRIPTION_OUTPUT_FORMAT.get(), StaticUtils.setOf(OUTPUT_FORMAT_TAB_DELIMITED, OUTPUT_FORMAT_CSV, OUTPUT_FORMAT_JSON), OUTPUT_FORMAT_TAB_DELIMITED);
    outputFormat.addLongIdentifier("output-format", true);
    outputFormat.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_OUTPUT.get());
    parser.addArgument(outputFormat);
    scriptFriendly = new BooleanArgument(null, "scriptFriendly", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_SCRIPT_FRIENDLY.get());
    scriptFriendly.addLongIdentifier("script-friendly", true);
    scriptFriendly.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_OUTPUT.get());
    scriptFriendly.setHidden(true);
    parser.addArgument(scriptFriendly);
    verbose = new BooleanArgument('v', "verbose", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_VERBOSE.get());
    verbose.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_OUTPUT.get());
    parser.addArgument(verbose);
    terse = new BooleanArgument(null, "terse", 1, INFO_LDAPCOMPARE_ARG_DESCRIPTION_TERSE.get());
    terse.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_OUTPUT.get());
    parser.addArgument(terse);
    useCompareResultCodeAsExitCode = new BooleanArgument(null, "useCompareResultCodeAsExitCode", 1, INFO_LDAPCOMPARE_ARG_DESC_USE_COMPARE_RESULT_CODE_AS_EXIT_CODE.get());
    useCompareResultCodeAsExitCode.addLongIdentifier("use-compare-result-code-as-exit-code", true);
    useCompareResultCodeAsExitCode.addLongIdentifier("useCompareResultCode", true);
    useCompareResultCodeAsExitCode.addLongIdentifier("use-compare-result-code", true);
    useCompareResultCodeAsExitCode.setArgumentGroupName(INFO_LDAPCOMPARE_ARG_GROUP_OUTPUT.get());
    parser.addArgument(useCompareResultCodeAsExitCode);
    parser.addExclusiveArgumentSet(dnFile, assertionFile);
    parser.addExclusiveArgumentSet(proxyAs, proxyV1As);
    parser.addDependentArgumentSet(teeOutput, outputFile);
    parser.addExclusiveArgumentSet(verbose, terse);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument) DNArgument(com.unboundid.util.args.DNArgument) FilterArgument(com.unboundid.util.args.FilterArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) FileArgument(com.unboundid.util.args.FileArgument) StringArgument(com.unboundid.util.args.StringArgument)

Example 13 with FilterArgument

use of com.unboundid.util.args.FilterArgument 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 14 with FilterArgument

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

the class ManageAccount method addNonLDAPArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    // Get a copy of the argument parser for later use.
    this.parser = parser;
    // Get the current time formatted as a generalized time.
    final String currentGeneralizedTime = StaticUtils.encodeGeneralizedTime(System.currentTimeMillis());
    final String olderGeneralizedTime = StaticUtils.encodeGeneralizedTime(System.currentTimeMillis() - 12_345L);
    // Define the global arguments used to indicate which users to target.
    final DNArgument targetDN = new DNArgument('b', ARG_TARGET_DN, false, 0, null, INFO_MANAGE_ACCT_ARG_DESC_TARGET_DN.get());
    targetDN.addLongIdentifier("userDN", true);
    targetDN.addLongIdentifier("target-dn", true);
    targetDN.addLongIdentifier("user-dn", true);
    targetDN.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(targetDN);
    final FileArgument dnInputFile = new FileArgument(null, ARG_DN_INPUT_FILE, false, 0, null, INFO_MANAGE_ACCT_ARG_DESC_DN_FILE.get(), true, true, true, false);
    dnInputFile.addLongIdentifier("targetDNFile", true);
    dnInputFile.addLongIdentifier("userDNFile", true);
    dnInputFile.addLongIdentifier("dn-input-file", true);
    dnInputFile.addLongIdentifier("target-dn-file", true);
    dnInputFile.addLongIdentifier("user-dn-file", true);
    dnInputFile.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(dnInputFile);
    final FilterArgument targetFilter = new FilterArgument(null, ARG_TARGET_FILTER, false, 0, null, INFO_MANAGE_ACCT_ARG_DESC_TARGET_FILTER.get(ARG_BASE_DN));
    targetFilter.addLongIdentifier("target-filter", true);
    targetFilter.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(targetFilter);
    final FileArgument filterInputFile = new FileArgument(null, ARG_FILTER_INPUT_FILE, false, 0, null, INFO_MANAGE_ACCT_ARG_DESC_FILTER_INPUT_FILE.get(ARG_BASE_DN), true, true, true, false);
    filterInputFile.addLongIdentifier("targetFilterFile", true);
    filterInputFile.addLongIdentifier("filter-input-file", true);
    filterInputFile.addLongIdentifier("target-filter-file", true);
    filterInputFile.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(filterInputFile);
    final StringArgument targetUserID = new StringArgument(null, ARG_TARGET_USER_ID, false, 0, null, INFO_MANAGE_ACCT_ARG_DESC_TARGET_USER_ID.get(ARG_BASE_DN, ARG_USER_ID_ATTRIBUTE));
    targetUserID.addLongIdentifier("userID", true);
    targetUserID.addLongIdentifier("target-user-id", true);
    targetUserID.addLongIdentifier("user-id", true);
    targetUserID.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(targetUserID);
    final FileArgument userIDInputFile = new FileArgument(null, ARG_USER_ID_INPUT_FILE, false, 0, null, INFO_MANAGE_ACCT_ARG_DESC_USER_ID_INPUT_FILE.get(ARG_BASE_DN, ARG_USER_ID_ATTRIBUTE), true, true, true, false);
    userIDInputFile.addLongIdentifier("targetUserIDFile", true);
    userIDInputFile.addLongIdentifier("user-id-input-file", true);
    userIDInputFile.addLongIdentifier("target-user-id-file", true);
    userIDInputFile.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(userIDInputFile);
    final StringArgument userIDAttribute = new StringArgument(null, ARG_USER_ID_ATTRIBUTE, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_USER_ID_ATTR.get(ARG_TARGET_USER_ID, ARG_USER_ID_INPUT_FILE, DEFAULT_USER_ID_ATTRIBUTE), DEFAULT_USER_ID_ATTRIBUTE);
    userIDAttribute.addLongIdentifier("user-id-attribute", true);
    userIDAttribute.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(userIDAttribute);
    final DNArgument baseDN = new DNArgument(null, ARG_BASE_DN, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_BASE_DN.get(ARG_TARGET_FILTER, ARG_FILTER_INPUT_FILE, ARG_TARGET_USER_ID, ARG_USER_ID_INPUT_FILE), DEFAULT_BASE_DN);
    baseDN.addLongIdentifier("base-dn", true);
    baseDN.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get());
    parser.addArgument(baseDN);
    final IntegerArgument simplePageSize = new IntegerArgument('z', ARG_SIMPLE_PAGE_SIZE, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_SIMPLE_PAGE_SIZE.get(getToolName()), 1, Integer.MAX_VALUE);
    simplePageSize.addLongIdentifier("simple-page-size", true);
    simplePageSize.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_TARGET_USER_ARGS.get(getToolName()));
    parser.addArgument(simplePageSize);
    // Ensure that the user will be required ot provide at least one of the
    // arguments to specify which users to target.
    parser.addRequiredArgumentSet(targetDN, dnInputFile, targetFilter, filterInputFile, targetUserID, userIDInputFile);
    // Define the global arguments used to control the amount of load the tool
    // should be permitted to generate.
    final IntegerArgument numThreads = new IntegerArgument('t', ARG_NUM_THREADS, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_NUM_THREADS.get(getToolName()), 1, Integer.MAX_VALUE, 1);
    numThreads.addLongIdentifier("num-threads", true);
    numThreads.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_PERFORMANCE.get());
    parser.addArgument(numThreads);
    final IntegerArgument numSearchThreads = new IntegerArgument(null, ARG_NUM_SEARCH_THREADS, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_NUM_SEARCH_THREADS.get(getToolName()), 1, Integer.MAX_VALUE, 1);
    numSearchThreads.addLongIdentifier("num-search-threads", true);
    numSearchThreads.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_PERFORMANCE.get());
    parser.addArgument(numSearchThreads);
    final IntegerArgument ratePerSecond = new IntegerArgument('r', ARG_RATE_PER_SECOND, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_RATE_PER_SECOND.get(ARG_VARIABLE_RATE_DATA), 1, Integer.MAX_VALUE);
    ratePerSecond.addLongIdentifier("rate-per-second", true);
    ratePerSecond.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_PERFORMANCE.get());
    parser.addArgument(ratePerSecond);
    final FileArgument variableRateData = new FileArgument(null, ARG_VARIABLE_RATE_DATA, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_VARIABLE_RATE_DATA.get(ARG_RATE_PER_SECOND), true, true, true, false);
    variableRateData.addLongIdentifier("variable-rate-data", true);
    variableRateData.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_PERFORMANCE.get());
    parser.addArgument(variableRateData);
    final FileArgument generateSampleRateFile = new FileArgument(null, ARG_GENERATE_SAMPLE_RATE_FILE, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_GENERATE_SAMPLE_RATE_FILE.get(ARG_VARIABLE_RATE_DATA), false, true, true, false);
    generateSampleRateFile.addLongIdentifier("generate-sample-rate-file", true);
    generateSampleRateFile.setArgumentGroupName(INFO_MANAGE_ACCT_ARG_GROUP_PERFORMANCE.get());
    generateSampleRateFile.setUsageArgument(true);
    parser.addArgument(generateSampleRateFile);
    // Define the global arguments tht pertain to the reject file.
    final FileArgument rejectFile = new FileArgument('R', ARG_REJECT_FILE, false, 1, null, INFO_MANAGE_ACCT_ARG_DESC_REJECT_FILE.get(), false, true, true, false);
    rejectFile.addLongIdentifier("reject-file", true);
    parser.addArgument(rejectFile);
    final BooleanArgument appendToRejectFile = new BooleanArgument(null, ARG_APPEND_TO_REJECT_FILE, 1, INFO_MANAGE_ACCT_ARG_DESC_APPEND_TO_REJECT_FILE.get(rejectFile.getIdentifierString()));
    appendToRejectFile.addLongIdentifier("append-to-reject-file", true);
    parser.addArgument(appendToRejectFile);
    parser.addDependentArgumentSet(appendToRejectFile, rejectFile);
    // Define the argument used to suppress result operations without values.
    final BooleanArgument suppressEmptyResultOperations = new BooleanArgument(null, ARG_SUPPRESS_EMPTY_RESULT_OPERATIONS, 1, INFO_MANAGE_ACCT_ARG_DESC_SUPPRESS_EMPTY_RESULT_OPERATIONS.get(getToolName()));
    parser.addArgument(suppressEmptyResultOperations);
    // Define the subcommand used to retrieve all state information for a user.
    createSubCommand(ManageAccountSubCommandType.GET_ALL, INFO_MANAGE_ACCT_SC_GET_ALL_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand used to retrieve the password policy DN for a user.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_POLICY_DN, INFO_MANAGE_ACCT_SC_GET_POLICY_DN_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether the account is usable.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_USABLE, INFO_MANAGE_ACCT_SC_GET_IS_USABLE_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the set of password policy state
    // account usability notice messages.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_USABILITY_NOTICES, INFO_MANAGE_ACCT_SC_GET_USABILITY_NOTICES_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the set of password policy state
    // account usability warning messages.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_USABILITY_WARNINGS, INFO_MANAGE_ACCT_SC_GET_USABILITY_WARNINGS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the set of password policy state
    // account usability error messages.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_USABILITY_ERRORS, INFO_MANAGE_ACCT_SC_GET_USABILITY_ERRORS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the password changed time for a user.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_CHANGED_TIME, INFO_MANAGE_ACCT_SC_GET_PW_CHANGED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set the password changed time for a user.
    final ArgumentParser setPWChangedTimeParser = createSubCommandParser(ManageAccountSubCommandType.SET_PASSWORD_CHANGED_TIME);
    final TimestampArgument setPWChangedTimeValueArg = new TimestampArgument('O', "passwordChangedTime", false, 1, null, INFO_MANAGE_ACCT_SC_SET_PW_CHANGED_TIME_ARG_VALUE.get());
    setPWChangedTimeValueArg.addLongIdentifier("operationValue", true);
    setPWChangedTimeValueArg.addLongIdentifier("password-changed-time", true);
    setPWChangedTimeValueArg.addLongIdentifier("operation-value", true);
    setPWChangedTimeParser.addArgument(setPWChangedTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_PASSWORD_CHANGED_TIME, setPWChangedTimeParser, createSubCommandExample(ManageAccountSubCommandType.SET_PASSWORD_CHANGED_TIME, INFO_MANAGE_ACCT_SC_SET_PW_CHANGED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, currentGeneralizedTime), "--passwordChangedTime", currentGeneralizedTime));
    // Define the subcommand to clear the password changed time for a user.
    createSubCommand(ManageAccountSubCommandType.CLEAR_PASSWORD_CHANGED_TIME, INFO_MANAGE_ACCT_SC_CLEAR_PW_CHANGED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user account is disabled.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_DISABLED, INFO_MANAGE_ACCT_SC_GET_IS_DISABLED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to specify whether a user's account is disabled.
    final ArgumentParser setAcctDisabledParser = createSubCommandParser(ManageAccountSubCommandType.SET_ACCOUNT_IS_DISABLED);
    final BooleanValueArgument setAcctDisabledValueArg = new BooleanValueArgument('O', "accountIsDisabled", true, null, INFO_MANAGE_ACCT_SC_SET_IS_DISABLED_ARG_VALUE.get());
    setAcctDisabledValueArg.addLongIdentifier("operationValue", true);
    setAcctDisabledValueArg.addLongIdentifier("account-is-disabled", true);
    setAcctDisabledValueArg.addLongIdentifier("operation-value", true);
    setAcctDisabledParser.addArgument(setAcctDisabledValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_ACCOUNT_IS_DISABLED, setAcctDisabledParser, createSubCommandExample(ManageAccountSubCommandType.SET_ACCOUNT_IS_DISABLED, INFO_MANAGE_ACCT_SC_SET_IS_DISABLED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN), "--accountIsDisabled", "true"));
    // Define the subcommand to clear the account disabled state.
    createSubCommand(ManageAccountSubCommandType.CLEAR_ACCOUNT_IS_DISABLED, INFO_MANAGE_ACCT_SC_CLEAR_IS_DISABLED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the account activation time for a user.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_ACTIVATION_TIME, INFO_MANAGE_ACCT_SC_GET_ACCT_ACT_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set the account activation time for a user.
    final ArgumentParser setAcctActivationTimeParser = createSubCommandParser(ManageAccountSubCommandType.SET_ACCOUNT_ACTIVATION_TIME);
    final TimestampArgument setAcctActivationTimeValueArg = new TimestampArgument('O', "accountActivationTime", false, 1, null, INFO_MANAGE_ACCT_SC_SET_ACCT_ACT_TIME_ARG_VALUE.get());
    setAcctActivationTimeValueArg.addLongIdentifier("operationValue", true);
    setAcctActivationTimeValueArg.addLongIdentifier("account-activation-time", true);
    setAcctActivationTimeValueArg.addLongIdentifier("operation-value", true);
    setAcctActivationTimeParser.addArgument(setAcctActivationTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_ACCOUNT_ACTIVATION_TIME, setAcctActivationTimeParser, createSubCommandExample(ManageAccountSubCommandType.SET_ACCOUNT_ACTIVATION_TIME, INFO_MANAGE_ACCT_SC_SET_ACCT_ACT_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, currentGeneralizedTime), "--accountActivationTime", currentGeneralizedTime));
    // Define the subcommand to clear the account activation time for a user.
    createSubCommand(ManageAccountSubCommandType.CLEAR_ACCOUNT_ACTIVATION_TIME, INFO_MANAGE_ACCT_SC_CLEAR_ACCT_ACT_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the length of time until a user's
    // account is activated.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_ACCOUNT_ACTIVATION, INFO_MANAGE_ACCT_SC_GET_SECONDS_UNTIL_ACCT_ACT_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user's account is not yet
    // active.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_NOT_YET_ACTIVE, INFO_MANAGE_ACCT_SC_GET_ACCT_NOT_YET_ACTIVE_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the account expiration time for a user.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_EXPIRATION_TIME, INFO_MANAGE_ACCT_SC_GET_ACCT_EXP_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set the account expiration time for a user.
    final ArgumentParser setAcctExpirationTimeParser = createSubCommandParser(ManageAccountSubCommandType.SET_ACCOUNT_EXPIRATION_TIME);
    final TimestampArgument setAcctExpirationTimeValueArg = new TimestampArgument('O', "accountExpirationTime", false, 1, null, INFO_MANAGE_ACCT_SC_SET_ACCT_EXP_TIME_ARG_VALUE.get());
    setAcctExpirationTimeValueArg.addLongIdentifier("operationValue", true);
    setAcctExpirationTimeValueArg.addLongIdentifier("account-expiration-time", true);
    setAcctExpirationTimeValueArg.addLongIdentifier("operation-value", true);
    setAcctExpirationTimeParser.addArgument(setAcctExpirationTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_ACCOUNT_EXPIRATION_TIME, setAcctExpirationTimeParser, createSubCommandExample(ManageAccountSubCommandType.SET_ACCOUNT_EXPIRATION_TIME, INFO_MANAGE_ACCT_SC_SET_ACCT_EXP_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, currentGeneralizedTime), "--accountExpirationTime", currentGeneralizedTime));
    // Define the subcommand to clear the account expiration time for a user.
    createSubCommand(ManageAccountSubCommandType.CLEAR_ACCOUNT_EXPIRATION_TIME, INFO_MANAGE_ACCT_SC_CLEAR_ACCT_EXP_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the length of time until a user's
    // account is expired.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_ACCOUNT_EXPIRATION, INFO_MANAGE_ACCT_SC_GET_SECONDS_UNTIL_ACCT_EXP_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user's account is expired.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_EXPIRED, INFO_MANAGE_ACCT_SC_GET_ACCT_IS_EXPIRED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve a user's password expiration warned
    // time.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_EXPIRATION_WARNED_TIME, INFO_MANAGE_ACCT_SC_GET_PW_EXP_WARNED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set a user's password expiration warned time.
    final ArgumentParser setPWExpWarnedTimeParser = createSubCommandParser(ManageAccountSubCommandType.SET_PASSWORD_EXPIRATION_WARNED_TIME);
    final TimestampArgument setPWExpWarnedTimeValueArg = new TimestampArgument('O', "passwordExpirationWarnedTime", false, 1, null, INFO_MANAGE_ACCT_SC_SET_PW_EXP_WARNED_TIME_ARG_VALUE.get());
    setPWExpWarnedTimeValueArg.addLongIdentifier("operationValue", true);
    setPWExpWarnedTimeValueArg.addLongIdentifier("password-expiration-warned-time", true);
    setPWExpWarnedTimeValueArg.addLongIdentifier("operation-value", true);
    setPWExpWarnedTimeParser.addArgument(setPWExpWarnedTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_PASSWORD_EXPIRATION_WARNED_TIME, setPWExpWarnedTimeParser, createSubCommandExample(ManageAccountSubCommandType.SET_PASSWORD_EXPIRATION_WARNED_TIME, INFO_MANAGE_ACCT_SC_SET_PW_EXP_WARNED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, currentGeneralizedTime), "--passwordExpirationWarnedTime", currentGeneralizedTime));
    // Define the subcommand to clear a user's password expiration warned time.
    createSubCommand(ManageAccountSubCommandType.CLEAR_PASSWORD_EXPIRATION_WARNED_TIME, INFO_MANAGE_ACCT_SC_CLEAR_PW_EXP_WARNED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the number of seconds until a user is
    // eligible to receive a password expiration warning.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_PASSWORD_EXPIRATION_WARNING, INFO_MANAGE_ACCT_SC_GET_SECONDS_UNTIL_PW_EXP_WARNING_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve a user's password expiration time.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_EXPIRATION_TIME, INFO_MANAGE_ACCT_SC_GET_PW_EXP_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the number of seconds until a user's
    // password expires.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_PASSWORD_EXPIRATION, INFO_MANAGE_ACCT_SC_GET_SECONDS_UNTIL_PW_EXP_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user's password is expired.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_IS_EXPIRED, INFO_MANAGE_ACCT_SC_GET_PW_IS_EXPIRED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether an account is failure locked.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_FAILURE_LOCKED, INFO_MANAGE_ACCT_SC_GET_ACCT_FAILURE_LOCKED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to specify whether an account is failure locked.
    final ArgumentParser setIsFailureLockedParser = createSubCommandParser(ManageAccountSubCommandType.SET_ACCOUNT_IS_FAILURE_LOCKED);
    final BooleanValueArgument setIsFailureLockedValueArg = new BooleanValueArgument('O', "accountIsFailureLocked", true, null, INFO_MANAGE_ACCT_SC_SET_ACCT_FAILURE_LOCKED_ARG_VALUE.get());
    setIsFailureLockedValueArg.addLongIdentifier("operationValue", true);
    setIsFailureLockedValueArg.addLongIdentifier("account-is-failure-locked", true);
    setIsFailureLockedValueArg.addLongIdentifier("operation-value", true);
    setIsFailureLockedParser.addArgument(setIsFailureLockedValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_ACCOUNT_IS_FAILURE_LOCKED, setIsFailureLockedParser, createSubCommandExample(ManageAccountSubCommandType.SET_ACCOUNT_IS_FAILURE_LOCKED, INFO_MANAGE_ACCT_SC_SET_ACCT_FAILURE_LOCKED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN), "--accountIsFailureLocked", "true"));
    // Define the subcommand to get the time an account was failure locked.
    createSubCommand(ManageAccountSubCommandType.GET_FAILURE_LOCKOUT_TIME, INFO_MANAGE_ACCT_SC_GET_FAILURE_LOCKED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the length of time until a failure-locked
    // account will be automatically unlocked.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_AUTHENTICATION_FAILURE_UNLOCK, INFO_MANAGE_ACCT_SC_GET_SECONDS_UNTIL_FAILURE_UNLOCK_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine the authentication failure times.
    createSubCommand(ManageAccountSubCommandType.GET_AUTHENTICATION_FAILURE_TIMES, INFO_MANAGE_ACCT_SC_GET_AUTH_FAILURE_TIMES_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to add values to the set of authentication failure
    // times.
    final ArgumentParser addAuthFailureTimeParser = createSubCommandParser(ManageAccountSubCommandType.ADD_AUTHENTICATION_FAILURE_TIME);
    final TimestampArgument addAuthFailureTimeValueArg = new TimestampArgument('O', "authenticationFailureTime", false, 0, null, INFO_MANAGE_ACCT_SC_ADD_AUTH_FAILURE_TIME_ARG_VALUE.get());
    addAuthFailureTimeValueArg.addLongIdentifier("operationValue", true);
    addAuthFailureTimeValueArg.addLongIdentifier("authentication-failure-time", true);
    addAuthFailureTimeValueArg.addLongIdentifier("operation-value", true);
    addAuthFailureTimeParser.addArgument(addAuthFailureTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.ADD_AUTHENTICATION_FAILURE_TIME, addAuthFailureTimeParser, createSubCommandExample(ManageAccountSubCommandType.ADD_AUTHENTICATION_FAILURE_TIME, INFO_MANAGE_ACCT_SC_ADD_AUTH_FAILURE_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN)));
    // Define the subcommand to replace the authentication failure times.
    final ArgumentParser setAuthFailureTimesParser = createSubCommandParser(ManageAccountSubCommandType.SET_AUTHENTICATION_FAILURE_TIMES);
    final TimestampArgument setAuthFailureTimesValueArg = new TimestampArgument('O', "authenticationFailureTime", false, 0, null, INFO_MANAGE_ACCT_SC_SET_AUTH_FAILURE_TIMES_ARG_VALUE.get());
    setAuthFailureTimesValueArg.addLongIdentifier("operationValue", true);
    setAuthFailureTimesValueArg.addLongIdentifier("authentication-failure-time", true);
    setAuthFailureTimesValueArg.addLongIdentifier("operation-value", true);
    setAuthFailureTimesParser.addArgument(setAuthFailureTimesValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_AUTHENTICATION_FAILURE_TIMES, setAuthFailureTimesParser, createSubCommandExample(ManageAccountSubCommandType.SET_AUTHENTICATION_FAILURE_TIMES, INFO_MANAGE_ACCT_SC_SET_AUTH_FAILURE_TIMES_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, olderGeneralizedTime, currentGeneralizedTime), "--authenticationFailureTime", olderGeneralizedTime, "--authenticationFailureTime", currentGeneralizedTime));
    // Define the subcommand to clear the authentication failure times.
    createSubCommand(ManageAccountSubCommandType.CLEAR_AUTHENTICATION_FAILURE_TIMES, INFO_MANAGE_ACCT_SC_CLEAR_AUTH_FAILURE_TIMES_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the remaining authentication failure count.
    createSubCommand(ManageAccountSubCommandType.GET_REMAINING_AUTHENTICATION_FAILURE_COUNT, INFO_MANAGE_ACCT_SC_GET_REMAINING_FAILURE_COUNT_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether the account is idle locked.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_IDLE_LOCKED, INFO_MANAGE_ACCT_SC_GET_ACCT_IDLE_LOCKED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the length of time until the account is
    // idle locked.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_IDLE_LOCKOUT, INFO_MANAGE_ACCT_SC_GET_SECONDS_UNTIL_IDLE_LOCKOUT_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the idle lockout time for an account.
    createSubCommand(ManageAccountSubCommandType.GET_IDLE_LOCKOUT_TIME, INFO_MANAGE_ACCT_SC_GET_IDLE_LOCKOUT_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user's password has been
    // reset.
    createSubCommand(ManageAccountSubCommandType.GET_MUST_CHANGE_PASSWORD, INFO_MANAGE_ACCT_SC_GET_MUST_CHANGE_PW_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to specify whether a user's password has been
    // reset.
    final ArgumentParser setPWIsResetParser = createSubCommandParser(ManageAccountSubCommandType.SET_MUST_CHANGE_PASSWORD);
    final BooleanValueArgument setPWIsResetValueArg = new BooleanValueArgument('O', "mustChangePassword", true, null, INFO_MANAGE_ACCT_SC_SET_MUST_CHANGE_PW_ARG_VALUE.get());
    setPWIsResetValueArg.addLongIdentifier("passwordIsReset", true);
    setPWIsResetValueArg.addLongIdentifier("operationValue", true);
    setPWIsResetValueArg.addLongIdentifier("must-change-password", true);
    setPWIsResetValueArg.addLongIdentifier("password-is-reset", true);
    setPWIsResetValueArg.addLongIdentifier("operation-value", true);
    setPWIsResetParser.addArgument(setPWIsResetValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_MUST_CHANGE_PASSWORD, setPWIsResetParser, createSubCommandExample(ManageAccountSubCommandType.SET_MUST_CHANGE_PASSWORD, INFO_MANAGE_ACCT_SC_SET_MUST_CHANGE_PW_EXAMPLE.get(EXAMPLE_TARGET_USER_DN), "--mustChangePassword", "true"));
    // Define the subcommand to clear the password reset state information.
    createSubCommand(ManageAccountSubCommandType.CLEAR_MUST_CHANGE_PASSWORD, INFO_MANAGE_ACCT_SC_CLEAR_MUST_CHANGE_PW_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether the account is reset locked.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_PASSWORD_RESET_LOCKED, INFO_MANAGE_ACCT_SC_GET_ACCT_IS_RESET_LOCKED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the length of time until the password is
    // reset locked.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_PASSWORD_RESET_LOCKOUT, INFO_MANAGE_ACCT_SC_GET_SECONDS_UNTIL_RESET_LOCKOUT_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the password reset lockout time.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_RESET_LOCKOUT_TIME, INFO_MANAGE_ACCT_SC_GET_RESET_LOCKOUT_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the last login time.
    createSubCommand(ManageAccountSubCommandType.GET_LAST_LOGIN_TIME, INFO_MANAGE_ACCT_SC_GET_LAST_LOGIN_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set the last login time.
    final ArgumentParser setLastLoginTimeParser = createSubCommandParser(ManageAccountSubCommandType.SET_LAST_LOGIN_TIME);
    final TimestampArgument setLastLoginTimeValueArg = new TimestampArgument('O', "lastLoginTime", false, 1, null, INFO_MANAGE_ACCT_SC_SET_LAST_LOGIN_TIME_ARG_VALUE.get());
    setLastLoginTimeValueArg.addLongIdentifier("operationValue", true);
    setLastLoginTimeValueArg.addLongIdentifier("last-login-time", true);
    setLastLoginTimeValueArg.addLongIdentifier("operation-value", true);
    setLastLoginTimeParser.addArgument(setLastLoginTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_LAST_LOGIN_TIME, setLastLoginTimeParser, createSubCommandExample(ManageAccountSubCommandType.SET_LAST_LOGIN_TIME, INFO_MANAGE_ACCT_SC_SET_LAST_LOGIN_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, currentGeneralizedTime), "--lastLoginTime", currentGeneralizedTime));
    // Define the subcommand to clear the last login time.
    createSubCommand(ManageAccountSubCommandType.CLEAR_LAST_LOGIN_TIME, INFO_MANAGE_ACCT_SC_CLEAR_LAST_LOGIN_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the last login IP address.
    createSubCommand(ManageAccountSubCommandType.GET_LAST_LOGIN_IP_ADDRESS, INFO_MANAGE_ACCT_SC_GET_LAST_LOGIN_IP_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set the last login IP address.
    final ArgumentParser setLastLoginIPParser = createSubCommandParser(ManageAccountSubCommandType.SET_LAST_LOGIN_IP_ADDRESS);
    final StringArgument setLastLoginIPValueArg = new StringArgument('O', "lastLoginIPAddress", true, 1, null, INFO_MANAGE_ACCT_SC_SET_LAST_LOGIN_IP_ARG_VALUE.get());
    setLastLoginIPValueArg.addLongIdentifier("operationValue", true);
    setLastLoginIPValueArg.addLongIdentifier("last-login-ip-address", true);
    setLastLoginIPValueArg.addLongIdentifier("operation-value", true);
    setLastLoginIPValueArg.addValueValidator(new IPAddressArgumentValueValidator());
    setLastLoginIPParser.addArgument(setLastLoginIPValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_LAST_LOGIN_IP_ADDRESS, setLastLoginIPParser, createSubCommandExample(ManageAccountSubCommandType.SET_LAST_LOGIN_IP_ADDRESS, INFO_MANAGE_ACCT_SC_SET_LAST_LOGIN_IP_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, "1.2.3.4"), "--lastLoginIPAddress", "1.2.3.4"));
    // Define the subcommand to clear the last login IP address.
    createSubCommand(ManageAccountSubCommandType.CLEAR_LAST_LOGIN_IP_ADDRESS, INFO_MANAGE_ACCT_SC_CLEAR_LAST_LOGIN_IP_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the grace login use times.
    createSubCommand(ManageAccountSubCommandType.GET_GRACE_LOGIN_USE_TIMES, INFO_MANAGE_ACCT_SC_GET_GRACE_LOGIN_TIMES_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to add values to the set of grace login use times.
    final ArgumentParser addGraceLoginTimeParser = createSubCommandParser(ManageAccountSubCommandType.ADD_GRACE_LOGIN_USE_TIME);
    final TimestampArgument addGraceLoginTimeValueArg = new TimestampArgument('O', "graceLoginUseTime", false, 0, null, INFO_MANAGE_ACCT_SC_ADD_GRACE_LOGIN_TIME_ARG_VALUE.get());
    addGraceLoginTimeValueArg.addLongIdentifier("operationValue", true);
    addGraceLoginTimeValueArg.addLongIdentifier("grace-login-use-time", true);
    addGraceLoginTimeValueArg.addLongIdentifier("operation-value", true);
    addGraceLoginTimeParser.addArgument(addGraceLoginTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.ADD_GRACE_LOGIN_USE_TIME, addGraceLoginTimeParser, createSubCommandExample(ManageAccountSubCommandType.ADD_GRACE_LOGIN_USE_TIME, INFO_MANAGE_ACCT_SC_ADD_GRACE_LOGIN_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN)));
    // Define the subcommand to replace the set of grace login use times.
    final ArgumentParser setGraceLoginTimesParser = createSubCommandParser(ManageAccountSubCommandType.SET_GRACE_LOGIN_USE_TIMES);
    final TimestampArgument setGraceLoginTimesValueArg = new TimestampArgument('O', "graceLoginUseTime", false, 0, null, INFO_MANAGE_ACCT_SC_SET_GRACE_LOGIN_TIMES_ARG_VALUE.get());
    setGraceLoginTimesValueArg.addLongIdentifier("operationValue", true);
    setGraceLoginTimesValueArg.addLongIdentifier("grace-login-use-time", true);
    setGraceLoginTimesValueArg.addLongIdentifier("operation-value", true);
    setGraceLoginTimesParser.addArgument(setGraceLoginTimesValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_GRACE_LOGIN_USE_TIMES, setGraceLoginTimesParser, createSubCommandExample(ManageAccountSubCommandType.SET_GRACE_LOGIN_USE_TIMES, INFO_MANAGE_ACCT_SC_SET_GRACE_LOGIN_TIMES_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, olderGeneralizedTime, currentGeneralizedTime), "--graceLoginUseTime", olderGeneralizedTime, "--graceLoginUseTime", currentGeneralizedTime));
    // Define the subcommand to clear the grace login use times.
    createSubCommand(ManageAccountSubCommandType.CLEAR_GRACE_LOGIN_USE_TIMES, INFO_MANAGE_ACCT_SC_CLEAR_GRACE_LOGIN_TIMES_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the remaining grace login count.
    createSubCommand(ManageAccountSubCommandType.GET_REMAINING_GRACE_LOGIN_COUNT, INFO_MANAGE_ACCT_SC_GET_REMAINING_GRACE_LOGIN_COUNT_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the password changed by required time value.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_CHANGED_BY_REQUIRED_TIME, INFO_MANAGE_ACCT_SC_GET_PW_CHANGED_BY_REQ_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set the password changed by required time value.
    final ArgumentParser setPWChangedByReqTimeParser = createSubCommandParser(ManageAccountSubCommandType.SET_PASSWORD_CHANGED_BY_REQUIRED_TIME);
    final TimestampArgument setPWChangedByReqTimeValueArg = new TimestampArgument('O', "passwordChangedByRequiredTime", false, 1, null, INFO_MANAGE_ACCT_SC_SET_PW_CHANGED_BY_REQ_TIME_ARG_VALUE.get());
    setPWChangedByReqTimeValueArg.addLongIdentifier("operationValue", true);
    setPWChangedByReqTimeValueArg.addLongIdentifier("password-changed-by-required-time", true);
    setPWChangedByReqTimeValueArg.addLongIdentifier("operation-value", true);
    setPWChangedByReqTimeParser.addArgument(setPWChangedByReqTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_PASSWORD_CHANGED_BY_REQUIRED_TIME, setPWChangedByReqTimeParser, createSubCommandExample(ManageAccountSubCommandType.SET_PASSWORD_CHANGED_BY_REQUIRED_TIME, INFO_MANAGE_ACCT_SC_SET_PW_CHANGED_BY_REQ_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN)));
    // Define the subcommand to clear the password changed by required time
    // value.
    createSubCommand(ManageAccountSubCommandType.CLEAR_PASSWORD_CHANGED_BY_REQUIRED_TIME, INFO_MANAGE_ACCT_SC_CLEAR_PW_CHANGED_BY_REQ_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the length of time until the required change
    // time.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_UNTIL_REQUIRED_PASSWORD_CHANGE_TIME, INFO_MANAGE_ACCT_SC_GET_SECS_UNTIL_REQ_CHANGE_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the password history count.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_HISTORY_COUNT, INFO_MANAGE_ACCT_SC_GET_PW_HISTORY_COUNT_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to clear a user's password history.
    createSubCommand(ManageAccountSubCommandType.CLEAR_PASSWORD_HISTORY, INFO_MANAGE_ACCT_SC_CLEAR_PW_HISTORY_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user has a retired password.
    createSubCommand(ManageAccountSubCommandType.GET_HAS_RETIRED_PASSWORD, INFO_MANAGE_ACCT_SC_GET_HAS_RETIRED_PW_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the time that a user's former password
    // was retired.
    createSubCommand(ManageAccountSubCommandType.GET_PASSWORD_RETIRED_TIME, INFO_MANAGE_ACCT_SC_GET_PW_RETIRED_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the retired password expiration time.
    createSubCommand(ManageAccountSubCommandType.GET_RETIRED_PASSWORD_EXPIRATION_TIME, INFO_MANAGE_ACCT_SC_GET_RETIRED_PW_EXP_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to purge a retired password.
    createSubCommand(ManageAccountSubCommandType.CLEAR_RETIRED_PASSWORD, INFO_MANAGE_ACCT_SC_PURGE_RETIRED_PW_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the available SASL mechanisms for a user.
    createSubCommand(ManageAccountSubCommandType.GET_AVAILABLE_SASL_MECHANISMS, INFO_MANAGE_ACCT_SC_GET_AVAILABLE_SASL_MECHS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the available OTP delivery mechanisms for a
    // user.
    createSubCommand(ManageAccountSubCommandType.GET_AVAILABLE_OTP_DELIVERY_MECHANISMS, INFO_MANAGE_ACCT_SC_GET_AVAILABLE_OTP_MECHS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user has at least one TOTP
    // shared secret.
    createSubCommand(ManageAccountSubCommandType.GET_HAS_TOTP_SHARED_SECRET, INFO_MANAGE_ACCT_SC_GET_HAS_TOTP_SHARED_SECRET_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to add a value to the set of TOTP shared secrets
    // for a user.
    final ArgumentParser addTOTPSharedSecretParser = createSubCommandParser(ManageAccountSubCommandType.ADD_TOTP_SHARED_SECRET);
    final StringArgument addTOTPSharedSecretValueArg = new StringArgument('O', "totpSharedSecret", true, 0, null, INFO_MANAGE_ACCT_SC_ADD_YUBIKEY_ID_ARG_VALUE.get());
    addTOTPSharedSecretValueArg.addLongIdentifier("operationValue", true);
    addTOTPSharedSecretValueArg.addLongIdentifier("totp-shared-secret", true);
    addTOTPSharedSecretValueArg.addLongIdentifier("operation-value", true);
    addTOTPSharedSecretValueArg.setSensitive(true);
    addTOTPSharedSecretParser.addArgument(addTOTPSharedSecretValueArg);
    createSubCommand(ManageAccountSubCommandType.ADD_TOTP_SHARED_SECRET, addTOTPSharedSecretParser, createSubCommandExample(ManageAccountSubCommandType.ADD_TOTP_SHARED_SECRET, INFO_MANAGE_ACCT_SC_ADD_TOTP_SHARED_SECRET_EXAMPLE.get("abcdefghijklmnop", EXAMPLE_TARGET_USER_DN), "--totpSharedSecret", "abcdefghijklmnop"));
    // Define the subcommand to remove a value from the set of TOTP shared
    // secrets for a user.
    final ArgumentParser removeTOTPSharedSecretParser = createSubCommandParser(ManageAccountSubCommandType.REMOVE_TOTP_SHARED_SECRET);
    final StringArgument removeTOTPSharedSecretValueArg = new StringArgument('O', "totpSharedSecret", true, 0, null, INFO_MANAGE_ACCT_SC_REMOVE_YUBIKEY_ID_ARG_VALUE.get());
    removeTOTPSharedSecretValueArg.addLongIdentifier("operationValue", true);
    removeTOTPSharedSecretValueArg.addLongIdentifier("totp-shared-secret", true);
    removeTOTPSharedSecretValueArg.addLongIdentifier("operation-value", true);
    removeTOTPSharedSecretValueArg.setSensitive(true);
    removeTOTPSharedSecretParser.addArgument(removeTOTPSharedSecretValueArg);
    createSubCommand(ManageAccountSubCommandType.REMOVE_TOTP_SHARED_SECRET, removeTOTPSharedSecretParser, createSubCommandExample(ManageAccountSubCommandType.REMOVE_TOTP_SHARED_SECRET, INFO_MANAGE_ACCT_SC_REMOVE_TOTP_SHARED_SECRET_EXAMPLE.get("abcdefghijklmnop", EXAMPLE_TARGET_USER_DN), "--totpSharedSecret", "abcdefghijklmnop"));
    // Define the subcommand to replace set of TOTP shared secrets for a user.
    final ArgumentParser setTOTPSharedSecretsParser = createSubCommandParser(ManageAccountSubCommandType.SET_TOTP_SHARED_SECRETS);
    final StringArgument setTOTPSharedSecretsValueArg = new StringArgument('O', "totpSharedSecret", true, 0, null, INFO_MANAGE_ACCT_SC_SET_TOTP_SHARED_SECRETS_ARG_VALUE.get());
    setTOTPSharedSecretsValueArg.addLongIdentifier("operationValue", true);
    setTOTPSharedSecretsValueArg.addLongIdentifier("totp-shared-secret", true);
    setTOTPSharedSecretsValueArg.addLongIdentifier("operation-value", true);
    setTOTPSharedSecretsValueArg.setSensitive(true);
    setTOTPSharedSecretsParser.addArgument(setTOTPSharedSecretsValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_TOTP_SHARED_SECRETS, setTOTPSharedSecretsParser, createSubCommandExample(ManageAccountSubCommandType.SET_TOTP_SHARED_SECRETS, INFO_MANAGE_ACCT_SC_SET_TOTP_SHARED_SECRETS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, "abcdefghijklmnop"), "--totpSharedSecret", "abcdefghijklmnop"));
    // Define the subcommand to clear the set of TOTP shared secrets for a user.
    createSubCommand(ManageAccountSubCommandType.CLEAR_TOTP_SHARED_SECRETS, INFO_MANAGE_ACCT_SC_CLEAR_TOTP_SHARED_SECRETS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user has at least one
    // registered YubiKey OTP device public ID.
    createSubCommand(ManageAccountSubCommandType.GET_HAS_REGISTERED_YUBIKEY_PUBLIC_ID, INFO_MANAGE_ACCT_SC_GET_HAS_YUBIKEY_ID_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to get the set of registered YubiKey OTP device
    // public IDs for a user.
    createSubCommand(ManageAccountSubCommandType.GET_REGISTERED_YUBIKEY_PUBLIC_IDS, INFO_MANAGE_ACCT_SC_GET_YUBIKEY_IDS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to add a value to the set of registered YubiKey OTP
    // device public IDs for a user.
    final ArgumentParser addRegisteredYubiKeyPublicIDParser = createSubCommandParser(ManageAccountSubCommandType.ADD_REGISTERED_YUBIKEY_PUBLIC_ID);
    final StringArgument addRegisteredYubiKeyPublicIDValueArg = new StringArgument('O', "publicID", true, 0, null, INFO_MANAGE_ACCT_SC_ADD_YUBIKEY_ID_ARG_VALUE.get());
    addRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("operationValue", true);
    addRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("public-id", true);
    addRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("operation-value", true);
    addRegisteredYubiKeyPublicIDParser.addArgument(addRegisteredYubiKeyPublicIDValueArg);
    createSubCommand(ManageAccountSubCommandType.ADD_REGISTERED_YUBIKEY_PUBLIC_ID, addRegisteredYubiKeyPublicIDParser, createSubCommandExample(ManageAccountSubCommandType.ADD_REGISTERED_YUBIKEY_PUBLIC_ID, INFO_MANAGE_ACCT_SC_ADD_YUBIKEY_ID_EXAMPLE.get("abcdefghijkl", EXAMPLE_TARGET_USER_DN), "--publicID", "abcdefghijkl"));
    // Define the subcommand to remove a value from the set of registered
    // YubiKey OTP device public IDs for a user.
    final ArgumentParser removeRegisteredYubiKeyPublicIDParser = createSubCommandParser(ManageAccountSubCommandType.REMOVE_REGISTERED_YUBIKEY_PUBLIC_ID);
    final StringArgument removeRegisteredYubiKeyPublicIDValueArg = new StringArgument('O', "publicID", true, 0, null, INFO_MANAGE_ACCT_SC_REMOVE_YUBIKEY_ID_ARG_VALUE.get());
    removeRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("operationValue", true);
    removeRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("public-id", true);
    removeRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("operation-value", true);
    removeRegisteredYubiKeyPublicIDParser.addArgument(removeRegisteredYubiKeyPublicIDValueArg);
    createSubCommand(ManageAccountSubCommandType.REMOVE_REGISTERED_YUBIKEY_PUBLIC_ID, removeRegisteredYubiKeyPublicIDParser, createSubCommandExample(ManageAccountSubCommandType.REMOVE_REGISTERED_YUBIKEY_PUBLIC_ID, INFO_MANAGE_ACCT_SC_REMOVE_YUBIKEY_ID_EXAMPLE.get("abcdefghijkl", EXAMPLE_TARGET_USER_DN), "--publicID", "abcdefghijkl"));
    // Define the subcommand to replace set of registered YubiKey OTP device
    // public IDs for a user.
    final ArgumentParser setRegisteredYubiKeyPublicIDParser = createSubCommandParser(ManageAccountSubCommandType.SET_REGISTERED_YUBIKEY_PUBLIC_IDS);
    final StringArgument setRegisteredYubiKeyPublicIDValueArg = new StringArgument('O', "publicID", true, 0, null, INFO_MANAGE_ACCT_SC_SET_YUBIKEY_IDS_ARG_VALUE.get());
    setRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("operationValue", true);
    setRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("public-id", true);
    setRegisteredYubiKeyPublicIDValueArg.addLongIdentifier("operation-value", true);
    setRegisteredYubiKeyPublicIDParser.addArgument(setRegisteredYubiKeyPublicIDValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_REGISTERED_YUBIKEY_PUBLIC_IDS, setRegisteredYubiKeyPublicIDParser, createSubCommandExample(ManageAccountSubCommandType.SET_REGISTERED_YUBIKEY_PUBLIC_IDS, INFO_MANAGE_ACCT_SC_SET_YUBIKEY_IDS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, "abcdefghijkl"), "--publicID", "abcdefghijkl"));
    // Define the subcommand to clear the set of registered YubiKey OTP device
    // public IDs for a user.
    createSubCommand(ManageAccountSubCommandType.CLEAR_REGISTERED_YUBIKEY_PUBLIC_IDS, INFO_MANAGE_ACCT_SC_CLEAR_YUBIKEY_IDS_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether a user has at least one static
    // password.
    createSubCommand(ManageAccountSubCommandType.GET_HAS_STATIC_PASSWORD, INFO_MANAGE_ACCT_SC_GET_HAS_STATIC_PW_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the last bind password validation time
    // for a user.
    createSubCommand(ManageAccountSubCommandType.GET_LAST_BIND_PASSWORD_VALIDATION_TIME, INFO_MANAGE_ACCT_SC_GET_LAST_BIND_PW_VALIDATION_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve the length of time since the last bind
    // password validation for a user.
    createSubCommand(ManageAccountSubCommandType.GET_SECONDS_SINCE_LAST_BIND_PASSWORD_VALIDATION, INFO_MANAGE_ACCT_SC_GET_SECS_SINCE_LAST_BIND_PW_VALIDATION_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to set the last bind password validation time for a
    // user.
    final ArgumentParser setLastBindPasswordValidationTimeParser = createSubCommandParser(ManageAccountSubCommandType.SET_LAST_BIND_PASSWORD_VALIDATION_TIME);
    final TimestampArgument setLastBindPasswordValidationTimeValueArg = new TimestampArgument('O', "validationTime", false, 1, null, INFO_MANAGE_ACCT_SC_SET_LAST_BIND_PW_VALIDATION_TIME_ARG_VALUE.get());
    setLastBindPasswordValidationTimeValueArg.addLongIdentifier("operationValue", true);
    setLastBindPasswordValidationTimeValueArg.addLongIdentifier("validation-time", true);
    setLastBindPasswordValidationTimeValueArg.addLongIdentifier("operation-value", true);
    setLastBindPasswordValidationTimeParser.addArgument(setLastBindPasswordValidationTimeValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_LAST_BIND_PASSWORD_VALIDATION_TIME, setLastBindPasswordValidationTimeParser, createSubCommandExample(ManageAccountSubCommandType.SET_LAST_BIND_PASSWORD_VALIDATION_TIME, INFO_MANAGE_ACCT_SC_SET_LAST_BIND_PW_VALIDATION_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN, currentGeneralizedTime), "--validationTime", currentGeneralizedTime));
    // Define the subcommand to clear the last bind password validation time for
    // a user.
    createSubCommand(ManageAccountSubCommandType.CLEAR_LAST_BIND_PASSWORD_VALIDATION_TIME, INFO_MANAGE_ACCT_SC_CLEAR_LAST_BIND_PW_VALIDATION_TIME_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to determine whether an account is locked because
    // it contains a password that does not satisfy all of the configured
    // password validators.
    createSubCommand(ManageAccountSubCommandType.GET_ACCOUNT_IS_VALIDATION_LOCKED, INFO_MANAGE_ACCT_SC_GET_ACCT_VALIDATION_LOCKED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to specify whether an account is locked because it
    // contains a password that does not satisfy all of the configured password
    // validators.
    final ArgumentParser setIsValidationLockedParser = createSubCommandParser(ManageAccountSubCommandType.SET_ACCOUNT_IS_VALIDATION_LOCKED);
    final BooleanValueArgument setIsValidationLockedValueArg = new BooleanValueArgument('O', "accountIsValidationLocked", true, null, INFO_MANAGE_ACCT_SC_SET_ACCT_VALIDATION_LOCKED_ARG_VALUE.get());
    setIsValidationLockedValueArg.addLongIdentifier("operationValue", true);
    setIsValidationLockedValueArg.addLongIdentifier("account-is-validation-locked", true);
    setIsValidationLockedValueArg.addLongIdentifier("operation-value", true);
    setIsValidationLockedParser.addArgument(setIsValidationLockedValueArg);
    createSubCommand(ManageAccountSubCommandType.SET_ACCOUNT_IS_VALIDATION_LOCKED, setIsValidationLockedParser, createSubCommandExample(ManageAccountSubCommandType.SET_ACCOUNT_IS_VALIDATION_LOCKED, INFO_MANAGE_ACCT_SC_SET_ACCT_VALIDATION_LOCKED_EXAMPLE.get(EXAMPLE_TARGET_USER_DN), "--accountIsValidationLocked", "true"));
    // Define the subcommand to retrieve a user's recent login history.
    createSubCommand(ManageAccountSubCommandType.GET_RECENT_LOGIN_HISTORY, INFO_MANAGE_ACCT_SC_GET_RECENT_LOGIN_HISTORY_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
    // Define the subcommand to retrieve a user's recent login history.
    createSubCommand(ManageAccountSubCommandType.CLEAR_RECENT_LOGIN_HISTORY, INFO_MANAGE_ACCT_SC_CLEAR_RECENT_LOGIN_HISTORY_EXAMPLE.get(EXAMPLE_TARGET_USER_DN));
}
Also used : DNArgument(com.unboundid.util.args.DNArgument) IPAddressArgumentValueValidator(com.unboundid.util.args.IPAddressArgumentValueValidator) FilterArgument(com.unboundid.util.args.FilterArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) FileArgument(com.unboundid.util.args.FileArgument) TimestampArgument(com.unboundid.util.args.TimestampArgument) BooleanValueArgument(com.unboundid.util.args.BooleanValueArgument) ArgumentParser(com.unboundid.util.args.ArgumentParser) StringArgument(com.unboundid.util.args.StringArgument)

Example 15 with FilterArgument

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

the class SplitLDIF method addToolArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addToolArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    // Add the global arguments.
    sourceLDIF = new FileArgument('l', "sourceLDIF", true, 0, null, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_SOURCE_LDIF.get(), true, false, true, false);
    sourceLDIF.addLongIdentifier("inputLDIF", true);
    sourceLDIF.addLongIdentifier("source-ldif", true);
    sourceLDIF.addLongIdentifier("input-ldif", true);
    parser.addArgument(sourceLDIF);
    sourceCompressed = new BooleanArgument('C', "sourceCompressed", INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_SOURCE_COMPRESSED.get());
    sourceCompressed.addLongIdentifier("inputCompressed", true);
    sourceCompressed.addLongIdentifier("source-compressed", true);
    sourceCompressed.addLongIdentifier("input-compressed", true);
    parser.addArgument(sourceCompressed);
    targetLDIFBasePath = new FileArgument('o', "targetLDIFBasePath", false, 1, null, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_TARGET_LDIF_BASE.get(), false, true, true, false);
    targetLDIFBasePath.addLongIdentifier("outputLDIFBasePath", true);
    targetLDIFBasePath.addLongIdentifier("target-ldif-base-path", true);
    targetLDIFBasePath.addLongIdentifier("output-ldif-base-path", true);
    parser.addArgument(targetLDIFBasePath);
    compressTarget = new BooleanArgument('c', "compressTarget", INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_COMPRESS_TARGET.get());
    compressTarget.addLongIdentifier("compressOutput", true);
    compressTarget.addLongIdentifier("compress", true);
    compressTarget.addLongIdentifier("compress-target", true);
    compressTarget.addLongIdentifier("compress-output", true);
    parser.addArgument(compressTarget);
    encryptTarget = new BooleanArgument(null, "encryptTarget", INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_ENCRYPT_TARGET.get());
    encryptTarget.addLongIdentifier("encryptOutput", true);
    encryptTarget.addLongIdentifier("encrypt", true);
    encryptTarget.addLongIdentifier("encrypt-target", true);
    encryptTarget.addLongIdentifier("encrypt-output", true);
    parser.addArgument(encryptTarget);
    encryptionPassphraseFile = new FileArgument(null, "encryptionPassphraseFile", false, 1, null, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_ENCRYPT_PW_FILE.get(), true, true, true, false);
    encryptionPassphraseFile.addLongIdentifier("encryptionPasswordFile", true);
    encryptionPassphraseFile.addLongIdentifier("encryption-passphrase-file", true);
    encryptionPassphraseFile.addLongIdentifier("encryption-password-file", true);
    parser.addArgument(encryptionPassphraseFile);
    splitBaseDN = new DNArgument('b', "splitBaseDN", true, 1, null, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_SPLIT_BASE_DN.get());
    splitBaseDN.addLongIdentifier("baseDN", true);
    splitBaseDN.addLongIdentifier("split-base-dn", true);
    splitBaseDN.addLongIdentifier("base-dn", true);
    parser.addArgument(splitBaseDN);
    addEntriesOutsideSplitBaseDNToAllSets = new BooleanArgument(null, "addEntriesOutsideSplitBaseDNToAllSets", 1, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_OUTSIDE_TO_ALL_SETS.get());
    addEntriesOutsideSplitBaseDNToAllSets.addLongIdentifier("add-entries-outside-split-base-dn-to-all-sets", true);
    parser.addArgument(addEntriesOutsideSplitBaseDNToAllSets);
    addEntriesOutsideSplitBaseDNToDedicatedSet = new BooleanArgument(null, "addEntriesOutsideSplitBaseDNToDedicatedSet", 1, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_OUTSIDE_TO_DEDICATED_SET.get());
    addEntriesOutsideSplitBaseDNToDedicatedSet.addLongIdentifier("add-entries-outside-split-base-dn-to-dedicated-set", true);
    parser.addArgument(addEntriesOutsideSplitBaseDNToDedicatedSet);
    schemaPath = new FileArgument(null, "schemaPath", false, 0, null, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_SCHEMA_PATH.get(), true, false, false, false);
    schemaPath.addLongIdentifier("schemaFile", true);
    schemaPath.addLongIdentifier("schemaDirectory", true);
    schemaPath.addLongIdentifier("schema-path", true);
    schemaPath.addLongIdentifier("schema-file", true);
    schemaPath.addLongIdentifier("schema-directory", true);
    parser.addArgument(schemaPath);
    numThreads = new IntegerArgument('t', "numThreads", false, 1, null, INFO_SPLIT_LDIF_GLOBAL_ARG_DESC_NUM_THREADS.get(), 1, Integer.MAX_VALUE, 1);
    numThreads.addLongIdentifier("num-threads", true);
    parser.addArgument(numThreads);
    // Add the subcommand used to split entries using a hash on the RDN.
    final ArgumentParser splitUsingHashOnRDNParser = new ArgumentParser("split-using-hash-on-rdn", INFO_SPLIT_LDIF_SC_HASH_ON_RDN_DESC.get());
    splitUsingHashOnRDNNumSets = new IntegerArgument(null, "numSets", true, 1, null, INFO_SPLIT_LDIF_SC_HASH_ON_RDN_ARG_DESC_NUM_SETS.get(), 2, Integer.MAX_VALUE);
    splitUsingHashOnRDNNumSets.addLongIdentifier("num-sets", true);
    splitUsingHashOnRDNParser.addArgument(splitUsingHashOnRDNNumSets);
    final LinkedHashMap<String[], String> splitUsingHashOnRDNExamples = new LinkedHashMap<>(StaticUtils.computeMapCapacity(1));
    splitUsingHashOnRDNExamples.put(new String[] { "split-using-hash-on-rdn", "--sourceLDIF", "whole.ldif", "--targetLDIFBasePath", "split.ldif", "--splitBaseDN", "ou=People,dc=example,dc=com", "--numSets", "4", "--schemaPath", "config/schema", "--addEntriesOutsideSplitBaseDNToAllSets" }, INFO_SPLIT_LDIF_SC_HASH_ON_RDN_EXAMPLE.get());
    splitUsingHashOnRDN = new SubCommand("split-using-hash-on-rdn", INFO_SPLIT_LDIF_SC_HASH_ON_RDN_DESC.get(), splitUsingHashOnRDNParser, splitUsingHashOnRDNExamples);
    splitUsingHashOnRDN.addName("hash-on-rdn", true);
    parser.addSubCommand(splitUsingHashOnRDN);
    // Add the subcommand used to split entries using a hash on a specified
    // attribute.
    final ArgumentParser splitUsingHashOnAttributeParser = new ArgumentParser("split-using-hash-on-attribute", INFO_SPLIT_LDIF_SC_HASH_ON_ATTR_DESC.get());
    splitUsingHashOnAttributeAttributeName = new StringArgument(null, "attributeName", true, 1, "{attr}", INFO_SPLIT_LDIF_SC_HASH_ON_ATTR_ARG_DESC_ATTR_NAME.get());
    splitUsingHashOnAttributeAttributeName.addLongIdentifier("attribute-name", true);
    splitUsingHashOnAttributeParser.addArgument(splitUsingHashOnAttributeAttributeName);
    splitUsingHashOnAttributeNumSets = new IntegerArgument(null, "numSets", true, 1, null, INFO_SPLIT_LDIF_SC_HASH_ON_ATTR_ARG_DESC_NUM_SETS.get(), 2, Integer.MAX_VALUE);
    splitUsingHashOnAttributeNumSets.addLongIdentifier("num-sets", true);
    splitUsingHashOnAttributeParser.addArgument(splitUsingHashOnAttributeNumSets);
    splitUsingHashOnAttributeUseAllValues = new BooleanArgument(null, "useAllValues", 1, INFO_SPLIT_LDIF_SC_HASH_ON_ATTR_ARG_DESC_ALL_VALUES.get());
    splitUsingHashOnAttributeUseAllValues.addLongIdentifier("use-all-values", true);
    splitUsingHashOnAttributeParser.addArgument(splitUsingHashOnAttributeUseAllValues);
    splitUsingHashOnAttributeAssumeFlatDIT = new BooleanArgument(null, "assumeFlatDIT", 1, INFO_SPLIT_LDIF_SC_HASH_ON_ATTR_ARG_DESC_ASSUME_FLAT_DIT.get());
    splitUsingHashOnAttributeAssumeFlatDIT.addLongIdentifier("assume-flat-dit", true);
    splitUsingHashOnAttributeParser.addArgument(splitUsingHashOnAttributeAssumeFlatDIT);
    final LinkedHashMap<String[], String> splitUsingHashOnAttributeExamples = new LinkedHashMap<>(StaticUtils.computeMapCapacity(1));
    splitUsingHashOnAttributeExamples.put(new String[] { "split-using-hash-on-attribute", "--sourceLDIF", "whole.ldif", "--targetLDIFBasePath", "split.ldif", "--splitBaseDN", "ou=People,dc=example,dc=com", "--attributeName", "uid", "--numSets", "4", "--schemaPath", "config/schema", "--addEntriesOutsideSplitBaseDNToAllSets" }, INFO_SPLIT_LDIF_SC_HASH_ON_ATTR_EXAMPLE.get());
    splitUsingHashOnAttribute = new SubCommand("split-using-hash-on-attribute", INFO_SPLIT_LDIF_SC_HASH_ON_ATTR_DESC.get(), splitUsingHashOnAttributeParser, splitUsingHashOnAttributeExamples);
    splitUsingHashOnAttribute.addName("hash-on-attribute", true);
    parser.addSubCommand(splitUsingHashOnAttribute);
    // Add the subcommand used to split entries by selecting the set with the
    // fewest entries.
    final ArgumentParser splitUsingFewestEntriesParser = new ArgumentParser("split-using-fewest-entries", INFO_SPLIT_LDIF_SC_FEWEST_ENTRIES_DESC.get());
    splitUsingFewestEntriesNumSets = new IntegerArgument(null, "numSets", true, 1, null, INFO_SPLIT_LDIF_SC_FEWEST_ENTRIES_ARG_DESC_NUM_SETS.get(), 2, Integer.MAX_VALUE);
    splitUsingFewestEntriesNumSets.addLongIdentifier("num-sets", true);
    splitUsingFewestEntriesParser.addArgument(splitUsingFewestEntriesNumSets);
    splitUsingFewestEntriesAssumeFlatDIT = new BooleanArgument(null, "assumeFlatDIT", 1, INFO_SPLIT_LDIF_SC_FEWEST_ENTRIES_ARG_DESC_ASSUME_FLAT_DIT.get());
    splitUsingFewestEntriesAssumeFlatDIT.addLongIdentifier("assume-flat-dit", true);
    splitUsingFewestEntriesParser.addArgument(splitUsingFewestEntriesAssumeFlatDIT);
    final LinkedHashMap<String[], String> splitUsingFewestEntriesExamples = new LinkedHashMap<>(StaticUtils.computeMapCapacity(1));
    splitUsingFewestEntriesExamples.put(new String[] { "split-using-fewest-entries", "--sourceLDIF", "whole.ldif", "--targetLDIFBasePath", "split.ldif", "--splitBaseDN", "ou=People,dc=example,dc=com", "--numSets", "4", "--schemaPath", "config/schema", "--addEntriesOutsideSplitBaseDNToAllSets" }, INFO_SPLIT_LDIF_SC_FEWEST_ENTRIES_EXAMPLE.get());
    splitUsingFewestEntries = new SubCommand("split-using-fewest-entries", INFO_SPLIT_LDIF_SC_FEWEST_ENTRIES_DESC.get(), splitUsingFewestEntriesParser, splitUsingFewestEntriesExamples);
    splitUsingFewestEntries.addName("fewest-entries", true);
    parser.addSubCommand(splitUsingFewestEntries);
    // Add the subcommand used to split entries by selecting the set based on a
    // filter.
    final ArgumentParser splitUsingFilterParser = new ArgumentParser("split-using-filter", INFO_SPLIT_LDIF_SC_FILTER_DESC.get());
    splitUsingFilterFilter = new FilterArgument(null, "filter", true, 0, null, INFO_SPLIT_LDIF_SC_FILTER_ARG_DESC_FILTER.get());
    splitUsingFilterParser.addArgument(splitUsingFilterFilter);
    splitUsingFilterAssumeFlatDIT = new BooleanArgument(null, "assumeFlatDIT", 1, INFO_SPLIT_LDIF_SC_FILTER_ARG_DESC_ASSUME_FLAT_DIT.get());
    splitUsingFilterAssumeFlatDIT.addLongIdentifier("assume-flat-dit", true);
    splitUsingFilterParser.addArgument(splitUsingFilterAssumeFlatDIT);
    final LinkedHashMap<String[], String> splitUsingFilterExamples = new LinkedHashMap<>(StaticUtils.computeMapCapacity(1));
    splitUsingFilterExamples.put(new String[] { "split-using-filter", "--sourceLDIF", "whole.ldif", "--targetLDIFBasePath", "split.ldif", "--splitBaseDN", "ou=People,dc=example,dc=com", "--filter", "(timeZone=Eastern)", "--filter", "(timeZone=Central)", "--filter", "(timeZone=Mountain)", "--filter", "(timeZone=Pacific)", "--schemaPath", "config/schema", "--addEntriesOutsideSplitBaseDNToAllSets" }, INFO_SPLIT_LDIF_SC_FILTER_EXAMPLE.get());
    splitUsingFilter = new SubCommand("split-using-filter", INFO_SPLIT_LDIF_SC_FILTER_DESC.get(), splitUsingFilterParser, splitUsingFilterExamples);
    splitUsingFilter.addName("filter", true);
    parser.addSubCommand(splitUsingFilter);
}
Also used : DNArgument(com.unboundid.util.args.DNArgument) SubCommand(com.unboundid.util.args.SubCommand) FilterArgument(com.unboundid.util.args.FilterArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) FileArgument(com.unboundid.util.args.FileArgument) ArgumentParser(com.unboundid.util.args.ArgumentParser) LinkedHashMap(java.util.LinkedHashMap) StringArgument(com.unboundid.util.args.StringArgument)

Aggregations

FilterArgument (com.unboundid.util.args.FilterArgument)15 StringArgument (com.unboundid.util.args.StringArgument)15 BooleanArgument (com.unboundid.util.args.BooleanArgument)14 FileArgument (com.unboundid.util.args.FileArgument)14 IntegerArgument (com.unboundid.util.args.IntegerArgument)13 DNArgument (com.unboundid.util.args.DNArgument)11 ControlArgument (com.unboundid.util.args.ControlArgument)8 ScopeArgument (com.unboundid.util.args.ScopeArgument)6 ASN1OctetString (com.unboundid.asn1.ASN1OctetString)4 ArgumentParser (com.unboundid.util.args.ArgumentParser)3 BooleanValueArgument (com.unboundid.util.args.BooleanValueArgument)3 DurationArgument (com.unboundid.util.args.DurationArgument)3 TimestampArgument (com.unboundid.util.args.TimestampArgument)2 DN (com.unboundid.ldap.sdk.DN)1 Filter (com.unboundid.ldap.sdk.Filter)1 LDAPConnectionPool (com.unboundid.ldap.sdk.LDAPConnectionPool)1 LDAPException (com.unboundid.ldap.sdk.LDAPException)1 LDIFWriter (com.unboundid.ldif.LDIFWriter)1 DNFileReader (com.unboundid.util.DNFileReader)1 FilterFileReader (com.unboundid.util.FilterFileReader)1