public abstract class LDAPConnection extends Object implements LDAPSchemaAware
Modifier and Type | Field and Description |
---|---|
static String |
AUTHENTICATION_ATTR |
protected static Map<String,Class<?>> |
CONNECTION_IMPLEMENTATIONS |
static String |
CONNECTION_TYPE_ATTR |
static boolean |
DEFAULT_SCHEMA_ENABLED |
static boolean |
DEFAULT_TLS_ENABLED |
static String |
INITIAL_POOL_CONNECTIONS_ATTR |
static String |
LDAP_URL_ATTR |
static String |
MAX_POOL_CONNECTIONS_ATTR |
static String |
NO_AUTHENTICATION |
static String |
POOL_TIMEOUT_ATTR |
static String |
REFERRAL_ATTR |
static String |
SCHEMA_ENABLED |
static String |
SIMPLE_AUTHENTICATION |
static String |
TLS_ENABLED |
Constructor and Description |
---|
LDAPConnection() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addAttribute(String dn,
LDAPEntryAttribute attribute) |
abstract void |
addEntry(LDAPEntry entry) |
abstract void |
bind(String dn,
String password) |
abstract void |
close() |
abstract void |
deleteAttribute(String dn,
LDAPEntryAttribute attribute)
Deletes the attribute or the value of the attribute.
|
abstract void |
deleteEntry(LDAPEntry entry) |
abstract void |
deleteEntry(String dn) |
abstract String |
getBindedUserDn() |
static LDAPConnection |
getConnection(Map<String,String> conf) |
static LDAPConnection |
getConnection(String type,
String url,
String authentication,
String referral,
Map<String,String> extendedConf,
boolean schemaEnabled) |
static LDAPConnection |
getConnection(String type,
String url,
String authentication,
String referral,
Map<String,String> extendedConf,
boolean schemaEnabled,
boolean tlsEnabled) |
protected abstract void |
initialize(Map<String,String> conf) |
abstract boolean |
isClosed() |
boolean |
isSchemaEnabled() |
boolean |
isTlsEnabled() |
abstract LDAPEntry |
lookup(String dn) |
abstract LDAPEntry |
lookup(String dn,
String[] attributes)
Returns the LDAP entry matching the given dn.
|
abstract void |
rebind() |
abstract void |
renameEntry(String oldDn,
String newDn) |
abstract LDAPResultSet |
search(String baseDn,
String filter,
LDAPSearchControls controls) |
abstract LDAPResultSet |
search(String baseDn,
String filter,
Object[] filterArgs,
LDAPSearchControls controls) |
abstract void |
setAuthentication(String authentication) |
void |
setSchemaEnabled(boolean schemaEnabled) |
void |
setTlsEnabled(boolean tlsEnabled) |
abstract void |
setTrustStore(String trustStorePath) |
abstract void |
setTrustStorePassword(String trustStorePassword) |
abstract void |
updateAttribute(String dn,
LDAPEntryAttribute attribute) |
abstract void |
updateEntry(LDAPEntry entry) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllObjectClasses, getAttributeTypeDefinition, getObjectClassDefinition
public static final boolean DEFAULT_SCHEMA_ENABLED
public static final boolean DEFAULT_TLS_ENABLED
public static final String NO_AUTHENTICATION
public static final String SIMPLE_AUTHENTICATION
public static final String CONNECTION_TYPE_ATTR
public static final String LDAP_URL_ATTR
public static final String AUTHENTICATION_ATTR
public static final String INITIAL_POOL_CONNECTIONS_ATTR
public static final String MAX_POOL_CONNECTIONS_ATTR
public static final String POOL_TIMEOUT_ATTR
public static final String REFERRAL_ATTR
public static final String SCHEMA_ENABLED
public static final String TLS_ENABLED
public static LDAPConnection getConnection(String type, String url, String authentication, String referral, Map<String,String> extendedConf, boolean schemaEnabled, boolean tlsEnabled) throws LDAPException
LDAPException
public static LDAPConnection getConnection(String type, String url, String authentication, String referral, Map<String,String> extendedConf, boolean schemaEnabled) throws LDAPException
LDAPException
public static LDAPConnection getConnection(Map<String,String> conf) throws LDAPException
LDAPException
protected abstract void initialize(Map<String,String> conf) throws LDAPException
conf
- ConfigurationsLDAPException
public abstract void bind(String dn, String password) throws LDAPException
dn
- Distinguished Namepassword
- PasswordLDAPException
public abstract void rebind() throws LDAPException
LDAPException
public abstract LDAPResultSet search(String baseDn, String filter, Object[] filterArgs, LDAPSearchControls controls) throws LDAPException
baseDn
- Base Distinguished Namefilter
- FilterfilterArgs
- Filter Argumentscontrols
- LDAP Search ControlsLDAPException
public abstract String getBindedUserDn() throws LDAPException
LDAPException
public abstract LDAPResultSet search(String baseDn, String filter, LDAPSearchControls controls) throws LDAPException
baseDn
- Base Distinguished Namefilter
- Filtercontrols
- LDAP Search ControlsLDAPException
public abstract LDAPEntry lookup(String dn) throws LDAPException
dn
- Distinguished NameLDAPException
public abstract void renameEntry(String oldDn, String newDn) throws LDAPException
oldDn
- Old Distinguished NamenewDn
- New Distinguished NameLDAPException
public abstract LDAPEntry lookup(String dn, String[] attributes) throws LDAPException
dn
- Distinguished Nameattributes
- Attributes names to fetch.LDAPException
public abstract void addEntry(LDAPEntry entry) throws LDAPException
entry
- LDAPEntryLDAPException
public abstract void updateEntry(LDAPEntry entry) throws LDAPException
entry
- LDAPEntryLDAPException
public abstract void deleteEntry(LDAPEntry entry) throws LDAPException
entry
- LDAPEntryLDAPException
public abstract void deleteEntry(String dn) throws LDAPException
dn
- Distinguished NameLDAPException
public abstract void addAttribute(String dn, LDAPEntryAttribute attribute) throws LDAPException
dn
- Distinguished Nameattribute
- AttributeLDAPException
public abstract void updateAttribute(String dn, LDAPEntryAttribute attribute) throws LDAPException
dn
- Distinguished Nameattribute
- AttributeLDAPException
public abstract void deleteAttribute(String dn, LDAPEntryAttribute attribute) throws LDAPException
dn
- Distinguished Nameattribute
- AttributeLDAPException
public abstract void close() throws LDAPException
LDAPException
public abstract boolean isClosed() throws LDAPException
LDAPException
public boolean isSchemaEnabled()
isSchemaEnabled
in interface LDAPSchemaAware
public void setSchemaEnabled(boolean schemaEnabled)
public boolean isTlsEnabled()
public void setTlsEnabled(boolean tlsEnabled)
public abstract void setAuthentication(String authentication)
public abstract void setTrustStore(String trustStorePath)
public abstract void setTrustStorePassword(String trustStorePassword)
Copyright © 2010–2018. All rights reserved.