javax.naming.directory
Class InitialDirContext

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.naming.InitialContext sample code for javax.naming.InitialContext definition code for javax.naming.InitialContext 
      extended by javax.naming.directory.InitialDirContext
All Implemented Interfaces:
Context sample code for javax.naming.Context definition code for javax.naming.Context , DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Direct Known Subclasses:
InitialLdapContext sample code for javax.naming.ldap.InitialLdapContext definition code for javax.naming.ldap.InitialLdapContext

public class InitialDirContext
extends InitialContext sample code for javax.naming.InitialContext definition code for javax.naming.InitialContext
implements DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext

This class is the starting context for performing directory operations. The documentation in the class description of InitialContext (including those for synchronization) apply here.

Since:
1.3
See Also:
InitialContext sample code for javax.naming.InitialContext definition code for javax.naming.InitialContext

Field Summary
 
Fields inherited from class javax.naming.InitialContext sample code for javax.naming.InitialContext definition code for javax.naming.InitialContext
defaultInitCtx sample code for javax.naming.InitialContext.defaultInitCtx definition code for javax.naming.InitialContext.defaultInitCtx , gotDefault sample code for javax.naming.InitialContext.gotDefault definition code for javax.naming.InitialContext.gotDefault , myProps sample code for javax.naming.InitialContext.myProps definition code for javax.naming.InitialContext.myProps
 
Fields inherited from interface javax.naming.directory.DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
ADD_ATTRIBUTE sample code for javax.naming.directory.DirContext.ADD_ATTRIBUTE definition code for javax.naming.directory.DirContext.ADD_ATTRIBUTE , REMOVE_ATTRIBUTE sample code for javax.naming.directory.DirContext.REMOVE_ATTRIBUTE definition code for javax.naming.directory.DirContext.REMOVE_ATTRIBUTE , REPLACE_ATTRIBUTE sample code for javax.naming.directory.DirContext.REPLACE_ATTRIBUTE definition code for javax.naming.directory.DirContext.REPLACE_ATTRIBUTE
 
Fields inherited from interface javax.naming.Context sample code for javax.naming.Context definition code for javax.naming.Context
APPLET sample code for javax.naming.Context.APPLET definition code for javax.naming.Context.APPLET , AUTHORITATIVE sample code for javax.naming.Context.AUTHORITATIVE definition code for javax.naming.Context.AUTHORITATIVE , BATCHSIZE sample code for javax.naming.Context.BATCHSIZE definition code for javax.naming.Context.BATCHSIZE , DNS_URL sample code for javax.naming.Context.DNS_URL definition code for javax.naming.Context.DNS_URL , INITIAL_CONTEXT_FACTORY sample code for javax.naming.Context.INITIAL_CONTEXT_FACTORY definition code for javax.naming.Context.INITIAL_CONTEXT_FACTORY , LANGUAGE sample code for javax.naming.Context.LANGUAGE definition code for javax.naming.Context.LANGUAGE , OBJECT_FACTORIES sample code for javax.naming.Context.OBJECT_FACTORIES definition code for javax.naming.Context.OBJECT_FACTORIES , PROVIDER_URL sample code for javax.naming.Context.PROVIDER_URL definition code for javax.naming.Context.PROVIDER_URL , REFERRAL sample code for javax.naming.Context.REFERRAL definition code for javax.naming.Context.REFERRAL , SECURITY_AUTHENTICATION sample code for javax.naming.Context.SECURITY_AUTHENTICATION definition code for javax.naming.Context.SECURITY_AUTHENTICATION , SECURITY_CREDENTIALS sample code for javax.naming.Context.SECURITY_CREDENTIALS definition code for javax.naming.Context.SECURITY_CREDENTIALS , SECURITY_PRINCIPAL sample code for javax.naming.Context.SECURITY_PRINCIPAL definition code for javax.naming.Context.SECURITY_PRINCIPAL , SECURITY_PROTOCOL sample code for javax.naming.Context.SECURITY_PROTOCOL definition code for javax.naming.Context.SECURITY_PROTOCOL , STATE_FACTORIES sample code for javax.naming.Context.STATE_FACTORIES definition code for javax.naming.Context.STATE_FACTORIES , URL_PKG_PREFIXES sample code for javax.naming.Context.URL_PKG_PREFIXES definition code for javax.naming.Context.URL_PKG_PREFIXES
 
Constructor Summary
  InitialDirContext sample code for javax.naming.directory.InitialDirContext.InitialDirContext() definition code for javax.naming.directory.InitialDirContext.InitialDirContext() ()
          Constructs an initial DirContext.
protected InitialDirContext sample code for javax.naming.directory.InitialDirContext.InitialDirContext(boolean) definition code for javax.naming.directory.InitialDirContext.InitialDirContext(boolean) (boolean lazy)
          Constructs an initial DirContext with the option of not initializing it.
  InitialDirContext sample code for javax.naming.directory.InitialDirContext.InitialDirContext(java.util.Hashtable) definition code for javax.naming.directory.InitialDirContext.InitialDirContext(java.util.Hashtable) (Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <?,?> environment)
          Constructs an initial DirContext using the supplied environment.
 
