Class DefaultLdapConnection
- java.lang.Object
-
- org.apache.archiva.redback.common.ldap.connection.DefaultLdapConnection
-
- All Implemented Interfaces:
AutoCloseable,LdapConnection
public class DefaultLdapConnection extends Object implements LdapConnection
The configuration for a connection will not change.- Since:
- 2.1
- Author:
- trygvis
-
-
Constructor Summary
Constructors Constructor Description DefaultLdapConnection(LdapConnectionConfiguration config, String bindDn, String password)This ldap connection will attempt to establish a connection using the configuration, replacing the principal and the passwordDefaultLdapConnection(LdapConnectionConfiguration config, Rdn subRdn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()List<Rdn>getBaseDnRdns()LdapConnectionConfigurationgetConfiguration()DirContextgetDirContext()Hashtable<Object,Object>getEnvironment()
-
-
-
Constructor Detail
-
DefaultLdapConnection
public DefaultLdapConnection(LdapConnectionConfiguration config, Rdn subRdn) throws LdapException
- Throws:
LdapException
-
DefaultLdapConnection
public DefaultLdapConnection(LdapConnectionConfiguration config, String bindDn, String password) throws LdapException
This ldap connection will attempt to establish a connection using the configuration, replacing the principal and the password- Parameters:
config-bindDn-password-- Throws:
LdapException
-
-
Method Detail
-
getEnvironment
public Hashtable<Object,Object> getEnvironment() throws LdapException
- Specified by:
getEnvironmentin interfaceLdapConnection- Throws:
LdapException
-
close
public void close() throws NamingException
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceLdapConnection- Throws:
NamingException
-
getConfiguration
public LdapConnectionConfiguration getConfiguration()
- Specified by:
getConfigurationin interfaceLdapConnection
-
getBaseDnRdns
public List<Rdn> getBaseDnRdns()
- Specified by:
getBaseDnRdnsin interfaceLdapConnection
-
getDirContext
public DirContext getDirContext()
- Specified by:
getDirContextin interfaceLdapConnection
-
-