Search in sources :

Example 61 with BooleanArgument

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

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

the class ParallelUpdate method addNonLDAPArguments.

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

Example 63 with BooleanArgument

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

use of com.unboundid.util.args.BooleanArgument 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)

Example 65 with BooleanArgument

use of com.unboundid.util.args.BooleanArgument in project ssam by pingidentity.

the class SSAMInstaller method addToolArguments.

/**
 * {@inheritDoc}
 */
@Override
public void addToolArguments(ArgumentParser argumentParser) throws ArgumentException {
    // //////////////////////////////////////////////////////////////////////////
    // //
    // Required arguments.                                                    //
    // //
    // //////////////////////////////////////////////////////////////////////////
    serverRootArg = new FileArgument(null, "serverRoot", true, 1, "[directory]", "Absolute or relative path to the server to host SSAM, or path to a" + " Directory Server whose tools will be used to configure a backend server" + " server for SSAM access.", true, true, false, true);
    argumentParser.addArgument(serverRootArg);
    ldapPortArg = new IntegerArgument('p', "ldapPort", true, 1, "[port]", "LDAP or LDAPS port for communicating with the server.");
    argumentParser.addArgument(ldapPortArg);
    bindDNArg = new DNArgument('D', "bindDN", true, 1, "[dn]", "DN of an account used to manage the server's configuration.");
    argumentParser.addArgument(bindDNArg);
    bindPasswordArg = new StringArgument('w', "bindPassword", true, 1, "[password]", "Password of the account used to manage the server's configuration.");
    argumentParser.addArgument(bindPasswordArg);
    peopleBaseDNArg = new DNArgument(null, "peopleBaseDN", true, 1, "[dn]", "The pre-configured server base DN for user entries.");
    argumentParser.addArgument(peopleBaseDNArg);
    // //////////////////////////////////////////////////////////////////////////
    // //
    // SMTP arguments.                                               //
    // //
    // //////////////////////////////////////////////////////////////////////////
    // Required when configuring SSAM access.
    smtpServerHostnameArg = new StringArgument(null, "smtpServerHostname", true, 1, "[hostname]", "Name of the SMTP host used to deliver email notifications.");
    argumentParser.addArgument(smtpServerHostnameArg);
    // Required when configuring SSAM access.
    smtpSenderEmailAddressArg = new StringArgument(null, "smtpSenderEmailAddress", true, 1, "[email address]", "Email address used as the sender, when notifying users.");
    argumentParser.addArgument(smtpSenderEmailAddressArg);
    smtpServerUsernameArg = new StringArgument(null, "smtpServerUsername", false, 1, "[username]", "Username of the SMTP server account, if required by the SMTP server.");
    argumentParser.addArgument(smtpServerUsernameArg);
    smtpServerPasswordArg = new StringArgument(null, "smtpServerPassword", false, 1, "[password]", "Password of the SMTP server account, if required by the SMTP server.");
    argumentParser.addArgument(smtpServerPasswordArg);
    // SMTP username and password must be specified together.
    argumentParser.addDependentArgumentSet(smtpServerUsernameArg, smtpServerPasswordArg);
    argumentParser.addDependentArgumentSet(smtpServerPasswordArg, smtpServerUsernameArg);
    // //////////////////////////////////////////////////////////////////////////
    // //
    // Optional connection arguments.                                         //
    // //
    // //////////////////////////////////////////////////////////////////////////
    useSSLArg = new BooleanArgument('Z', "useSSL", "Specifies use of SSL to secure communication with the server by" + " this tool, and also for SSAM.");
    argumentParser.addArgument(useSSLArg);
    useStartTLSArg = new BooleanArgument('q', "useStartTLS", "Use StartTLS to secure communication with the server by this tool," + " and also for SSAM.");
    argumentParser.addArgument(useStartTLSArg);
    trustAllArg = new BooleanArgument('X', "trustAll", "Trust all server SSL certificates.");
    argumentParser.addArgument(trustAllArg);
    trustStorePathArg = new FileArgument('P', "trustStorePath", false, 1, "[file]", "Path to the keystore used to establish trust between this tool" + " and the server.  You can use /server-root/config/keystore.", true, true, true, false);
    argumentParser.addArgument(trustStorePathArg);
    ssamUserDNArg = new DNArgument(null, "ssamUserDN", false, 1, "[dn]", "DN of SSAM user account used to bind to the server.");
    argumentParser.addArgument(ssamUserDNArg);
    // Hidden for now until credentials management support is addressed.
    ssamUserDNArg.setHidden(true);
    ssamUserPasswordArg = new StringArgument(null, "ssamUserPassword", false, 1, "[password]", "Password for the SSAM user. If not specified in this option, nor " + "in a password file, a password will be generated if the SSAM user account " + "does not already exist.");
    // todo: add to argument description later for proxy support
    // "A specified password is required for Proxy installs."
    argumentParser.addArgument(ssamUserPasswordArg);
    ssamUserPasswordFileArg = new FileArgument(null, "ssamUserPasswordFile", false, 1, "[file]", "Path to the SSAM user password file.", true, true, true, false);
    // todo: add to argument description later for proxy support-- ", required for Proxy installs"
    argumentParser.addArgument(ssamUserPasswordFileArg);
    // Hidden for now to obfuscate passwords being written to files in clear-text,
    // since a generated password looks less like a password than a generated one.
    ssamUserPasswordArg.setHidden(true);
    ssamUserPasswordFileArg.setHidden(true);
    argumentParser.addExclusiveArgumentSet(ssamUserPasswordArg, ssamUserPasswordFileArg);
    resetSSAMUserPasswordArg = new BooleanArgument(null, "resetSSAMUserPassword", "Force a password reset of the SSAM user account if the SSAM user DN entry exists. " + "Not recommended if the SSAM user account is replicated, because the same password " + "must be used in all installations, instead the correct user password or the pin " + "file should be obtained from another server.");
    argumentParser.addArgument(resetSSAMUserPasswordArg);
    // SSL method and trust arguments are exclusive.
    argumentParser.addExclusiveArgumentSet(useSSLArg, useStartTLSArg);
    // If using StartTLS or SSL, if a trust store path is not specified,
    // a trust-all trust manager will be used by this tool and configured
    // for SSAM.
    argumentParser.addExclusiveArgumentSet(trustAllArg, trustStorePathArg);
    // The user must specify a trust argument if using SSL.
    argumentParser.addDependentArgumentSet(useSSLArg, trustAllArg, trustStorePathArg);
    argumentParser.addDependentArgumentSet(useStartTLSArg, trustAllArg, trustStorePathArg);
    // //////////////////////////////////////////////////////////////////////////
    // //
    // Optional reCAPTCHA arguments.                                          //
    // //
    // //////////////////////////////////////////////////////////////////////////
    // Optional site key used for the Google reCAPTCHA human verification.
    reCaptchaSiteKeyArg = new StringArgument(null, "reCaptchaSiteKey", false, 1, "[key]", "Optional site key used for the Google reCAPTCHA human verification.");
    argumentParser.addArgument(reCaptchaSiteKeyArg);
    // The secret key used for the Google reCAPTCHA human verification. May be empty.
    reCaptchaSecretKeyArg = new StringArgument(null, "reCaptchaSecretKey", false, 1, "[key]", "Optional secret key used for the Google reCAPTCHA human verification.");
    argumentParser.addArgument(reCaptchaSecretKeyArg);
    // Both must be specified, or neither.
    argumentParser.addDependentArgumentSet(reCaptchaSiteKeyArg, reCaptchaSecretKeyArg);
    argumentParser.addDependentArgumentSet(reCaptchaSecretKeyArg, reCaptchaSiteKeyArg);
    // //////////////////////////////////////////////////////////////////////////
    // //
    // Optional Ping arguments.                                               //
    // //
    // //////////////////////////////////////////////////////////////////////////
    pingAccessLogoutURLArg = new StringArgument(null, "pingAccessLogoutURL", false, 1, "[url]", "Optional URL used for logging out of PingAccess, for example https://<hostname>/pa/oidc/logout." + " Required if deploying SSAM with Ping. Note that the full URL must be used.");
    argumentParser.addArgument(pingAccessLogoutURLArg);
    pingFederateLogoutURLArg = new StringArgument(null, "pingFederateLogoutURL", false, 1, "[url]", "optional URL used for logging out of PingFederate, for example https://<hostname>:<PingFederatePort>/ext/logout." + " Required if deploying SSAM with Ping. Note that the full URL must be used.");
    argumentParser.addArgument(pingFederateLogoutURLArg);
    // Both must be specified, or neither.
    argumentParser.addDependentArgumentSet(pingAccessLogoutURLArg, pingFederateLogoutURLArg);
    argumentParser.addDependentArgumentSet(pingFederateLogoutURLArg, pingAccessLogoutURLArg);
    // //////////////////////////////////////////////////////////////////////////
    // //
    // Miscellaneous optional arguments.                                      //
    // //
    // //////////////////////////////////////////////////////////////////////////
    noDeployArg = new BooleanArgument(null, "noDeploy", "Indicates that the server will be configured for" + " SSAM access, but SSAM will not be deployed on the server.");
    argumentParser.addArgument(noDeployArg);
    debugArg = new BooleanArgument(null, "debug", "Debug this installer application.");
    argumentParser.addArgument(debugArg);
    debugArg.setHidden(true);
}
Also used : DNArgument(com.unboundid.util.args.DNArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) FileArgument(com.unboundid.util.args.FileArgument) StringArgument(com.unboundid.util.args.StringArgument)

Aggregations

BooleanArgument (com.unboundid.util.args.BooleanArgument)65 StringArgument (com.unboundid.util.args.StringArgument)53 FileArgument (com.unboundid.util.args.FileArgument)51 IntegerArgument (com.unboundid.util.args.IntegerArgument)35 DNArgument (com.unboundid.util.args.DNArgument)25 LDAPException (com.unboundid.ldap.sdk.LDAPException)19 File (java.io.File)19 ArgumentException (com.unboundid.util.args.ArgumentException)18 ASN1BitString (com.unboundid.asn1.ASN1BitString)16 NotNull (com.unboundid.util.NotNull)16 FilterArgument (com.unboundid.util.args.FilterArgument)14 ControlArgument (com.unboundid.util.args.ControlArgument)13 IOException (java.io.IOException)13 UnrecoverableKeyException (java.security.UnrecoverableKeyException)12 ArrayList (java.util.ArrayList)12 KeyStore (java.security.KeyStore)10 ScopeArgument (com.unboundid.util.args.ScopeArgument)9 Certificate (java.security.cert.Certificate)8 ArgumentParser (com.unboundid.util.args.ArgumentParser)7 DN (com.unboundid.ldap.sdk.DN)6