Class LdapService
- java.lang.Object
-
- com.identity4j.connector.jndi.directory.LdapService
-
public class LdapService extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLdapService.Block<T>static interfaceLdapService.ResultMapper<T>
-
Field Summary
Fields Modifier and Type Field Description static StringOBJECT_CLASS_ATTRIBUTEstatic StringWILDCARD_SEARCH
-
Method Summary
-
-
-
Field Detail
-
WILDCARD_SEARCH
public static final String WILDCARD_SEARCH
- See Also:
- Constant Field Values
-
OBJECT_CLASS_ATTRIBUTE
public static final String OBJECT_CLASS_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
openConnection
public void openConnection() throws NamingException, IOException- Throws:
NamingExceptionIOException
-
getSocketFactory
public SocketFactory getSocketFactory()
-
setSocketFactory
public void setSocketFactory(SocketFactory socketFactory)
-
getConnection
public LdapContext getConnection(Control... controls) throws NamingException
- Throws:
NamingException
-
getConnection
public DirContext getConnection(String account, String password) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
authenticate
public void authenticate(String account, String password) throws IOException, NamingException
- Throws:
IOExceptionNamingException
-
setPassword
public void setPassword(String account, char[] newPassword) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
setPassword
public void setPassword(String account, byte[] encodedPassword, Control... controls) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
close
public void close()
-
getSearchControls
public SearchControls getSearchControls()
-
init
public void init(AbstractDirectoryConfiguration configuration)
-
rename
public void rename(LdapName currentDN, LdapName newDN) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
getAttributes
public Attributes getAttributes(Name dn) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
search
public <T> Iterator<T> search(Filter filter, LdapService.ResultMapper<T> resultMapper, SearchControls searchControls) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
search
public <T> Iterator<T> search(Name baseDN, Filter filter, LdapService.ResultMapper<T> resultMapper, SearchControls searchControls) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
unbind
public void unbind(Name name) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
update
public void update(Name name, ModificationItem... mods) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
bind
public void bind(Name name, Attribute... attrs) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
getRootDSEAttribute
public Attribute getRootDSEAttribute(String name) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
lookupContext
public LdapContext lookupContext(Name dn) throws NamingException, IOException
- Throws:
NamingExceptionIOException
-
buildObjectClassFilter
public final Filter buildObjectClassFilter(String objectClass, String principalNameFilterAttribute, String principalName)
-
checkLDAPHost
protected void checkLDAPHost()
-
-