Method Summary
 void bind sample code for javax.naming.directory.InitialDirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, Object sample code for java.lang.Object definition code for java.lang.Object  obj, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Binds a name to an object, along with associated attributes.
 void bind sample code for javax.naming.directory.InitialDirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) (String sample code for java.lang.String definition code for java.lang.String  name, Object sample code for java.lang.Object definition code for java.lang.Object  obj, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Binds a name to an object, along with associated attributes.
 DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext createSubcontext sample code for javax.naming.directory.InitialDirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Creates and binds a new context, along with associated attributes.
 DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext createSubcontext sample code for javax.naming.directory.InitialDirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes) (String sample code for java.lang.String definition code for java.lang.String  name, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Creates and binds a new context, along with associated attributes.
 Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name) definition code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Retrieves all of the attributes associated with a named object.
 Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name, java.lang.String[]) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, String sample code for java.lang.String definition code for java.lang.String [] attrIds)
          Retrieves selected attributes associated with a named object.
 Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String) definition code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Retrieves all of the attributes associated with a named object.
 Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String, java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  name, String sample code for java.lang.String definition code for java.lang.String [] attrIds)
          Retrieves selected attributes associated with a named object.
 DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext getSchema sample code for javax.naming.directory.InitialDirContext.getSchema(javax.naming.Name) definition code for javax.naming.directory.InitialDirContext.getSchema(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Retrieves the schema associated with the named object.
 DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext getSchema sample code for javax.naming.directory.InitialDirContext.getSchema(java.lang.String) definition code for javax.naming.directory.InitialDirContext.getSchema(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Retrieves the schema associated with the named object.
 DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext getSchemaClassDefinition sample code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(javax.naming.Name) definition code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Retrieves a context containing the schema objects of the named object's class definitions.
 DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext getSchemaClassDefinition sample code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(java.lang.String) definition code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Retrieves a context containing the schema objects of the named object's class definitions.
 void modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, int mod_op, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Modifies the attributes associated with a named object.
 void modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, ModificationItem sample code for javax.naming.directory.ModificationItem definition code for javax.naming.directory.ModificationItem [] mods)
          Modifies the attributes associated with a named object using an ordered list of modifications.
 void modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes) (String sample code for java.lang.String definition code for java.lang.String  name, int mod_op, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Modifies the attributes associated with a named object.
 void modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[]) (String sample code for java.lang.String definition code for java.lang.String  name, ModificationItem sample code for javax.naming.directory.ModificationItem definition code for javax.naming.directory.ModificationItem [] mods)
          Modifies the attributes associated with a named object using an ordered list of modifications.
 void rebind sample code for javax.naming.directory.InitialDirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, Object sample code for java.lang.Object definition code for java.lang.Object  obj, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Binds a name to an object, along with associated attributes, overwriting any existing binding.
 void rebind sample code for javax.naming.directory.InitialDirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) (String sample code for java.lang.String definition code for java.lang.String  name, Object sample code for java.lang.Object definition code for java.lang.Object  obj, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          Binds a name to an object, along with associated attributes, overwriting any existing binding.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes)
          Searches in a single context for objects that contain a specified set of attributes.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes, String sample code for java.lang.String definition code for java.lang.String [] attributesToReturn)
          Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, String sample code for java.lang.String definition code for java.lang.String  filterExpr, Object sample code for java.lang.Object definition code for java.lang.Object [] filterArgs, SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
          Searches in the named context or object for entries that satisfy the given search filter.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name, String sample code for java.lang.String definition code for java.lang.String  filter, SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
          Searches in the named context or object for entries that satisfy the given search filter.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes) (String sample code for java.lang.String definition code for java.lang.String  name, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes)
          Searches in a single context for objects that contain a specified set of attributes.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  name, Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes, String sample code for java.lang.String definition code for java.lang.String [] attributesToReturn)
          Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) (String sample code for java.lang.String definition code for java.lang.String  name, String sample code for java.lang.String definition code for java.lang.String  filterExpr, Object sample code for java.lang.Object definition code for java.lang.Object [] filterArgs, SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
          Searches in the named context or object for entries that satisfy the given search filter.
 NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls) (String sample code for java.lang.String definition code for java.lang.String  name, String sample code for java.lang.String definition code for java.lang.String  filter, SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
          Searches in the named context or object for entries that satisfy the given search filter.
 
Methods inherited from class javax.naming.InitialContext sample code for javax.naming.InitialContext definition code for javax.naming.InitialContext
addToEnvironment sample code for javax.naming.InitialContext.addToEnvironment(java.lang.String, java.lang.Object) definition code for javax.naming.InitialContext.addToEnvironment(java.lang.String, java.lang.Object) , bind sample code for javax.naming.InitialContext.bind(javax.naming.Name, java.lang.Object) definition code for javax.naming.InitialContext.bind(javax.naming.Name, java.lang.Object) , bind sample code for javax.naming.InitialContext.bind(java.lang.String, java.lang.Object) definition code for javax.naming.InitialContext.bind(java.lang.String, java.lang.Object) , close sample code for javax.naming.InitialContext.close() definition code for javax.naming.InitialContext.close() , composeName sample code for javax.naming.InitialContext.composeName(javax.naming.Name, javax.naming.Name) definition code for javax.naming.InitialContext.composeName(javax.naming.Name, javax.naming.Name) , composeName sample code for javax.naming.InitialContext.composeName(java.lang.String, java.lang.String) definition code for javax.naming.InitialContext.composeName(java.lang.String, java.lang.String) , createSubcontext sample code for javax.naming.InitialContext.createSubcontext(javax.naming.Name) definition code for javax.naming.InitialContext.createSubcontext(javax.naming.Name) , createSubcontext sample code for javax.naming.InitialContext.createSubcontext(java.lang.String) definition code for javax.naming.InitialContext.createSubcontext(java.lang.String) , destroySubcontext sample code for javax.naming.InitialContext.destroySubcontext(javax.naming.Name) definition code for javax.naming.InitialContext.destroySubcontext(javax.naming.Name) , destroySubcontext sample code for javax.naming.InitialContext.destroySubcontext(java.lang.String) definition code for javax.naming.InitialContext.destroySubcontext(java.lang.String) , getDefaultInitCtx sample code for javax.naming.InitialContext.getDefaultInitCtx() definition code for javax.naming.InitialContext.getDefaultInitCtx() , getEnvironment sample code for javax.naming.InitialContext.getEnvironment() definition code for javax.naming.InitialContext.getEnvironment() , getNameInNamespace sample code for javax.naming.InitialContext.getNameInNamespace() definition code for javax.naming.InitialContext.getNameInNamespace() , getNameParser sample code for javax.naming.InitialContext.getNameParser(javax.naming.Name) definition code for javax.naming.InitialContext.getNameParser(javax.naming.Name) , getNameParser sample code for javax.naming.InitialContext.getNameParser(java.lang.String) definition code for javax.naming.InitialContext.getNameParser(java.lang.String) , getURLOrDefaultInitCtx sample code for javax.naming.InitialContext.getURLOrDefaultInitCtx(javax.naming.Name) definition code for javax.naming.InitialContext.getURLOrDefaultInitCtx(javax.naming.Name) , getURLOrDefaultInitCtx sample code for javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) definition code for javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) , init sample code for javax.naming.InitialContext.init(java.util.Hashtable) definition code for javax.naming.InitialContext.init(java.util.Hashtable) , list sample code for javax.naming.InitialContext.list(javax.naming.Name) definition code for javax.naming.InitialContext.list(javax.naming.Name) , list sample code for javax.naming.InitialContext.list(java.lang.String) definition code for javax.naming.InitialContext.list(java.lang.String) , listBindings sample code for javax.naming.InitialContext.listBindings(javax.naming.Name) definition code for javax.naming.InitialContext.listBindings(javax.naming.Name) , listBindings sample code for javax.naming.InitialContext.listBindings(java.lang.String) definition code for javax.naming.InitialContext.listBindings(java.lang.String) , lookup sample code for javax.naming.InitialContext.lookup(javax.naming.Name) definition code for javax.naming.InitialContext.lookup(javax.naming.Name) , lookup sample code for javax.naming.InitialContext.lookup(java.lang.String) definition code for javax.naming.InitialContext.lookup(java.lang.String) , lookupLink sample code for javax.naming.InitialContext.lookupLink(javax.naming.Name) definition code for javax.naming.InitialContext.lookupLink(javax.naming.Name) , lookupLink sample code for javax.naming.InitialContext.lookupLink(java.lang.String) definition code for javax.naming.InitialContext.lookupLink(java.lang.String) , rebind sample code for javax.naming.InitialContext.rebind(javax.naming.Name, java.lang.Object) definition code for javax.naming.InitialContext.rebind(javax.naming.Name, java.lang.Object) , rebind sample code for javax.naming.InitialContext.rebind(java.lang.String, java.lang.Object) definition code for javax.naming.InitialContext.rebind(java.lang.String, java.lang.Object) , removeFromEnvironment sample code for javax.naming.InitialContext.removeFromEnvironment(java.lang.String) definition code for javax.naming.InitialContext.removeFromEnvironment(java.lang.String) , rename sample code for javax.naming.InitialContext.rename(javax.naming.Name, javax.naming.Name) definition code for javax.naming.InitialContext.rename(javax.naming.Name, javax.naming.Name) , rename sample code for javax.naming.InitialContext.rename(java.lang.String, java.lang.String) definition code for javax.naming.InitialContext.rename(java.lang.String, java.lang.String) , unbind sample code for javax.naming.InitialContext.unbind(javax.naming.Name) definition code for javax.naming.InitialContext.unbind(javax.naming.Name) , unbind sample code for javax.naming.InitialContext.unbind(java.lang.String) definition code for javax.naming.InitialContext.unbind(java.lang.String)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface javax.naming.Context sample code for javax.naming.Context definition code for javax.naming.Context
addToEnvironment sample code for javax.naming.Context.addToEnvironment(java.lang.String, java.lang.Object) definition code for javax.naming.Context.addToEnvironment(java.lang.String, java.lang.Object) , bind sample code for javax.naming.Context.bind(javax.naming.Name, java.lang.Object) definition code for javax.naming.Context.bind(javax.naming.Name, java.lang.Object) , bind sample code for javax.naming.Context.bind(java.lang.String, java.lang.Object) definition code for javax.naming.Context.bind(java.lang.String, java.lang.Object) , close sample code for javax.naming.Context.close() definition code for javax.naming.Context.close() , composeName sample code for javax.naming.Context.composeName(javax.naming.Name, javax.naming.Name) definition code for javax.naming.Context.composeName(javax.naming.Name, javax.naming.Name) , composeName sample code for javax.naming.Context.composeName(java.lang.String, java.lang.String) definition code for javax.naming.Context.composeName(java.lang.String, java.lang.String) , createSubcontext sample code for javax.naming.Context.createSubcontext(javax.naming.Name) definition code for javax.naming.Context.createSubcontext(javax.naming.Name) , createSubcontext sample code for javax.naming.Context.createSubcontext(java.lang.String) definition code for javax.naming.Context.createSubcontext(java.lang.String) , destroySubcontext sample code for javax.naming.Context.destroySubcontext(javax.naming.Name) definition code for javax.naming.Context.destroySubcontext(javax.naming.Name) , destroySubcontext sample code for javax.naming.Context.destroySubcontext(java.lang.String) definition code for javax.naming.Context.destroySubcontext(java.lang.String) , getEnvironment sample code for javax.naming.Context.getEnvironment() definition code for javax.naming.Context.getEnvironment() , getNameInNamespace sample code for javax.naming.Context.getNameInNamespace() definition code for javax.naming.Context.getNameInNamespace() , getNameParser sample code for javax.naming.Context.getNameParser(javax.naming.Name) definition code for javax.naming.Context.getNameParser(javax.naming.Name) , getNameParser sample code for javax.naming.Context.getNameParser(java.lang.String) definition code for javax.naming.Context.getNameParser(java.lang.String) , list sample code for javax.naming.Context.list(javax.naming.Name) definition code for javax.naming.Context.list(javax.naming.Name) , list sample code for javax.naming.Context.list(java.lang.String) definition code for javax.naming.Context.list(java.lang.String) , listBindings sample code for javax.naming.Context.listBindings(javax.naming.Name) definition code for javax.naming.Context.listBindings(javax.naming.Name) , listBindings sample code for javax.naming.Context.listBindings(java.lang.String) definition code for javax.naming.Context.listBindings(java.lang.String) , lookup sample code for javax.naming.Context.lookup(javax.naming.Name) definition code for javax.naming.Context.lookup(javax.naming.Name) , lookup sample code for javax.naming.Context.lookup(java.lang.String) definition code for javax.naming.Context.lookup(java.lang.String) , lookupLink sample code for javax.naming.Context.lookupLink(javax.naming.Name) definition code for javax.naming.Context.lookupLink(javax.naming.Name) , lookupLink sample code for javax.naming.Context.lookupLink(java.lang.String) definition code for javax.naming.Context.lookupLink(java.lang.String) , rebind sample code for javax.naming.Context.rebind(javax.naming.Name, java.lang.Object) definition code for javax.naming.Context.rebind(javax.naming.Name, java.lang.Object) , rebind sample code for javax.naming.Context.rebind(java.lang.String, java.lang.Object) definition code for javax.naming.Context.rebind(java.lang.String, java.lang.Object) , removeFromEnvironment sample code for javax.naming.Context.removeFromEnvironment(java.lang.String) definition code for javax.naming.Context.removeFromEnvironment(java.lang.String) , rename sample code for javax.naming.Context.rename(javax.naming.Name, javax.naming.Name) definition code for javax.naming.Context.rename(javax.naming.Name, javax.naming.Name) , rename sample code for javax.naming.Context.rename(java.lang.String, java.lang.String) definition code for javax.naming.Context.rename(java.lang.String, java.lang.String) , unbind sample code for javax.naming.Context.unbind(javax.naming.Name) definition code for javax.naming.Context.unbind(javax.naming.Name) , unbind sample code for javax.naming.Context.unbind(java.lang.String) definition code for javax.naming.Context.unbind(java.lang.String)
 

