| | |
| | | import org.forgerock.opendj.ldap.controls.SimplePagedResultsControl; |
| | | import org.forgerock.opendj.ldap.controls.VirtualListViewRequestControl; |
| | | import org.forgerock.opendj.ldap.controls.VirtualListViewResponseControl; |
| | | import org.forgerock.opendj.ldap.requests.BindRequest; |
| | | import org.forgerock.opendj.ldap.requests.Requests; |
| | | import org.forgerock.opendj.ldap.requests.SearchRequest; |
| | | import org.forgerock.opendj.ldap.responses.Result; |
| | |
| | | import static com.forgerock.opendj.cli.ArgumentConstants.*; |
| | | import static com.forgerock.opendj.cli.Utils.*; |
| | | import static com.forgerock.opendj.ldap.tools.ToolsMessages.*; |
| | | import static com.forgerock.opendj.ldap.tools.Utils.*; |
| | | |
| | | /** |
| | | * A tool that can be used to issue Search requests to the Directory Server. |
| | |
| | | "[filter] [attributes ...]"); |
| | | ConnectionFactoryProvider connectionFactoryProvider; |
| | | ConnectionFactory connectionFactory; |
| | | BindRequest bindRequest; |
| | | |
| | | BooleanArgument countEntries; |
| | | BooleanArgument dontWrap; |
| | |
| | | return 0; |
| | | } |
| | | |
| | | connectionFactory = connectionFactoryProvider.getConnectionFactory(); |
| | | bindRequest = connectionFactoryProvider.getBindRequest(); |
| | | connectionFactory = connectionFactoryProvider.getAuthenticatedConnectionFactory(); |
| | | } catch (final ArgumentException ae) { |
| | | final LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage()); |
| | | errPrintln(message); |
| | |
| | | Connection connection; |
| | | try { |
| | | connection = connectionFactory.getConnection(); |
| | | if (bindRequest != null) { |
| | | printPasswordPolicyResults(this, connection.bind(bindRequest)); |
| | | } |
| | | } catch (final LdapException ere) { |
| | | return printErrorMessage(this, ere); |
| | | return Utils.printErrorMessage(this, ere); |
| | | } |
| | | |
| | | Utils.printPasswordPolicyResults(this, connection); |
| | | |
| | | try { |
| | | int filterIndex = 0; |