Interface LDAPConnection
-
- All Known Implementing Classes:
ActiveDirectoryConnectionImpl,EDirectoryConnectionImpl,JNDIConnectionImpl
public interface LDAPConnectionProvides ldap services. The different implementations are responsible for providing support for server failover or other failure recovery features.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangePassword(javax.naming.directory.DirContext ctx, java.lang.String argRDN, java.lang.String oldPassword, java.lang.String newPassword)booleancheckPassword(java.lang.String searchbase, java.lang.String login, char[] plainPassword)voidclose()Close the connection to the directory.javax.naming.directory.Attributesread(java.lang.String distinguishedName)Reads all the attribute type and values for the given entry.java.util.CollectionsearchBaseEntry(java.lang.String searchbase, java.lang.String filter, int limit, int timeout)Performs a base object search (i.e.java.util.CollectionsearchBaseEntry(java.lang.String searchbase, java.lang.String filter, int limit, int timeout, java.lang.String[] returnAttributes)Performs a base object search (i.e.java.util.CollectionsearchSubTree(java.lang.String searchbase, java.lang.String filter, int limit, int timeout)Performs a directory sub tree search (i.e.java.util.Collection<LDAPGenericObject>searchSubTree(java.lang.String searchbase, java.lang.String filter, int limit, int timeout, java.lang.String[] returnAttributes)Performs a directory sub tree search (i.e.
-
-
-
Method Detail
-
close
void close()
Close the connection to the directory. All other methods of this interface should throw an exception if called after this method, but it is not guarenteed.
-
searchBaseEntry
java.util.Collection searchBaseEntry(java.lang.String searchbase, java.lang.String filter, int limit, int timeout) throws LDAPOperationException, LDAPUnavailableException, javax.naming.NamingExceptionPerforms a base object search (i.e. just a search of the current entry, nothing below it), returning no attributes (i.e. just DNs);- Parameters:
searchbase- the domain name (relative to initial context in ldap) to seach from.filter- the non-null filter to use for the searchlimit- the maximum number of results to returntimeout- the maximum time to wait before abandoning the search- Returns:
- list of search results ('SearchResult's); entries matching the search filter.
- Throws:
LDAPOperationExceptionLDAPUnavailableExceptionjavax.naming.NamingException
-
searchBaseEntry
java.util.Collection searchBaseEntry(java.lang.String searchbase, java.lang.String filter, int limit, int timeout, java.lang.String[] returnAttributes) throws LDAPOperationException, LDAPUnavailableException, javax.naming.NamingExceptionPerforms a base object search (i.e. just a search of the current entry, nothing below it).- Parameters:
searchbase- the domain name (relative to initial context in ldap) to seach from.filter- the non-null filter to use for the searchlimit- the maximum number of results to returntimeout- the maximum time to wait before abandoning the searchreturnAttributes- an array of strings containing the names of attributes to search. (null = all, empty array = none)- Returns:
- list of search results ('SearchResult's); entries matching the search filter.
- Throws:
LDAPOperationExceptionLDAPUnavailableExceptionjavax.naming.NamingException
-
searchSubTree
java.util.Collection searchSubTree(java.lang.String searchbase, java.lang.String filter, int limit, int timeout) throws LDAPOperationException, LDAPUnavailableException, javax.naming.NamingExceptionPerforms a directory sub tree search (i.e. of the next level and all subsequent levels below), returning just dns);- Parameters:
searchbase- the domain name (relative to initial context in ldap) to seach from.filter- the non-null filter to use for the searchlimit- the maximum number of results to returntimeout- the maximum time to wait before abandoning the search- Returns:
- list of search results ('SearchResult's); entries matching the search filter. WARNING - these may be RELATIVE to the seachbase.
- Throws:
LDAPOperationExceptionLDAPUnavailableExceptionjavax.naming.NamingException
-
searchSubTree
java.util.Collection<LDAPGenericObject> searchSubTree(java.lang.String searchbase, java.lang.String filter, int limit, int timeout, java.lang.String[] returnAttributes) throws LDAPOperationException, LDAPUnavailableException, javax.naming.NamingException
Performs a directory sub tree search (i.e. of the next level and all subsequent levels below).- Parameters:
searchbase- the domain name (relative to initial context in ldap) to seach from.filter- the non-null filter to use for the searchlimit- the maximum number of results to returntimeout- the maximum time to wait before abandoning the searchreturnAttributes- an array of strings containing the names of attributes to search. (null = all, empty array = none)- Returns:
- list of search results ('SearchResult's); entries matching the search filter. WARNING - these may be RELATIVE to the seachbase.
- Throws:
LDAPOperationExceptionLDAPUnavailableExceptionjavax.naming.NamingException
-
read
javax.naming.directory.Attributes read(java.lang.String distinguishedName) throws LDAPOperationException, LDAPUnavailableException, javax.naming.NamingExceptionReads all the attribute type and values for the given entry.- Parameters:
distinguishedName- the ldap string distinguished name of entry to be read- Returns:
- an 'Attributes' object containing a list of all Attribute objects.
- Throws:
LDAPOperationExceptionLDAPUnavailableExceptionjavax.naming.NamingException
-
checkPassword
boolean checkPassword(java.lang.String searchbase, java.lang.String login, char[] plainPassword)
-
changePassword
void changePassword(javax.naming.directory.DirContext ctx, java.lang.String argRDN, java.lang.String oldPassword, java.lang.String newPassword) throws javax.naming.NamingException- Throws:
javax.naming.NamingException
-
-