Constructor Detail

InitialDirContext sample code for javax.naming.directory.InitialDirContext(boolean) definition code for javax.naming.directory.InitialDirContext(boolean)

protected InitialDirContext(boolean lazy)
                     throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Constructs an initial DirContext with the option of not initializing it. This may be used by a constructor in a subclass when the value of the environment parameter is not yet known at the time the InitialDirContext constructor is called. The subclass's constructor will call this constructor, compute the value of the environment, and then call init() before returning.

Parameters:
lazy - true means do not initialize the initial DirContext; false is equivalent to calling new InitialDirContext()
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
Since:
1.3
See Also:
InitialContext.init(Hashtable) sample code for javax.naming.InitialContext.init(java.util.Hashtable) definition code for javax.naming.InitialContext.init(java.util.Hashtable)

InitialDirContext sample code for javax.naming.directory.InitialDirContext() definition code for javax.naming.directory.InitialDirContext()

public InitialDirContext()
                  throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Constructs an initial DirContext. No environment properties are supplied. Equivalent to new InitialDirContext(null).

Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
InitialDirContext(Hashtable) sample code for javax.naming.directory.InitialDirContext.InitialDirContext(java.util.Hashtable) definition code for javax.naming.directory.InitialDirContext.InitialDirContext(java.util.Hashtable)

