public class DirContextImpl extends ContextImpl implements javax.naming.directory.DirContext
DirContext
.
The actual storage
of the persistent data is in the AbstractModel
.
The DirContextImpl
is just a Visitor around
the AbstractModel
which also encapsulate
the JNDI environment.
In JNDI, each Context
is a <model, env> pair.
Each client might pass a different environment
to the InitialContext
so each ContextImpl
must be unique for each client. (Granted, this is a bit wasteful of
space which is why JNDI values should be cached.)
Applications which want a different model can still use
ContextImpl
and specify the root
object for AbstractModel
. ContextImpl
will
take care of the JNDI API for the model.
Modifier and Type | Field and Description |
---|---|
protected static L10N |
L |
protected static java.util.logging.Logger |
log |
_env, _model, _name
Constructor and Description |
---|
DirContextImpl(AbstractModel model,
java.util.Hashtable env)
Creates a
DirContextImpl . |
DirContextImpl(java.lang.String name,
AbstractModel model,
java.util.Hashtable env)
Creates a
DirContextImpl . |
Modifier and Type | Method and Description |
---|---|
void |
bind(javax.naming.Name name,
java.lang.Object obj,
javax.naming.directory.Attributes attrs) |
void |
bind(java.lang.String name,
java.lang.Object obj,
javax.naming.directory.Attributes attrs) |
protected ContextImpl |
create(java.lang.String name,
AbstractModel model,
java.util.Hashtable env)
Creates a new instance of the
ContextImpl . |
javax.naming.directory.DirContext |
createSubcontext(javax.naming.Name name,
javax.naming.directory.Attributes attrs) |
javax.naming.directory.DirContext |
createSubcontext(java.lang.String name,
javax.naming.directory.Attributes attrs) |
javax.naming.directory.Attributes |
getAttributes(javax.naming.Name name) |
javax.naming.directory.Attributes |
getAttributes(javax.naming.Name name,
java.lang.String[] attrIds) |
javax.naming.directory.Attributes |
getAttributes(java.lang.String name) |
javax.naming.directory.Attributes |
getAttributes(java.lang.String name,
java.lang.String[] attrIds) |
javax.naming.directory.DirContext |
getSchema(javax.naming.Name name) |
javax.naming.directory.DirContext |
getSchema(java.lang.String name) |
javax.naming.directory.DirContext |
getSchemaClassDefinition(javax.naming.Name name) |
javax.naming.directory.DirContext |
getSchemaClassDefinition(java.lang.String name) |
void |
modifyAttributes(javax.naming.Name name,
int mod_op,
javax.naming.directory.Attributes attrs) |
void |
modifyAttributes(javax.naming.Name name,
javax.naming.directory.ModificationItem[] mods) |
void |
modifyAttributes(java.lang.String name,
int mod_op,
javax.naming.directory.Attributes attrs) |
void |
modifyAttributes(java.lang.String name,
javax.naming.directory.ModificationItem[] mods) |
void |
rebind(javax.naming.Name name,
java.lang.Object obj,
javax.naming.directory.Attributes attrs) |
void |
rebind(java.lang.String name,
java.lang.Object obj,
javax.naming.directory.Attributes attrs) |
javax.naming.NamingEnumeration |
search(javax.naming.Name name,
javax.naming.directory.Attributes attrs) |
javax.naming.NamingEnumeration |
search(javax.naming.Name name,
javax.naming.directory.Attributes attrs,
java.lang.String[] args) |
javax.naming.NamingEnumeration |
search(javax.naming.Name name,
java.lang.String filterExpr,
java.lang.Object[] filterArgs,
javax.naming.directory.SearchControls cons) |
javax.naming.NamingEnumeration |
search(javax.naming.Name name,
java.lang.String filterExpr,
javax.naming.directory.SearchControls cons) |
javax.naming.NamingEnumeration |
search(java.lang.String name,
javax.naming.directory.Attributes attrs) |
javax.naming.NamingEnumeration |
search(java.lang.String name,
javax.naming.directory.Attributes attrs,
java.lang.String[] args) |
javax.naming.NamingEnumeration |
search(java.lang.String name,
java.lang.String filterExpr,
java.lang.Object[] filterArgs,
javax.naming.directory.SearchControls cons) |
javax.naming.NamingEnumeration |
search(java.lang.String name,
java.lang.String filterExpr,
javax.naming.directory.SearchControls cons) |
java.lang.String |
toString()
Returns a string value.
|
addToEnvironment, bind, bind, close, composeName, composeName, create, createSingleSubcontext, createSubcontext, createSubcontext, destroySingleSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getFullPath, getFullPath, getModel, getName, getNameInNamespace, getNameParser, getNameParser, getSeparator, getSeparatorString, list, list, listBindings, listBindings, listSingle, lookup, lookup, lookupImpl, lookupLink, lookupLink, lookupSingle, parseFirst, parseRest, rebind, rebind, rebindSingle, removeFromEnvironment, rename, rename, unbind, unbind, unbindSingle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
protected static L10N L
protected static java.util.logging.Logger log
public DirContextImpl(AbstractModel model, java.util.Hashtable env)
DirContextImpl
.model
- The underlying storage node.env
- The client's JNDI environment.public DirContextImpl(java.lang.String name, AbstractModel model, java.util.Hashtable env)
DirContextImpl
.name
- JNDI name, used for error messages, etc.model
- The underlying storage node.env
- The client's JNDI environment.protected ContextImpl create(java.lang.String name, AbstractModel model, java.util.Hashtable env)
ContextImpl
. Subclasses will
override this method to return a new instance of the subclass.create
in class ContextImpl
name
- the JNDI name for the new contextmodel
- the underlying storage nodeenv
- the client's JNDI environment.public void bind(javax.naming.Name name, java.lang.Object obj, javax.naming.directory.Attributes attrs)
bind
in interface javax.naming.directory.DirContext
public void bind(java.lang.String name, java.lang.Object obj, javax.naming.directory.Attributes attrs)
bind
in interface javax.naming.directory.DirContext
public javax.naming.directory.DirContext createSubcontext(javax.naming.Name name, javax.naming.directory.Attributes attrs)
createSubcontext
in interface javax.naming.directory.DirContext
public javax.naming.directory.DirContext createSubcontext(java.lang.String name, javax.naming.directory.Attributes attrs)
createSubcontext
in interface javax.naming.directory.DirContext
public javax.naming.directory.Attributes getAttributes(javax.naming.Name name)
getAttributes
in interface javax.naming.directory.DirContext
public javax.naming.directory.Attributes getAttributes(java.lang.String name)
getAttributes
in interface javax.naming.directory.DirContext
public javax.naming.directory.Attributes getAttributes(javax.naming.Name name, java.lang.String[] attrIds)
getAttributes
in interface javax.naming.directory.DirContext
public javax.naming.directory.Attributes getAttributes(java.lang.String name, java.lang.String[] attrIds)
getAttributes
in interface javax.naming.directory.DirContext
public javax.naming.directory.DirContext getSchema(javax.naming.Name name)
getSchema
in interface javax.naming.directory.DirContext
public javax.naming.directory.DirContext getSchema(java.lang.String name)
getSchema
in interface javax.naming.directory.DirContext
public javax.naming.directory.DirContext getSchemaClassDefinition(javax.naming.Name name)
getSchemaClassDefinition
in interface javax.naming.directory.DirContext
public javax.naming.directory.DirContext getSchemaClassDefinition(java.lang.String name)
getSchemaClassDefinition
in interface javax.naming.directory.DirContext
public void modifyAttributes(javax.naming.Name name, int mod_op, javax.naming.directory.Attributes attrs)
modifyAttributes
in interface javax.naming.directory.DirContext
public void modifyAttributes(java.lang.String name, int mod_op, javax.naming.directory.Attributes attrs)
modifyAttributes
in interface javax.naming.directory.DirContext
public void modifyAttributes(javax.naming.Name name, javax.naming.directory.ModificationItem[] mods)
modifyAttributes
in interface javax.naming.directory.DirContext
public void modifyAttributes(java.lang.String name, javax.naming.directory.ModificationItem[] mods)
modifyAttributes
in interface javax.naming.directory.DirContext
public void rebind(javax.naming.Name name, java.lang.Object obj, javax.naming.directory.Attributes attrs)
rebind
in interface javax.naming.directory.DirContext
public void rebind(java.lang.String name, java.lang.Object obj, javax.naming.directory.Attributes attrs)
rebind
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(javax.naming.Name name, javax.naming.directory.Attributes attrs)
search
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(java.lang.String name, javax.naming.directory.Attributes attrs)
search
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(javax.naming.Name name, javax.naming.directory.Attributes attrs, java.lang.String[] args)
search
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(java.lang.String name, javax.naming.directory.Attributes attrs, java.lang.String[] args)
search
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(javax.naming.Name name, java.lang.String filterExpr, java.lang.Object[] filterArgs, javax.naming.directory.SearchControls cons)
search
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(java.lang.String name, java.lang.String filterExpr, java.lang.Object[] filterArgs, javax.naming.directory.SearchControls cons)
search
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(javax.naming.Name name, java.lang.String filterExpr, javax.naming.directory.SearchControls cons)
search
in interface javax.naming.directory.DirContext
public javax.naming.NamingEnumeration search(java.lang.String name, java.lang.String filterExpr, javax.naming.directory.SearchControls cons)
search
in interface javax.naming.directory.DirContext
public java.lang.String toString()
toString
in class ContextImpl