This section shows how to supply your own LDAP implementation for the API. It might be useful if you want to borrow some concepts of LDAP Utils on your implementation, or if you want to reuse parts of the LDAP Utils implementation.
The LDAP Utils API is defined by the ILDAPUtils interface and any new LDAP Utils implementation must conform to it.
This interface defines the expected behavior for the API. It includes typical operations executed on LDAP servers such as:
The AbstractLDAPUtils is the standard base implementation of the LDAP Utils API as specified by the ILDAPUtils interface. This class provides default implementations of most of the interface's methods. Some technology specific methods implementations are delegated to subclasses. Since these implementations are common to several LDAP technologies they were placed on the base class to be available for the subclasses. As such the AbstractLDAPUtils class can be used as a starting point for the new implementation.
The technology specific details not implemented on the base class are:
Here's the list of abstract methods that must be implemented:
abstract protected String getUserClassName(); abstract protected String getGroupClassName(); abstract protected String getUserParentGroupAttributeName(); abstract protected String getGroupParentGroupAttributeName(); abstract protected String calculateDistinguishedName(String commonName, String mainGroupCommonName);
The following method might be implemented as well, if the programmer wishes so or if the used LDAP technology forces to:
public void changePassword(String loginName, String newPassword) throws LDAPOperationException ;
For a complete in-depth view of the AbstractLDAPUtils class read this page.
If you have the need for a specific LDAP technology you can opt to implement everything from scratch. To do so, simply make you class implement the ILDAPUtils interface and supply the adequate implementation logic.