| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2012 ForgeRock AS |
| | | * Portions copyright 2011-2013 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.requests; |
| | |
| | | |
| | | /** |
| | | * Creates a new search request using the provided distinguished name, |
| | | * scope, and filter, decoded using the default schema. |
| | | * scope, and filter. |
| | | * |
| | | * @param name |
| | | * The distinguished name of the base entry relative to which the |
| | |
| | | } |
| | | |
| | | /** |
| | | * Creates a new search request for a single entry, using the provided distinguished name, |
| | | * scope, and filter. |
| | | * |
| | | * @param name |
| | | * The distinguished name of the base entry relative to which the |
| | | * search is to be performed. |
| | | * @param scope |
| | | * The scope of the search. |
| | | * @param filter |
| | | * The filter that defines the conditions that must be fulfilled |
| | | * in order for an entry to be returned. |
| | | * @param attributeDescriptions |
| | | * The names of the attributes to be included with each entry. |
| | | * @return The new search request. |
| | | * @throws NullPointerException |
| | | * If the {@code name}, {@code scope}, or {@code filter} were |
| | | * {@code null}. |
| | | */ |
| | | public static SearchRequest newSingleEntrySearchRequest(final DN name, final SearchScope scope, |
| | | final Filter filter, final String... attributeDescriptions) { |
| | | return newSearchRequest(name, scope, filter, attributeDescriptions).setSizeLimit(1); |
| | | } |
| | | |
| | | /** |
| | | * Creates a new search request for a single entry, using the provided distinguished name, |
| | | * scope, and filter, decoded using the default schema. |
| | | * |
| | | * @param name |
| | | * The distinguished name of the base entry relative to which the |
| | | * search is to be performed. |
| | | * @param scope |
| | | * The scope of the search. |
| | | * @param filter |
| | | * The filter that defines the conditions that must be fulfilled |
| | | * in order for an entry to be returned. |
| | | * @param attributeDescriptions |
| | | * The names of the attributes to be included with each entry. |
| | | * @return The new search request. |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code name} could not be decoded using the default |
| | | * schema, or if {@code filter} is not a valid LDAP string |
| | | * representation of a filter. |
| | | * @throws NullPointerException |
| | | * If the {@code name}, {@code scope}, or {@code filter} were |
| | | * {@code null}. |
| | | */ |
| | | public static SearchRequest newSingleEntrySearchRequest(final String name, final SearchScope scope, |
| | | final String filter, final String... attributeDescriptions) { |
| | | return newSearchRequest(name, scope, filter, attributeDescriptions).setSizeLimit(1); |
| | | } |
| | | |
| | | /** |
| | | * Creates a new simple bind request having an empty name and password |
| | | * suitable for anonymous authentication. |
| | | * |