harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r549955 [7/16] - in /harmony/enhanced/classlib/trunk/modules/jndi/src/main/java: javax/naming/ javax/naming/directory/ javax/naming/event/ javax/naming/ldap/ javax/naming/spi/ org/apache/harmony/jndi/internal/ org/apache/harmony/jndi/intern...
Date Fri, 22 Jun 2007 20:48:56 GMT
Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/DirContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/DirContext.java?view=diff&rev=549955&r1=549954&r2=549955
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/DirContext.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/DirContext.java Fri Jun 22 13:48:49 2007
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 package javax.naming.directory;
 
 import javax.naming.Context;
@@ -29,98 +28,108 @@
 /**
  * This is the main interface to a directory service.
  * <p>
- * A <code>DirContext</code> is the interface through which a client interacts with a
- * particular concrete directory service provider. The API provides methods for
- * searching, reading and writing attributes of directory entries.</p>
- * <p>
- * The name of a directory entry is taken as relative to the context receiving the
- * method invocation. Names cannot be null and the empty name has a special
- * meaning of the context itself.</p>
- * <p>
- * In this interface there are duplicated methods that take either a <code>String</code>
- * or <code>Name</code> parameter.  This is simply a convenience and the behavior of each
- * method is identical.</p>
- * <p>
- * The semantics of a name in a <code>DirContext</code> is exactly equivalent to that of
- * a name in a regular naming <code>Context</code>.</p>
+ * A <code>DirContext</code> is the interface through which a client interacts
+ * with a particular concrete directory service provider. The API provides
+ * methods for searching, reading and writing attributes of directory entries.
+ * </p>
+ * <p>
+ * The name of a directory entry is taken as relative to the context receiving
+ * the method invocation. Names cannot be null and the empty name has a special
+ * meaning of the context itself.
+ * </p>
+ * <p>
+ * In this interface there are duplicated methods that take either a
+ * <code>String</code> or <code>Name</code> parameter. This is simply a
+ * convenience and the behavior of each method is identical.
+ * </p>
+ * <p>
+ * The semantics of a name in a <code>DirContext</code> is exactly equivalent
+ * to that of a name in a regular naming <code>Context</code>.
+ * </p>
  * 
  * <em>Attribute storage models</em>
  * <p>
  * JNDI supports two logical models of attribute storage:
  * <ul>
- * <li>Type A : where an attribute operation on a named object is equivalent to a lookup
- *      in the <code>DirContext</code> on the given name followed by application of the
- *      operation to the resulting empty <code>DirContext</code>.  Think of this
- *      as attributes being stored on the object itself.</li>
- * <li>Type B : where an attribute operation on a named object is equivalent to a lookup
- *      on that name in the <em>parent</em> <code>DirContext</code> followed by application
- *      of the operation on the parent <code>DirContext</code> providing the name as an argument.
- *      Think of this as the attributes being stored in the parent context.<p>
- *      In this model objects that are not <code>DirContext</code> can have attributes,
- *      provided their parents are <code>DirContext</code>.</li>
- * </ul></p>
- * <p>
- * The directory service provider can implement either of these logical models, and the client
- * is expected to know which model it is dealing with.</p>
+ * <li>Type A : where an attribute operation on a named object is equivalent to
+ * a lookup in the <code>DirContext</code> on the given name followed by
+ * application of the operation to the resulting empty <code>DirContext</code>.
+ * Think of this as attributes being stored on the object itself.</li>
+ * <li>Type B : where an attribute operation on a named object is equivalent to
+ * a lookup on that name in the <em>parent</em> <code>DirContext</code>
+ * followed by application of the operation on the parent
+ * <code>DirContext</code> providing the name as an argument. Think of this as
+ * the attributes being stored in the parent context.
+ * <p>
+ * In this model objects that are not <code>DirContext</code> can have
+ * attributes, provided their parents are <code>DirContext</code>.</li>
+ * </ul>
+ * </p>
+ * <p>
+ * The directory service provider can implement either of these logical models,
+ * and the client is expected to know which model it is dealing with.
+ * </p>
  * 
  * <em>Attribute Name aliasing</em>
  * <p>
- * Directory service providers are free to implement attribute name aliasing. If the service
- * employs aliasing then the list of attribute names that are returned as a result of API
- * calls to get a named attribute, or search for a set of attributes may include attributes
- * whose name was not in the search list.  Implementations should not rely on the preservation
- * of attribute names.</p>
+ * Directory service providers are free to implement attribute name aliasing. If
+ * the service employs aliasing then the list of attribute names that are
+ * returned as a result of API calls to get a named attribute, or search for a
+ * set of attributes may include attributes whose name was not in the search
+ * list. Implementations should not rely on the preservation of attribute names.
+ * </p>
  * 
  * <em>Searching and operational attributes</em>
  * <p>
- * Some directory service providers support "operational attributes" on objects.  These are
- * attributes that are computed by the provider, or have other special semantics to the
- * directory service.  The directory service defines which attributes are operational.</p>
- * <p>
- * The API calls for searching for attributes, and those for getting named attributes using
- * a list of names are defined to interpret the <code>null</code> argument to match all
- * non-operational attributes.</p>
- * <p>
- * It is therefore possible to get a specific named attribute that is not returned in a global
- * retrieval of all object attributes.</p>
+ * Some directory service providers support "operational attributes" on objects.
+ * These are attributes that are computed by the provider, or have other special
+ * semantics to the directory service. The directory service defines which
+ * attributes are operational.
+ * </p>
+ * <p>
+ * The API calls for searching for attributes, and those for getting named
+ * attributes using a list of names are defined to interpret the
+ * <code>null</code> argument to match all non-operational attributes.
+ * </p>
+ * <p>
+ * It is therefore possible to get a specific named attribute that is not
+ * returned in a global retrieval of all object attributes.
+ * </p>
  * 
  * <em>Conditions</em>
  * <p>
- * Some APIs require that the name resolves to another <code>DirContext</code> and not an
- * object.  In such cases, if this postcondition is not met then the method should throw
- * a <code>NotContextException</code>.  Other methods can resolve to be either objects or
- * <code>DirContext</code>.</p>
- * <p>
- * Service providers must not modify collection parameters such as <code>Attribute</code>,
- * <code>SearchControl</code> or arrays. Similarly, clients are expected not to modify
- * the collections while the service provider iterates over such collections -- the service
- * provider should be given exclusive control of the collection until the method returns.</p>
- * <p>
- * APIs that return collections are safe -- that is, the service provider will not modify
- * collections that are returned to clients.</p>
+ * Some APIs require that the name resolves to another <code>DirContext</code>
+ * and not an object. In such cases, if this postcondition is not met then the
+ * method should throw a <code>NotContextException</code>. Other methods can
+ * resolve to be either objects or <code>DirContext</code>.
+ * </p>
+ * <p>
+ * Service providers must not modify collection parameters such as
+ * <code>Attribute</code>, <code>SearchControl</code> or arrays. Similarly,
+ * clients are expected not to modify the collections while the service provider
+ * iterates over such collections -- the service provider should be given
+ * exclusive control of the collection until the method returns.
+ * </p>
+ * <p>
+ * APIs that return collections are safe -- that is, the service provider will
+ * not modify collections that are returned to clients.
+ * </p>
  * 
  * <em>Exceptions</em>
  * <p>
- * Any method may throw a <code>NamingException</code> (or subclass) as defined by the
- * exception descriptions.</p>
- * 
- * 
+ * Any method may throw a <code>NamingException</code> (or subclass) as
+ * defined by the exception descriptions.
+ * </p>
  */
 public interface DirContext extends Context {
 
-    /*
-     * -------------------------------------------------------------------
-     * Constants
-     * -------------------------------------------------------------------
-     */
-
     /**
-     * Constant value indicating the addition of an attribute. 
+     * Constant value indicating the addition of an attribute.
      * <p>
      * The new value is added to the existing attributes at that identifier
      * subject to the following constraints:
      * <ol>
-     *  <li>If the attribute is being created and the value is empty, an
+     * <li>If the attribute is being created and the value is empty, an
      * <code>InvalidAttributeValueException</code> is thrown if the attribute
      * must have a value.</li>
      * <li>If the attribute already exists with a single value and the schema
@@ -129,182 +138,223 @@
      * <li>If the attribute is being created with a multi-value and the schema
      * requires that the attribute can only have a single value, an
      * <code>InvalidAttributeValueException</code> is thrown.</li>
-     * </ol></p>
+     * </ol>
+     * </p>
      */
     public static final int ADD_ATTRIBUTE = 1;
 
     /**
      * Constant value indicating the replacement of an attribute value.
      * <p>
-     * If the attribute does not exist then it is created with the given attribute
-     * identifier and attribute.  If the value contravenes the schema, an <code>
-     * InvalidAttributeValueException</code> is thrown.</p>
+     * If the attribute does not exist then it is created with the given
+     * attribute identifier and attribute. If the value contravenes the schema,
+     * an <code>
+     * InvalidAttributeValueException</code> is thrown.
+     * </p>
      * <p>
      * If the attribute exists then all of its values are replaced by the given
-     * values.  If the attribute is defined to take a single value and the new
-     * value is a multi-value then an <code>InvalidAttributeValueException</code>
-     * is thrown.  If no value is given then all of the values are removed from
-     * the attribute.</p>
+     * values. If the attribute is defined to take a single value and the new
+     * value is a multi-value then an
+     * <code>InvalidAttributeValueException</code> is thrown. If no value is
+     * given then all of the values are removed from the attribute.
+     * </p>
      * <p>
      * If an attribute is defined as requiring at least one value, then removing
-     * values results in the removal of the attribute itself.</p>
+     * values results in the removal of the attribute itself.
+     * </p>
      */
     public static final int REPLACE_ATTRIBUTE = 2;
 
     /**
      * Constant field indicating the removal of an attribute.
      * <p>
-     * If the attribute exists then the resulting values of the attribute is
-     * the set of values given by removing all values in the given set from
-     * the existing attribute set.</p>
-     * <p>
-     * If the given set of attributes is <code>null</code> that should be interpreted
-     * as a request to remove all values from the existing attribute set.</p>
+     * If the attribute exists then the resulting values of the attribute is the
+     * set of values given by removing all values in the given set from the
+     * existing attribute set.
+     * </p>
+     * <p>
+     * If the given set of attributes is <code>null</code> that should be
+     * interpreted as a request to remove all values from the existing attribute
+     * set.
+     * </p>
      * <p>
      * If the attribute does not exist, or a value in the given set does not
      * appear in the existing attribute set then the service provider is free to
-     * either ignore the fact it does not exist, or throw a <code>NamingException</code>.</p>
+     * either ignore the fact it does not exist, or throw a
+     * <code>NamingException</code>.
+     * </p>
      */
     public static final int REMOVE_ATTRIBUTE = 3;
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
-
     /**
-     * Binds a <code>Name</code> to an <code>Object</code> in this directory 
-     * to produce a binding. 
+     * Binds a <code>Name</code> to an <code>Object</code> in this directory
+     * to produce a binding.
      * 
-     * <p>This binding can have attributes, which are specified by the 
-     * <code>attributes</code> parameter if it is non-null. If the 
-     * <code>attributes</code>  parameter is null and <code>obj</code> is a 
-     * <code>DirContext</code> with attributes, the binding will have the 
-     * attributes of <code>obj</code>.</p>
-     * <p>
-     * Note that null is not a valid value for <code>name</code>. Neither is 
-     * the empty <code>Name</code> because this is reserved to refer to the 
-     * context.</p>
-     * <p>
-     * If <code>name</code> is already bound in this <code>DirContext</code> 
-     * this method throws a <code>NameAlreadyBoundException</code>.</p>
      * <p>
-     * If there are mandatory attributes for this binding in this 
-     * <code>DirContext</code>, and they are not specified, this method throws 
-     * an <code>InvalidAttributesException</code>.</p>
+     * This binding can have attributes, which are specified by the
+     * <code>attributes</code> parameter if it is non-null. If the
+     * <code>attributes</code> parameter is null and <code>obj</code> is a
+     * <code>DirContext</code> with attributes, the binding will have the
+     * attributes of <code>obj</code>.
+     * </p>
+     * <p>
+     * Note that null is not a valid value for <code>name</code>. Neither is
+     * the empty <code>Name</code> because this is reserved to refer to the
+     * context.
+     * </p>
+     * <p>
+     * If <code>name</code> is already bound in this <code>DirContext</code>
+     * this method throws a <code>NameAlreadyBoundException</code>.
+     * </p>
+     * <p>
+     * If there are mandatory attributes for this binding in this
+     * <code>DirContext</code>, and they are not specified, this method
+     * throws an <code>InvalidAttributesException</code>.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the name to be bound
-     * @param obj				the object to be bound
-     * @param attributes		the attributes of this binding, can be null 
-     * @throws NamingException	If any occurs.
+     * @param name
+     *            the name to be bound
+     * @param obj
+     *            the object to be bound
+     * @param attributes
+     *            the attributes of this binding, can be null
+     * @throws NamingException
+     *             If any occurs.
      */
     void bind(Name name, Object obj, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Binds a string name to an <code>Object</code> in this directory 
-     * to produce a binding. 
+     * Binds a string name to an <code>Object</code> in this directory to
+     * produce a binding.
      * 
-     * @param s					the string representative of name to be bound
-     * @param obj				the object to be bound
-     * @param attributes		the attributes of this binding, can be null 
-     * @throws NamingException	thrown if any occurs
+     * @param s
+     *            the string representative of name to be bound
+     * @param obj
+     *            the object to be bound
+     * @param attributes
+     *            the attributes of this binding, can be null
+     * @throws NamingException
+     *             thrown if any occurs
      * @see #bind(Name name, Object obj, Attributes attributes)
      */
     void bind(String s, Object obj, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
      * Creates and binds a new subcontext.
      * <p>
-     * The new subcontext might not be an immediate subcontext of this one. If 
-     * it is not an immediate subcontext, all the intervening subcontexts 
-     * specified in <code>name</code> must already exist. If the attributes 
-     * parameter is non-null the specified attributes are added to the
-     * new subcontext.</p>
+     * The new subcontext might not be an immediate subcontext of this one. If
+     * it is not an immediate subcontext, all the intervening subcontexts
+     * specified in <code>name</code> must already exist. If the attributes
+     * parameter is non-null the specified attributes are added to the new
+     * subcontext.
+     * </p>
      * <p>
      * Possible exceptions are <code>NameAlreadyBoundException</code> and
-     * <code>InvalidAttributesException</code>.</p>
+     * <code>InvalidAttributesException</code>.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the name bound to the new subcontext
-     * @param attributes		the attributes of the new subcontxt, can be null
-     * @return 					the new subcontext
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the name bound to the new subcontext
+     * @param attributes
+     *            the attributes of the new subcontxt, can be null
+     * @return the new subcontext
+     * @throws NamingException
+     *             If any occurs.
      */
     DirContext createSubcontext(Name name, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
      * Creates and binds a new subcontext.
      * 
-     * @param s  				the string representative of name bound to the new subcontext
-     * @param attributes		the attributes of the new subcontxt, can be null
-     * @return 					the new subcontext
-     * @throws NamingException  If any occurs.
+     * @param s
+     *            the string representative of name bound to the new subcontext
+     * @param attributes
+     *            the attributes of the new subcontxt, can be null
+     * @return the new subcontext
+     * @throws NamingException
+     *             If any occurs.
      * @see #createSubcontext(Name n, Attributes attributes)
      */
     DirContext createSubcontext(String s, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Gets all attributes of <code>name</code>. 
+     * Gets all attributes of <code>name</code>.
      * <p>
-     * See note in description about operational attributes.</p>  
+     * See note in description about operational attributes.
+     * </p>
      * <p>
      * The returned set of attributes is empty if <code>name</code> has no
-     * attributes.</p>
+     * attributes.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				name to be searched for attributes
-     * @return					all attributes of <code>name</code>	
-     * @throws NamingException  If any occurs.	
+     * @param name
+     *            name to be searched for attributes
+     * @return all attributes of <code>name</code>
+     * @throws NamingException
+     *             If any occurs.
      */
     Attributes getAttributes(Name name) throws NamingException;
 
     /**
-     * Gets the attributes for <code>name</code> that match the strings in 
-     * array <code>as</code>. 
+     * Gets the attributes for <code>name</code> that match the strings in
+     * array <code>as</code>.
      * <p>
-     * If any string in <code>as</code> is not matched it is skipped. More 
-     * attributes may be returned than the number of strings in <code>as</code> 
-     * - see notes on attribute aliasing.</p>
-     * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
-     * 
-     * @param name				name to be searched for attributes		
-     * @param as				the array of strings to match attributes
-     * @return					all attributes for <code>name</code> that match 
-     * 							the strings in array <code>as</code>. 
-     * @throws NamingException  If any occurs.
+     * If any string in <code>as</code> is not matched it is skipped. More
+     * attributes may be returned than the number of strings in <code>as</code> -
+     * see notes on attribute aliasing.
+     * </p>
+     * <p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
+     * 
+     * @param name
+     *            name to be searched for attributes
+     * @param as
+     *            the array of strings to match attributes
+     * @return all attributes for <code>name</code> that match the strings in
+     *         array <code>as</code>.
+     * @throws NamingException
+     *             If any occurs.
      */
     Attributes getAttributes(Name name, String as[]) throws NamingException;
 
     /**
      * Gets all attributes of name represented by <code>s</code>.
      * 
-     * @param s					representative of name to be searched for attributes
-     * @return					all attributes of name represented by <code>s</code>
-     * @throws NamingException  If any occurs.	
+     * @param s
+     *            representative of name to be searched for attributes
+     * @return all attributes of name represented by <code>s</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see #getAttributes(Name name)
      */
     Attributes getAttributes(String s) throws NamingException;
 
     /**
-     * Gets the attributes for name represented by <code>s</code> that match the strings in 
-     * array <code>as</code>. 
+     * Gets the attributes for name represented by <code>s</code> that match
+     * the strings in array <code>as</code>.
      * 
-     * @param s					representative of name to be searched for attributes
-     * @param as				the array of strings to match attributes
-     * @return					all attributes for name represented by 
-     * 							<code>s</code> that match the strings in array 
-     * 							<code>as</code>. 
-     * @throws NamingException  If any occurs.
+     * @param s
+     *            representative of name to be searched for attributes
+     * @param as
+     *            the array of strings to match attributes
+     * @return all attributes for name represented by <code>s</code> that
+     *         match the strings in array <code>as</code>.
+     * @throws NamingException
+     *             If any occurs.
      * @see #getAttributes(Name name, String[] as)
      */
     Attributes getAttributes(String s, String as[]) throws NamingException;
@@ -313,68 +363,81 @@
      * Gets the top level of the schema for object <code>name</code>.
      * <p>
      * If <code>name</code> does not support a schema this method throws an
-     * <code>OperationNotSupportedException</code>.</p>
+     * <code>OperationNotSupportedException</code>.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the object to be searched for schema 
-     * @return					the top level of the schema for object <code>name</code>
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the object to be searched for schema
+     * @return the top level of the schema for object <code>name</code>
+     * @throws NamingException
+     *             If any occurs.
      */
     DirContext getSchema(Name name) throws NamingException;
 
     /**
      * Gets the top level of the schema for name represented by <code>s</code>.
      * 
-     * @param s					representative of name to be searched for schema 
-     * @return					the top level of the schema for object <code>name</code>
-     * @throws NamingException  If any occurs.
+     * @param s
+     *            representative of name to be searched for schema
+     * @return the top level of the schema for object <code>name</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see #getSchema(Name name)
      */
     DirContext getSchema(String s) throws NamingException;
 
     /**
-     * Gets the class definition for <code>name</code> from its schema. 
+     * Gets the class definition for <code>name</code> from its schema.
      * <p>
-     * A class definition from a schema specifies a type and its mandatory and 
-     * optional attributes. Note that the term "class" here refers to the 
-     * general concept of a data type, not a Java class.</p>
+     * A class definition from a schema specifies a type and its mandatory and
+     * optional attributes. Note that the term "class" here refers to the
+     * general concept of a data type, not a Java class.
+     * </p>
      * <p>
      * If <code>name</code> does not support a schema this method throws an
-     * <code>OperationNotSupportedException</code>.</p>
+     * <code>OperationNotSupportedException</code>.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the name to searched for the class definition 
-     * 							from its schema
-     * @return					the class definition for <code>name</code> from 
-     * 							its schema.
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the name to searched for the class definition from its schema
+     * @return the class definition for <code>name</code> from its schema.
+     * @throws NamingException
+     *             If any occurs.
      */
     DirContext getSchemaClassDefinition(Name name) throws NamingException;
 
     /**
-     * Gets the class definition for name represented by <code>s</code> from its schema. 
+     * Gets the class definition for name represented by <code>s</code> from
+     * its schema.
      * 
-     * @param s					the string representative of name to searched for 
-     * 							the class definition from its schema
-     * @return					the class definition for <code>name</code> from 
-     * 							its schema.
-     * @throws NamingException  If any occurs.
+     * @param s
+     *            the string representative of name to searched for the class
+     *            definition from its schema
+     * @return the class definition for <code>name</code> from its schema.
+     * @throws NamingException
+     *             If any occurs.
      * @see #getSchemaClassDefinition(Name name)
      */
     DirContext getSchemaClassDefinition(String s) throws NamingException;
 
     /**
-     * Modifies the attributes of <code>name</code>. 
-     * <p> 
-     * Parameter <code>i</code> is modification operation type and  
-     * is constrained to be one of <code>ADD_ATTRIBUTE</code>, 
-     * <code>REPLACE_ATTRIBUTE</code>, <code>REMOVE_ATTRIBUTE</code>. The 
-     * implementation should try to make the modifications atomic.</p>
+     * Modifies the attributes of <code>name</code>.
      * <p>
-     * This method throws an <code>AttributeModificationException</code> if 
-     * there is a problem completing the modification.</p>
+     * Parameter <code>i</code> is modification operation type and is
+     * constrained to be one of <code>ADD_ATTRIBUTE</code>,
+     * <code>REPLACE_ATTRIBUTE</code>, <code>REMOVE_ATTRIBUTE</code>. The
+     * implementation should try to make the modifications atomic.
+     * </p>
+     * <p>
+     * This method throws an <code>AttributeModificationException</code> if
+     * there is a problem completing the modification.
+     * </p>
      * <p>
      * This method throws any <code>NamingException<code> that occurs.</p>
      * 
@@ -384,219 +447,271 @@
      * @throws NamingException  If any occurs.
      */
     void modifyAttributes(Name name, int i, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Modifies the attributes of <code>name</code> in the order given by the 
-     * array parameter <code>amodificationitem</code>. 
+     * Modifies the attributes of <code>name</code> in the order given by the
+     * array parameter <code>amodificationitem</code>.
      * <p>
-     * The required operations are specified by the elements of 
-     * <code>modificationItems</code>.</p>
+     * The required operations are specified by the elements of
+     * <code>modificationItems</code>.
+     * </p>
      * <p>
-     * This method throws an <code>AttributeModificationException</code> if 
-     * there is a problem completing the modifications.</p>
+     * This method throws an <code>AttributeModificationException</code> if
+     * there is a problem completing the modifications.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the name which attributes will be modified
-     * @param modificationItems the array of modification item
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the name which attributes will be modified
+     * @param modificationItems
+     *            the array of modification item
+     * @throws NamingException
+     *             If any occurs.
      */
     void modifyAttributes(Name name, ModificationItem[] modificationItems)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Modifies the attributes of name represented by <code>s</code>. 
+     * Modifies the attributes of name represented by <code>s</code>.
      * 
-     * @param s					name represented by <code>s</code>
-     * @param i					the modification operation type
-     * @param attributes		the modified attributes
-     * @throws NamingException  If any occurs.
+     * @param s
+     *            name represented by <code>s</code>
+     * @param i
+     *            the modification operation type
+     * @param attributes
+     *            the modified attributes
+     * @throws NamingException
+     *             If any occurs.
      * @see #modifyAttributes(Name name, int i, Attributes attributes)
      */
     void modifyAttributes(String s, int i, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Modifies the attributes of name represented by <code>s</code> in the 
-     * order given by the array parameter <code>modificationItems</code>. 
+     * Modifies the attributes of name represented by <code>s</code> in the
+     * order given by the array parameter <code>modificationItems</code>.
      * 
-     * @param s					name represented by <code>s</code>
-     * @param modificationItems the array of modification item
-     * @throws NamingException  If any occurs.
+     * @param s
+     *            name represented by <code>s</code>
+     * @param modificationItems
+     *            the array of modification item
+     * @throws NamingException
+     *             If any occurs.
      * @see #modifyAttributes(Name name, ModificationItem[] modificationItems)
      */
     void modifyAttributes(String s, ModificationItem[] modificationItems)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Rebinds <code>name</code> to <code>obj</code>. 
+     * Rebinds <code>name</code> to <code>obj</code>.
      * <p>
-     * If the attributes parameter is non-null, the attributes it
-     * specifies become the only attributes of the binding. If the attributes
-     * parameter is null but <code>obj</code> is an instance of 
-     * <code>DirContext</code> then the attributes of <code>obj</code> become 
-     * the only attributes of the binding. If the <code>attributes</code> 
-     * parameter is null and <code>obj</code> is not an instance of 
-     * <code>DirContext</code> then any attributes of the previous binding 
-     * remain.</p>
+     * If the attributes parameter is non-null, the attributes it specifies
+     * become the only attributes of the binding. If the attributes parameter is
+     * null but <code>obj</code> is an instance of <code>DirContext</code>
+     * then the attributes of <code>obj</code> become the only attributes of
+     * the binding. If the <code>attributes</code> parameter is null and
+     * <code>obj</code> is not an instance of <code>DirContext</code> then
+     * any attributes of the previous binding remain.
+     * </p>
      * <p>
      * If a schema defines mandatory attributes for the binding but they are not
-     * all present this method throws an <code>InvalidAttributesException</code>.</p>
+     * all present this method throws an <code>InvalidAttributesException</code>.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the name to be bound
-     * @param obj				the object to be bound
-     * @param attributes		the attributes of the binding
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the name to be bound
+     * @param obj
+     *            the object to be bound
+     * @param attributes
+     *            the attributes of the binding
+     * @throws NamingException
+     *             If any occurs.
      */
     void rebind(Name name, Object obj, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Rebinds name represented by <code>s</code> to <code>obj</code>. 
+     * Rebinds name represented by <code>s</code> to <code>obj</code>.
      * 
-     * @param s					the string representative of name to be bound
-     * @param obj				the object to be bound
-     * @param attributes		the attributes of the binding
-     * @throws NamingException  If any occurs.
+     * @param s
+     *            the string representative of name to be bound
+     * @param obj
+     *            the object to be bound
+     * @param attributes
+     *            the attributes of the binding
+     * @throws NamingException
+     *             If any occurs.
      * @see #rebind(Name name, Object o, Attributes attributes)
      */
     void rebind(String s, Object obj, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * Searches in the context specified by <code>name</code> only, for any 
-     * objects that have attributes that match the <code>attributes</code> 
-     * parameter. 
-     * <p>
-     * This method is equivalent to passing a null <code>as</code> parameter to 
-     * <code>search(Name name, Attributes attributes, String[] as)</code>. 
-     * Objects with attributes that match the <code>attributes</code> parameter 
-     * are selected and all attributes are returned for selected objects.</p>
+     * Searches in the context specified by <code>name</code> only, for any
+     * objects that have attributes that match the <code>attributes</code>
+     * parameter.
+     * <p>
+     * This method is equivalent to passing a null <code>as</code> parameter
+     * to <code>search(Name name, Attributes attributes, String[] as)</code>.
+     * Objects with attributes that match the <code>attributes</code>
+     * parameter are selected and all attributes are returned for selected
+     * objects.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the name specifies the context to be searched
-     * @param attributes		the attributes to be matched when search 
-     * @return					<code>NamingEnumeration</code> of <code>SearchResult</code>
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the name specifies the context to be searched
+     * @param attributes
+     *            the attributes to be matched when search
+     * @return <code>NamingEnumeration</code> of <code>SearchResult</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see #search(Name name, Attributes attributes, String[] as)
      */
     NamingEnumeration<SearchResult> search(Name name, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * This method searches in the context specified by <code>name</code> only, 
-     * for any objects that have attributes that match the <code>attributes</code> 
-     * parameter. 
+     * This method searches in the context specified by <code>name</code>
+     * only, for any objects that have attributes that match the
+     * <code>attributes</code> parameter.
      * 
-     * <p>It uses default <code>SearchControls</code>. An object is selected if 
-     * it has every attribute in the <code>attributes</code> parameter, 
-     * regardless of whether it has extra attributes. If the <code>attributes</code> 
-     * parameter is null or empty then every object in the context is a match.</p>
+     * <p>
+     * It uses default <code>SearchControls</code>. An object is selected if
+     * it has every attribute in the <code>attributes</code> parameter,
+     * regardless of whether it has extra attributes. If the
+     * <code>attributes</code> parameter is null or empty then every object in
+     * the context is a match.
+     * </p>
      * <p>
      * The definition of attribute matching is
-     * <ol> 
-     * <li>both attributes have the same identifier;</li> 
-     * <li>all values of the attribute from the attributes parameter are
-     * found in the attribute from the target object.</li> 
-     * </ol></p>
-     * <p>
-     * Attribute ordering is ignored. If an attribute from the 
-     * <code>attributes</code> parameter has no values it is matched by any 
-     * attribute that has the same identifier. The definition of attribute value 
-     * equality is left to the directory service - it could be 
-     * <code>Object.equals(Object obj)</code>, or a test defined by a schema.</p>
+     * <ol>
+     * <li>both attributes have the same identifier;</li>
+     * <li>all values of the attribute from the attributes parameter are found
+     * in the attribute from the target object.</li>
+     * </ol>
+     * </p>
+     * <p>
+     * Attribute ordering is ignored. If an attribute from the
+     * <code>attributes</code> parameter has no values it is matched by any
+     * attribute that has the same identifier. The definition of attribute value
+     * equality is left to the directory service - it could be
+     * <code>Object.equals(Object obj)</code>, or a test defined by a schema.
+     * </p>
      * <p>
      * For each of the selected objects, this method collects and returns the
-     * attributes with identifiers listed in parameter <code>as</code>. Note 
-     * that these may be different to those in the <code>attributes</code> 
-     * parameter. If a selected object does not have one of the attributes 
-     * listed in <code>as</code>, the missing attribute is simply skipped for 
-     * that object. Attribute aliasing may mean that an attribute in the 
-     * <code>as</code> parameter list maps to more than one returned attribute. 
-     * If parameter <code>as</code> is empty, no attributes are returned, but 
-     * if <code>a</code>s is null all attributes are returned.</p>
-     * <p>
-     * The return value is an enumeration of <code>SearchResult</code> objects, 
-     * which is empty if no matches are found. It is not specified how subsequent 
-     * changes to context specified by <code>name</code> will affect an 
-     * enumeration that this method returns.</p>
+     * attributes with identifiers listed in parameter <code>as</code>. Note
+     * that these may be different to those in the <code>attributes</code>
+     * parameter. If a selected object does not have one of the attributes
+     * listed in <code>as</code>, the missing attribute is simply skipped for
+     * that object. Attribute aliasing may mean that an attribute in the
+     * <code>as</code> parameter list maps to more than one returned
+     * attribute. If parameter <code>as</code> is empty, no attributes are
+     * returned, but if <code>a</code>s is null all attributes are returned.
+     * </p>
+     * <p>
+     * The return value is an enumeration of <code>SearchResult</code>
+     * objects, which is empty if no matches are found. It is not specified how
+     * subsequent changes to context specified by <code>name</code> will
+     * affect an enumeration that this method returns.
+     * </p>
      * <p>
-     * This method throws any <code>NamingException</code> that occurs.</p>
+     * This method throws any <code>NamingException</code> that occurs.
+     * </p>
      * 
-     * @param name				the name specifies the context to be searched
-     * @param attributes		the attributes to be matched when search 
-     * @param as				the array of string representative of attributes to be returned
-     * @return					<code>NamingEnumeration</code> of <code>SearchResult</code>
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the name specifies the context to be searched
+     * @param attributes
+     *            the attributes to be matched when search
+     * @param as
+     *            the array of string representative of attributes to be
+     *            returned
+     * @return <code>NamingEnumeration</code> of <code>SearchResult</code>
+     * @throws NamingException
+     *             If any occurs.
      */
     NamingEnumeration<SearchResult> search(Name name, Attributes attributes,
-                                           String as[])
-        throws NamingException;
+            String as[]) throws NamingException;
 
     /**
-     * This method searches in the context specified by <code>name</code> only, 
-     * using the filter specified by parameter <code>filter</code> and controlled by
-     * <code>searchControls</code>.
+     * This method searches in the context specified by <code>name</code>
+     * only, using the filter specified by parameter <code>filter</code> and
+     * controlled by <code>searchControls</code>.
      * 
      * <p>
-     * The parameter <code>filter</code> is an RFC2254 filter. It may contain 
-     * variables such as "{N}", which refer to element N of the <code>objs</code> 
-     * array.</p>
+     * The parameter <code>filter</code> is an RFC2254 filter. It may contain
+     * variables such as "{N}", which refer to element N of the
+     * <code>objs</code> array.
+     * </p>
      * <p>
      * The "{N}" variables can be used in place of "attr", "value", or
      * "matchingrule" from RFC2254 section 4. If an "{N}" variable refers to a
-     * <code>String</code> object, that string becomes part of the filter string, 
-     * but with any special characters escaped as defined by RFC 2254. The 
-     * directory service implementation decides how to interpret filter arguments 
-     * with types other than <code>String</code>. The result of giving invalid 
-     * variable substitutions is not specified.</p>
-     * <p>
-     * If <code>searchControls</code> is null, the default <code>SearchControls</code>
-     * object is used: i.e. the object created by the no-args <code>SearchControls()</code> 
-     * constructor.</p>
-     * <p>
-     * The return value is an enumeration of <code>SearchResult</code> objects. 
-     * The object names used may be relative to the context specified in the 
-     * <code>name</code> parameter, or a URL string. If the <code>name</code> 
-     * context itself is referred to in the results, the empty string is used. 
-     * It is not specified how subsequent changes to context specified by
-     * <code>name</code> will affect an enumeration that this method returns.</p>
-     * <p>
-     * If an "{N}" variable in <code>s</code> references a position outside the 
-     * bounds of array <code>objs</code> this method will throw an 
-     * <code>ArrayIndexOutOfBoundsException</code>.</p>
+     * <code>String</code> object, that string becomes part of the filter
+     * string, but with any special characters escaped as defined by RFC 2254.
+     * The directory service implementation decides how to interpret filter
+     * arguments with types other than <code>String</code>. The result of
+     * giving invalid variable substitutions is not specified.
+     * </p>
+     * <p>
+     * If <code>searchControls</code> is null, the default
+     * <code>SearchControls</code> object is used: i.e. the object created by
+     * the no-args <code>SearchControls()</code> constructor.
+     * </p>
+     * <p>
+     * The return value is an enumeration of <code>SearchResult</code>
+     * objects. The object names used may be relative to the context specified
+     * in the <code>name</code> parameter, or a URL string. If the
+     * <code>name</code> context itself is referred to in the results, the
+     * empty string is used. It is not specified how subsequent changes to
+     * context specified by <code>name</code> will affect an enumeration that
+     * this method returns.
+     * </p>
+     * <p>
+     * If an "{N}" variable in <code>s</code> references a position outside
+     * the bounds of array <code>objs</code> this method will throw an
+     * <code>ArrayIndexOutOfBoundsException</code>.
+     * </p>
      * <p>
      * If <code>searchControls</code> is invalid this method will throw
-     * <code>InvalidSearchControlsException</code>.</p>
+     * <code>InvalidSearchControlsException</code>.
+     * </p>
      * <p>
-     * If the filter specified by <code>filter</code> and <code>objs</code> is 
-     * invalid this method will throw an <code>InvalidSearchFilterException</code>.</p>
+     * If the filter specified by <code>filter</code> and <code>objs</code>
+     * is invalid this method will throw an
+     * <code>InvalidSearchFilterException</code>.
+     * </p>
      * <p>
      * This method throws any <code>NamingException</code> that occurs.
      * 
-     * @param name				the name specifies the context to be searched
-     * @param filter			the search filter
-     * @param objs				array of objects referred by search filter
-     * @param searchControls 	the search controls
-     * @return					<code>NamingEnumeration</code> of <code>SearchResult</code>
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the name specifies the context to be searched
+     * @param filter
+     *            the search filter
+     * @param objs
+     *            array of objects referred by search filter
+     * @param searchControls
+     *            the search controls
+     * @return <code>NamingEnumeration</code> of <code>SearchResult</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see SearchControls
      */
-    NamingEnumeration<SearchResult> search(
-        Name name,
-        String filter,
-        Object[] objs,
-        SearchControls searchControls)
-        throws NamingException;
+    NamingEnumeration<SearchResult> search(Name name, String filter,
+            Object[] objs, SearchControls searchControls)
+            throws NamingException;
 
     /**
-     * This method searches in the context specified by <code>name</code> only, 
-     * using the filter specified by parameter <code>filter</code> and controlled by
-     * <code>searchControls</code>.
+     * This method searches in the context specified by <code>name</code>
+     * only, using the filter specified by parameter <code>filter</code> and
+     * controlled by <code>searchControls</code>.
      * <p>
      * This method can throw <code>InvalidSearchFilterException<c/ode>,
      * <code>InvalidSearchControlsException</code>, <code>NamingException</code>.</p>
@@ -608,84 +723,89 @@
      * @throws NamingException  If any occurs.
      * @see #search(Name, String, Object[], SearchControls)
      */
-    NamingEnumeration<SearchResult> search(
-        Name name,
-        String filter,
-        SearchControls searchControls)
-        throws NamingException;
+    NamingEnumeration<SearchResult> search(Name name, String filter,
+            SearchControls searchControls) throws NamingException;
 
     /**
-     * Searches in the context specified by name represented by <code>name</code> 
-     * only, for any objects that have attributes that match the 
-     * <code>attributes</code> parameter. 
-     * 
-     * @param name				the string representative of name which specifies 
-     * 							the context to be searched
-     * @param attributes		the attributes to be matched when search 
-     * @return					<code>NamingEnumeration</code> of <code>SearchResult</code>
-     * @throws NamingException  If any occurs.
+     * Searches in the context specified by name represented by
+     * <code>name</code> only, for any objects that have attributes that match
+     * the <code>attributes</code> parameter.
+     * 
+     * @param name
+     *            the string representative of name which specifies the context
+     *            to be searched
+     * @param attributes
+     *            the attributes to be matched when search
+     * @return <code>NamingEnumeration</code> of <code>SearchResult</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see #search(Name, Attributes)
      */
     NamingEnumeration<SearchResult> search(String name, Attributes attributes)
-        throws NamingException;
+            throws NamingException;
 
     /**
-     * This method searches in the context specified by name represented by 
+     * This method searches in the context specified by name represented by
      * <code>name</code> only, for any objects that have attributes that match
-     * the <code>attributes</code> parameter. 
+     * the <code>attributes</code> parameter.
      * 
-     * @param name				the string representative of name which specifies 
-     * 							the context to be searched
-     * @param attributes		the attributes to be matched when search 
-     * @param as				the array of string representative of attributes to be returned
-     * @return					<code>NamingEnumeration</code> of <code>SearchResult</code>
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the string representative of name which specifies the context
+     *            to be searched
+     * @param attributes
+     *            the attributes to be matched when search
+     * @param as
+     *            the array of string representative of attributes to be
+     *            returned
+     * @return <code>NamingEnumeration</code> of <code>SearchResult</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see #search(Name, Attributes, String[])
      */
     NamingEnumeration<SearchResult> search(String name, Attributes attributes,
-                                           String as[])
-        throws NamingException;
+            String as[]) throws NamingException;
 
     /**
-     * This method searches in the context specified by name represented by 
-     * <code>name</code> only,  using the filter specified by parameter 
+     * This method searches in the context specified by name represented by
+     * <code>name</code> only, using the filter specified by parameter
      * <code>filter</code> and controlled by <code>searchControls</code>.
      * 
-     * @param name				the string representative of name which specifies 
-     * 							the context to be searched
-     * @param filter			the search filter
-     * @param objs				array of objects referred by search filter
-     * @param searchControls 	the search controls
-     * @return					<code>NamingEnumeration</code> of <code>SearchResult</code>
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the string representative of name which specifies the context
+     *            to be searched
+     * @param filter
+     *            the search filter
+     * @param objs
+     *            array of objects referred by search filter
+     * @param searchControls
+     *            the search controls
+     * @return <code>NamingEnumeration</code> of <code>SearchResult</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see #search(Name, String, Object[], SearchControls)
      */
-    NamingEnumeration<SearchResult> search(
-        String name,
-        String filter,
-        Object[] objs,
-        SearchControls searchControls)
-        throws NamingException;
+    NamingEnumeration<SearchResult> search(String name, String filter,
+            Object[] objs, SearchControls searchControls)
+            throws NamingException;
 
     /**
-     * This method searches in the context specified by name represented by 
-     * <code>name</code> only,  using the filter specified by parameter 
+     * This method searches in the context specified by name represented by
+     * <code>name</code> only, using the filter specified by parameter
      * <code>filter</code> and controlled by <code>searchControls</code>.
      * 
-     * @param name				the string representative of name which specifies 
-     * 							the context to be searched
-     * @param filter			the search filter
-     * @param searchControls 	the search controls
-     * @return					<code>NamingEnumeration</code> of <code>SearchResult</code>
-     * @throws NamingException  If any occurs.
+     * @param name
+     *            the string representative of name which specifies the context
+     *            to be searched
+     * @param filter
+     *            the search filter
+     * @param searchControls
+     *            the search controls
+     * @return <code>NamingEnumeration</code> of <code>SearchResult</code>
+     * @throws NamingException
+     *             If any occurs.
      * @see #search(Name, String, SearchControls)
      */
-    NamingEnumeration<SearchResult> search(
-        String name,
-        String filter,
-        SearchControls searchControls)
-        throws NamingException;
+    NamingEnumeration<SearchResult> search(String name, String filter,
+            SearchControls searchControls) throws NamingException;
 
 }
-
-

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InitialDirContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InitialDirContext.java?view=diff&rev=549955&r1=549954&r2=549955
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InitialDirContext.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InitialDirContext.java Fri Jun 22 13:48:49 2007
@@ -35,72 +35,59 @@
  * 
  * <p>
  * The <code>InitialDirContext</code> behavior is defined by the specification
- * for <code>javax.naming.InitialContext</code>.</p>
- * 
- * 
+ * for <code>javax.naming.InitialContext</code>.
+ * </p>
  */
 public class InitialDirContext extends InitialContext implements DirContext {
 
-    /*
-     * -------------------------------------------------------------------
-     * Constructors
-     * -------------------------------------------------------------------
-     */
-
     /**
-     * Constructs a new <code>InitialDirContext</code> with no environment 
+     * Constructs a new <code>InitialDirContext</code> with no environment
      * properties.
      * 
      * @throws NamingException
-     *                      If failed to a construct new instance.
+     *             If failed to a construct new instance.
      */
     public InitialDirContext() throws NamingException {
         super();
     }
 
     /**
-     * Constructs a new <code>InitialDirContext</code> instance with no 
-     * environment properties. A mechanism for subclass constructors 
-     * to construct a new <code>InitialDirContext</code> instance before all 
-     * environment parameters are known. 
+     * Constructs a new <code>InitialDirContext</code> instance with no
+     * environment properties. A mechanism for subclass constructors to
+     * construct a new <code>InitialDirContext</code> instance before all
+     * environment parameters are known.
      * 
-     * @param flag          If flag is true, the new instance is created but 
-     *                      not initialized. In this case the subclass
-     *                      constructor is expected to call <code>init</code>
-     *                      after the environment parameters are known. If flag
-     *                      is false, a new instance is created and initialized
-     *                      with no environment parameters.
+     * @param flag
+     *            If flag is true, the new instance is created but not
+     *            initialized. In this case the subclass constructor is expected
+     *            to call <code>init</code> after the environment parameters
+     *            are known. If flag is false, a new instance is created and
+     *            initialized with no environment parameters.
      * @throws NamingException
-     *                      If failed to construct new instance.
+     *             If failed to construct new instance.
      */
     protected InitialDirContext(boolean flag) throws NamingException {
         super(flag);
     }
 
     /**
-     * Constructs a new <code>InitialDirContext</code> instance with 
+     * Constructs a new <code>InitialDirContext</code> instance with
      * environment properties.
      * 
-     * @param hashtable     Contains the environment parameters. This constructor 
-     *                      will not change the hashtable or keep a reference to 
-     *                      it. The hashtable parameter may be null.
+     * @param hashtable
+     *            Contains the environment parameters. This constructor will not
+     *            change the hashtable or keep a reference to it. The hashtable
+     *            parameter may be null.
      * @throws NamingException
-     *                      If failed to construct a new instance.
+     *             If failed to construct a new instance.
      * @see InitialContext
      */
-    public InitialDirContext(Hashtable<?, ?> hashtable)
-            throws NamingException {
+    public InitialDirContext(Hashtable<?, ?> hashtable) throws NamingException {
         super(hashtable);
     }
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
-
     private DirContext getURLOrDefaultInitDirCtx(Name name)
-        throws NamingException {
+            throws NamingException {
         return castToDirContext(super.getURLOrDefaultInitCtx(name));
     }
 
@@ -108,48 +95,41 @@
      * Try to cast the default context to DirContext.
      */
     private DirContext castToDirContext(Context ctx)
-        throws NoInitialContextException, NotContextException {
+            throws NoInitialContextException, NotContextException {
         if (ctx instanceof DirContext) {
             return (DirContext) ctx;
         } else if (null == ctx) {
             // jndi.1A=Cannot create initial context.
-            throw new NoInitialContextException(Messages.getString("jndi.1A"));  //$NON-NLS-1$
+            throw new NoInitialContextException(Messages.getString("jndi.1A")); //$NON-NLS-1$
         } else {
             // jndi.1B=DirContext object is required.
-            throw new NotContextException(Messages.getString("jndi.1B"));  //$NON-NLS-1$
+            throw new NotContextException(Messages.getString("jndi.1B")); //$NON-NLS-1$
         }
     }
 
     private DirContext getURLOrDefaultInitDirCtx(String name)
-        throws NamingException {
+            throws NamingException {
         return castToDirContext(super.getURLOrDefaultInitCtx(name));
     }
 
-    /*
-     * -------------------------------------------------------------------
-     * Methods of interface DirContext
-     * -------------------------------------------------------------------
-     */
-
     public void bind(Name name, Object obj, Attributes attributes)
-        throws NamingException {
+            throws NamingException {
         getURLOrDefaultInitDirCtx(name).bind(name, obj, attributes);
     }
 
     public void bind(String s, Object obj, Attributes attributes)
-        throws NamingException {
+            throws NamingException {
         getURLOrDefaultInitDirCtx(s).bind(s, obj, attributes);
     }
 
     public DirContext createSubcontext(Name name, Attributes attributes)
-        throws NamingException {
-        return getURLOrDefaultInitDirCtx(name).createSubcontext(
-            name,
-            attributes);
+            throws NamingException {
+        return getURLOrDefaultInitDirCtx(name).createSubcontext(name,
+                attributes);
     }
 
     public DirContext createSubcontext(String s, Attributes attributes)
-        throws NamingException {
+            throws NamingException {
         return getURLOrDefaultInitDirCtx(s).createSubcontext(s, attributes);
     }
 
@@ -158,7 +138,7 @@
     }
 
     public Attributes getAttributes(Name name, String[] as)
-        throws NamingException {
+            throws NamingException {
         return getURLOrDefaultInitDirCtx(name).getAttributes(name, as);
     }
 
@@ -167,7 +147,7 @@
     }
 
     public Attributes getAttributes(String s, String[] as)
-        throws NamingException {
+            throws NamingException {
         return getURLOrDefaultInitDirCtx(s).getAttributes(s, as);
     }
 
@@ -180,117 +160,90 @@
     }
 
     public DirContext getSchemaClassDefinition(Name name)
-        throws NamingException {
+            throws NamingException {
         return getURLOrDefaultInitDirCtx(name).getSchemaClassDefinition(name);
     }
 
-    public DirContext getSchemaClassDefinition(String s)
-        throws NamingException {
+    public DirContext getSchemaClassDefinition(String s) throws NamingException {
         return getURLOrDefaultInitDirCtx(s).getSchemaClassDefinition(s);
     }
 
     public void modifyAttributes(Name name, int i, Attributes attributes)
-        throws NamingException {
+            throws NamingException {
         getURLOrDefaultInitDirCtx(name).modifyAttributes(name, i, attributes);
     }
 
-    public void modifyAttributes(
-        Name name,
-        ModificationItem[] modificationItems)
-        throws NamingException {
-        getURLOrDefaultInitDirCtx(name).modifyAttributes(
-            name,
-            modificationItems);
+    public void modifyAttributes(Name name, ModificationItem[] modificationItems)
+            throws NamingException {
+        getURLOrDefaultInitDirCtx(name).modifyAttributes(name,
+                modificationItems);
     }
 
     public void modifyAttributes(String s, int i, Attributes attributes)
-        throws NamingException {
+            throws NamingException {
         getURLOrDefaultInitDirCtx(s).modifyAttributes(s, i, attributes);
     }
 
-    public void modifyAttributes(
-        String s,
-        ModificationItem[] modificationItems)
-        throws NamingException {
+    public void modifyAttributes(String s, ModificationItem[] modificationItems)
+            throws NamingException {
         getURLOrDefaultInitDirCtx(s).modifyAttributes(s, modificationItems);
 
     }
 
     public void rebind(Name name, Object obj, Attributes attributes)
-        throws NamingException {
+            throws NamingException {
         getURLOrDefaultInitDirCtx(name).rebind(name, obj, attributes);
     }
 
     public void rebind(String s, Object obj, Attributes attributes)
-        throws NamingException {
+            throws NamingException {
         getURLOrDefaultInitDirCtx(s).rebind(s, obj, attributes);
     }
 
     public NamingEnumeration<SearchResult> search(Name name,
-                                                  Attributes attributes)
-        throws NamingException {
+            Attributes attributes) throws NamingException {
         return getURLOrDefaultInitDirCtx(name).search(name, attributes);
     }
 
-    public NamingEnumeration<SearchResult> search(
-        Name name,
-        Attributes attributes,
-        String[] as)
-        throws NamingException {
+    public NamingEnumeration<SearchResult> search(Name name,
+            Attributes attributes, String[] as) throws NamingException {
         return getURLOrDefaultInitDirCtx(name).search(name, attributes, as);
     }
 
-    public NamingEnumeration<SearchResult> search(
-        Name name,
-        String filter,
-        Object[] objs,
-        SearchControls searchControls)
-        throws NamingException {
-        return getURLOrDefaultInitDirCtx(name).search(
-            name,
-            filter,
-            objs,
-            searchControls);
-    }
-
-    public NamingEnumeration<SearchResult> search(
-        Name name,
-        String filter,
-        SearchControls searchcontrols)
-        throws NamingException {
-        return getURLOrDefaultInitDirCtx(name).search(name, filter, searchcontrols);
+    public NamingEnumeration<SearchResult> search(Name name, String filter,
+            Object[] objs, SearchControls searchControls)
+            throws NamingException {
+        return getURLOrDefaultInitDirCtx(name).search(name, filter, objs,
+                searchControls);
+    }
+
+    public NamingEnumeration<SearchResult> search(Name name, String filter,
+            SearchControls searchcontrols) throws NamingException {
+        return getURLOrDefaultInitDirCtx(name).search(name, filter,
+                searchcontrols);
     }
 
     public NamingEnumeration<SearchResult> search(String name,
-                                                  Attributes attributes)
-        throws NamingException {
+            Attributes attributes) throws NamingException {
         return getURLOrDefaultInitDirCtx(name).search(name, attributes);
     }
 
-    public NamingEnumeration<SearchResult> search(
-        String name,
-        Attributes attributes,
-        String[] as)
-        throws NamingException {
+    public NamingEnumeration<SearchResult> search(String name,
+            Attributes attributes, String[] as) throws NamingException {
         return getURLOrDefaultInitDirCtx(name).search(name, attributes, as);
     }
 
-    public NamingEnumeration<SearchResult> search(
-        String name,
-        String filter,
-        Object[] objs,
-        SearchControls searchControls)
-        throws NamingException {
-        return getURLOrDefaultInitDirCtx(name).search(name, filter, objs, searchControls);
+    public NamingEnumeration<SearchResult> search(String name, String filter,
+            Object[] objs, SearchControls searchControls)
+            throws NamingException {
+        return getURLOrDefaultInitDirCtx(name).search(name, filter, objs,
+                searchControls);
     }
 
-    public NamingEnumeration<SearchResult> search(
-        String name,
-        String filter,
-        SearchControls searchControls)
-        throws NamingException {
-        return getURLOrDefaultInitDirCtx(name).search(name, filter, searchControls);
+    public NamingEnumeration<SearchResult> search(String name, String filter,
+            SearchControls searchControls) throws NamingException {
+        return getURLOrDefaultInitDirCtx(name).search(name, filter,
+                searchControls);
     }
-}
-
 
+}

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeIdentifierException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeIdentifierException.java?view=diff&rev=549955&r1=549954&r2=549955
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeIdentifierException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeIdentifierException.java Fri Jun 22 13:48:49 2007
@@ -15,8 +15,7 @@
  * limitations under the License.
  */
 
- 
- package javax.naming.directory;
+package javax.naming.directory;
 
 import javax.naming.NamingException;
 
@@ -24,51 +23,37 @@
  * Thrown when the identifier part of an attribute is invalid.
  * <p>
  * Directory service providers may restrict the characteristics of the attribute
- * identifier.  If an attempt is made to set the attribute with an invalid
- * attribute the provider will throw an 
- * <code>InvalidAttributeIdentifierException</code>.</p>
- * 
- * 
+ * identifier. If an attempt is made to set the attribute with an invalid
+ * attribute the provider will throw an
+ * <code>InvalidAttributeIdentifierException</code>.
+ * </p>
  */
 public class InvalidAttributeIdentifierException extends NamingException {
-	
-	/*
-	 * -------------------------------------------------------------------
-	 * Constants
-	 * -------------------------------------------------------------------
-	 */	
-
-	/* Serialization information - start. */
-	private static final long serialVersionUID = 0x829668e5be4a058dL;
-	/* Serialization information - end. */
-	
-	/*
-	 * -------------------------------------------------------------------
-	 * Constructors
-	 * -------------------------------------------------------------------
-	 */	
-	
-	/**
-	 * Default constructor. 
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 */	 	
-	public InvalidAttributeIdentifierException() {
-		super();
-	}
-
-	/**
-	 * Constructs an <code>InvalidAttributeIdentifierException</code> 
-     * instance using the supplied text of the message.
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 * 
-	 * @param s				message about the problem
-	 */
-	public InvalidAttributeIdentifierException(String s) {
-		super(s);
-	}
 
-}
+    private static final long serialVersionUID = 0x829668e5be4a058dL;
 
+    /**
+     * Default constructor.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     */
+    public InvalidAttributeIdentifierException() {
+        super();
+    }
+
+    /**
+     * Constructs an <code>InvalidAttributeIdentifierException</code> instance
+     * using the supplied text of the message.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     * 
+     * @param s
+     *            message about the problem
+     */
+    public InvalidAttributeIdentifierException(String s) {
+        super(s);
+    }
 
+}

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeValueException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeValueException.java?view=diff&rev=549955&r1=549954&r2=549955
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeValueException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributeValueException.java Fri Jun 22 13:48:49 2007
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
- package javax.naming.directory;
+package javax.naming.directory;
 
 import javax.naming.NamingException;
 
@@ -23,59 +23,48 @@
  * Thrown when the value part of an attribute is invalid.
  * <p>
  * Directory service providers may restrict the characteristics of the attribute
- * value.  If an attempt is made to set the attribute with an invalid attribute
- * value the provider will throw an <code>InvalidAttributeValueException</code>.</p>
+ * value. If an attempt is made to set the attribute with an invalid attribute
+ * value the provider will throw an <code>InvalidAttributeValueException</code>.
+ * </p>
  * <p>
- * Examples include attempting to set a value on an attribute that doesn't take 
- * a value, attempting to set multiple values on an attribute that only takes a 
- * single value, attempting to clear a value on an attribute that must have a 
- * value, and so on.</p> 
+ * Examples include attempting to set a value on an attribute that doesn't take
+ * a value, attempting to set multiple values on an attribute that only takes a
+ * single value, attempting to clear a value on an attribute that must have a
+ * value, and so on.
+ * </p>
  * <p>
- * The serialization and synchronization specification for <code>NamingException</code>
- * applies equally to this class.</p>
+ * The serialization and synchronization specification for
+ * <code>NamingException</code> applies equally to this class.
+ * </p>
  * 
  * @see NamingException
- * 
  */
 public class InvalidAttributeValueException extends NamingException {
 
-	/*
-	 * -------------------------------------------------------------------
-	 * Constants
-	 * -------------------------------------------------------------------
-	 */
-	 
-	/* Serialization information - start. */
-	private static final long serialVersionUID = 0x7903d78afec63b03L;
-	/* Serialization information - end. */
-
-	/*
-	 * -------------------------------------------------------------------
-	 * Constructors
-	 * -------------------------------------------------------------------
-	 */
-	 	
-	/**
-	 * Default constructor. 
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 */	 		
-	public InvalidAttributeValueException() {
-		super();
-	}
+    private static final long serialVersionUID = 0x7903d78afec63b03L;
+
+    /**
+     * Default constructor.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     */
+    public InvalidAttributeValueException() {
+        super();
+    }
 
-	/**
-	 * Constructs an <code>InvalidAttributeValueException</code> instance 
+    /**
+     * Constructs an <code>InvalidAttributeValueException</code> instance
      * using the supplied text of the message.
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 * 
-	 * @param s				message about the problem
-	 */
-	public InvalidAttributeValueException(String s) {
-		super(s);
-	}
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     * 
+     * @param s
+     *            message about the problem
+     */
+    public InvalidAttributeValueException(String s) {
+        super(s);
+    }
 
 }
-
-

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributesException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributesException.java?view=diff&rev=549955&r1=549954&r2=549955
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributesException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidAttributesException.java Fri Jun 22 13:48:49 2007
@@ -15,58 +15,49 @@
  * limitations under the License.
  */
 
- package javax.naming.directory;
+package javax.naming.directory;
 
 import javax.naming.NamingException;
 
 /**
- * Thrown when an attempt is made to set attributes that are invalid for
- * the entry they are being targeted.
+ * Thrown when an attempt is made to set attributes that are invalid for the
+ * entry they are being targeted.
  * <p>
  * Examples include schema restrictions for attributes such as specific values
- * required, attributes that must be set exclusively of others, and so on.</p>
+ * required, attributes that must be set exclusively of others, and so on.
+ * </p>
  * <p>
- * The list of invalid cases is defined by the directory service provider.</p>
+ * The list of invalid cases is defined by the directory service provider.
+ * </p>
  * 
  * @see NamingException
- * 
  */
 public class InvalidAttributesException extends NamingException {
 
-	/*
-	 * -------------------------------------------------------------------
-	 * Constants
-	 * -------------------------------------------------------------------
-	 */
-
-	private static final long serialVersionUID = 0x24301a12642c8465L;
-
-	/*
-	 * -------------------------------------------------------------------
-	 * Constructors
-	 * -------------------------------------------------------------------
-	 */
-	
-	/**
-	 * Default constructor. 
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 */		
-	public InvalidAttributesException() {
-		super();
-	}
+    private static final long serialVersionUID = 0x24301a12642c8465L;
 
-	/**
-	 * Constructs an <code>InvalidAttributesException</code> instance using 
-     * the supplied text of the message.
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 * 
-	 * @param s				message about the problem
-	 */ 
-	public InvalidAttributesException(String s) {
-		super(s);
-	}
-}
+    /**
+     * Default constructor.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     */
+    public InvalidAttributesException() {
+        super();
+    }
 
+    /**
+     * Constructs an <code>InvalidAttributesException</code> instance using
+     * the supplied text of the message.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     * 
+     * @param s
+     *            message about the problem
+     */
+    public InvalidAttributesException(String s) {
+        super(s);
+    }
 
+}

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchControlsException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchControlsException.java?view=diff&rev=549955&r1=549954&r2=549955
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchControlsException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchControlsException.java Fri Jun 22 13:48:49 2007
@@ -20,53 +20,38 @@
 import javax.naming.NamingException;
 
 /**
- * Thrown when the <code>SearchControls</code> for a given search are
- * invalid.
+ * Thrown when the <code>SearchControls</code> for a given search are invalid.
  * <p>
- * For example, the search controls would be invalid if the scope is not
- * one of the defined class constants.</p> 
- * 
- * 
+ * For example, the search controls would be invalid if the scope is not one of
+ * the defined class constants.
+ * </p>
  */
 public class InvalidSearchControlsException extends NamingException {
-	
-	/*
-	 * -------------------------------------------------------------------
-	 * Constants
-	 * -------------------------------------------------------------------
-	 */	
 
-	/* Serialization information - start. */
-	private static final long serialVersionUID = 0xb8e38210910fe94fL;
-	/* Serialization information - end. */
-	
-	/*
-	 * -------------------------------------------------------------------
-	 * Constructors
-	 * -------------------------------------------------------------------
-	 */	
-	
-	/**
-	 * Default constructor. 
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 */	 	
-	public InvalidSearchControlsException() {
-		super();
-	}
-	
-	/**
-	 * Constructs an <code>InvalidSearchControlsException</code> instance 
-     * using the supplied text of the message.
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 * 
-	 * @param s				message about the problem
-	 */
-	public InvalidSearchControlsException(String s) {
-		super(s);
-	}
+    private static final long serialVersionUID = 0xb8e38210910fe94fL;
 
-}
+    /**
+     * Default constructor.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     */
+    public InvalidSearchControlsException() {
+        super();
+    }
 
+    /**
+     * Constructs an <code>InvalidSearchControlsException</code> instance
+     * using the supplied text of the message.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     * 
+     * @param s
+     *            message about the problem
+     */
+    public InvalidSearchControlsException(String s) {
+        super(s);
+    }
 
+}

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchFilterException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchFilterException.java?view=diff&rev=549955&r1=549954&r2=549955
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchFilterException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/directory/InvalidSearchFilterException.java Fri Jun 22 13:48:49 2007
@@ -22,54 +22,44 @@
 /**
  * Thrown when the search filter specification is invalid.
  * <p>
- * Search filters are part of the search API on a <code>DirContext</code>.
- * If the API is invoked with a search filter that has invalid syntax, or
- * an invalid parameter, etc. then the <code>InvalidSearchFilterException</code>
- * is thrown.</p>
+ * Search filters are part of the search API on a <code>DirContext</code>. If
+ * the API is invoked with a search filter that has invalid syntax, or an
+ * invalid parameter, etc. then the <code>InvalidSearchFilterException</code>
+ * is thrown.
+ * </p>
  * <p>
  * Serialization and multithreaded issues for <code>NamingException</code>
- * apply equally here.</p>
+ * apply equally here.
+ * </p>
  * 
  * @see NamingException
  */
 public class InvalidSearchFilterException extends NamingException {
-	
-	/*
-	 * -------------------------------------------------------------------
-	 * Constants
-	 * -------------------------------------------------------------------
-	 */
-	 	
-	/* Serialization information - start. */
-	private static final long serialVersionUID = 0x284877205a985231L;
-	/* Serialization information - end. */
 
-	/*
-	 * -------------------------------------------------------------------
-	 * Constructors
-	 * -------------------------------------------------------------------
-	 */
-	 
-	/**
-	 * Default constructor. 
-	 * <p>
-	 * All fields are initialized to null.</p>
-	 */	 	 
-	public InvalidSearchFilterException() {
-		super();
-	}
-	
-	/**
-	 * Constructs an <code>InvalidSearchFilterException</code> instance 
-     * using the supplied text of the message.
+    private static final long serialVersionUID = 0x284877205a985231L;
+
+    /**
+     * Default constructor.
      * <p>
-	 * All fields are initialized to null.</p>
-     * 
-	 * @param s				message about the problem
-	 */
-	public InvalidSearchFilterException(String s) {
-		super(s);
-	}
-}
+     * All fields are initialized to null.
+     * </p>
+     */
+    public InvalidSearchFilterException() {
+        super();
+    }
 
+    /**
+     * Constructs an <code>InvalidSearchFilterException</code> instance using
+     * the supplied text of the message.
+     * <p>
+     * All fields are initialized to null.
+     * </p>
+     * 
+     * @param s
+     *            message about the problem
+     */
+    public InvalidSearchFilterException(String s) {
+        super(s);
+    }
 
+}



Mime
View raw message