org.identityconnectors.ldap.search
Class LdapSearches

java.lang.Object
  extended by org.identityconnectors.ldap.search.LdapSearches

public class LdapSearches
extends Object

Helper methods for searching. The "get" methods throw an exception when nothing is found; the "find" methods return null or an empty result.

Author:
Andrei Badea

Method Summary
static void findEntries(SearchResultsHandler handler, LdapConnection conn, String filter, String... ldapAttrsToGet)
           
static String findEntryDN(LdapConnection conn, org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.Uid uid)
          Returns the DN of the entry identified by the given Uid.
static org.identityconnectors.framework.common.objects.ConnectorObject findObject(LdapConnection conn, org.identityconnectors.framework.common.objects.ObjectClass oclass, LdapFilter filter, String... attrsToGet)
           
static List<org.identityconnectors.framework.common.objects.ConnectorObject> findObjects(LdapConnection conn, org.identityconnectors.framework.common.objects.ObjectClass oclass, String baseDN, org.identityconnectors.framework.common.objects.Attribute attr, String... attrsToGet)
           
static LdapEntry getEntry(LdapConnection conn, LdapName entryDN, String... ldapAttrsToGet)
           
static String getEntryDN(LdapConnection conn, org.identityconnectors.framework.common.objects.ObjectClass oclass, org.identityconnectors.framework.common.objects.Uid uid)
          Returns the DN of the entry identified by the given Uid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEntryDN

public static String getEntryDN(LdapConnection conn,
                                org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                org.identityconnectors.framework.common.objects.Uid uid)
Returns the DN of the entry identified by the given Uid. Throws UnknownUidException if such an entry does not exists.


findEntryDN

public static String findEntryDN(LdapConnection conn,
                                 org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                 org.identityconnectors.framework.common.objects.Uid uid)
Returns the DN of the entry identified by the given Uid. May throw UnknownUidException if such an entry does not exists, but not necessarily.


findObjects

public static List<org.identityconnectors.framework.common.objects.ConnectorObject> findObjects(LdapConnection conn,
                                                                                                org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                                                                                String baseDN,
                                                                                                org.identityconnectors.framework.common.objects.Attribute attr,
                                                                                                String... attrsToGet)

findObject

public static org.identityconnectors.framework.common.objects.ConnectorObject findObject(LdapConnection conn,
                                                                                         org.identityconnectors.framework.common.objects.ObjectClass oclass,
                                                                                         LdapFilter filter,
                                                                                         String... attrsToGet)

getEntry

public static LdapEntry getEntry(LdapConnection conn,
                                 LdapName entryDN,
                                 String... ldapAttrsToGet)

findEntries

public static void findEntries(SearchResultsHandler handler,
                               LdapConnection conn,
                               String filter,
                               String... ldapAttrsToGet)


Copyright © 2012. All Rights Reserved.