public class ServerLdapContext extends ServerDirContext implements javax.naming.ldap.LdapContext
connectControls, DELETE_OLD_RDN_PROP, EMPTY_CONTROLS, objectClassAT, requestControls, responseControls, schemaManagerADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE| Constructor and Description |
|---|
ServerLdapContext(DirectoryService service,
CoreSession session,
javax.naming.Name bindDn) |
ServerLdapContext(DirectoryService service,
java.util.Hashtable<java.lang.String,java.lang.Object> env)
Creates an instance of an ServerLdapContext.
|
ServerLdapContext(DirectoryService service,
LdapPrincipal principal,
javax.naming.Name dn)
Creates a new ServerDirContext with a distinguished name which is used to
set the PROVIDER_URL to the distinguished name for this context.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compare(org.apache.directory.api.ldap.model.name.Dn name,
java.lang.String oid,
java.lang.Object value)
Explicitly exposes an LDAP compare operation which JNDI does not
directly provide.
|
javax.naming.ldap.ExtendedResponse |
extendedOperation(javax.naming.ldap.ExtendedRequest request) |
javax.naming.ldap.Control[] |
getConnectControls() |
javax.naming.ldap.Control[] |
getRequestControls() |
javax.naming.ldap.Control[] |
getResponseControls() |
ServerContext |
getRootContext()
Gets a handle on the root context of the DIT.
|
void |
ldapUnbind()
Calling this method tunnels an unbind call down into the partition holding
the bindDn.
|
javax.naming.ldap.LdapContext |
newInstance(javax.naming.ldap.Control[] requestControls) |
void |
reconnect(javax.naming.ldap.Control[] connCtls) |
void |
setRequestControls(javax.naming.ldap.Control[] requestControls) |
addNamingListener, addNamingListener, addNamingListener, addNamingListener, bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search, searchaddNamingListener, addNamingListener, addToEnvironment, bind, bind, buildTarget, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, doAddOperation, doBindOperation, doDeleteOperation, doGetRootDseOperation, doListOperation, doLookupOperation, doLookupOperation, doModifyOperation, doMove, doMoveAndRenameOperation, doRename, doSearchOperation, getDirectoryService, getDn, getEnvironment, getListeners, getNameInNamespace, getNameParser, getNameParser, getService, getSession, injectReferralControl, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, removeNamingListener, rename, rename, targetMustExist, unbind, unbindclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, searchaddToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbindpublic ServerLdapContext(DirectoryService service, java.util.Hashtable<java.lang.String,java.lang.Object> env) throws java.lang.Exception
service - the parent service that manages this contextenv - the JNDI environment parametersjavax.naming.NamingException - the context cannot be createdjava.lang.Exceptionpublic ServerLdapContext(DirectoryService service, LdapPrincipal principal, javax.naming.Name dn) throws java.lang.Exception
principal - the directory user principal that is propagateddn - the distinguished name of this contextservice - the directory service corejavax.naming.NamingException - if there are problems instantiatingjava.lang.Exceptionpublic ServerLdapContext(DirectoryService service, CoreSession session, javax.naming.Name bindDn) throws java.lang.Exception
java.lang.Exceptionpublic javax.naming.ldap.ExtendedResponse extendedOperation(javax.naming.ldap.ExtendedRequest request)
extendedOperation in interface javax.naming.ldap.LdapContextLdapContext.extendedOperation(
javax.naming.ldap.ExtendedRequest)public javax.naming.ldap.LdapContext newInstance(javax.naming.ldap.Control[] requestControls)
throws javax.naming.NamingException
newInstance in interface javax.naming.ldap.LdapContextjavax.naming.NamingExceptionLdapContext.newInstance(
javax.naming.ldap.Control[])public void reconnect(javax.naming.ldap.Control[] connCtls)
throws javax.naming.NamingException
reconnect in interface javax.naming.ldap.LdapContextjavax.naming.NamingExceptionLdapContext.reconnect(javax.naming.ldap.Control[])public javax.naming.ldap.Control[] getConnectControls()
throws javax.naming.NamingException
getConnectControls in interface javax.naming.ldap.LdapContextjavax.naming.NamingExceptionLdapContext.getConnectControls()public void setRequestControls(javax.naming.ldap.Control[] requestControls)
throws javax.naming.NamingException
setRequestControls in interface javax.naming.ldap.LdapContextjavax.naming.NamingExceptionLdapContext.setRequestControls(
javax.naming.ldap.Control[])public javax.naming.ldap.Control[] getRequestControls()
throws javax.naming.NamingException
getRequestControls in interface javax.naming.ldap.LdapContextjavax.naming.NamingExceptionLdapContext.getRequestControls()public javax.naming.ldap.Control[] getResponseControls()
throws javax.naming.NamingException
getResponseControls in interface javax.naming.ldap.LdapContextjavax.naming.NamingExceptionLdapContext.getResponseControls()public boolean compare(org.apache.directory.api.ldap.model.name.Dn name,
java.lang.String oid,
java.lang.Object value)
throws javax.naming.NamingException
name - the name of the entrioid - the name or object identifier for the attribute to comparevalue - the value to compare the attribute tojavax.naming.NamingException - if the backing store cannot be accessed, or
permission is not allowed for this operation or the oid is not recognized,
or the attribute is not present in the entry ... you get the picture.public void ldapUnbind()
throws javax.naming.NamingException
javax.naming.NamingException - if there are failures encountered while unbindingpublic ServerContext getRootContext() throws javax.naming.NamingException
ServerContextgetRootContext in class ServerContextjavax.naming.NamingException - if this fails