InitialDirContext sample code for javax.naming.directory.InitialDirContext(java.util.Hashtable<?, ?>) definition code for javax.naming.directory.InitialDirContext(java.util.Hashtable<?, ?>)

public InitialDirContext(Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <?,?> environment)
                  throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Constructs an initial DirContext using the supplied environment. Environment properties are discussed in the javax.naming.InitialContext class description.

This constructor will not modify environment or save a reference to it, but may save a clone.

Parameters:
environment - environment used to create the initial DirContext. Null indicates an empty environment.
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
Method Detail

getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String) definition code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String)

public Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  getAttributes(String sample code for java.lang.String definition code for java.lang.String  name)
                         throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getAttributes(java.lang.String) definition code for javax.naming.directory.DirContext.getAttributes(java.lang.String)
Retrieves all of the attributes associated with a named object. See DirContext.getAttributes(Name) sample code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name) definition code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name) for details.

Specified by:
getAttributes sample code for javax.naming.directory.DirContext.getAttributes(java.lang.String) definition code for javax.naming.directory.DirContext.getAttributes(java.lang.String) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object from which to retrieve attributes
Returns:
the set of attributes associated with name
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.getAttributes(java.lang.String, java.lang.String[])

public Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  getAttributes(String sample code for java.lang.String definition code for java.lang.String  name,
                                String sample code for java.lang.String definition code for java.lang.String [] attrIds)
                         throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getAttributes(java.lang.String, java.lang.String[]) definition code for javax.naming.directory.DirContext.getAttributes(java.lang.String, java.lang.String[])
Retrieves selected attributes associated with a named object. See DirContext.getAttributes(Name, String[]) sample code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[]) definition code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[]) for details.

Specified by:
getAttributes sample code for javax.naming.directory.DirContext.getAttributes(java.lang.String, java.lang.String[]) definition code for javax.naming.directory.DirContext.getAttributes(java.lang.String, java.lang.String[]) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - The name of the object from which to retrieve attributes
attrIds - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.
Returns:
the requested attributes; never null
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name) definition code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name)

public Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  getAttributes(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
                         throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name) definition code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name)
Retrieves all of the attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes.

Specified by:
getAttributes sample code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name) definition code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object from which to retrieve attributes
Returns:
the set of attributes associated with name. Returns an empty attribute set if name has no attributes; never null.
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
DirContext.getAttributes(String) sample code for javax.naming.directory.DirContext.getAttributes(java.lang.String) definition code for javax.naming.directory.DirContext.getAttributes(java.lang.String) , DirContext.getAttributes(Name, String[]) sample code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[]) definition code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[])

getAttributes sample code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.getAttributes(javax.naming.Name, java.lang.String[])

public Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  getAttributes(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                                String sample code for java.lang.String definition code for java.lang.String [] attrIds)
                         throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[]) definition code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[])
Retrieves selected attributes associated with a named object. See the class description regarding attribute models, attribute type names, and operational attributes.

If the object does not have an attribute specified, the directory will ignore the nonexistent attribute and return those requested attributes that the object does have.

A directory might return more attributes than was requested (see Attribute Type Names in the class description), but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Specified by:
getAttributes sample code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[]) definition code for javax.naming.directory.DirContext.getAttributes(javax.naming.Name, java.lang.String[]) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object from which to retrieve attributes
attrIds - the identifiers of the attributes to retrieve. null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved.
Returns:
the requested attributes; never null
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes)

public void modifyAttributes(String sample code for java.lang.String definition code for java.lang.String  name,
                             int mod_op,
                             Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
                      throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes)
Modifies the attributes associated with a named object. See DirContext.modifyAttributes(Name, int, Attributes) sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) for details.

Specified by:
modifyAttributes sample code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, int, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; map not be null
Throws:
AttributeModificationException sample code for javax.naming.directory.AttributeModificationException definition code for javax.naming.directory.AttributeModificationException - if the modification cannot be completed successfully
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)

