Search in sources :

Example 6 with ControlArgument

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

the class ModRate 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 = "The DN of the entry to modify.  It may be a simple " + "DN or a value pattern to specify a range of DN (e.g., " + "\"uid=user.[1-1000],ou=People,dc=example,dc=com\").  See " + ValuePattern.PUBLIC_JAVADOC_URL + " for complete details about the " + "value pattern syntax.  This must be provided.";
    entryDN = new StringArgument('b', "entryDN", true, 1, "{dn}", description);
    entryDN.setArgumentGroupName("Modification Arguments");
    entryDN.addLongIdentifier("entry-dn", true);
    parser.addArgument(entryDN);
    description = "The name of the attribute to modify.  Multiple attributes " + "may be specified by providing this argument multiple " + "times.  At least one attribute must be specified.";
    attribute = new StringArgument('A', "attribute", true, 0, "{name}", description);
    attribute.setArgumentGroupName("Modification Arguments");
    parser.addArgument(attribute);
    description = "The pattern to use to generate values for the replace " + "modifications.  If this is provided, then neither the " + "--valueLength argument nor the --characterSet arguments " + "may be provided.";
    valuePattern = new StringArgument(null, "valuePattern", false, 1, "{pattern}", description);
    valuePattern.setArgumentGroupName("Modification Arguments");
    valuePattern.addLongIdentifier("value-pattern", true);
    parser.addArgument(valuePattern);
    description = "The length in bytes to use when generating values for the " + "replace modifications.  If this is not provided, then a " + "default length of ten bytes will be used.";
    valueLength = new IntegerArgument('l', "valueLength", false, 1, "{num}", description, 1, Integer.MAX_VALUE);
    valueLength.setArgumentGroupName("Modification Arguments");
    valueLength.addLongIdentifier("value-length", true);
    parser.addArgument(valueLength);
    description = "The number of values to include in replace " + "modifications.  If this is not provided, then a default " + "of one value will be used.";
    valueCount = new IntegerArgument(null, "valueCount", false, 1, "{num}", description, 0, Integer.MAX_VALUE, 1);
    valueCount.setArgumentGroupName("Modification Arguments");
    valueCount.addLongIdentifier("value-count", true);
    parser.addArgument(valueCount);
    description = "Indicates that the tool should use the increment " + "modification type rather than the replace modification " + "type.";
    increment = new BooleanArgument(null, "increment", 1, description);
    increment.setArgumentGroupName("Modification Arguments");
    parser.addArgument(increment);
    description = "The amount by which to increment values when using the " + "increment modification type.  The amount may be negative " + "if values should be decremented rather than incremented.  " + "If this is not provided, then a default increment amount " + "of one will be used.";
    incrementAmount = new IntegerArgument(null, "incrementAmount", false, 1, null, description, Integer.MIN_VALUE, Integer.MAX_VALUE, 1);
    incrementAmount.setArgumentGroupName("Modification Arguments");
    incrementAmount.addLongIdentifier("increment-amount", true);
    parser.addArgument(incrementAmount);
    description = "The set of characters to use to generate the values for " + "the modifications.  It should only include ASCII " + "characters.  If this is not provided, then a default set " + "of lowercase alphabetic characters will be used.";
    characterSet = new StringArgument('C', "characterSet", false, 1, "{chars}", description);
    characterSet.setArgumentGroupName("Modification Arguments");
    characterSet.addLongIdentifier("character-set", true);
    parser.addArgument(characterSet);
    description = "Indicates that modify requests should include the " + "assertion request control with the specified filter.";
    assertionFilter = new FilterArgument(null, "assertionFilter", false, 1, "{filter}", description);
    assertionFilter.setArgumentGroupName("Request Control Arguments");
    assertionFilter.addLongIdentifier("assertion-filter", true);
    parser.addArgument(assertionFilter);
    description = "Indicates that modify requests should include the " + "permissive modify request control.";
    permissiveModify = new BooleanArgument(null, "permissiveModify", 1, description);
    permissiveModify.setArgumentGroupName("Request Control Arguments");
    permissiveModify.addLongIdentifier("permissive-modify", true);
    parser.addArgument(permissiveModify);
    description = "Indicates that modify requests should include the " + "pre-read request control with the specified requested " + "attribute.  This argument may be provided multiple times " + "to indicate that multiple requested attributes should be " + "included in the pre-read request control.";
    preReadAttribute = new StringArgument(null, "preReadAttribute", false, 0, "{attribute}", description);
    preReadAttribute.setArgumentGroupName("Request Control Arguments");
    preReadAttribute.addLongIdentifier("pre-read-attribute", true);
    parser.addArgument(preReadAttribute);
    description = "Indicates that modify requests should include the " + "post-read request control with the specified requested " + "attribute.  This argument may be provided multiple times " + "to indicate that multiple requested attributes should be " + "included in the post-read request control.";
    postReadAttribute = new StringArgument(null, "postReadAttribute", false, 0, "{attribute}", description);
    postReadAttribute.setArgumentGroupName("Request Control Arguments");
    postReadAttribute.addLongIdentifier("post-read-attribute", true);
    parser.addArgument(postReadAttribute);
    description = "Indicates that the proxied authorization control (as " + "defined in RFC 4370) should be used to request that " + "operations be processed using an alternate authorization " + "identity.  This may be a simple authorization ID or it " + "may be a value pattern to specify a range of " + "identities.  See " + ValuePattern.PUBLIC_JAVADOC_URL + " for complete details about the value pattern syntax.";
    proxyAs = new StringArgument('Y', "proxyAs", false, 1, "{authzID}", description);
    proxyAs.setArgumentGroupName("Request Control Arguments");
    proxyAs.addLongIdentifier("proxy-as", true);
    parser.addArgument(proxyAs);
    description = "Indicates that modify requests should include the " + "specified request control.  This may be provided multiple " + "times to include multiple request controls.";
    control = new ControlArgument('J', "control", false, 0, null, description);
    control.setArgumentGroupName("Request Control Arguments");
    parser.addArgument(control);
    description = "The number of threads to use to perform the " + "modifications.  If this is not provided, a single thread " + "will be used.";
    numThreads = new IntegerArgument('t', "numThreads", true, 1, "{num}", description, 1, Integer.MAX_VALUE, 1);
    numThreads.setArgumentGroupName("Rate Management Arguments");
    numThreads.addLongIdentifier("num-threads", true);
    parser.addArgument(numThreads);
    description = "The length of time in seconds between output lines.  If " + "this is not provided, then a default interval of five " + "seconds will be used.";
    collectionInterval = new IntegerArgument('i', "intervalDuration", true, 1, "{num}", description, 1, Integer.MAX_VALUE, 5);
    collectionInterval.setArgumentGroupName("Rate Management Arguments");
    collectionInterval.addLongIdentifier("interval-duration", true);
    parser.addArgument(collectionInterval);
    description = "The maximum number of intervals for which to run.  If " + "this is not provided, then the tool will run until it is " + "interrupted.";
    numIntervals = new IntegerArgument('I', "numIntervals", true, 1, "{num}", description, 1, Integer.MAX_VALUE, Integer.MAX_VALUE);
    numIntervals.setArgumentGroupName("Rate Management Arguments");
    numIntervals.addLongIdentifier("num-intervals", true);
    parser.addArgument(numIntervals);
    description = "The number of modify iterations that should be processed " + "on a connection before that connection is closed and " + "replaced with a newly-established (and authenticated, if " + "appropriate) connection.  If this is not provided, then " + "connections will not be periodically closed and " + "re-established.";
    iterationsBeforeReconnect = new IntegerArgument(null, "iterationsBeforeReconnect", false, 1, "{num}", description, 0);
    iterationsBeforeReconnect.setArgumentGroupName("Rate Management Arguments");
    iterationsBeforeReconnect.addLongIdentifier("iterations-before-reconnect", true);
    parser.addArgument(iterationsBeforeReconnect);
    description = "The target number of modifies to perform per second.  It " + "is still necessary to specify a sufficient number of " + "threads for achieving this rate.  If neither this option " + "nor --variableRateData is provided, then the tool will " + "run at the maximum rate for the specified number of " + "threads.";
    ratePerSecond = new IntegerArgument('r', "ratePerSecond", false, 1, "{modifies-per-second}", description, 1, Integer.MAX_VALUE);
    ratePerSecond.setArgumentGroupName("Rate Management Arguments");
    ratePerSecond.addLongIdentifier("rate-per-second", true);
    parser.addArgument(ratePerSecond);
    final String variableRateDataArgName = "variableRateData";
    final String generateSampleRateFileArgName = "generateSampleRateFile";
    description = RateAdjustor.getVariableRateDataArgumentDescription(generateSampleRateFileArgName);
    variableRateData = new FileArgument(null, variableRateDataArgName, false, 1, "{path}", description, true, true, true, false);
    variableRateData.setArgumentGroupName("Rate Management Arguments");
    variableRateData.addLongIdentifier("variable-rate-data", true);
    parser.addArgument(variableRateData);
    description = RateAdjustor.getGenerateSampleVariableRateFileDescription(variableRateDataArgName);
    sampleRateFile = new FileArgument(null, generateSampleRateFileArgName, false, 1, "{path}", description, false, true, true, false);
    sampleRateFile.setArgumentGroupName("Rate Management Arguments");
    sampleRateFile.addLongIdentifier("generate-sample-rate-file", true);
    sampleRateFile.setUsageArgument(true);
    parser.addArgument(sampleRateFile);
    parser.addExclusiveArgumentSet(variableRateData, sampleRateFile);
    description = "The number of intervals to complete before beginning " + "overall statistics collection.  Specifying a nonzero " + "number of warm-up intervals gives the client and server " + "a chance to warm up without skewing performance results.";
    warmUpIntervals = new IntegerArgument(null, "warmUpIntervals", true, 1, "{num}", description, 0, Integer.MAX_VALUE, 0);
    warmUpIntervals.setArgumentGroupName("Rate Management Arguments");
    warmUpIntervals.addLongIdentifier("warm-up-intervals", true);
    parser.addArgument(warmUpIntervals);
    description = "Indicates the format to use for timestamps included in " + "the output.  A value of 'none' indicates that no " + "timestamps should be included.  A value of 'with-date' " + "indicates that both the date and the time should be " + "included.  A value of 'without-date' indicates that only " + "the time should be included.";
    final Set<String> allowedFormats = StaticUtils.setOf("none", "with-date", "without-date");
    timestampFormat = new StringArgument(null, "timestampFormat", true, 1, "{format}", description, allowedFormats, "none");
    timestampFormat.addLongIdentifier("timestamp-format", true);
    parser.addArgument(timestampFormat);
    description = "Indicates that information about the result codes for " + "failed operations should not be displayed.";
    suppressErrorsArgument = new BooleanArgument(null, "suppressErrorResultCodes", 1, description);
    suppressErrorsArgument.addLongIdentifier("suppress-error-result-codes", true);
    parser.addArgument(suppressErrorsArgument);
    description = "Generate output in CSV format rather than a " + "display-friendly format";
    csvFormat = new BooleanArgument('c', "csv", 1, description);
    parser.addArgument(csvFormat);
    description = "Specifies the seed to use for the random number generator.";
    randomSeed = new IntegerArgument('R', "randomSeed", false, 1, "{value}", description);
    randomSeed.addLongIdentifier("random-seed", true);
    parser.addArgument(randomSeed);
    // The incrementAmount argument can only be used if the increment argument
    // is provided.
    parser.addDependentArgumentSet(incrementAmount, increment);
    // None of the valueLength, valueCount, characterSet, or valuePattern
    // arguments can be used if the increment argument is provided.
    parser.addExclusiveArgumentSet(increment, valueLength);
    parser.addExclusiveArgumentSet(increment, valueCount);
    parser.addExclusiveArgumentSet(increment, characterSet);
    parser.addExclusiveArgumentSet(increment, valuePattern);
    // The valuePattern argument cannot be used with either the valueLength or
    // characterSet arguments.
    parser.addExclusiveArgumentSet(valuePattern, valueLength);
    parser.addExclusiveArgumentSet(valuePattern, characterSet);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument) FilterArgument(com.unboundid.util.args.FilterArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) FileArgument(com.unboundid.util.args.FileArgument) StringArgument(com.unboundid.util.args.StringArgument)

