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 void
close()
List<Rdn>
getBaseDnRdns()
LdapConnectionConfiguration
getConfiguration()
DirContext
getDirContext()
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:
getEnvironment
in interfaceLdapConnection
- Throws:
LdapException
-
close
public void close() throws NamingException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceLdapConnection
- Throws:
NamingException
-
getConfiguration
public LdapConnectionConfiguration getConfiguration()
- Specified by:
getConfiguration
in interfaceLdapConnection
-
getBaseDnRdns
public List<Rdn> getBaseDnRdns()
- Specified by:
getBaseDnRdns
in interfaceLdapConnection
-
getDirContext
public DirContext getDirContext()
- Specified by:
getDirContext
in interfaceLdapConnection
-
-