public void modifyAttributes(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                             int mod_op,
                             Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
                      throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes)
Modifies the attributes associated with a named object. The order of the modifications is not specified. Where possible, the modifications are performed atomically.

Specified by:
modifyAttributes sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; may not be null
Throws:
AttributeModificationException sample code for javax.naming.directory.AttributeModificationException definition code for javax.naming.directory.AttributeModificationException - if the modification cannot be completed successfully
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
DirContext.modifyAttributes(Name, ModificationItem[]) sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[])

modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[])

public void modifyAttributes(String sample code for java.lang.String definition code for java.lang.String  name,
                             ModificationItem sample code for javax.naming.directory.ModificationItem definition code for javax.naming.directory.ModificationItem [] mods)
                      throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[])
Modifies the attributes associated with a named object using an ordered list of modifications. See DirContext.modifyAttributes(Name, ModificationItem[]) sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) for details.

Specified by:
modifyAttributes sample code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.DirContext.modifyAttributes(java.lang.String, javax.naming.directory.ModificationItem[]) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException sample code for javax.naming.directory.AttributeModificationException definition code for javax.naming.directory.AttributeModificationException - if the modifications cannot be completed successfully
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

modifyAttributes sample code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.InitialDirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[])

public void modifyAttributes(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                             ModificationItem sample code for javax.naming.directory.ModificationItem definition code for javax.naming.directory.ModificationItem [] mods)
                      throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[])
Modifies the attributes associated with a named object using an ordered list of modifications. The modifications are performed in the order specified. Each modification specifies a modification operation code and an attribute on which to operate. Where possible, the modifications are performed atomically.

Specified by:
modifyAttributes sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, javax.naming.directory.ModificationItem[]) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException sample code for javax.naming.directory.AttributeModificationException definition code for javax.naming.directory.AttributeModificationException - if the modifications cannot be completed successfully
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
DirContext.modifyAttributes(Name, int, Attributes) sample code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.modifyAttributes(javax.naming.Name, int, javax.naming.directory.Attributes) , ModificationItem sample code for javax.naming.directory.ModificationItem definition code for javax.naming.directory.ModificationItem

bind sample code for javax.naming.directory.InitialDirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)

public void bind(String sample code for java.lang.String definition code for java.lang.String  name,
                 Object sample code for java.lang.Object definition code for java.lang.Object  obj,
                 Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
Binds a name to an object, along with associated attributes. See DirContext.bind(Name, Object, Attributes) sample code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) for details.

Specified by:
bind sample code for javax.naming.directory.DirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.bind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
NameAlreadyBoundException sample code for javax.naming.NameAlreadyBoundException definition code for javax.naming.NameAlreadyBoundException - if name is already bound
InvalidAttributesException sample code for javax.naming.directory.InvalidAttributesException definition code for javax.naming.directory.InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

bind sample code for javax.naming.directory.InitialDirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)

public void bind(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                 Object sample code for java.lang.Object definition code for java.lang.Object  obj,
                 Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
          throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)
Binds a name to an object, along with associated attributes. If attrs is null, the resulting binding will have the attributes associated with obj if obj is a DirContext, and no attributes otherwise. If attrs is non-null, the resulting binding will have attrs as its attributes; any attributes associated with obj are ignored.

Specified by:
bind sample code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
NameAlreadyBoundException sample code for javax.naming.NameAlreadyBoundException definition code for javax.naming.NameAlreadyBoundException - if name is already bound
InvalidAttributesException sample code for javax.naming.directory.InvalidAttributesException definition code for javax.naming.directory.InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
Context.bind(Name, Object) sample code for javax.naming.Context.bind(javax.naming.Name, java.lang.Object) definition code for javax.naming.Context.bind(javax.naming.Name, java.lang.Object) , DirContext.rebind(Name, Object, Attributes) sample code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)

rebind sample code for javax.naming.directory.InitialDirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)

public void rebind(String sample code for java.lang.String definition code for java.lang.String  name,
                   Object sample code for java.lang.Object definition code for java.lang.Object  obj,
                   Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
            throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes)
Binds a name to an object, along with associated attributes, overwriting any existing binding. See DirContext.rebind(Name, Object, Attributes) sample code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) for details.

Specified by:
rebind sample code for javax.naming.directory.DirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.rebind(java.lang.String, java.lang.Object, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
InvalidAttributesException sample code for javax.naming.directory.InvalidAttributesException definition code for javax.naming.directory.InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

rebind sample code for javax.naming.directory.InitialDirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)

public void rebind(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                   Object sample code for java.lang.Object definition code for java.lang.Object  obj,
                   Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
            throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)
Binds a name to an object, along with associated attributes, overwriting any existing binding. If attrs is null and obj is a DirContext, the attributes from obj are used. If attrs is null and obj is not a DirContext, any existing attributes associated with the object already bound in the directory remain unchanged. If attrs is non-null, any existing attributes associated with the object already bound in the directory are removed and attrs is associated with the named object. If obj is a DirContext and attrs is non-null, the attributes of obj are ignored.

Specified by:
rebind sample code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.rebind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name to bind; may not be empty
obj - the object to bind; possibly null
attrs - the attributes to associate with the binding
Throws:
InvalidAttributesException sample code for javax.naming.directory.InvalidAttributesException definition code for javax.naming.directory.InvalidAttributesException - if some "mandatory" attributes of the binding are not supplied
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
Context.bind(Name, Object) sample code for javax.naming.Context.bind(javax.naming.Name, java.lang.Object) definition code for javax.naming.Context.bind(javax.naming.Name, java.lang.Object) , DirContext.bind(Name, Object, Attributes) sample code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.bind(javax.naming.Name, java.lang.Object, javax.naming.directory.Attributes)

createSubcontext sample code for javax.naming.directory.InitialDirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes)

public DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext  createSubcontext(String sample code for java.lang.String definition code for java.lang.String  name,
                                   Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
                            throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes)
Creates and binds a new context, along with associated attributes. See DirContext.createSubcontext(Name, Attributes) sample code for javax.naming.directory.DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) for details.