Example 7 with ControlArgument

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

the class AuthRate 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 = "The base DN to use for the searches.  It may be a " + "simple DN or a value pattern to specify a range of DNs (e.g., " + "\"uid=user.[1-1000],ou=People,dc=example,dc=com\").  See " + ValuePattern.PUBLIC_JAVADOC_URL + " for complete details about the " + "value pattern syntax.  This must be provided.";
    baseDN = new StringArgument('b', "baseDN", true, 1, "{dn}", description);
    baseDN.setArgumentGroupName("Search and Authentication Arguments");
    baseDN.addLongIdentifier("base-dn", true);
    parser.addArgument(baseDN);
    description = "The scope to use for the searches.  It should be 'base', " + "'one', 'sub', or 'subord'.  If this is not provided, a " + "default scope of 'sub' will be used.";
    scopeArg = new ScopeArgument('s', "scope", false, "{scope}", description, SearchScope.SUB);
    scopeArg.setArgumentGroupName("Search and Authentication Arguments");
    parser.addArgument(scopeArg);
    description = "The filter to use for the searches.  It may be a simple " + "filter or a value pattern to specify a range of filters " + "(e.g., \"(uid=user.[1-1000])\").  See " + ValuePattern.PUBLIC_JAVADOC_URL + " for complete details " + "about the value pattern syntax.  This must be provided.";
    filter = new StringArgument('f', "filter", false, 1, "{filter}", description);
    filter.setArgumentGroupName("Search and Authentication Arguments");
    parser.addArgument(filter);
    description = "The name of an attribute to include in entries returned " + "from the searches.  Multiple attributes may be requested " + "by providing this argument multiple times.  If no return " + "attributes are specified, then entries will be returned " + "with all user attributes.";
    attributes = new StringArgument('A', "attribute", false, 0, "{name}", description);
    attributes.setArgumentGroupName("Search and Authentication Arguments");
    parser.addArgument(attributes);
    description = "The password to use when binding as the users returned " + "from the searches.  This must be provided.";
    userPassword = new StringArgument('C', "credentials", true, 1, "{password}", description);
    userPassword.setSensitive(true);
    userPassword.setArgumentGroupName("Search and Authentication Arguments");
    parser.addArgument(userPassword);
    description = "Indicates that the tool should only perform bind " + "operations without the initial search.  If this argument " + "is provided, then the base DN pattern will be used to " + "obtain the bind DNs.";
    bindOnly = new BooleanArgument('B', "bindOnly", 1, description);
    bindOnly.setArgumentGroupName("Search and Authentication Arguments");
    bindOnly.addLongIdentifier("bind-only", true);
    parser.addArgument(bindOnly);
    parser.addRequiredArgumentSet(filter, bindOnly);
    description = "The type of authentication to perform.  Allowed values " + "are:  SIMPLE, CRAM-MD5, DIGEST-MD5, and PLAIN.  If no " + "value is provided, then SIMPLE authentication will be " + "performed.";
    final Set<String> allowedAuthTypes = StaticUtils.setOf("simple", "cram-md5", "digest-md5", "plain");
    authType = new StringArgument('a', "authType", true, 1, "{authType}", description, allowedAuthTypes, "simple");
    authType.setArgumentGroupName("Search and Authentication Arguments");
    authType.addLongIdentifier("auth-type", true);
    parser.addArgument(authType);
    description = "Indicates that bind requests should include the " + "authorization identity request control as described in " + "RFC 3829.";
    authorizationIdentityRequestControl = new BooleanArgument(null, "authorizationIdentityRequestControl", 1, description);
    authorizationIdentityRequestControl.setArgumentGroupName("Request Control Arguments");
    authorizationIdentityRequestControl.addLongIdentifier("authorization-identity-request-control", true);
    parser.addArgument(authorizationIdentityRequestControl);
    description = "Indicates that bind requests should include the " + "password policy request control as described in " + "draft-behera-ldap-password-policy-10.";
    passwordPolicyRequestControl = new BooleanArgument(null, "passwordPolicyRequestControl", 1, description);
    passwordPolicyRequestControl.setArgumentGroupName("Request Control Arguments");
    passwordPolicyRequestControl.addLongIdentifier("password-policy-request-control", true);
    parser.addArgument(passwordPolicyRequestControl);
    description = "Indicates that search requests should include the " + "specified request control.  This may be provided multiple " + "times to include multiple search request controls.";
    searchControl = new ControlArgument(null, "searchControl", false, 0, null, description);
    searchControl.setArgumentGroupName("Request Control Arguments");
    searchControl.addLongIdentifier("search-control", true);
    parser.addArgument(searchControl);
    description = "Indicates that bind requests should include the " + "specified request control.  This may be provided multiple " + "times to include multiple modify request controls.";
    bindControl = new ControlArgument(null, "bindControl", false, 0, null, description);
    bindControl.setArgumentGroupName("Request Control Arguments");
    bindControl.addLongIdentifier("bind-control", true);
    parser.addArgument(bindControl);
    description = "The number of threads to use to perform the " + "authentication processing.  If this is not provided, then " + "a default of one thread will be used.";
    numThreads = new IntegerArgument('t', "numThreads", true, 1, "{num}", description, 1, Integer.MAX_VALUE, 1);
    numThreads.setArgumentGroupName("Rate Management Arguments");
    numThreads.addLongIdentifier("num-threads", true);
    parser.addArgument(numThreads);
    description = "The length of time in seconds between output lines.  If " + "this is not provided, then a default interval of five " + "seconds will be used.";
    collectionInterval = new IntegerArgument('i', "intervalDuration", true, 1, "{num}", description, 1, Integer.MAX_VALUE, 5);
    collectionInterval.setArgumentGroupName("Rate Management Arguments");
    collectionInterval.addLongIdentifier("interval-duration", true);
    parser.addArgument(collectionInterval);
    description = "The maximum number of intervals for which to run.  If " + "this is not provided, then the tool will run until it is " + "interrupted.";
    numIntervals = new IntegerArgument('I', "numIntervals", true, 1, "{num}", description, 1, Integer.MAX_VALUE, Integer.MAX_VALUE);
    numIntervals.setArgumentGroupName("Rate Management Arguments");
    numIntervals.addLongIdentifier("num-intervals", true);
    parser.addArgument(numIntervals);
    description = "The target number of authorizations to perform per " + "second.  It is still necessary to specify a sufficient " + "number of threads for achieving this rate.  If neither " + "this option nor --variableRateData is provided, then the " + "tool will run at the maximum rate for the specified " + "number of threads.";
    ratePerSecond = new IntegerArgument('r', "ratePerSecond", false, 1, "{auths-per-second}", description, 1, Integer.MAX_VALUE);
    ratePerSecond.setArgumentGroupName("Rate Management Arguments");
    ratePerSecond.addLongIdentifier("rate-per-second", true);
    parser.addArgument(ratePerSecond);
    final String variableRateDataArgName = "variableRateData";
    final String generateSampleRateFileArgName = "generateSampleRateFile";
    description = RateAdjustor.getVariableRateDataArgumentDescription(generateSampleRateFileArgName);
    variableRateData = new FileArgument(null, variableRateDataArgName, false, 1, "{path}", description, true, true, true, false);
    variableRateData.setArgumentGroupName("Rate Management Arguments");
    variableRateData.addLongIdentifier("variable-rate-data", true);
    parser.addArgument(variableRateData);
    description = RateAdjustor.getGenerateSampleVariableRateFileDescription(variableRateDataArgName);
    sampleRateFile = new FileArgument(null, generateSampleRateFileArgName, false, 1, "{path}", description, false, true, true, false);
    sampleRateFile.setArgumentGroupName("Rate Management Arguments");
    sampleRateFile.addLongIdentifier("generate-sample-rate-file", true);
    sampleRateFile.setUsageArgument(true);
    parser.addArgument(sampleRateFile);
    parser.addExclusiveArgumentSet(variableRateData, sampleRateFile);
    description = "The number of intervals to complete before beginning " + "overall statistics collection.  Specifying a nonzero " + "number of warm-up intervals gives the client and server " + "a chance to warm up without skewing performance results.";
    warmUpIntervals = new IntegerArgument(null, "warmUpIntervals", true, 1, "{num}", description, 0, Integer.MAX_VALUE, 0);
    warmUpIntervals.setArgumentGroupName("Rate Management Arguments");
    warmUpIntervals.addLongIdentifier("warm-up-intervals", true);
    parser.addArgument(warmUpIntervals);
    description = "Indicates the format to use for timestamps included in " + "the output.  A value of 'none' indicates that no " + "timestamps should be included.  A value of 'with-date' " + "indicates that both the date and the time should be " + "included.  A value of 'without-date' indicates that only " + "the time should be included.";
    final Set<String> allowedFormats = StaticUtils.setOf("none", "with-date", "without-date");
    timestampFormat = new StringArgument(null, "timestampFormat", true, 1, "{format}", description, allowedFormats, "none");
    timestampFormat.addLongIdentifier("timestamp-format", true);
    parser.addArgument(timestampFormat);
    description = "Indicates that information about the result codes for " + "failed operations should not be displayed.";
    suppressErrorsArgument = new BooleanArgument(null, "suppressErrorResultCodes", 1, description);
    suppressErrorsArgument.addLongIdentifier("suppress-error-result-codes", true);
    parser.addArgument(suppressErrorsArgument);
    description = "Generate output in CSV format rather than a " + "display-friendly format";
    csvFormat = new BooleanArgument('c', "csv", 1, description);
    parser.addArgument(csvFormat);
    description = "Specifies the seed to use for the random number generator.";
    randomSeed = new IntegerArgument('R', "randomSeed", false, 1, "{value}", description);
    randomSeed.addLongIdentifier("random-seed", true);
    parser.addArgument(randomSeed);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument) ScopeArgument(com.unboundid.util.args.ScopeArgument) 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 8 with ControlArgument

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

