Search in sources :

Example 1 with SearchExecutor

use of org.ldaptive.SearchExecutor in project cas by apereo.

the class Beans method newLdaptiveSearchExecutor.

/**
     * New ldaptive search executor search executor.
     *
     * @param baseDn           the base dn
     * @param filterQuery      the filter query
     * @param params           the params
     * @param returnAttributes the return attributes
     * @return the search executor
     */
public static SearchExecutor newLdaptiveSearchExecutor(final String baseDn, final String filterQuery, final List<String> params, final String[] returnAttributes) {
    final SearchExecutor executor = new SearchExecutor();
    executor.setBaseDn(baseDn);
    executor.setSearchFilter(newLdaptiveSearchFilter(filterQuery, params));
    executor.setReturnAttributes(returnAttributes);
    executor.setSearchScope(SearchScope.SUBTREE);
    return executor;
}
Also used : SearchExecutor(org.ldaptive.SearchExecutor)

Example 2 with SearchExecutor

use of org.ldaptive.SearchExecutor in project cas by apereo.

the class LdapUtils method newLdaptiveSearchExecutor.

/**
 * New ldaptive search executor search executor.
 *
 * @param baseDn           the base dn
 * @param filterQuery      the filter query
 * @param params           the params
 * @param returnAttributes the return attributes
 * @return the search executor
 */
public static SearchExecutor newLdaptiveSearchExecutor(final String baseDn, final String filterQuery, final List<String> params, final String[] returnAttributes) {
    final SearchExecutor executor = new SearchExecutor();
    executor.setBaseDn(baseDn);
    executor.setSearchFilter(newLdaptiveSearchFilter(filterQuery, params));
    executor.setReturnAttributes(returnAttributes);
    executor.setSearchScope(SearchScope.SUBTREE);
    return executor;
}
Also used : SearchExecutor(org.ldaptive.SearchExecutor)

Aggregations

SearchExecutor (org.ldaptive.SearchExecutor)2