Specified by:
createSubcontext sample code for javax.naming.directory.DirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context to create; may not be empty
attrs - the attributes to associate with the newly created context
Returns:
the newly created context
Throws:
NameAlreadyBoundException sample code for javax.naming.NameAlreadyBoundException definition code for javax.naming.NameAlreadyBoundException - if the name is already bound
InvalidAttributesException sample code for javax.naming.directory.InvalidAttributesException definition code for javax.naming.directory.InvalidAttributesException - if attrs does not contain all the mandatory attributes required for creation
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

createSubcontext sample code for javax.naming.directory.InitialDirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes)

public DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext  createSubcontext(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                                   Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  attrs)
                            throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes)
Creates and binds a new context, along with associated attributes. This method creates a new subcontext with the given name, binds it in the target context (that named by all but terminal atomic component of the name), and associates the supplied attributes with the newly created object. All intermediate and target contexts must already exist. If attrs is null, this method is equivalent to Context.createSubcontext().

Specified by:
createSubcontext sample code for javax.naming.directory.DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context to create; may not be empty
attrs - the attributes to associate with the newly created context
Returns:
the newly created context
Throws:
NameAlreadyBoundException sample code for javax.naming.NameAlreadyBoundException definition code for javax.naming.NameAlreadyBoundException - if the name is already bound
InvalidAttributesException sample code for javax.naming.directory.InvalidAttributesException definition code for javax.naming.directory.InvalidAttributesException - if attrs does not contain all the mandatory attributes required for creation
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
Context.createSubcontext(Name) sample code for javax.naming.Context.createSubcontext(javax.naming.Name) definition code for javax.naming.Context.createSubcontext(javax.naming.Name)

getSchema sample code for javax.naming.directory.InitialDirContext.getSchema(java.lang.String) definition code for javax.naming.directory.InitialDirContext.getSchema(java.lang.String)

public DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext  getSchema(String sample code for java.lang.String definition code for java.lang.String  name)
                     throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getSchema(java.lang.String) definition code for javax.naming.directory.DirContext.getSchema(java.lang.String)
Retrieves the schema associated with the named object. See DirContext.getSchema(Name) sample code for javax.naming.directory.DirContext.getSchema(javax.naming.Name) definition code for javax.naming.directory.DirContext.getSchema(javax.naming.Name) for details.

Specified by:
getSchema sample code for javax.naming.directory.DirContext.getSchema(java.lang.String) definition code for javax.naming.directory.DirContext.getSchema(java.lang.String) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose schema is to be retrieved
Returns:
the schema associated with the context; never null
Throws:
OperationNotSupportedException sample code for javax.naming.OperationNotSupportedException definition code for javax.naming.OperationNotSupportedException - if schema not supported
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

getSchema sample code for javax.naming.directory.InitialDirContext.getSchema(javax.naming.Name) definition code for javax.naming.directory.InitialDirContext.getSchema(javax.naming.Name)

public DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext  getSchema(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
                     throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getSchema(javax.naming.Name) definition code for javax.naming.directory.DirContext.getSchema(javax.naming.Name)
Retrieves the schema associated with the named object. The schema describes rules regarding the structure of the namespace and the attributes stored within it. The schema specifies what types of objects can be added to the directory and where they can be added; what mandatory and optional attributes an object can have. The range of support for schemas is directory-specific.

This method returns the root of the schema information tree that is applicable to the named object. Several named objects (or even an entire directory) might share the same schema.

Issues such as structure and contents of the schema tree, permission to modify to the contents of the schema tree, and the effect of such modifications on the directory are dependent on the underlying directory.

Specified by:
getSchema sample code for javax.naming.directory.DirContext.getSchema(javax.naming.Name) definition code for javax.naming.directory.DirContext.getSchema(javax.naming.Name) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose schema is to be retrieved
Returns:
the schema associated with the context; never null
Throws:
OperationNotSupportedException sample code for javax.naming.OperationNotSupportedException definition code for javax.naming.OperationNotSupportedException - if schema not supported
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

getSchemaClassDefinition sample code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(java.lang.String) definition code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(java.lang.String)

public DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext  getSchemaClassDefinition(String sample code for java.lang.String definition code for java.lang.String  name)
                                    throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getSchemaClassDefinition(java.lang.String) definition code for javax.naming.directory.DirContext.getSchemaClassDefinition(java.lang.String)
Retrieves a context containing the schema objects of the named object's class definitions. See DirContext.getSchemaClassDefinition(Name) sample code for javax.naming.directory.DirContext.getSchemaClassDefinition(javax.naming.Name) definition code for javax.naming.directory.DirContext.getSchemaClassDefinition(javax.naming.Name) for details.

Specified by:
getSchemaClassDefinition sample code for javax.naming.directory.DirContext.getSchemaClassDefinition(java.lang.String) definition code for javax.naming.directory.DirContext.getSchemaClassDefinition(java.lang.String) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose object class definition is to be retrieved
Returns:
the DirContext containing the named object's class definitions; never null
Throws:
OperationNotSupportedException sample code for javax.naming.OperationNotSupportedException definition code for javax.naming.OperationNotSupportedException - if schema not supported
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

getSchemaClassDefinition sample code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(javax.naming.Name) definition code for javax.naming.directory.InitialDirContext.getSchemaClassDefinition(javax.naming.Name)

public DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext  getSchemaClassDefinition(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
                                    throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.getSchemaClassDefinition(javax.naming.Name) definition code for javax.naming.directory.DirContext.getSchemaClassDefinition(javax.naming.Name)
Retrieves a context containing the schema objects of the named object's class definitions.

One category of information found in directory schemas is class definitions. An "object class" definition specifies the object's type and what attributes (mandatory and optional) the object must/can have. Note that the term "object class" being referred to here is in the directory sense rather than in the Java sense. For example, if the named object is a directory object of "Person" class, getSchemaClassDefinition() would return a DirContext representing the (directory's) object class definition of "Person".

The information that can be retrieved from an object class definition is directory-dependent.

Prior to JNDI 1.2, this method returned a single schema object representing the class definition of the named object. Since JNDI 1.2, this method returns a DirContext containing all of the named object's class definitions.

Specified by:
getSchemaClassDefinition sample code for javax.naming.directory.DirContext.getSchemaClassDefinition(javax.naming.Name) definition code for javax.naming.directory.DirContext.getSchemaClassDefinition(javax.naming.Name) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the object whose object class definition is to be retrieved
Returns:
the DirContext containing the named object's class definitions; never null
Throws:
OperationNotSupportedException sample code for javax.naming.OperationNotSupportedException definition code for javax.naming.OperationNotSupportedException - if schema not supported
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes)

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(String sample code for java.lang.String definition code for java.lang.String  name,
                                              Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes)
Searches in a single context for objects that contain a specified set of attributes. See DirContext.search(Name, Attributes) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes) for details.

Specified by:
search sample code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
Returns:
an enumeration of SearchResult objects
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes)

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                                              Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes)
Searches in a single context for objects that contain a specified set of attributes. This method returns all the attributes of such objects. It is equivalent to supplying null as the atributesToReturn parameter to the method search(Name, Attributes, String[]).
See DirContext.search(Name, Attributes, String[]) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) for a full description.

Specified by:
search sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
Returns:
an enumeration of SearchResult objects
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
DirContext.search(Name, Attributes, String[]) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[])

search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[])

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(String sample code for java.lang.String definition code for java.lang.String  name,
                                              Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes,
                                              String sample code for java.lang.String definition code for java.lang.String [] attributesToReturn)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[])
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes. See DirContext.search(Name, Attributes, String[]) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) for details.

Specified by:
search sample code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(java.lang.String, javax.naming.directory.Attributes, java.lang.String[]) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for
attributesToReturn - the attributes to return
Returns:
a non-null enumeration of SearchResult objects
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[])

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                                              Attributes sample code for javax.naming.directory.Attributes definition code for javax.naming.directory.Attributes  matchingAttributes,
                                              String sample code for java.lang.String definition code for java.lang.String [] attributesToReturn)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[])
Searches in a single context for objects that contain a specified set of attributes, and retrieves selected attributes. The search is performed using the default SearchControls settings.

For an object to be selected, each attribute in matchingAttributes must match some attribute of the object. If matchingAttributes is empty or null, all objects in the target context are returned.

An attribute A1 in matchingAttributes is considered to match an attribute A2 of an object if A1 and A2 have the same identifier, and each value of A1 is equal to some value of A2. This implies that the order of values is not significant, and that A2 may contain "extra" values not found in A1 without affecting the comparison. It also implies that if A1 has no values, then testing for a match is equivalent to testing for the presence of an attribute A2 with the same identifier.

The precise definition of "equality" used in comparing attribute values is defined by the underlying directory service. It might use the Object.equals method, for example, or might use a schema to specify a different equality operation. For matching based on operations other than equality (such as substring comparison) use the version of the search method that takes a filter argument.

When changes are made to this DirContext, the effect on enumerations returned by prior calls to this method is undefined.

If the object does not have the attribute specified, the directory will ignore the nonexistent attribute and return the requested attributes that the object does have.

A directory might return more attributes than was requested (see Attribute Type Names in the class description), but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Specified by:
search sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context to search
matchingAttributes - the attributes to search for. If empty or null, all objects in the target context are returned.
attributesToReturn - the attributes to return. null indicates that all attributes are to be returned; an empty array indicates that none are to be returned.
Returns:
a non-null enumeration of SearchResult objects. Each SearchResult contains the attributes identified by attributesToReturn and the name of the corresponding object, named relative to the context named by name.
Throws:
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls , SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult , DirContext.search(Name, String, Object[], SearchControls) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)

search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls)

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(String sample code for java.lang.String definition code for java.lang.String  name,
                                              String sample code for java.lang.String definition code for java.lang.String  filter,
                                              SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls)
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls. See DirContext.search(Name, String, SearchControls) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) for details.

Specified by:
search sample code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, javax.naming.directory.SearchControls) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filter - the filter expression to use for the search; may not be null
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults for the objects that satisfy the filter.
Throws:
InvalidSearchFilterException sample code for javax.naming.directory.InvalidSearchFilterException definition code for javax.naming.directory.InvalidSearchFilterException - if the search filter specified is not supported or understood by the underlying directory
InvalidSearchControlsException sample code for javax.naming.directory.InvalidSearchControlsException definition code for javax.naming.directory.InvalidSearchControlsException - if the search controls contain invalid settings
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls)

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                                              String sample code for java.lang.String definition code for java.lang.String  filter,
                                              SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls)
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls.

The format and interpretation of filter follows RFC 2254 with the following interpretations for attr and value mentioned in the RFC.

attr is the attribute's identifier.

value is the string representation the attribute's value. The translation of this string representation into the attribute's value is directory-specific.

For the assertion "someCount=127", for example, attr is "someCount" and value is "127". The provider determines, based on the attribute ID ("someCount") (and possibly its schema), that the attribute's value is an integer. It then parses the string "127" appropriately.

Any non-ASCII characters in the filter string should be represented by the appropriate Java (Unicode) characters, and not encoded as UTF-8 octets. Alternately, the "backslash-hexcode" notation described in RFC 2254 may be used.

If the directory does not support a string representation of some or all of its attributes, the form of search that accepts filter arguments in the form of Objects can be used instead. The service provider for such a directory would then translate the filter arguments to its service-specific representation for filter evaluation. See search(Name, String, Object[], SearchControls).

RFC 2254 defines certain operators for the filter, including substring matches, equality, approximate match, greater than, less than. These operators are mapped to operators with corresponding semantics in the underlying directory. For example, for the equals operator, suppose the directory has a matching rule defining "equality" of the attributes in the filter. This rule would be used for checking equality of the attributes specified in the filter with the attributes of objects in the directory. Similarly, if the directory has a matching rule for ordering, this rule would be used for making "greater than" and "less than" comparisons.

Not all of the operators defined in RFC 2254 are applicable to all attributes. When an operator is not applicable, the exception InvalidSearchFilterException is thrown.

The result is returned in an enumeration of SearchResults. Each SearchResult contains the name of the object and other information about the object (see SearchResult). The name is either relative to the target context of the search (which is named by the name parameter), or it is a URL string. If the target context is included in the enumeration (as is possible when cons specifies a search scope of SearchControls.OBJECT_SCOPE or SearchControls.SUBSTREE_SCOPE), its name is the empty string. The SearchResult may also contain attributes of the matching object if the cons argument specified that attributes be returned.