the class LDAPCompare 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 {
    // Save a reference to the argument parser.
    this.parser = parser;
    String 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);
    description = "Information about a control to include in compare requests.";
    compareControls = new ControlArgument('J', "control", false, 0, null, description);
    parser.addArgument(compareControls);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument)

Example 9 with ControlArgument

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

the class LDAPDelete method addNonLDAPArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
    this.parser = parser;
    // 
    // Data Arguments
    // 
    final String argGroupData = INFO_LDAPDELETE_ARG_GROUP_DATA.get();
    entryDN = new DNArgument('b', "entryDN", false, 0, null, INFO_LDAPDELETE_ARG_DESC_DN.get());
    entryDN.addLongIdentifier("entry-dn", true);
    entryDN.addLongIdentifier("dn", true);
    entryDN.addLongIdentifier("dnToDelete", true);
    entryDN.addLongIdentifier("dn-to-delete", true);
    entryDN.addLongIdentifier("entry", true);
    entryDN.addLongIdentifier("entryToDelete", true);
    entryDN.addLongIdentifier("entry-to-delete", true);
    entryDN.setArgumentGroupName(argGroupData);
    parser.addArgument(entryDN);
    dnFile = new FileArgument('f', "dnFile", false, 0, null, INFO_LDAPDELETE_ARG_DESC_DN_FILE.get(), true, true, true, false);
    dnFile.addLongIdentifier("dn-file", true);
    dnFile.addLongIdentifier("dnFilename", true);
    dnFile.addLongIdentifier("dn-filename", true);
    dnFile.addLongIdentifier("deleteEntriesWithDNsFromFile", true);
    dnFile.addLongIdentifier("delete-entries0-with-dns-from-file", true);
    dnFile.addLongIdentifier("file", true);
    dnFile.addLongIdentifier("filename", true);
    dnFile.setArgumentGroupName(argGroupData);
    parser.addArgument(dnFile);
    deleteEntriesMatchingFilter = new FilterArgument(null, "deleteEntriesMatchingFilter", false, 0, null, INFO_LDAPDELETE_ARG_DESC_DELETE_ENTRIES_MATCHING_FILTER.get());
    deleteEntriesMatchingFilter.addLongIdentifier("delete-entries-matching-filter", true);
    deleteEntriesMatchingFilter.addLongIdentifier("deleteFilter", true);
    deleteEntriesMatchingFilter.addLongIdentifier("delete-filter", true);
    deleteEntriesMatchingFilter.addLongIdentifier("deleteSearchFilter", true);
    deleteEntriesMatchingFilter.addLongIdentifier("delete-search-filter", true);
    deleteEntriesMatchingFilter.addLongIdentifier("filter", true);
    deleteEntriesMatchingFilter.setArgumentGroupName(argGroupData);
    parser.addArgument(deleteEntriesMatchingFilter);
    deleteEntriesMatchingFiltersFromFile = new FileArgument(null, "deleteEntriesMatchingFiltersFromFile", false, 0, null, INFO_LDAPDELETE_ARG_DESC_DELETE_ENTRIES_MATCHING_FILTER_FILE.get(), true, true, true, false);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("delete-entries-matching-filters-from-file", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("deleteEntriesMatchingFilterFromFile", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("delete-entries-matching-filter-from-file", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("deleteFilterFile", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("delete-filter-file", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("deleteSearchFilterFile", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("delete-search-filter-file", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("filterFile", true);
    deleteEntriesMatchingFiltersFromFile.addLongIdentifier("filter-file", true);
    deleteEntriesMatchingFiltersFromFile.setArgumentGroupName(argGroupData);
    parser.addArgument(deleteEntriesMatchingFiltersFromFile);
    searchBaseDN = new DNArgument(null, "searchBaseDN", false, 0, null, INFO_LDAPDELETE_ARG_DESC_SEARCH_BASE_DN.get(), DN.NULL_DN);
    searchBaseDN.addLongIdentifier("search-base-dn", true);
    searchBaseDN.addLongIdentifier("baseDN", true);
    searchBaseDN.addLongIdentifier("base-dn", true);
    searchBaseDN.setArgumentGroupName(argGroupData);
    parser.addArgument(searchBaseDN);
    searchPageSize = new IntegerArgument(null, "searchPageSize", false, 1, null, INFO_LDAPDELETE_ARG_DESC_SEARCH_PAGE_SIZE.get(), 1, Integer.MAX_VALUE);
    searchPageSize.addLongIdentifier("search-page-size", true);
    searchPageSize.addLongIdentifier("simplePagedResultsPageSize", true);
    searchPageSize.addLongIdentifier("simple-paged-results-page-size", true);
    searchPageSize.addLongIdentifier("pageSize", true);
    searchPageSize.addLongIdentifier("page-size", true);
    searchPageSize.setArgumentGroupName(argGroupData);
    parser.addArgument(searchPageSize);
    encryptionPassphraseFile = new FileArgument(null, "encryptionPassphraseFile", false, 1, null, INFO_LDAPDELETE_ARG_DESC_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.addLongIdentifier("encryptionPINFile", true);
    encryptionPassphraseFile.addLongIdentifier("encryption-pin-file", true);
    encryptionPassphraseFile.setArgumentGroupName(argGroupData);
    parser.addArgument(encryptionPassphraseFile);
    characterSet = new StringArgument('i', "characterSet", false, 1, INFO_LDAPDELETE_ARG_PLACEHOLDER_CHARSET.get(), INFO_LDAPDELETE_ARG_DESC_CHARSET.get(), "UTF-8");
    characterSet.addLongIdentifier("character-set", true);
    characterSet.addLongIdentifier("charSet", true);
    characterSet.addLongIdentifier("char-set", true);
    characterSet.addLongIdentifier("encoding", true);
    characterSet.setArgumentGroupName(argGroupData);
    parser.addArgument(characterSet);
    rejectFile = new FileArgument('R', "rejectFile", false, 1, null, INFO_LDAPDELETE_ARG_DESC_REJECT_FILE.get(), false, true, true, false);
    rejectFile.addLongIdentifier("reject-file", true);
    rejectFile.addLongIdentifier("errorFile", true);
    rejectFile.addLongIdentifier("error-file", true);
    rejectFile.addLongIdentifier("failureFile", true);
    rejectFile.addLongIdentifier("failure-file", true);
    rejectFile.setArgumentGroupName(argGroupData);
    parser.addArgument(rejectFile);
    verbose = new BooleanArgument('v', "verbose", 1, INFO_LDAPDELETE_ARG_DESC_VERBOSE.get());
    verbose.setArgumentGroupName(argGroupData);
    parser.addArgument(verbose);
    // This argument has no effect.  It is provided for compatibility with a
    // legacy ldapdelete tool, where the argument was also offered but had no
    // effect.  In this tool, it is hidden.
    final BooleanArgument scriptFriendly = new BooleanArgument(null, "scriptFriendly", 1, INFO_LDAPDELETE_ARG_DESC_SCRIPT_FRIENDLY.get());
    scriptFriendly.addLongIdentifier("script-friendly", true);
    scriptFriendly.setArgumentGroupName(argGroupData);
    scriptFriendly.setHidden(true);
    parser.addArgument(scriptFriendly);
    // 
    // Operation Arguments
    // 
    final String argGroupOp = INFO_LDAPDELETE_ARG_GROUP_OPERATION.get();
    // NOTE:  The retryFailedOperations argument is now hidden, as we will retry
    // operations by default.  The neverRetry argument can be used to disable
    // this.
    retryFailedOperations = new BooleanArgument(null, "retryFailedOperations", 1, INFO_LDAPDELETE_ARG_DESC_RETRY_FAILED_OPS.get());
    retryFailedOperations.addLongIdentifier("retry-failed-operations", true);
    retryFailedOperations.addLongIdentifier("retryFailedOps", true);
    retryFailedOperations.addLongIdentifier("retry-failed-ops", true);
    retryFailedOperations.addLongIdentifier("retry", true);
    retryFailedOperations.setArgumentGroupName(argGroupOp);
    retryFailedOperations.setHidden(true);
    parser.addArgument(retryFailedOperations);
    neverRetry = new BooleanArgument(null, "neverRetry", 1, INFO_LDAPDELETE_ARG_DESC_NEVER_RETRY.get());
    neverRetry.addLongIdentifier("never-retry", true);
    neverRetry.setArgumentGroupName(argGroupOp);
    parser.addArgument(neverRetry);
    dryRun = new BooleanArgument('n', "dryRun", 1, INFO_LDAPDELETE_ARG_DESC_DRY_RUN.get());
    dryRun.addLongIdentifier("dry-run", true);
    dryRun.setArgumentGroupName(argGroupOp);
    parser.addArgument(dryRun);
    continueOnError = new BooleanArgument('c', "continueOnError", 1, INFO_LDAPDELETE_ARG_DESC_CONTINUE_ON_ERROR.get());
    continueOnError.addLongIdentifier("continue-on-error", true);
    continueOnError.setArgumentGroupName(argGroupOp);
    parser.addArgument(continueOnError);
    followReferrals = new BooleanArgument(null, "followReferrals", 1, INFO_LDAPDELETE_ARG_DESC_FOLLOW_REFERRALS.get());
    followReferrals.addLongIdentifier("follow-referrals", true);
    followReferrals.setArgumentGroupName(argGroupOp);
    parser.addArgument(followReferrals);
    useAdministrativeSession = new BooleanArgument(null, "useAdministrativeSession", 1, INFO_LDAPDELETE_ARG_DESC_USE_ADMIN_SESSION.get());
    useAdministrativeSession.addLongIdentifier("use-administrative-session", true);
    useAdministrativeSession.addLongIdentifier("useAdminSession", true);
    useAdministrativeSession.addLongIdentifier("use-admin-session", true);
    useAdministrativeSession.setArgumentGroupName(argGroupOp);
    parser.addArgument(useAdministrativeSession);
    ratePerSecond = new IntegerArgument('r', "ratePerSecond", false, 1, INFO_LDAPDELETE_ARG_PLACEHOLDER_RATE_PER_SECOND.get(), INFO_LDAPDELETE_ARG_DESC_RATE_PER_SECOND.get(), 1, Integer.MAX_VALUE);
    ratePerSecond.addLongIdentifier("rate-per-second", true);
    ratePerSecond.addLongIdentifier("deletesPerSecond", true);
    ratePerSecond.addLongIdentifier("deletes-per-second", true);
    ratePerSecond.addLongIdentifier("operationsPerSecond", true);
    ratePerSecond.addLongIdentifier("operations-per-second", true);
    ratePerSecond.addLongIdentifier("opsPerSecond", true);
    ratePerSecond.addLongIdentifier("ops-per-second", true);
    ratePerSecond.setArgumentGroupName(argGroupOp);
    parser.addArgument(ratePerSecond);
    // This argument has no effect.  It is provided for compatibility with a
    // legacy ldapdelete tool, but this version only supports LDAPv3, so this
    // argument is hidden.
    final IntegerArgument ldapVersion = new IntegerArgument('V', "ldapVersion", false, 1, "{version}", INFO_LDAPDELETE_ARG_DESC_LDAP_VERSION.get(), 3, 3, 3);
    ldapVersion.addLongIdentifier("ldap-version", true);
    ldapVersion.setArgumentGroupName(argGroupOp);
    ldapVersion.setHidden(true);
    parser.addArgument(ldapVersion);
    // 
    // Control Arguments
    // 
    final String argGroupControls = INFO_LDAPDELETE_ARG_GROUP_CONTROLS.get();
    clientSideSubtreeDelete = new BooleanArgument(null, "clientSideSubtreeDelete", 1, INFO_LDAPDELETE_ARG_DESC_CLIENT_SIDE_SUB_DEL.get());
    clientSideSubtreeDelete.addLongIdentifier("client-side-subtree-delete", true);
    clientSideSubtreeDelete.setArgumentGroupName(argGroupControls);
    parser.addArgument(clientSideSubtreeDelete);
    serverSideSubtreeDelete = new BooleanArgument('x', "serverSideSubtreeDelete", 1, INFO_LDAPDELETE_ARG_DESC_SERVER_SIDE_SUB_DEL.get());
    serverSideSubtreeDelete.addLongIdentifier("server-side-subtree-delete", true);
    serverSideSubtreeDelete.addLongIdentifier("deleteSubtree", true);
    serverSideSubtreeDelete.addLongIdentifier("delete-subtree", true);
    serverSideSubtreeDelete.addLongIdentifier("useSubtreeDeleteControl", true);
    serverSideSubtreeDelete.addLongIdentifier("use-subtree-delete-control", true);
    serverSideSubtreeDelete.setArgumentGroupName(argGroupControls);
    parser.addArgument(serverSideSubtreeDelete);
    softDelete = new BooleanArgument('s', "softDelete", 1, INFO_LDAPDELETE_ARG_DESC_SOFT_DELETE.get());
    softDelete.addLongIdentifier("soft-delete", true);
    softDelete.addLongIdentifier("useSoftDelete", true);
    softDelete.addLongIdentifier("use-soft-delete", true);
    softDelete.addLongIdentifier("useSoftDeleteControl", true);
    softDelete.addLongIdentifier("use-soft-delete-control", true);
    softDelete.setArgumentGroupName(argGroupControls);
    parser.addArgument(softDelete);
    hardDelete = new BooleanArgument(null, "hardDelete", 1, INFO_LDAPDELETE_ARG_DESC_HARD_DELETE.get());
    hardDelete.addLongIdentifier("hard-delete", true);
    hardDelete.addLongIdentifier("useHardDelete", true);
    hardDelete.addLongIdentifier("use-hard-delete", true);
    hardDelete.addLongIdentifier("useHardDeleteControl", true);
    hardDelete.addLongIdentifier("use-hard-delete-control", true);
    hardDelete.setArgumentGroupName(argGroupControls);
    parser.addArgument(hardDelete);
    proxyAs = new StringArgument('Y', "proxyAs", false, 1, INFO_LDAPDELETE_ARG_PLACEHOLDER_AUTHZ_ID.get(), INFO_LDAPDELETE_ARG_DESC_PROXY_AS.get());
    proxyAs.addLongIdentifier("proxy-as", true);
    proxyAs.addLongIdentifier("proxyV2As", true);
    proxyAs.addLongIdentifier("proxy-v2-as", true);
    proxyAs.addLongIdentifier("proxiedAuth", true);
    proxyAs.addLongIdentifier("proxied-auth", true);
    proxyAs.addLongIdentifier("proxiedAuthorization", true);
    proxyAs.addLongIdentifier("proxied-authorization", true);
    proxyAs.addLongIdentifier("useProxiedAuth", true);
    proxyAs.addLongIdentifier("use-proxied-auth", true);
    proxyAs.addLongIdentifier("useProxiedAuthorization", true);
    proxyAs.addLongIdentifier("use-proxied-authorization", true);
    proxyAs.addLongIdentifier("useProxiedAuthControl", true);
    proxyAs.addLongIdentifier("use-proxied-auth-control", true);
    proxyAs.addLongIdentifier("useProxiedAuthorizationControl", true);
    proxyAs.addLongIdentifier("use-proxied-authorization-control", true);
    proxyAs.setArgumentGroupName(argGroupControls);
    parser.addArgument(proxyAs);
    proxyV1As = new DNArgument(null, "proxyV1As", false, 1, null, INFO_LDAPDELETE_ARG_DESC_PROXY_V1_AS.get());
    proxyV1As.addLongIdentifier("proxy-v1-as", true);
    proxyV1As.setArgumentGroupName(argGroupControls);
    parser.addArgument(proxyV1As);
    manageDsaIT = new BooleanArgument(null, "useManageDsaIT", 1, INFO_LDAPDELETE_ARG_DESC_MANAGE_DSA_IT.get());
    manageDsaIT.addLongIdentifier("use-manage-dsa-it", true);
    manageDsaIT.addLongIdentifier("manageDsaIT", true);
    manageDsaIT.addLongIdentifier("manage-dsa-it", true);
    manageDsaIT.addLongIdentifier("manageDsaITControl", true);
    manageDsaIT.addLongIdentifier("manage-dsa-it-control", true);
    manageDsaIT.addLongIdentifier("useManageDsaITControl", true);
    manageDsaIT.addLongIdentifier("use-manage-dsa-it-control", true);
    manageDsaIT.setArgumentGroupName(argGroupControls);
    parser.addArgument(manageDsaIT);
    assertionFilter = new FilterArgument(null, "assertionFilter", false, 1, null, INFO_LDAPDELETE_ARG_DESC_ASSERTION_FILTER.get());
    assertionFilter.addLongIdentifier("assertion-filter", true);
    assertionFilter.addLongIdentifier("useAssertionFilter", true);
    assertionFilter.addLongIdentifier("use-assertion-filter", true);
    assertionFilter.addLongIdentifier("assertionControl", true);
    assertionFilter.addLongIdentifier("assertion-control", true);
    assertionFilter.addLongIdentifier("useAssertionControl", true);
    assertionFilter.addLongIdentifier("use-assertion-control", true);
    assertionFilter.setArgumentGroupName(argGroupControls);
    parser.addArgument(assertionFilter);
    preReadAttribute = new StringArgument(null, "preReadAttribute", false, 0, INFO_LDAPDELETE_ARG_PLACEHOLDER_ATTR.get(), INFO_LDAPDELETE_ARG_DESC_PRE_READ_ATTR.get());
    preReadAttribute.addLongIdentifier("pre-read-attribute", true);
    preReadAttribute.setArgumentGroupName(argGroupControls);
    parser.addArgument(preReadAttribute);
    noOperation = new BooleanArgument(null, "noOperation", 1, INFO_LDAPDELETE_ARG_DESC_NO_OP.get());
    noOperation.addLongIdentifier("no-operation", true);
    noOperation.addLongIdentifier("noOp", true);
    noOperation.addLongIdentifier("no-op", true);
    noOperation.setArgumentGroupName(argGroupControls);
    parser.addArgument(noOperation);
    getBackendSetID = new BooleanArgument(null, "getBackendSetID", 1, INFO_LDAPDELETE_ARG_DESC_GET_BACKEND_SET_ID.get());
    getBackendSetID.addLongIdentifier("get-backend-set-id", true);
    getBackendSetID.addLongIdentifier("useGetBackendSetID", true);
    getBackendSetID.addLongIdentifier("use-get-backend-set-id", true);
    getBackendSetID.addLongIdentifier("useGetBackendSetIDControl", true);
    getBackendSetID.addLongIdentifier("use-get-backend-set-id-control", true);
    getBackendSetID.setArgumentGroupName(argGroupControls);
    parser.addArgument(getBackendSetID);
    routeToBackendSet = new StringArgument(null, "routeToBackendSet", false, 0, INFO_LDAPDELETE_ARG_PLACEHOLDER_ROUTE_TO_BACKEND_SET.get(), INFO_LDAPDELETE_ARG_DESC_ROUTE_TO_BACKEND_SET.get());
    routeToBackendSet.addLongIdentifier("route-to-backend-set", true);
    routeToBackendSet.addLongIdentifier("useRouteToBackendSet", true);
    routeToBackendSet.addLongIdentifier("use0route-to-backend-set", true);
    routeToBackendSet.addLongIdentifier("useRouteToBackendSetControl", true);
    routeToBackendSet.addLongIdentifier("use-route-to-backend-set-control", true);
    routeToBackendSet.setArgumentGroupName(argGroupControls);
    parser.addArgument(routeToBackendSet);
    getServerID = new BooleanArgument(null, "getServerID", 1, INFO_LDAPDELETE_ARG_DESC_GET_SERVER_ID.get());
    getServerID.addLongIdentifier("get-server-id", true);
    getServerID.addLongIdentifier("getBackendServerID", true);
    getServerID.addLongIdentifier("get-backend-server-id", true);
    getServerID.addLongIdentifier("useGetServerID", true);
    getServerID.addLongIdentifier("use-get-server-id", true);
    getServerID.addLongIdentifier("useGetServerIDControl", true);
    getServerID.addLongIdentifier("use-get-server-id-control", true);
    getServerID.setArgumentGroupName(argGroupControls);
    parser.addArgument(getServerID);
    routeToServer = new StringArgument(null, "routeToServer", false, 1, INFO_LDAPDELETE_ARG_PLACEHOLDER_ID.get(), INFO_LDAPDELETE_ARG_DESC_ROUTE_TO_SERVER.get());
    routeToServer.addLongIdentifier("route-to-server", true);
    routeToServer.addLongIdentifier("routeToBackendServer", true);
    routeToServer.addLongIdentifier("route-to-backend-server", true);
    routeToServer.addLongIdentifier("useRouteToServer", true);
    routeToServer.addLongIdentifier("use-route-to-server", true);
    routeToServer.addLongIdentifier("useRouteToBackendServer", true);
    routeToServer.addLongIdentifier("use-route-to-backend-server", true);
    routeToServer.addLongIdentifier("useRouteToServerControl", true);
    routeToServer.addLongIdentifier("use-route-to-server-control", true);
    routeToServer.addLongIdentifier("useRouteToBackendServerControl", true);
    routeToServer.addLongIdentifier("use-route-to-backend-server-control", true);
    routeToServer.setArgumentGroupName(argGroupControls);
    parser.addArgument(routeToServer);
    useAssuredReplication = new BooleanArgument(null, "useAssuredReplication", 1, INFO_LDAPDELETE_ARG_DESC_USE_ASSURED_REPLICATION.get());
    useAssuredReplication.addLongIdentifier("use-assured-replication", true);
    useAssuredReplication.addLongIdentifier("assuredReplication", true);
    useAssuredReplication.addLongIdentifier("assured-replication", true);
    useAssuredReplication.addLongIdentifier("assuredReplicationControl", true);
    useAssuredReplication.addLongIdentifier("assured-replication-control", true);
    useAssuredReplication.addLongIdentifier("useAssuredReplicationControl", true);
    useAssuredReplication.addLongIdentifier("use-assured-replication-control", true);
    useAssuredReplication.setArgumentGroupName(argGroupControls);
    parser.addArgument(useAssuredReplication);
    assuredReplicationLocalLevel = 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("none", "received-any-server", "processed-all-servers"));
    assuredReplicationLocalLevel.addLongIdentifier("assured-replication-local-level", true);
    assuredReplicationLocalLevel.setArgumentGroupName(argGroupControls);
    parser.addArgument(assuredReplicationLocalLevel);
    assuredReplicationRemoteLevel = new StringArgument(null, "assuredReplicationRemoteLevel", false, 1, INFO_LDAPDELETE_ARG_PLACEHOLDER_ASSURED_REPLICATION_REMOTE_LEVEL.get(), INFO_LDAPDELETE_ARG_DESC_ASSURED_REPLICATION_REMOTE_LEVEL.get(), StaticUtils.setOf("none", "received-any-remote-location", "received-all-remote-locations", "processed-all-remote-servers"));
    assuredReplicationRemoteLevel.addLongIdentifier("assured-replication-remote-level", true);
    assuredReplicationRemoteLevel.setArgumentGroupName(argGroupControls);
    parser.addArgument(assuredReplicationRemoteLevel);
    assuredReplicationTimeout = new DurationArgument(null, "assuredReplicationTimeout", false, null, INFO_LDAPDELETE_ARG_DESC_ASSURED_REPLICATION_TIMEOUT.get());
    assuredReplicationTimeout.addLongIdentifier("assured-replication-timeout", true);
    assuredReplicationTimeout.setArgumentGroupName(argGroupControls);
    parser.addArgument(assuredReplicationTimeout);
    replicationRepair = new BooleanArgument(null, "replicationRepair", 1, INFO_LDAPDELETE_ARG_DESC_REPLICATION_REPAIR.get());
    replicationRepair.addLongIdentifier("replication-repair", true);
    replicationRepair.addLongIdentifier("replicationRepairControl", true);
    replicationRepair.addLongIdentifier("replication-repair-control", true);
    replicationRepair.addLongIdentifier("useReplicationRepair", true);
    replicationRepair.addLongIdentifier("use-replication-repair", true);
    replicationRepair.addLongIdentifier("useReplicationRepairControl", true);
    replicationRepair.addLongIdentifier("use-replication-repair-control", true);
    replicationRepair.setArgumentGroupName(argGroupControls);
    parser.addArgument(replicationRepair);
    suppressReferentialIntegrityUpdates = new BooleanArgument(null, "suppressReferentialIntegrityUpdates", 1, INFO_LDAPDELETE_ARG_DESC_SUPPRESS_REFINT_UPDATES.get());
    suppressReferentialIntegrityUpdates.addLongIdentifier("suppress-referential-integrity-updates", true);
    suppressReferentialIntegrityUpdates.addLongIdentifier("useSuppressReferentialIntegrityUpdates", true);
    suppressReferentialIntegrityUpdates.addLongIdentifier("use-suppress-referential-integrity-updates", true);
    suppressReferentialIntegrityUpdates.addLongIdentifier("useSuppressReferentialIntegrityUpdatesControl", true);
    suppressReferentialIntegrityUpdates.addLongIdentifier("use-suppress-referential-integrity-updates-control", true);
    suppressReferentialIntegrityUpdates.setArgumentGroupName(argGroupControls);
    parser.addArgument(suppressReferentialIntegrityUpdates);
    operationPurpose = new StringArgument(null, "operationPurpose", false, 1, null, INFO_LDAPDELETE_ARG_DESC_OP_PURPOSE.get());
    operationPurpose.addLongIdentifier("operation-purpose", true);
    operationPurpose.addLongIdentifier("operationPurposeControl", true);
    operationPurpose.addLongIdentifier("operation-purpose-control", true);
    operationPurpose.addLongIdentifier("useOperationPurpose", true);
    operationPurpose.addLongIdentifier("use-operation-purpose", true);
    operationPurpose.addLongIdentifier("useOperationPurposeControl", true);
    operationPurpose.addLongIdentifier("use-operation-purpose-control", true);
    operationPurpose.setArgumentGroupName(argGroupControls);
    parser.addArgument(operationPurpose);
    authorizationIdentity = new BooleanArgument('E', "authorizationIdentity", 1, INFO_LDAPDELETE_ARG_DESC_AUTHZ_ID.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(argGroupControls);
    parser.addArgument(authorizationIdentity);
    getAuthorizationEntryAttribute = new StringArgument(null, "getAuthorizationEntryAttribute", false, 0, INFO_LDAPDELETE_ARG_PLACEHOLDER_ATTR.get(), INFO_LDAPDELETE_ARG_DESC_GET_AUTHZ_ENTRY_ATTR.get());
    getAuthorizationEntryAttribute.addLongIdentifier("get-authorization-entry-attribute", true);
    getAuthorizationEntryAttribute.setArgumentGroupName(argGroupControls);
    parser.addArgument(getAuthorizationEntryAttribute);
    getUserResourceLimits = new BooleanArgument(null, "getUserResourceLimits", 1, INFO_LDAPDELETE_ARG_DESC_GET_USER_RESOURCE_LIMITS.get());
    getUserResourceLimits.addLongIdentifier("get-user-resource-limits", true);
    getUserResourceLimits.addLongIdentifier("getUserResourceLimitsControl", true);
    getUserResourceLimits.addLongIdentifier("get-user-resource-limits-control", true);
    getUserResourceLimits.addLongIdentifier("useGetUserResourceLimits", true);
    getUserResourceLimits.addLongIdentifier("use-get-user-resource-limits", true);
    getUserResourceLimits.addLongIdentifier("useGetUserResourceLimitsControl", true);
    getUserResourceLimits.addLongIdentifier("use-get-user-resource-limits-control", true);
    getUserResourceLimits.setArgumentGroupName(argGroupControls);
    parser.addArgument(getUserResourceLimits);
    deleteControl = new ControlArgument('J', "deleteControl", false, 0, null, INFO_LDAPDELETE_ARG_DESC_DELETE_CONTROL.get());
    deleteControl.addLongIdentifier("delete-control", true);
    deleteControl.addLongIdentifier("operationControl", true);
    deleteControl.addLongIdentifier("operation-control", true);
    deleteControl.addLongIdentifier("control", true);
    deleteControl.setArgumentGroupName(argGroupControls);
    parser.addArgument(deleteControl);
    bindControl = new ControlArgument(null, "bindControl", false, 0, null, INFO_LDAPDELETE_ARG_DESC_BIND_CONTROL.get());
    bindControl.addLongIdentifier("bind-control", true);
    bindControl.setArgumentGroupName(argGroupControls);
    parser.addArgument(bindControl);
    // 
    // Argument Constraints
    // 
    // At most one argument may be provided to select the entries to delete.
    parser.addExclusiveArgumentSet(entryDN, dnFile, deleteEntriesMatchingFilter, deleteEntriesMatchingFiltersFromFile);
    // The searchBaseDN argument can only be used if identifying entries with
    // search filters.
    parser.addDependentArgumentSet(searchBaseDN, deleteEntriesMatchingFilter, deleteEntriesMatchingFiltersFromFile);
    // The search page size argument can only be used if identifying entries
    // with search filters or performing a client-side subtree delete.
    parser.addDependentArgumentSet(searchPageSize, deleteEntriesMatchingFilter, deleteEntriesMatchingFiltersFromFile, clientSideSubtreeDelete);
    // Follow referrals and manage DSA IT can't be used together.
    parser.addExclusiveArgumentSet(followReferrals, manageDsaIT);
    // Client-side and server-side subtree delete can't be used together.
    parser.addExclusiveArgumentSet(clientSideSubtreeDelete, serverSideSubtreeDelete);
    // A lot of options can't be used in conjunction with client-side
    // subtree delete.
    parser.addExclusiveArgumentSet(clientSideSubtreeDelete, followReferrals);
    parser.addExclusiveArgumentSet(clientSideSubtreeDelete, preReadAttribute);
    parser.addExclusiveArgumentSet(clientSideSubtreeDelete, getBackendSetID);
    parser.addExclusiveArgumentSet(clientSideSubtreeDelete, getServerID);
    parser.addExclusiveArgumentSet(clientSideSubtreeDelete, noOperation);
    parser.addExclusiveArgumentSet(clientSideSubtreeDelete, dryRun);
    // Soft delete and hard delete can't be used together.
    parser.addExclusiveArgumentSet(softDelete, hardDelete);
}
Also used : ControlArgument(com.unboundid.util.args.ControlArgument) DNArgument(com.unboundid.util.args.DNArgument) DurationArgument(com.unboundid.util.args.DurationArgument) 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) StringArgument(com.unboundid.util.args.StringArgument)

Example 10 with ControlArgument

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

the class TestLDAPCommandLineTool method addNonLDAPArguments.

/**
 * {@inheritDoc}
 */
@Override()
public void addNonLDAPArguments(final ArgumentParser parser) throws ArgumentException {
    final ArgumentParser argListParser1 = new ArgumentParser("argumentList1", "Argument List 1 Description");
    argListParser1.addArgument(new StringArgument(null, "foo", false, -1, "{foo}", "Foo Description"));
    final ArgumentParser argListParser2 = new ArgumentParser("argumentList2", "Argument List 2 Description");
    argListParser2.addArgument(new StringArgument(null, "bar", false, -1, "{bar}", "Bar Description"));
    singleValuedArgumentListArgument = new ArgumentListArgument(null, "singleValuedArgumentList", false, 1, "{argList}", "Argument List", argListParser1);
    parser.addArgument(singleValuedArgumentListArgument);
    multiValuedArgumentListArgument = new ArgumentListArgument(null, "multiValuedArgumentList", false, -1, "{argList}", "Argument List", argListParser2);
    parser.addArgument(multiValuedArgumentListArgument);
    booleanArgument = new BooleanArgument(null, "boolean", "Boolean Description");
    parser.addArgument(booleanArgument);
    booleanValueArgument = new BooleanValueArgument(null, "booleanValue", false, "{true|false}", "Boolean Value Description");
    parser.addArgument(booleanValueArgument);
    singleValuedControlArgument = new ControlArgument(null, "singleValuedControl", false, 1, null, "Control Description");
    parser.addArgument(singleValuedControlArgument);
    multiValuedControlArgument = new ControlArgument(null, "multiValuedControl", false, -1, null, "Control Description");
    parser.addArgument(multiValuedControlArgument);
    singleValuedDNArgument = new DNArgument(null, "singleValuedDN", false, 1, "{dn}", "DN Description");
    parser.addArgument(singleValuedDNArgument);
    multiValuedDNArgument = new DNArgument(null, "multiValuedDN", false, -1, "{dn}", "DN Description");
    parser.addArgument(multiValuedDNArgument);
    durationArgument = new DurationArgument(null, "duration", false, "{duration}", "Duration Description");
    parser.addArgument(durationArgument);
    singleValuedFileArgument = new FileArgument(null, "singleValuedFile", false, 1, "{path}", "File Description", false, true, true, false);
    parser.addArgument(singleValuedFileArgument);
    multiValuedFileArgument = new FileArgument(null, "multiValuedFile", false, -1, "{path}", "File Description", false, false, false, false);
    parser.addArgument(multiValuedFileArgument);
    singleValuedFilterArgument = new FilterArgument(null, "singleValuedFilter", false, 1, "{filter}", "Filter Description");
    parser.addArgument(singleValuedFilterArgument);
    multiValuedFilterArgument = new FilterArgument(null, "multiValuedFilter", false, -1, "{filter}", "Filter Description");
    parser.addArgument(multiValuedFilterArgument);
    singleValuedTimestampArgument = new TimestampArgument(null, "singleValuedGeneralizedTime", false, 1, "{timestamp}", "Generalized Time Description");
    parser.addArgument(singleValuedTimestampArgument);
    multiValuedTimestampArgument = new TimestampArgument(null, "multiValuedGeneralizedTime", false, -1, "{timestamp}", "Generalized Time Description");
    parser.addArgument(multiValuedTimestampArgument);
    singleValuedIntegerArgument = new IntegerArgument(null, "singleValuedInteger", false, 1, "{int}", "Integer Description");
    parser.addArgument(singleValuedIntegerArgument);
    multiValuedIntegerArgument = new IntegerArgument(null, "multiValuedInteger", false, -1, "{int}", "Integer Description");
    parser.addArgument(multiValuedIntegerArgument);
    scopeArgument = new ScopeArgument(null, "scope", false, "{scope}", "Scope Description");
    parser.addArgument(scopeArgument);
    singleValuedStringArgument = new StringArgument(null, "singleValuedString", false, 1, "{string}", "String Description");
    parser.addArgument(singleValuedStringArgument);
    multiValuedOpenOptionsStringArgument = new StringArgument(null, "multiValuedOpenOptionsString", false, -1, "{string}", "String Description");
    parser.addArgument(multiValuedOpenOptionsStringArgument);
    final LinkedHashSet<String> allowedValues = new LinkedHashSet<String>(5);
    allowedValues.add("first");
    allowedValues.add("second");
    allowedValues.add("third");
    allowedValues.add("fourth");
    allowedValues.add("fifth");
    multiValuedFixedOptionsStringArgument = new StringArgument(null, "multiValuedFixedOptionsString", false, -1, "{string}", "String Description", allowedValues);
    parser.addArgument(multiValuedFixedOptionsStringArgument);
    resultCodeArgument = new IntegerArgument(null, "resultCode", true, 1, "{intValue}", "The result code");
    parser.addArgument(resultCodeArgument);
}
Also used : LinkedHashSet(java.util.LinkedHashSet) ScopeArgument(com.unboundid.util.args.ScopeArgument) DurationArgument(com.unboundid.util.args.DurationArgument) BooleanArgument(com.unboundid.util.args.BooleanArgument) FileArgument(com.unboundid.util.args.FileArgument) ArgumentParser(com.unboundid.util.args.ArgumentParser) StringArgument(com.unboundid.util.args.StringArgument) ControlArgument(com.unboundid.util.args.ControlArgument) DNArgument(com.unboundid.util.args.DNArgument) FilterArgument(com.unboundid.util.args.FilterArgument) IntegerArgument(com.unboundid.util.args.IntegerArgument) BooleanValueArgument(com.unboundid.util.args.BooleanValueArgument) TimestampArgument(com.unboundid.util.args.TimestampArgument) ArgumentListArgument(com.unboundid.util.args.ArgumentListArgument)

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