use of com.unboundid.util.args.ArgumentListArgument 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);
}
Aggregations