If the object does not have a requested attribute, that nonexistent attribute will be ignored. Those requested attributes that the object does have will be returned.

A directory might return more attributes than were requested (see Attribute Type Names in the class description) but is not allowed to return arbitrary, unrelated attributes.

See also Operational Attributes in the class description.

Specified by:
search sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, javax.naming.directory.SearchControls) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filter - the filter expression to use for the search; may not be null
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
InvalidSearchFilterException sample code for javax.naming.directory.InvalidSearchFilterException definition code for javax.naming.directory.InvalidSearchFilterException - if the search filter specified is not supported or understood by the underlying directory
InvalidSearchControlsException sample code for javax.naming.directory.InvalidSearchControlsException definition code for javax.naming.directory.InvalidSearchControlsException - if the search controls contain invalid settings
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
DirContext.search(Name, String, Object[], SearchControls) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) , SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls , SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult

search sample code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(String sample code for java.lang.String definition code for java.lang.String  name,
                                              String sample code for java.lang.String definition code for java.lang.String  filterExpr,
                                              Object sample code for java.lang.Object definition code for java.lang.Object [] filterArgs,
                                              SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls. See DirContext.search(Name, String, Object[], SearchControls) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) for details.

Specified by:
search sample code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(java.lang.String, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filterExpr - the filter expression to use for the search. The expression may contain variables of the form "{i}" where i is a nonnegative integer. May not be null.
filterArgs - the array of arguments to substitute for the variables in filterExpr. The value of filterArgs[i] will replace each occurrence of "{i}". If null, equivalent to an empty array.
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
InvalidSearchControlsException sample code for javax.naming.directory.InvalidSearchControlsException definition code for javax.naming.directory.InvalidSearchControlsException - if cons contains invalid settings
InvalidSearchFilterException sample code for javax.naming.directory.InvalidSearchFilterException definition code for javax.naming.directory.InvalidSearchFilterException - if filterExpr with filterArgs represents an invalid search filter
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered

search sample code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.InitialDirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)

public NamingEnumeration sample code for javax.naming.NamingEnumeration definition code for javax.naming.NamingEnumeration <SearchResult sample code for javax.naming.directory.SearchResult definition code for javax.naming.directory.SearchResult > search(Name sample code for javax.naming.Name definition code for javax.naming.Name  name,
                                              String sample code for java.lang.String definition code for java.lang.String  filterExpr,
                                              Object sample code for java.lang.Object definition code for java.lang.Object [] filterArgs,
                                              SearchControls sample code for javax.naming.directory.SearchControls definition code for javax.naming.directory.SearchControls  cons)
                                       throws NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
Description copied from interface: DirContext sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)
Searches in the named context or object for entries that satisfy the given search filter. Performs the search as specified by the search controls.

The interpretation of filterExpr is based on RFC 2254. It may additionally contain variables of the form {i} -- where i is an integer -- that refer to objects in the filterArgs array. The interpretation of filterExpr is otherwise identical to that of the filter parameter of the method search(Name, String, SearchControls).

When a variable {i} appears in a search filter, it indicates that the filter argument filterArgs[i] is to be used in that place. Such variables may be used wherever an attr, value, or matchingrule production appears in the filter grammar of RFC 2254, section 4. When a string-valued filter argument is substituted for a variable, the filter is interpreted as if the string were given in place of the variable, with any characters having special significance within filters (such as '*') having been escaped according to the rules of RFC 2254.

For directories that do not use a string representation for some or all of their attributes, the filter argument corresponding to an attribute value may be of a type other than String. Directories that support unstructured binary-valued attributes, for example, should accept byte arrays as filter arguments. The interpretation (if any) of filter arguments of any other type is determined by the service provider for that directory, which maps the filter operations onto operations with corresponding semantics in the underlying directory.

This method returns an enumeration of the results. Each element in the enumeration contains the name of the object and other information about the object (see SearchResult). The name is either relative to the target context of the search (which is named by the name parameter), or it is a URL string. If the target context is included in the enumeration (as is possible when cons specifies a search scope of SearchControls.OBJECT_SCOPE or SearchControls.SUBSTREE_SCOPE), its name is the empty string.

The SearchResult may also contain attributes of the matching object if the cons argument specifies that attributes be returned.

If the object does not have a requested attribute, that nonexistent attribute will be ignored. Those requested attributes that the object does have will be returned.

A directory might return more attributes than were requested (see Attribute Type Names in the class description) but is not allowed to return arbitrary, unrelated attributes.

If a search filter with invalid variable substitutions is provided to this method, the result is undefined. When changes are made to this DirContext, the effect on enumerations returned by prior calls to this method is undefined.

See also Operational Attributes in the class description.

Specified by:
search sample code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls) in interface DirContext sample code for javax.naming.directory.DirContext definition code for javax.naming.directory.DirContext
Parameters:
name - the name of the context or object to search
filterExpr - the filter expression to use for the search. The expression may contain variables of the form "{i}" where i is a nonnegative integer. May not be null.
filterArgs - the array of arguments to substitute for the variables in filterExpr. The value of filterArgs[i] will replace each occurrence of "{i}". If null, equivalent to an empty array.
cons - the search controls that control the search. If null, the default search controls are used (equivalent to (new SearchControls())).
Returns:
an enumeration of SearchResults of the objects that satisfy the filter; never null
Throws:
InvalidSearchControlsException sample code for javax.naming.directory.InvalidSearchControlsException definition code for javax.naming.directory.InvalidSearchControlsException - if cons contains invalid settings
InvalidSearchFilterException sample code for javax.naming.directory.InvalidSearchFilterException definition code for javax.naming.directory.InvalidSearchFilterException - if filterExpr with filterArgs represents an invalid search filter
NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException - if a naming exception is encountered
See Also:
DirContext.search(Name, Attributes, String[]) sample code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) definition code for javax.naming.directory.DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[]) , MessageFormat sample code for java.text.MessageFormat definition code for java.text.MessageFormat