|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.jndi.ServerContext
public abstract class ServerContext
A non-federated abstract Context implementation.
Field Summary | |
---|---|
protected javax.naming.ldap.Control[] |
connectControls
Connection level controls associated with the session |
static java.lang.String |
DELETE_OLD_RDN_PROP
property key used for deleting the old RDN on a rename |
protected static javax.naming.ldap.Control[] |
EMPTY_CONTROLS
Empty array of controls for use in dealing with them |
protected javax.naming.ldap.Control[] |
requestControls
The request controls to set on operations before performing them |
protected javax.naming.ldap.Control[] |
responseControls
The response controls to set after performing operations |
Fields inherited from interface javax.naming.event.EventContext |
---|
OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE |
Fields inherited from interface javax.naming.Context |
---|
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 |
Constructor Summary | |
---|---|
|
ServerContext(DirectoryService service,
CoreSession session,
javax.naming.Name name)
|
protected |
ServerContext(DirectoryService service,
java.util.Hashtable<java.lang.String,java.lang.Object> env)
Must be called by all subclasses to initialize the nexus proxy and the environment settings to be used by this Context implementation. |
|
ServerContext(DirectoryService service,
LdapPrincipal principal,
javax.naming.Name name)
Must be called by all subclasses to initialize the nexus proxy and the environment settings to be used by this Context implementation. |
Method Summary | |
---|---|
void |
addNamingListener(javax.naming.Name name,
int scope,
javax.naming.event.NamingListener namingListener)
|
void |
addNamingListener(java.lang.String name,
int scope,
javax.naming.event.NamingListener namingListener)
|
java.lang.Object |
addToEnvironment(java.lang.String propName,
java.lang.Object propVal)
|
void |
bind(javax.naming.Name name,
java.lang.Object obj)
|
void |
bind(java.lang.String name,
java.lang.Object obj)
|
void |
close()
|
javax.naming.Name |
composeName(javax.naming.Name name,
javax.naming.Name prefix)
|
java.lang.String |
composeName(java.lang.String name,
java.lang.String prefix)
|
javax.naming.Context |
createSubcontext(javax.naming.Name name)
|
javax.naming.Context |
createSubcontext(java.lang.String name)
|
void |
destroySubcontext(javax.naming.Name name)
|
void |
destroySubcontext(java.lang.String name)
|
protected void |
doAddOperation(org.apache.directory.shared.ldap.name.DN target,
org.apache.directory.shared.ldap.entry.ServerEntry entry)
Used to encapsulate [de]marshalling of controls before and after add operations. |
protected BindOperationContext |
doBindOperation(org.apache.directory.shared.ldap.name.DN bindDn,
byte[] credentials,
java.lang.String saslMechanism,
java.lang.String saslAuthId)
Used to encapsulate [de]marshalling of controls before and after bind operations. |
protected void |
doDeleteOperation(org.apache.directory.shared.ldap.name.DN target)
Used to encapsulate [de]marshalling of controls before and after delete operations. |
protected org.apache.directory.shared.ldap.entry.ServerEntry |
doGetRootDSEOperation(org.apache.directory.shared.ldap.name.DN target)
|
protected EntryFilteringCursor |
doListOperation(org.apache.directory.shared.ldap.name.DN target)
Used to encapsulate [de]marshalling of controls before and after list operations. |
protected org.apache.directory.shared.ldap.entry.ServerEntry |
doLookupOperation(org.apache.directory.shared.ldap.name.DN target)
Used to encapsulate [de]marshalling of controls before and after lookup operations. |
protected org.apache.directory.shared.ldap.entry.ServerEntry |
doLookupOperation(org.apache.directory.shared.ldap.name.DN target,
java.lang.String[] attrIds)
Used to encapsulate [de]marshalling of controls before and after lookup operations. |
protected void |
doModifyOperation(org.apache.directory.shared.ldap.name.DN dn,
java.util.List<org.apache.directory.shared.ldap.entry.Modification> modifications)
Used to encapsulate [de]marshalling of controls before and after modify operations. |
protected void |
doMove(org.apache.directory.shared.ldap.name.DN oldDn,
org.apache.directory.shared.ldap.name.DN target)
Used to encapsulate [de]marshalling of controls before and after moveAndRename operations. |
protected void |
doMoveAndRenameOperation(org.apache.directory.shared.ldap.name.DN oldDn,
org.apache.directory.shared.ldap.name.DN parent,
org.apache.directory.shared.ldap.name.RDN newRdn,
boolean delOldDn)
Used to encapsulate [de]marshalling of controls before and after moveAndRename operations. |
protected void |
doRename(org.apache.directory.shared.ldap.name.DN oldDn,
org.apache.directory.shared.ldap.name.RDN newRdn,
boolean delOldRdn)
Used to encapsulate [de]marshalling of controls before and after rename operations. |
protected EntryFilteringCursor |
doSearchOperation(org.apache.directory.shared.ldap.name.DN dn,
org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode,
org.apache.directory.shared.ldap.filter.ExprNode filter,
javax.naming.directory.SearchControls searchControls)
Used to encapsulate [de]marshalling of controls before and after list operations. |
DirectoryService |
getDirectoryService()
|
protected org.apache.directory.shared.ldap.name.DN |
getDn()
Gets the distinguished name of the entry associated with this Context. |
java.util.Hashtable<java.lang.String,java.lang.Object> |
getEnvironment()
|
protected java.util.Map<javax.naming.event.NamingListener,DirectoryListener> |
getListeners()
Allows subclasses to register and unregister listeners. |
java.lang.String |
getNameInNamespace()
|
javax.naming.NameParser |
getNameParser(javax.naming.Name name)
Non-federated implementation presuming the name argument is not a composite name spanning multiple namespaces but a compound name in the same LDAP namespace. |
javax.naming.NameParser |
getNameParser(java.lang.String name)
Non-federated implementation presuming the name argument is not a composite name spanning multiple namespaces but a compound name in the same LDAP namespace. |
abstract ServerContext |
getRootContext()
Gets a handle on the root context of the DIT. |
DirectoryService |
getService()
Gets the DirectoryService associated with this context. |
CoreSession |
getSession()
|
protected void |
injectReferralControl(OperationContext opCtx)
Set the referral handling flag into the operation context using the JNDI value stored into the environment. |
javax.naming.NamingEnumeration |
list(javax.naming.Name name)
|
javax.naming.NamingEnumeration |
list(java.lang.String name)
|
javax.naming.NamingEnumeration |
listBindings(javax.naming.Name name)
|
javax.naming.NamingEnumeration |
listBindings(java.lang.String name)
|
java.lang.Object |
lookup(javax.naming.Name name)
|
java.lang.Object |
lookup(java.lang.String name)
|
java.lang.Object |
lookupLink(javax.naming.Name name)
|
java.lang.Object |
lookupLink(java.lang.String name)
|
void |
rebind(javax.naming.Name name,
java.lang.Object obj)
|
void |
rebind(java.lang.String name,
java.lang.Object obj)
|
java.lang.Object |
removeFromEnvironment(java.lang.String propName)
|
void |
removeNamingListener(javax.naming.event.NamingListener namingListener)
|
void |
rename(javax.naming.Name oldName,
javax.naming.Name newName)
|
void |
rename(java.lang.String oldName,
java.lang.String newName)
|
boolean |
targetMustExist()
|
void |
unbind(javax.naming.Name name)
|
void |
unbind(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DELETE_OLD_RDN_PROP
protected static final javax.naming.ldap.Control[] EMPTY_CONTROLS
protected javax.naming.ldap.Control[] requestControls
protected javax.naming.ldap.Control[] responseControls
protected javax.naming.ldap.Control[] connectControls
Constructor Detail |
---|
protected ServerContext(DirectoryService service, java.util.Hashtable<java.lang.String,java.lang.Object> env) throws java.lang.Exception
Context.PROVIDER_URL
key and value to determine the distinguished name
of the newly created context. It also checks to make sure the
referenced name actually exists within the system. This constructor
is used for all InitialContext requests.
service
- the parent service that manages this contextenv
- the environment properties used by this context.
javax.naming.NamingException
- if the environment parameters are not set
correctly.
java.lang.Exception
public ServerContext(DirectoryService service, LdapPrincipal principal, javax.naming.Name name) throws java.lang.Exception
principal
- the directory user principal that is propagateddn
- the distinguished name of this contextservice
- the directory service core
javax.naming.NamingException
- if there is a problem creating the new context
java.lang.Exception
public ServerContext(DirectoryService service, CoreSession session, javax.naming.Name name) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
protected void injectReferralControl(OperationContext opCtx)
protected void doAddOperation(org.apache.directory.shared.ldap.name.DN target, org.apache.directory.shared.ldap.entry.ServerEntry entry) throws java.lang.Exception
entry
- target
-
java.lang.Exception
protected void doDeleteOperation(org.apache.directory.shared.ldap.name.DN target) throws java.lang.Exception
target
-
java.lang.Exception
protected EntryFilteringCursor doSearchOperation(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.message.AliasDerefMode aliasDerefMode, org.apache.directory.shared.ldap.filter.ExprNode filter, javax.naming.directory.SearchControls searchControls) throws java.lang.Exception
dn
- aliasDerefMode
- filter
- searchControls
-
java.lang.Exception
protected EntryFilteringCursor doListOperation(org.apache.directory.shared.ldap.name.DN target) throws java.lang.Exception
java.lang.Exception
protected org.apache.directory.shared.ldap.entry.ServerEntry doGetRootDSEOperation(org.apache.directory.shared.ldap.name.DN target) throws java.lang.Exception
java.lang.Exception
protected org.apache.directory.shared.ldap.entry.ServerEntry doLookupOperation(org.apache.directory.shared.ldap.name.DN target) throws java.lang.Exception
java.lang.Exception
protected org.apache.directory.shared.ldap.entry.ServerEntry doLookupOperation(org.apache.directory.shared.ldap.name.DN target, java.lang.String[] attrIds) throws java.lang.Exception
java.lang.Exception
protected BindOperationContext doBindOperation(org.apache.directory.shared.ldap.name.DN bindDn, byte[] credentials, java.lang.String saslMechanism, java.lang.String saslAuthId) throws java.lang.Exception
java.lang.Exception
protected void doMoveAndRenameOperation(org.apache.directory.shared.ldap.name.DN oldDn, org.apache.directory.shared.ldap.name.DN parent, org.apache.directory.shared.ldap.name.RDN newRdn, boolean delOldDn) throws java.lang.Exception
java.lang.Exception
protected void doModifyOperation(org.apache.directory.shared.ldap.name.DN dn, java.util.List<org.apache.directory.shared.ldap.entry.Modification> modifications) throws java.lang.Exception
java.lang.Exception
protected void doMove(org.apache.directory.shared.ldap.name.DN oldDn, org.apache.directory.shared.ldap.name.DN target) throws java.lang.Exception
java.lang.Exception
protected void doRename(org.apache.directory.shared.ldap.name.DN oldDn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean delOldRdn) throws java.lang.Exception
java.lang.Exception
public CoreSession getSession()
public DirectoryService getDirectoryService()
public abstract ServerContext getRootContext() throws javax.naming.NamingException
javax.naming.NamingException
- if this failspublic DirectoryService getService()
DirectoryService
associated with this context.
protected org.apache.directory.shared.ldap.name.DN getDn()
public void close() throws javax.naming.NamingException
close
in interface javax.naming.Context
javax.naming.NamingException
Context.close()
public java.lang.String getNameInNamespace() throws javax.naming.NamingException
getNameInNamespace
in interface javax.naming.Context
javax.naming.NamingException
Context.getNameInNamespace()
public java.util.Hashtable<java.lang.String,java.lang.Object> getEnvironment()
getEnvironment
in interface javax.naming.Context
Context.getEnvironment()
public java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propVal) throws javax.naming.NamingException
addToEnvironment
in interface javax.naming.Context
javax.naming.NamingException
Context.addToEnvironment(java.lang.String,
java.lang.Object)
public java.lang.Object removeFromEnvironment(java.lang.String propName) throws javax.naming.NamingException
removeFromEnvironment
in interface javax.naming.Context
javax.naming.NamingException
Context.removeFromEnvironment(java.lang.String)
public javax.naming.Context createSubcontext(java.lang.String name) throws javax.naming.NamingException
createSubcontext
in interface javax.naming.Context
javax.naming.NamingException
Context.createSubcontext(java.lang.String)
public javax.naming.Context createSubcontext(javax.naming.Name name) throws javax.naming.NamingException
createSubcontext
in interface javax.naming.Context
javax.naming.NamingException
Context.createSubcontext(javax.naming.Name)
public void destroySubcontext(java.lang.String name) throws javax.naming.NamingException
destroySubcontext
in interface javax.naming.Context
javax.naming.NamingException
Context.destroySubcontext(java.lang.String)
public void destroySubcontext(javax.naming.Name name) throws javax.naming.NamingException
destroySubcontext
in interface javax.naming.Context
javax.naming.NamingException
Context.destroySubcontext(javax.naming.Name)
public void bind(java.lang.String name, java.lang.Object obj) throws javax.naming.NamingException
bind
in interface javax.naming.Context
javax.naming.NamingException
Context.bind(java.lang.String, java.lang.Object)
public void bind(javax.naming.Name name, java.lang.Object obj) throws javax.naming.NamingException
bind
in interface javax.naming.Context
javax.naming.NamingException
Context.bind(javax.naming.Name, java.lang.Object)
public void rename(java.lang.String oldName, java.lang.String newName) throws javax.naming.NamingException
rename
in interface javax.naming.Context
javax.naming.NamingException
Context.rename(java.lang.String, java.lang.String)
public void rename(javax.naming.Name oldName, javax.naming.Name newName) throws javax.naming.NamingException
rename
in interface javax.naming.Context
javax.naming.NamingException
Context.rename(javax.naming.Name, javax.naming.Name)
public void rebind(java.lang.String name, java.lang.Object obj) throws javax.naming.NamingException
rebind
in interface javax.naming.Context
javax.naming.NamingException
Context.rebind(java.lang.String, java.lang.Object)
public void rebind(javax.naming.Name name, java.lang.Object obj) throws javax.naming.NamingException
rebind
in interface javax.naming.Context
javax.naming.NamingException
Context.rebind(javax.naming.Name, java.lang.Object)
public void unbind(java.lang.String name) throws javax.naming.NamingException
unbind
in interface javax.naming.Context
javax.naming.NamingException
Context.unbind(java.lang.String)
public void unbind(javax.naming.Name name) throws javax.naming.NamingException
unbind
in interface javax.naming.Context
javax.naming.NamingException
Context.unbind(javax.naming.Name)
public java.lang.Object lookup(java.lang.String name) throws javax.naming.NamingException
lookup
in interface javax.naming.Context
javax.naming.NamingException
Context.lookup(java.lang.String)
public java.lang.Object lookup(javax.naming.Name name) throws javax.naming.NamingException
lookup
in interface javax.naming.Context
javax.naming.NamingException
Context.lookup(javax.naming.Name)
public java.lang.Object lookupLink(java.lang.String name) throws javax.naming.NamingException
lookupLink
in interface javax.naming.Context
javax.naming.NamingException
Context.lookupLink(java.lang.String)
public java.lang.Object lookupLink(javax.naming.Name name) throws javax.naming.NamingException
lookupLink
in interface javax.naming.Context
javax.naming.NamingException
Context.lookupLink(javax.naming.Name)
public javax.naming.NameParser getNameParser(java.lang.String name) throws javax.naming.NamingException
getNameParser
in interface javax.naming.Context
javax.naming.NamingException
Context.getNameParser(java.lang.String)
public javax.naming.NameParser getNameParser(javax.naming.Name name) throws javax.naming.NamingException
getNameParser
in interface javax.naming.Context
javax.naming.NamingException
Context.getNameParser(javax.naming.Name)
public javax.naming.NamingEnumeration list(java.lang.String name) throws javax.naming.NamingException
list
in interface javax.naming.Context
javax.naming.NamingException
Context.list(java.lang.String)
public javax.naming.NamingEnumeration list(javax.naming.Name name) throws javax.naming.NamingException
list
in interface javax.naming.Context
javax.naming.NamingException
Context.list(javax.naming.Name)
public javax.naming.NamingEnumeration listBindings(java.lang.String name) throws javax.naming.NamingException
listBindings
in interface javax.naming.Context
javax.naming.NamingException
Context.listBindings(java.lang.String)
public javax.naming.NamingEnumeration listBindings(javax.naming.Name name) throws javax.naming.NamingException
listBindings
in interface javax.naming.Context
javax.naming.NamingException
Context.listBindings(javax.naming.Name)
public java.lang.String composeName(java.lang.String name, java.lang.String prefix) throws javax.naming.NamingException
composeName
in interface javax.naming.Context
javax.naming.NamingException
Context.composeName(java.lang.String, java.lang.String)
public javax.naming.Name composeName(javax.naming.Name name, javax.naming.Name prefix) throws javax.naming.NamingException
composeName
in interface javax.naming.Context
javax.naming.NamingException
Context.composeName(javax.naming.Name,
javax.naming.Name)
public void addNamingListener(javax.naming.Name name, int scope, javax.naming.event.NamingListener namingListener) throws javax.naming.NamingException
addNamingListener
in interface javax.naming.event.EventContext
javax.naming.NamingException
public void addNamingListener(java.lang.String name, int scope, javax.naming.event.NamingListener namingListener) throws javax.naming.NamingException
addNamingListener
in interface javax.naming.event.EventContext
javax.naming.NamingException
public void removeNamingListener(javax.naming.event.NamingListener namingListener) throws javax.naming.NamingException
removeNamingListener
in interface javax.naming.event.EventContext
javax.naming.NamingException
public boolean targetMustExist() throws javax.naming.NamingException
targetMustExist
in interface javax.naming.event.EventContext
javax.naming.NamingException
protected java.util.Map<javax.naming.event.NamingListener,DirectoryListener> getListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |