|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.util.ldap.LdapUtil
public final class LdapUtil
This class provides LDAP generic connection methods
Method Summary | |
---|---|
static DirContext |
bindUser(String strLDAPContext,
String strLDAPUrl,
String strDN,
String strPassword)
|
static void |
freeContext(DirContext context)
Close the context given in parameter |
static DirContext |
getContext(String strLDAPContext,
String strLDAPUrl,
String strAdminDN,
String strAdminPassword)
LDAP Context search |
static NamingEnumeration<SearchResult> |
searchUsers(DirContext context,
String strFilter,
String strUserDN,
String strDNBase,
SearchControls sc)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DirContext getContext(String strLDAPContext, String strLDAPUrl, String strAdminDN, String strAdminPassword) throws NamingException
strLDAPContext
- the contextstrLDAPUrl
- the urlstrAdminDN
- the admin dn to usestrAdminPassword
- the admin password to use
NamingException
- in case of errorpublic static void freeContext(DirContext context) throws NamingException
context
- the LDAP context as a DirContext object
NamingException
- in case of errorpublic static DirContext bindUser(String strLDAPContext, String strLDAPUrl, String strDN, String strPassword) throws NamingException
strLDAPContext
- the contextstrLDAPUrl
- the urlstrDN
- the dn of the user to connectstrPassword
- the password of the user to connect
NamingException
- in case of errorpublic static NamingEnumeration<SearchResult> searchUsers(DirContext context, String strFilter, String strUserDN, String strDNBase, SearchControls sc) throws NamingException
context
- the contextstrFilter
- the filter for the searchstrUserDN
- the user dnstrDNBase
- the base dnsc
- the SearchControls
NamingException
- in case of error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |