public class ServerLdapContext extends ServerDirContext implements LdapContext
connectControls, DELETE_OLD_RDN_PROP, EMPTY_CONTROLS, objectClassAT, requestControls, responseControls, schemaManagerCONTROL_FACTORIESADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTEAPPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXESOBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE| Constructor and Description |
|---|
ServerLdapContext(DirectoryService service,
CoreSession session,
Name bindDn) |
ServerLdapContext(DirectoryService service,
Hashtable<String,Object> env)
Creates an instance of an ServerLdapContext.
|
ServerLdapContext(DirectoryService service,
LdapPrincipal principal,
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,
String oid,
Object value)
Explicitly exposes an LDAP compare operation which JNDI does not
directly provide.
|
ExtendedResponse |
extendedOperation(ExtendedRequest request) |
Control[] |
getConnectControls() |
Control[] |
getRequestControls() |
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.
|
LdapContext |
newInstance(Control[] requestControls) |
void |
reconnect(Control[] connCtls) |
void |
setRequestControls(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, 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, unbindaddNamingListener, addNamingListener, removeNamingListener, targetMustExistpublic ServerLdapContext(DirectoryService service, Hashtable<String,Object> env) throws Exception
service - the parent service that manages this contextenv - the JNDI environment parametersNamingException - the context cannot be createdExceptionpublic ServerLdapContext(DirectoryService service, LdapPrincipal principal, Name dn) throws Exception
principal - the directory user principal that is propagateddn - the distinguished name of this contextservice - the directory service coreNamingException - if there are problems instantiatingExceptionpublic ServerLdapContext(DirectoryService service, CoreSession session, Name bindDn) throws Exception
Exceptionpublic ExtendedResponse extendedOperation(ExtendedRequest request)
extendedOperation in interface LdapContextLdapContext.extendedOperation(
javax.naming.ldap.ExtendedRequest)public LdapContext newInstance(Control[] requestControls) throws NamingException
newInstance in interface LdapContextNamingExceptionLdapContext.newInstance(
javax.naming.ldap.Control[])public void reconnect(Control[] connCtls) throws NamingException
reconnect in interface LdapContextNamingExceptionLdapContext.reconnect(javax.naming.ldap.Control[])public Control[] getConnectControls() throws NamingException
getConnectControls in interface LdapContextNamingExceptionLdapContext.getConnectControls()public void setRequestControls(Control[] requestControls) throws NamingException
setRequestControls in interface LdapContextNamingExceptionLdapContext.setRequestControls(
javax.naming.ldap.Control[])public Control[] getRequestControls() throws NamingException
getRequestControls in interface LdapContextNamingExceptionLdapContext.getRequestControls()public Control[] getResponseControls() throws NamingException
getResponseControls in interface LdapContextNamingExceptionLdapContext.getResponseControls()public boolean compare(org.apache.directory.api.ldap.model.name.Dn name,
String oid,
Object value)
throws NamingException
name - the name of the entrioid - the name or object identifier for the attribute to comparevalue - the value to compare the attribute toNamingException - 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 NamingException
NamingException - if there are failures encountered while unbindingpublic ServerContext getRootContext() throws NamingException
ServerContextgetRootContext in class ServerContextNamingException - if this failsCopyright © 2021. All rights reserved.