|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.admin.client.ldap.LDAPConnection
public abstract class LDAPConnection
An LDAP connection adaptor interface which is used to perform LDAP client operations.
This interface is provided in order to make it easier to keep track of which JNDI DirContext methods we require and also to facilitate implementation of mock JNDI contexts for unit-testing.
Constructor Summary | |
---|---|
protected |
LDAPConnection()
Create a new LDAP connection. |
Method Summary | |
---|---|
abstract void |
createEntry(javax.naming.ldap.LdapName dn,
javax.naming.directory.Attributes attributes)
Creates a new entry with the specified set of attributes. |
abstract void |
deleteSubtree(javax.naming.ldap.LdapName dn)
Deletes the named subtree. |
abstract boolean |
entryExists(javax.naming.ldap.LdapName dn)
Determines whether or not the named entry exists. |
abstract java.util.Collection<javax.naming.ldap.LdapName> |
listEntries(javax.naming.ldap.LdapName dn,
java.lang.String filter)
Lists the children of the named entry. |
abstract void |
modifyEntry(javax.naming.ldap.LdapName dn,
javax.naming.directory.Attributes mods)
Modifies the attributes of the named entry. |
abstract javax.naming.directory.Attributes |
readEntry(javax.naming.ldap.LdapName dn,
java.util.Collection<java.lang.String> attrIds)
Reads the attributes of the named entry. |
abstract void |
unbind()
Closes the LDAP connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected LDAPConnection()
Method Detail |
---|
public abstract void createEntry(javax.naming.ldap.LdapName dn, javax.naming.directory.Attributes attributes) throws javax.naming.NamingException
dn
- The name of the entry to be created.attributes
- The set of attributes.
javax.naming.NamingException
- If an error occurred whilst creating the entry.public abstract void deleteSubtree(javax.naming.ldap.LdapName dn) throws javax.naming.NamingException
dn
- The name of the subtree to be deleted.
javax.naming.NamingException
- If an error occurred whilst deleting the subtree.public abstract boolean entryExists(javax.naming.ldap.LdapName dn) throws javax.naming.NamingException
dn
- The name of the entry.
true
if the entry exists.
javax.naming.NamingException
- If an error occurred whilst making the determination.public abstract java.util.Collection<javax.naming.ldap.LdapName> listEntries(javax.naming.ldap.LdapName dn, java.lang.String filter) throws javax.naming.NamingException
dn
- The name of the entry to list.filter
- An LDAP filter string, or null
indicating
the default filter of (objectclass=*)
.
javax.naming.NamingException
- If an error occurred whilst listing the children.public abstract void modifyEntry(javax.naming.ldap.LdapName dn, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
dn
- The name of the entry to be modified.mods
- The list of attributes which need replacing.
javax.naming.NamingException
- If an error occurred whilst applying the modifications.public abstract javax.naming.directory.Attributes readEntry(javax.naming.ldap.LdapName dn, java.util.Collection<java.lang.String> attrIds) throws javax.naming.NamingException
dn
- The name of the entry to be read.attrIds
- The list of attributes to be retrievd.
javax.naming.NamingException
- If an error occurred whilst reading the entry.public abstract void unbind()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |