Class LDAPConnection
java.lang.Object
de.muehlencord.shared.network.ldap.LDAPConnection
Initializes and holds a connection to an LDAP address directory
LdapContext- Author:
- Joern Muehlencord (joern@muehlencord.de)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidinit()initialize connection to ADsearch(String name, String filter, SearchControls cons) voidsetAuthentication(String authentication) voidsetPassword(String password) voidsetProviderUrl(String providerUrl) voidsetSecurityProtocol(String securityProtocol) voidsetUsername(String username)
-
Field Details
-
CONTEXT_FACTORY
- See Also:
-
CONTROL_FACTORY
- See Also:
-
AUTHENTICATION_SIMPLE
- See Also:
-
SECURITYPROTOCOL_SIMPLE
- See Also:
-
-
Constructor Details
-
LDAPConnection
-
-
Method Details
-
getAuthentication
-
setAuthentication
-
getPassword
-
setPassword
-
getProviderUrl
-
setProviderUrl
-
getSecurityProtocol
-
setSecurityProtocol
-
getUsername
-
setUsername
-
init
initialize connection to AD- Throws:
NamingException- is thrown if connection to LDAP failed
-
search
public NamingEnumeration<SearchResult> search(String name, String filter, SearchControls cons) throws NamingException - Parameters:
name- the name to search forfilter- the filter to applycons- the search controls to use- Returns:
- the result returned by the LDAP server
- Throws:
NamingException- it the search fails
-
close
- Throws:
NamingException- if the close operation failsLdapContext
-