use of com.unboundid.util.args.BooleanArgument 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);
}
use of com.unboundid.util.args.BooleanArgument in project ldapsdk by pingidentity.
the class ValidateLDIF 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 path to the LDIF file to process. The tool " + "will automatically attempt to detect whether the file is " + "encrypted or compressed.";
ldifFile = new FileArgument('f', "ldifFile", true, 1, "{path}", description, true, true, true, false);
ldifFile.addLongIdentifier("ldif-file", true);
parser.addArgument(ldifFile);
// Add an argument that makes it possible to read a compressed LDIF file.
// Note that this argument is no longer needed for dealing with compressed
// files, since the tool will automatically detect whether a file is
// compressed. However, the argument is still provided for the purpose of
// backward compatibility.
description = "Indicates that the specified LDIF file is compressed " + "using gzip compression.";
isCompressed = new BooleanArgument('c', "isCompressed", description);
isCompressed.addLongIdentifier("is-compressed", true);
isCompressed.setHidden(true);
parser.addArgument(isCompressed);
// Add an argument that indicates that the tool should read the encryption
// passphrase from a file.
description = "Indicates that the specified LDIF file is encrypted and " + "that the encryption passphrase is contained in the specified " + "file. If the LDIF data is encrypted and this argument is not " + "provided, then the tool will interactively prompt for the " + "encryption passphrase.";
encryptionPassphraseFile = new FileArgument(null, "encryptionPassphraseFile", false, 1, null, description, true, true, true, false);
encryptionPassphraseFile.addLongIdentifier("encryption-passphrase-file", true);
encryptionPassphraseFile.addLongIdentifier("encryptionPasswordFile", true);
encryptionPassphraseFile.addLongIdentifier("encryption-password-file", true);
parser.addArgument(encryptionPassphraseFile);
description = "The path to the file to which rejected entries should be " + "written.";
rejectFile = new FileArgument('R', "rejectFile", false, 1, "{path}", description, false, true, true, false);
rejectFile.addLongIdentifier("reject-file", true);
parser.addArgument(rejectFile);
description = "The path to a directory containing one or more LDIF files " + "with the schema information to use. If this is provided, " + "then no LDAP communication will be performed.";
schemaDirectory = new FileArgument(null, "schemaDirectory", false, 1, "{path}", description, true, true, false, true);
schemaDirectory.addLongIdentifier("schema-directory", true);
parser.addArgument(schemaDirectory);
description = "The number of threads to use when processing the LDIF file.";
numThreads = new IntegerArgument('t', "numThreads", true, 1, "{num}", description, 1, Integer.MAX_VALUE, 1);
numThreads.addLongIdentifier("num-threads", true);
parser.addArgument(numThreads);
description = "Ignore validation failures due to entries containing " + "duplicate values for the same attribute.";
ignoreDuplicateValues = new BooleanArgument(null, "ignoreDuplicateValues", description);
ignoreDuplicateValues.setArgumentGroupName("Validation Strictness Arguments");
ignoreDuplicateValues.addLongIdentifier("ignore-duplicate-values", true);
parser.addArgument(ignoreDuplicateValues);
description = "Ignore validation failures due to object classes not " + "defined in the schema.";
ignoreUndefinedObjectClasses = new BooleanArgument(null, "ignoreUndefinedObjectClasses", description);
ignoreUndefinedObjectClasses.setArgumentGroupName("Validation Strictness Arguments");
ignoreUndefinedObjectClasses.addLongIdentifier("ignore-undefined-object-classes", true);
parser.addArgument(ignoreUndefinedObjectClasses);
description = "Ignore validation failures due to attributes not defined " + "in the schema.";
ignoreUndefinedAttributes = new BooleanArgument(null, "ignoreUndefinedAttributes", description);
ignoreUndefinedAttributes.setArgumentGroupName("Validation Strictness Arguments");
ignoreUndefinedAttributes.addLongIdentifier("ignore-undefined-attributes", true);
parser.addArgument(ignoreUndefinedAttributes);
description = "Ignore validation failures due to entries with malformed " + "DNs.";
ignoreMalformedDNs = new BooleanArgument(null, "ignoreMalformedDNs", description);
ignoreMalformedDNs.setArgumentGroupName("Validation Strictness Arguments");
ignoreMalformedDNs.addLongIdentifier("ignore-malformed-dns", true);
parser.addArgument(ignoreMalformedDNs);
description = "Ignore validation failures due to entries with RDN " + "attribute values that are missing from the set of entry " + "attributes.";
ignoreMissingRDNValues = new BooleanArgument(null, "ignoreMissingRDNValues", description);
ignoreMissingRDNValues.setArgumentGroupName("Validation Strictness Arguments");
ignoreMissingRDNValues.addLongIdentifier("ignore-missing-rdn-values", true);
parser.addArgument(ignoreMissingRDNValues);
description = "Ignore validation failures due to entries without exactly " + "structural object class.";
ignoreStructuralObjectClasses = new BooleanArgument(null, "ignoreStructuralObjectClasses", description);
ignoreStructuralObjectClasses.setArgumentGroupName("Validation Strictness Arguments");
ignoreStructuralObjectClasses.addLongIdentifier("ignore-structural-object-classes", true);
parser.addArgument(ignoreStructuralObjectClasses);
description = "Ignore validation failures due to entries with object " + "classes that are not allowed.";
ignoreProhibitedObjectClasses = new BooleanArgument(null, "ignoreProhibitedObjectClasses", description);
ignoreProhibitedObjectClasses.setArgumentGroupName("Validation Strictness Arguments");
ignoreProhibitedObjectClasses.addLongIdentifier("ignore-prohibited-object-classes", true);
parser.addArgument(ignoreProhibitedObjectClasses);
description = "Ignore validation failures due to entries that are " + "one or more superior object classes.";
ignoreMissingSuperiorObjectClasses = new BooleanArgument(null, "ignoreMissingSuperiorObjectClasses", description);
ignoreMissingSuperiorObjectClasses.setArgumentGroupName("Validation Strictness Arguments");
ignoreMissingSuperiorObjectClasses.addLongIdentifier("ignore-missing-superior-object-classes", true);
parser.addArgument(ignoreMissingSuperiorObjectClasses);
description = "Ignore validation failures due to entries with attributes " + "that are not allowed.";
ignoreProhibitedAttributes = new BooleanArgument(null, "ignoreProhibitedAttributes", description);
ignoreProhibitedAttributes.setArgumentGroupName("Validation Strictness Arguments");
ignoreProhibitedAttributes.addLongIdentifier("ignore-prohibited-attributes", true);
parser.addArgument(ignoreProhibitedAttributes);
description = "Ignore validation failures due to entries missing " + "required attributes.";
ignoreMissingAttributes = new BooleanArgument(null, "ignoreMissingAttributes", description);
ignoreMissingAttributes.setArgumentGroupName("Validation Strictness Arguments");
ignoreMissingAttributes.addLongIdentifier("ignore-missing-attributes", true);
parser.addArgument(ignoreMissingAttributes);
description = "Ignore validation failures due to entries with multiple " + "values for single-valued attributes.";
ignoreSingleValuedAttributes = new BooleanArgument(null, "ignoreSingleValuedAttributes", description);
ignoreSingleValuedAttributes.setArgumentGroupName("Validation Strictness Arguments");
ignoreSingleValuedAttributes.addLongIdentifier("ignore-single-valued-attributes", true);
parser.addArgument(ignoreSingleValuedAttributes);
description = "Ignore validation failures due to entries with attribute " + "values that violate their associated syntax. If this is " + "provided, then no attribute syntax violations will be " + "flagged. If this is not provided, then all attribute " + "syntax violations will be flagged except for violations " + "in those attributes excluded by the " + "--ignoreSyntaxViolationsForAttribute argument.";
ignoreAttributeSyntax = new BooleanArgument(null, "ignoreAttributeSyntax", description);
ignoreAttributeSyntax.setArgumentGroupName("Validation Strictness Arguments");
ignoreAttributeSyntax.addLongIdentifier("ignore-attribute-syntax", true);
parser.addArgument(ignoreAttributeSyntax);
description = "The name or OID of an attribute for which to ignore " + "validation failures due to violations of the associated " + "attribute syntax. This argument can only be used if the " + "--ignoreAttributeSyntax argument is not provided.";
ignoreSyntaxViolationsForAttribute = new StringArgument(null, "ignoreSyntaxViolationsForAttribute", false, 0, "{attr}", description);
ignoreSyntaxViolationsForAttribute.setArgumentGroupName("Validation Strictness Arguments");
ignoreSyntaxViolationsForAttribute.addLongIdentifier("ignore-syntax-violations-for-attribute", true);
parser.addArgument(ignoreSyntaxViolationsForAttribute);
description = "Ignore validation failures due to entries with RDNs " + "that violate the associated name form definition.";
ignoreNameForms = new BooleanArgument(null, "ignoreNameForms", description);
ignoreNameForms.setArgumentGroupName("Validation Strictness Arguments");
ignoreNameForms.addLongIdentifier("ignore-name-forms", true);
parser.addArgument(ignoreNameForms);
// The ignoreAttributeSyntax and ignoreAttributeSyntaxForAttribute arguments
// cannot be used together.
parser.addExclusiveArgumentSet(ignoreAttributeSyntax, ignoreSyntaxViolationsForAttribute);
}
use of com.unboundid.util.args.BooleanArgument in project ldapsdk by pingidentity.
the class ValidateLDAPSchema method addToolArguments.
/**
* {@inheritDoc}
*/
@Override()
public void addToolArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
final boolean pingIdentityDSAvailable = SchemaValidator.PING_IDENTITY_DIRECTORY_SERVER_AVAILABLE;
final List<File> defaultSchemaPaths = new ArrayList<>(1);
if (pingIdentityDSAvailable && (SchemaValidator.PING_IDENTITY_DIRECTORY_SERVER_SCHEMA_DIR != null)) {
defaultSchemaPaths.add(SchemaValidator.PING_IDENTITY_DIRECTORY_SERVER_SCHEMA_DIR);
}
schemaPath = new FileArgument(null, "schema-path", true, 0, null, INFO_VALIDATE_SCHEMA_ARG_DESC_SCHEMA_PATH.get(), true, true, false, false, defaultSchemaPaths);
schemaPath.addLongIdentifier("schemaPath", true);
schemaPath.addLongIdentifier("schema-file", true);
schemaPath.addLongIdentifier("schemaFile", true);
schemaPath.addLongIdentifier("schema-directory", true);
schemaPath.addLongIdentifier("schemaDirectory", true);
schemaPath.addLongIdentifier("schema-dir", true);
schemaPath.addLongIdentifier("schemaDir", true);
schemaPath.addLongIdentifier("file", true);
schemaPath.addLongIdentifier("directory", true);
schemaPath.addLongIdentifier("path", true);
schemaPath.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_INPUT.get());
parser.addArgument(schemaPath);
allowMultipleEntriesPerSchemaFile = new BooleanArgument(null, "allow-multiple-entries-per-schema-file", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_MULTIPLE_ENTRIES.get());
allowMultipleEntriesPerSchemaFile.addLongIdentifier("allowMultipleEntriesPerSchemaFile", true);
allowMultipleEntriesPerSchemaFile.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_INPUT.get());
parser.addArgument(allowMultipleEntriesPerSchemaFile);
allowSchemaFilesInSubdirectories = new BooleanArgument(null, "allow-schema-files-in-subdirectories", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_SUB_DIRS.get());
allowSchemaFilesInSubdirectories.addLongIdentifier("allow-schema-files-in-sub-directories", true);
allowSchemaFilesInSubdirectories.addLongIdentifier("allowSchemaFilesInSubDirectories", true);
allowSchemaFilesInSubdirectories.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_INPUT.get());
parser.addArgument(allowSchemaFilesInSubdirectories);
allowedElementType = new StringArgument(null, "allowed-element-type", false, 0, INFO_VALIDATE_SCHEMA_ARG_PLACEHOLDER_ELEMENT_TYPE.get(), INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOWED_ELEMENT_TYPE.get());
allowedElementType.addLongIdentifier("allowedElementType", true);
allowedElementType.addLongIdentifier("allowed-schema-element-type", true);
allowedElementType.addLongIdentifier("allowedSchemaElementType", true);
allowedElementType.addLongIdentifier("allow-element-type", true);
allowedElementType.addLongIdentifier("allowElementType", true);
allowedElementType.addLongIdentifier("allow-schema-element-type", true);
allowedElementType.addLongIdentifier("allowSchemaElementType", true);
allowedElementType.addLongIdentifier("allowed-element", true);
allowedElementType.addLongIdentifier("allowedElement", true);
allowedElementType.addLongIdentifier("allow-element", true);
allowedElementType.addLongIdentifier("allowElement", true);
allowedElementType.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowedElementType);
prohibitedElementType = new StringArgument(null, "prohibited-element-type", false, 0, INFO_VALIDATE_SCHEMA_ARG_PLACEHOLDER_ELEMENT_TYPE.get(), INFO_VALIDATE_SCHEMA_ARG_DESC_PROHIBITED_ELEMENT_TYPE.get());
prohibitedElementType.addLongIdentifier("prohibitedElementType", true);
prohibitedElementType.addLongIdentifier("prohibited-schema-element-type", true);
prohibitedElementType.addLongIdentifier("prohibitedSchemaElementType", true);
prohibitedElementType.addLongIdentifier("prohibit-element-type", true);
prohibitedElementType.addLongIdentifier("prohibitElementType", true);
prohibitedElementType.addLongIdentifier("prohibit-schema-element-type", true);
prohibitedElementType.addLongIdentifier("prohibitSchemaElementType", true);
prohibitedElementType.addLongIdentifier("prohibited-element", true);
prohibitedElementType.addLongIdentifier("prohibitedElement", true);
prohibitedElementType.addLongIdentifier("prohibit-element", true);
prohibitedElementType.addLongIdentifier("prohibitElement", true);
prohibitedElementType.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(prohibitedElementType);
allowRedefiningElements = new BooleanArgument(null, "allow-redefining-elements", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_REDEFINING.get());
allowRedefiningElements.addLongIdentifier("allow-re-defining-elements", true);
allowRedefiningElements.addLongIdentifier("allowRedefiningElements", true);
allowRedefiningElements.addLongIdentifier("allow-redefining-schema-elements", true);
allowRedefiningElements.addLongIdentifier("allow-re-defining-schema-elements", true);
allowRedefiningElements.addLongIdentifier("allowRedefiningSchemaElements", true);
allowRedefiningElements.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowRedefiningElements);
allowUndefinedElementType = new StringArgument(null, "allow-undefined-element-type", false, 0, INFO_VALIDATE_SCHEMA_ARG_PLACEHOLDER_ELEMENT_TYPE.get(), INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_UNDEFINED.get());
allowUndefinedElementType.addLongIdentifier("allowUndefinedElementType", true);
allowUndefinedElementType.addLongIdentifier("allow-undefined-schema-element-type", true);
allowUndefinedElementType.addLongIdentifier("allowUndefinedSchemaElementType", true);
allowUndefinedElementType.addLongIdentifier("allowed-undefined-element-type", true);
allowUndefinedElementType.addLongIdentifier("allowedUndefinedElementType", true);
allowUndefinedElementType.addLongIdentifier("allowed-undefined-schema-element-type", true);
allowUndefinedElementType.addLongIdentifier("allowedUndefinedSchemaElementType", true);
allowUndefinedElementType.addLongIdentifier("allow-undefined-element", true);
allowUndefinedElementType.addLongIdentifier("allowUndefinedType", true);
allowUndefinedElementType.addLongIdentifier("allow-undefined-type", true);
allowUndefinedElementType.addLongIdentifier("allowUndefinedElement", true);
allowUndefinedElementType.addLongIdentifier("allowed-undefined-element", true);
allowUndefinedElementType.addLongIdentifier("allowedUndefinedType", true);
allowUndefinedElementType.addLongIdentifier("allowed-undefined-type", true);
allowUndefinedElementType.addLongIdentifier("allowedUndefinedElement", true);
allowUndefinedElementType.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowUndefinedElementType);
useLenientOIDValidation = new BooleanArgument(null, "use-lenient-oid-validation", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_LENIENT_OID.get());
useLenientOIDValidation.addLongIdentifier("useLenientOIDValidation", true);
useLenientOIDValidation.addLongIdentifier("allow-lenient-oid-validation", true);
useLenientOIDValidation.addLongIdentifier("allowLenientOIDValidation", true);
useLenientOIDValidation.addLongIdentifier("lenient-oid-validation", true);
useLenientOIDValidation.addLongIdentifier("lenientOIDValidation", true);
useLenientOIDValidation.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(useLenientOIDValidation);
allowNonNumericOIDs = new BooleanArgument(null, "allow-non-numeric-oids", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_NON_NUMERIC_OID.get());
allowNonNumericOIDs.addLongIdentifier("allow-nonnumeric-oids", true);
allowNonNumericOIDs.addLongIdentifier("allowNonNumericOIDs", true);
allowNonNumericOIDs.addLongIdentifier("allow-non-numeric-oid", true);
allowNonNumericOIDs.addLongIdentifier("allow-nonnumeric-oid", true);
allowNonNumericOIDs.addLongIdentifier("allowNonNumericOID", true);
allowNonNumericOIDs.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowNonNumericOIDs);
allowElementsWithoutNames = new BooleanArgument(null, "allow-elements-without-names", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_MISSING_NAME.get());
allowElementsWithoutNames.addLongIdentifier("allowElementsWithoutNames", true);
allowElementsWithoutNames.addLongIdentifier("allow-schema-elements-without-names", true);
allowElementsWithoutNames.addLongIdentifier("allowSchemaElementsWithoutNames", true);
allowElementsWithoutNames.addLongIdentifier("allow-elements-missing-names", true);
allowElementsWithoutNames.addLongIdentifier("allowElementsMissingNames", true);
allowElementsWithoutNames.addLongIdentifier("allow-schema-elements-missing-names", true);
allowElementsWithoutNames.addLongIdentifier("allowSchemaElementsMissingNames", true);
allowElementsWithoutNames.addLongIdentifier("allow-missing-names", true);
allowElementsWithoutNames.addLongIdentifier("allowEMissingNames", true);
allowElementsWithoutNames.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowElementsWithoutNames);
useLenientNameValidation = new BooleanArgument(null, "use-lenient-name-validation", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_LENIENT_NAMES.get());
useLenientNameValidation.addLongIdentifier("useLenientNameValidation", true);
useLenientNameValidation.addLongIdentifier("allow-lenient-name-validation", true);
useLenientNameValidation.addLongIdentifier("allowLenientNameValidation", true);
useLenientNameValidation.addLongIdentifier("lenient-name-validation", true);
useLenientNameValidation.addLongIdentifier("lenientNameValidation", true);
useLenientNameValidation.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(useLenientNameValidation);
allowAttributeTypesWithoutSyntax = new BooleanArgument(null, "allow-attribute-types-without-syntax", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_AT_WITHOUT_SYNTAX.get());
allowAttributeTypesWithoutSyntax.addLongIdentifier("allowAttributeTypesWithoutSyntax", true);
allowAttributeTypesWithoutSyntax.addLongIdentifier("allow-attribute-type-without-syntax", true);
allowAttributeTypesWithoutSyntax.addLongIdentifier("allowAttributeTypeWithoutSyntax", true);
allowAttributeTypesWithoutSyntax.addLongIdentifier("allow-attribute-types-missing-Syntax", true);
allowAttributeTypesWithoutSyntax.addLongIdentifier("allowAttributeTypesMissingSyntax", true);
allowAttributeTypesWithoutSyntax.addLongIdentifier("allow-attribute-type-missing-syntax", true);
allowAttributeTypesWithoutSyntax.addLongIdentifier("allowAttributeTypeMissingSyntax", true);
allowAttributeTypesWithoutSyntax.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowAttributeTypesWithoutSyntax);
rejectAttributeTypesWithoutEqualityMatchingRule = new BooleanArgument(null, "reject-attribute-types-without-equality-matching-rule", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_REJECT_AT_WITHOUT_EQ_MR.get());
rejectAttributeTypesWithoutEqualityMatchingRule.addLongIdentifier("rejectAttributeTypesWithoutEqualityMatchingRule", true);
rejectAttributeTypesWithoutEqualityMatchingRule.addLongIdentifier("reject-attribute-type-without-equality-matching-rule", true);
rejectAttributeTypesWithoutEqualityMatchingRule.addLongIdentifier("rejectAttributeTypeWithoutEqualityMatchingRule", true);
rejectAttributeTypesWithoutEqualityMatchingRule.addLongIdentifier("reject-attribute-types-missing-equality-matching-rule", true);
rejectAttributeTypesWithoutEqualityMatchingRule.addLongIdentifier("rejectAttributeTypesMissingEqualityMatchingRule", true);
rejectAttributeTypesWithoutEqualityMatchingRule.addLongIdentifier("reject-attribute-type-missing-equality-matching-rule", true);
rejectAttributeTypesWithoutEqualityMatchingRule.addLongIdentifier("rejectAttributeTypeMissingEqualityMatchingRule", true);
rejectAttributeTypesWithoutEqualityMatchingRule.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(rejectAttributeTypesWithoutEqualityMatchingRule);
allowStructuralObjectClassesWithoutSuperior = new BooleanArgument(null, "allow-structural-object-classes-without-superior", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_MISSING_MISSING_OC_SUP.get());
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-structural-objectclasses-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allowStructuralObjectClassesWithoutSuperior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-structural-object-class-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-structural-objectclass-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allowStructuralObjectClassWithoutSuperior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-structural-classes-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allowStructuralClassesWithoutSuperior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-structural-class-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allowStructuralClassWithoutSuperior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-object-classes-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-objectclasses-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allowObjectClassesWithoutSuperior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-object-class-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allow-objectclass-without-superior", true);
allowStructuralObjectClassesWithoutSuperior.addLongIdentifier("allowObjectClassWithoutSuperior", true);
allowStructuralObjectClassesWithoutSuperior.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowStructuralObjectClassesWithoutSuperior);
rejectObjectClassesWithMultipleSuperiors = new BooleanArgument(null, "reject-object-classes-with-multiple-superiors", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_REJECT_MULTIPLE_OC_SUP.get());
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("reject-objectclasses-with-multiple-superiors", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("rejectObjectClassesWithMultipleSuperiors", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("reject-object-class-with-multiple-superiors", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("reject-objectclass-with-multiple-superiors", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("rejectObjectClassWithMultipleSuperiors", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("reject-object-classes-with-multiple-superior-classes", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("reject-objectclasses-with-multiple-superior-classes", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("rejectObjectClassesWithMultipleSuperiorClasses", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("reject-object-class-with-multiple-superior-classes", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("reject-objectclass-with-multiple-superior-classes", true);
rejectObjectClassesWithMultipleSuperiors.addLongIdentifier("rejectObjectClassWithMultipleSuperiorClasses", true);
rejectObjectClassesWithMultipleSuperiors.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
if (pingIdentityDSAvailable) {
rejectObjectClassesWithMultipleSuperiors.setHidden(true);
}
parser.addArgument(rejectObjectClassesWithMultipleSuperiors);
allowEmptyDescriptions = new BooleanArgument(null, "allow-empty-descriptions", 1, INFO_VALIDATE_SCHEMA_ARG_DESC_ALLOW_EMPTY_DESC.get());
allowEmptyDescriptions.addLongIdentifier("allowEmptyDescriptions", true);
allowEmptyDescriptions.addLongIdentifier("allow-empty-description", true);
allowEmptyDescriptions.addLongIdentifier("allowEmptyDescription", true);
allowEmptyDescriptions.addLongIdentifier("allow-empty-desc", true);
allowEmptyDescriptions.addLongIdentifier("allowEmptyDESC", true);
allowEmptyDescriptions.setArgumentGroupName(INFO_VALIDATE_SCHEMA_ARG_GROUP_VALIDATION.get());
parser.addArgument(allowEmptyDescriptions);
// The allowed and prohibited schema element type arguments cannot be used
// together.
parser.addExclusiveArgumentSet(allowedElementType, prohibitedElementType);
}
use of com.unboundid.util.args.BooleanArgument in project ldapsdk by pingidentity.
the class MoveSubtree method addNonLDAPArguments.
/**
* {@inheritDoc}
*/
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
baseDN = new DNArgument('b', "baseDN", false, 0, INFO_MOVE_SUBTREE_ARG_BASE_DN_PLACEHOLDER.get(), INFO_MOVE_SUBTREE_ARG_BASE_DN_DESCRIPTION.get());
baseDN.addLongIdentifier("entryDN", true);
parser.addArgument(baseDN);
baseDNFile = new FileArgument('f', "baseDNFile", false, 1, INFO_MOVE_SUBTREE_ARG_BASE_DN_FILE_PLACEHOLDER.get(), INFO_MOVE_SUBTREE_ARG_BASE_DN_FILE_DESCRIPTION.get(), true, true, true, false);
baseDNFile.addLongIdentifier("entryDNFile", true);
parser.addArgument(baseDNFile);
sizeLimit = new IntegerArgument('z', "sizeLimit", false, 1, INFO_MOVE_SUBTREE_ARG_SIZE_LIMIT_PLACEHOLDER.get(), INFO_MOVE_SUBTREE_ARG_SIZE_LIMIT_DESCRIPTION.get(), 0, Integer.MAX_VALUE, 0);
parser.addArgument(sizeLimit);
purpose = new StringArgument(null, "purpose", false, 1, INFO_MOVE_SUBTREE_ARG_PURPOSE_PLACEHOLDER.get(), INFO_MOVE_SUBTREE_ARG_PURPOSE_DESCRIPTION.get());
parser.addArgument(purpose);
verbose = new BooleanArgument('v', "verbose", 1, INFO_MOVE_SUBTREE_ARG_VERBOSE_DESCRIPTION.get());
parser.addArgument(verbose);
parser.addRequiredArgumentSet(baseDN, baseDNFile);
parser.addExclusiveArgumentSet(baseDN, baseDNFile);
}
use of com.unboundid.util.args.BooleanArgument in project ldapsdk by pingidentity.
the class RegisterYubiKeyOTPDevice method addNonLDAPArguments.
/**
* {@inheritDoc}
*/
@Override()
public void addNonLDAPArguments(@NotNull final ArgumentParser parser) throws ArgumentException {
deregister = new BooleanArgument(null, "deregister", 1, INFO_REGISTER_YUBIKEY_OTP_DEVICE_DESCRIPTION_DEREGISTER.get("--otp"));
deregister.addLongIdentifier("de-register", true);
parser.addArgument(deregister);
otp = new StringArgument(null, "otp", false, 1, INFO_REGISTER_YUBIKEY_OTP_DEVICE_PLACEHOLDER_OTP.get(), INFO_REGISTER_YUBIKEY_OTP_DEVICE_DESCRIPTION_OTP.get());
parser.addArgument(otp);
authenticationID = new StringArgument(null, "authID", false, 1, INFO_REGISTER_YUBIKEY_OTP_DEVICE_PLACEHOLDER_AUTHID.get(), INFO_REGISTER_YUBIKEY_OTP_DEVICE_DESCRIPTION_AUTHID.get());
authenticationID.addLongIdentifier("authenticationID", true);
authenticationID.addLongIdentifier("auth-id", true);
authenticationID.addLongIdentifier("authentication-id", true);
parser.addArgument(authenticationID);
userPassword = new StringArgument(null, "userPassword", false, 1, INFO_REGISTER_YUBIKEY_OTP_DEVICE_PLACEHOLDER_USER_PW.get(), INFO_REGISTER_YUBIKEY_OTP_DEVICE_DESCRIPTION_USER_PW.get(authenticationID.getIdentifierString()));
userPassword.setSensitive(true);
userPassword.addLongIdentifier("user-password", true);
parser.addArgument(userPassword);
userPasswordFile = new FileArgument(null, "userPasswordFile", false, 1, null, INFO_REGISTER_YUBIKEY_OTP_DEVICE_DESCRIPTION_USER_PW_FILE.get(authenticationID.getIdentifierString()), true, true, true, false);
userPasswordFile.addLongIdentifier("user-password-file", true);
parser.addArgument(userPasswordFile);
promptForUserPassword = new BooleanArgument(null, "promptForUserPassword", INFO_REGISTER_YUBIKEY_OTP_DEVICE_DESCRIPTION_PROMPT_FOR_USER_PW.get(authenticationID.getIdentifierString()));
promptForUserPassword.addLongIdentifier("prompt-for-user-password", true);
parser.addArgument(promptForUserPassword);
// At most one of the userPassword, userPasswordFile, and
// promptForUserPassword arguments must be present.
parser.addExclusiveArgumentSet(userPassword, userPasswordFile, promptForUserPassword);
// If any of the userPassword, userPasswordFile, or promptForUserPassword
// arguments is present, then the authenticationID argument must also be
// present.
parser.addDependentArgumentSet(userPassword, authenticationID);
parser.addDependentArgumentSet(userPasswordFile, authenticationID);
parser.addDependentArgumentSet(promptForUserPassword, authenticationID);
}
Aggregations