| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | package com.sun.opends.sdk.tools; |
| | |
| | | final ArgumentParser argParser = new ArgumentParser(LDAPSearch.class |
| | | .getName(), toolDescription, false, true, 0, 0, |
| | | "[filter] [attributes ...]"); |
| | | ArgumentParserConnectionFactory connectionFactory; |
| | | ConnectionFactoryProvider connectionFactoryProvider; |
| | | ConnectionFactory connectionFactory; |
| | | |
| | | BooleanArgument countEntries; |
| | | BooleanArgument dontWrap; |
| | |
| | | IntegerArgument sizeLimit; |
| | | try |
| | | { |
| | | connectionFactory = new ArgumentParserConnectionFactory(argParser, this); |
| | | connectionFactoryProvider = |
| | | new ConnectionFactoryProvider(argParser, this); |
| | | final StringArgument propertiesFileArgument = new StringArgument( |
| | | "propertiesFilePath", null, OPTION_LONG_PROP_FILE_PATH, false, false, |
| | | true, INFO_PROP_FILE_PATH_PLACEHOLDER.get(), null, null, |
| | |
| | | try |
| | | { |
| | | argParser.parseArguments(args); |
| | | connectionFactory.validate(); |
| | | connectionFactory = |
| | | connectionFactoryProvider.getAuthenticatedConnectionFactory(); |
| | | } |
| | | catch (final ArgumentException ae) |
| | | { |