Search in sources :

Example 11 with ControlArgument

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

the class LDAPModify method addNonLDAPArguments.

/**
 * Adds the arguments used by this program that aren't already provided by the
 * generic {@code LDAPCommandLineTool} framework.
 *
 * @param  parser  The argument parser to which the arguments should be added.
 *
 * @throws  ArgumentException  If a problem occurs while adding the arguments.
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    String description = "Treat LDIF records that do not contain a " + "changetype as add records.";
    defaultAdd = new BooleanArgument('a', "defaultAdd", description);
    defaultAdd.addLongIdentifier("default-add", true);
    parser.addArgument(defaultAdd);
    description = "Attempt to continue processing additional changes if " + "an error occurs.";
    continueOnError = new BooleanArgument('c', "continueOnError", description);
    continueOnError.addLongIdentifier("continue-on-error", true);
    parser.addArgument(continueOnError);
    description = "The path to the LDIF file containing the changes.  If " + "this is not provided, then the changes will be read from " + "standard input.";
    ldifFile = new FileArgument('f', "ldifFile", false, 1, "{path}", description, true, false, true, false);
    ldifFile.addLongIdentifier("ldif-file", true);
    parser.addArgument(ldifFile);
    description = "Information about a control to include in the bind request.";
    bindControls = new ControlArgument(null, "bindControl", false, 0, null, description);
    bindControls.addLongIdentifier("bind-control", true);
    parser.addArgument(bindControls);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) FileArgument(com.unboundid.util.args.FileArgument)

Example 12 with ControlArgument

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

the class LDAPCompare method addNonLDAPArguments.

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

Example 13 with ControlArgument

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

the class LDAPSearch method addNonLDAPArguments.

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

Example 14 with ControlArgument

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

the class ParallelUpdate method addNonLDAPArguments.

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

Aggregations

ControlArgument (com.unboundid.util.args.ControlArgument)14 BooleanArgument (com.unboundid.util.args.BooleanArgument)13 FileArgument (com.unboundid.util.args.FileArgument)12 IntegerArgument (com.unboundid.util.args.IntegerArgument)11 StringArgument (com.unboundid.util.args.StringArgument)11 DNArgument (com.unboundid.util.args.DNArgument)8 FilterArgument (com.unboundid.util.args.FilterArgument)8 ScopeArgument (com.unboundid.util.args.ScopeArgument)6 DurationArgument (com.unboundid.util.args.DurationArgument)5 ASN1OctetString (com.unboundid.asn1.ASN1OctetString)3 BooleanValueArgument (com.unboundid.util.args.BooleanValueArgument)2 ArgumentListArgument (com.unboundid.util.args.ArgumentListArgument)1 ArgumentParser (com.unboundid.util.args.ArgumentParser)1 TimestampArgument (com.unboundid.util.args.TimestampArgument)1 LinkedHashSet (java.util.LinkedHashSet)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1