public class ServerLdapContext extends ServerDirContext implements LdapContext
connectControls, DELETE_OLD_RDN_PROP, EMPTY_CONTROLS, objectClassAT, requestControls, responseControls, schemaManager
CONTROL_FACTORIES
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
APPLET, 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_PREFIXES
OBJECT_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, search
addNamingListener, 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, unbind
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search
addToEnvironment, 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, unbind
addNamingListener, addNamingListener, removeNamingListener, targetMustExist
public 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 createdException
public 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 instantiatingException
public ServerLdapContext(DirectoryService service, CoreSession session, Name bindDn) throws Exception
Exception
public ExtendedResponse extendedOperation(ExtendedRequest request)
extendedOperation
in interface LdapContext
LdapContext.extendedOperation(
javax.naming.ldap.ExtendedRequest)
public LdapContext newInstance(Control[] requestControls) throws NamingException
newInstance
in interface LdapContext
NamingException
LdapContext.newInstance(
javax.naming.ldap.Control[])
public void reconnect(Control[] connCtls) throws NamingException
reconnect
in interface LdapContext
NamingException
LdapContext.reconnect(javax.naming.ldap.Control[])
public Control[] getConnectControls() throws NamingException
getConnectControls
in interface LdapContext
NamingException
LdapContext.getConnectControls()
public void setRequestControls(Control[] requestControls) throws NamingException
setRequestControls
in interface LdapContext
NamingException
LdapContext.setRequestControls(
javax.naming.ldap.Control[])
public Control[] getRequestControls() throws NamingException
getRequestControls
in interface LdapContext
NamingException
LdapContext.getRequestControls()
public Control[] getResponseControls() throws NamingException
getResponseControls
in interface LdapContext
NamingException
LdapContext.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
ServerContext
getRootContext
in class ServerContext
NamingException
- if this failsCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.