< prev index next >
src/java.naming/share/classes/javax/naming/directory/DirContext.java
Print this page
*** 31,41 ****
* The directory service interface, containing
* methods for examining and updating attributes
* associated with objects, and for searching the directory.
*
* <h1>Names</h1>
! * Each name passed as an argument to a <tt>DirContext</tt> method is relative
* to that context. The empty name is used to name the context itself.
* The name parameter may never be null.
* <p>
* Most of the methods have overloaded versions with one taking a
* <code>Name</code> parameter and one taking a <code>String</code>.
--- 31,41 ----
* The directory service interface, containing
* methods for examining and updating attributes
* associated with objects, and for searching the directory.
*
* <h1>Names</h1>
! * Each name passed as an argument to a {@code DirContext} method is relative
* to that context. The empty name is used to name the context itself.
* The name parameter may never be null.
* <p>
* Most of the methods have overloaded versions with one taking a
* <code>Name</code> parameter and one taking a <code>String</code>.
*** 45,57 ****
* versions of the same methods behave the same.
* In the method descriptions below, only one version is documented.
* The second version instead has a link to the first: the same
* documentation applies to both.
* <p>
! * See <tt>Context</tt> for a discussion on the interpretation of the
! * name argument to the <tt>Context</tt> methods. These same rules
! * apply to the name argument to the <tt>DirContext</tt> methods.
*
* <h1>Attribute Models</h1>
* There are two basic models of what attributes should be
* associated with. First, attributes may be directly associated with a
* DirContext object.
--- 45,57 ----
* versions of the same methods behave the same.
* In the method descriptions below, only one version is documented.
* The second version instead has a link to the first: the same
* documentation applies to both.
* <p>
! * See {@code Context} for a discussion on the interpretation of the
! * name argument to the {@code Context} methods. These same rules
! * apply to the name argument to the {@code DirContext} methods.
*
* <h1>Attribute Models</h1>
* There are two basic models of what attributes should be
* associated with. First, attributes may be directly associated with a
* DirContext object.
*** 80,90 ****
* JNDI clients are safest when they do not make assumptions about
* whether an object's attributes are stored as part of the object, or stored
* within the parent object and associated with the object's name.
*
* <h1>Attribute Type Names</h1>
! * In the <tt>getAttributes()</tt> and <tt>search()</tt> methods,
* you can supply the attributes to return by supplying a list of
* attribute names (strings).
* The attributes that you get back might not have the same names as the
* attribute names you have specified. This is because some directories
* support features that cause them to return other attributes. Such
--- 80,90 ----
* JNDI clients are safest when they do not make assumptions about
* whether an object's attributes are stored as part of the object, or stored
* within the parent object and associated with the object's name.
*
* <h1>Attribute Type Names</h1>
! * In the {@code getAttributes()} and {@code search()} methods,
* you can supply the attributes to return by supplying a list of
* attribute names (strings).
* The attributes that you get back might not have the same names as the
* attribute names you have specified. This is because some directories
* support features that cause them to return other attributes. Such
*** 118,130 ****
* Some directories have the notion of "operational attributes" which are
* attributes associated with a directory object for administrative
* purposes. An example of operational attributes is the access control
* list for an object.
* <p>
! * In the <tt>getAttributes()</tt> and <tt>search()</tt> methods,
* you can specify that all attributes associated with the requested objects
! * be returned by supply <tt>null</tt> as the list of attributes to return.
* The attributes returned do <em>not</em> include operational attributes.
* In order to retrieve operational attributes, you must name them explicitly.
*
*
* <h1>Named Context</h1>
--- 118,130 ----
* Some directories have the notion of "operational attributes" which are
* attributes associated with a directory object for administrative
* purposes. An example of operational attributes is the access control
* list for an object.
* <p>
! * In the {@code getAttributes()} and {@code search()} methods,
* you can specify that all attributes associated with the requested objects
! * be returned by supply {@code null} as the list of attributes to return.
* The attributes returned do <em>not</em> include operational attributes.
* In order to retrieve operational attributes, you must name them explicitly.
*
*
* <h1>Named Context</h1>
*** 138,154 ****
* Aside from these methods, there is no requirement that the
* <em>named object</em> be a DirContext.
*
*<h1>Parameters</h1>
*<p>
! * An <tt>Attributes</tt>, <tt>SearchControls</tt>, or array object
* passed as a parameter to any method will not be modified by the
* service provider. The service provider may keep a reference to it
* for the duration of the operation, including any enumeration of the
* method's results and the processing of any referrals generated.
* The caller should not modify the object during this time.
! * An <tt>Attributes</tt> object returned by any method is owned by
* the caller. The caller may subsequently modify it; the service
* provider will not.
*
*<h1>Exceptions</h1>
*<p>
--- 138,154 ----
* Aside from these methods, there is no requirement that the
* <em>named object</em> be a DirContext.
*
*<h1>Parameters</h1>
*<p>
! * An {@code Attributes}, {@code SearchControls}, or array object
* passed as a parameter to any method will not be modified by the
* service provider. The service provider may keep a reference to it
* for the duration of the operation, including any enumeration of the
* method's results and the processing of any referrals generated.
* The caller should not modify the object during this time.
! * An {@code Attributes} object returned by any method is owned by
* the caller. The caller may subsequently modify it; the service
* provider will not.
*
*<h1>Exceptions</h1>
*<p>
*** 252,262 ****
* at least one value. For a single-valued attribute where that attribute
* already exists, throws <code>AttributeInUseException</code>.
* If attempting to add more than one value to a single-valued attribute,
* throws <code>InvalidAttributeValueException</code>.
* <p>
! * The value of this constant is <tt>1</tt>.
*
* @see ModificationItem
* @see #modifyAttributes
*/
public final static int ADD_ATTRIBUTE = 1;
--- 252,262 ----
* at least one value. For a single-valued attribute where that attribute
* already exists, throws <code>AttributeInUseException</code>.
* If attempting to add more than one value to a single-valued attribute,
* throws <code>InvalidAttributeValueException</code>.
* <p>
! * The value of this constant is {@code 1}.
*
* @see ModificationItem
* @see #modifyAttributes
*/
public final static int ADD_ATTRIBUTE = 1;
*** 271,281 ****
* Removal of the last value will remove the attribute if the attribute
* is required to have at least one value. If
* attempting to add more than one value to a single-valued attribute,
* throws <code>InvalidAttributeValueException</code>.
* <p>
! * The value of this constant is <tt>2</tt>.
*
* @see ModificationItem
* @see #modifyAttributes
*/
public final static int REPLACE_ATTRIBUTE = 2;
--- 271,281 ----
* Removal of the last value will remove the attribute if the attribute
* is required to have at least one value. If
* attempting to add more than one value to a single-valued attribute,
* throws <code>InvalidAttributeValueException</code>.
* <p>
! * The value of this constant is {@code 2}.
*
* @see ModificationItem
* @see #modifyAttributes
*/
public final static int REPLACE_ATTRIBUTE = 2;
*** 292,302 ****
* and the operation succeeds, or a NamingException may be thrown to
* indicate the absence.
* Removal of the last value will remove the attribute if the
* attribute is required to have at least one value.
* <p>
! * The value of this constant is <tt>3</tt>.
*
* @see ModificationItem
* @see #modifyAttributes
*/
public final static int REMOVE_ATTRIBUTE = 3;
--- 292,302 ----
* and the operation succeeds, or a NamingException may be thrown to
* indicate the absence.
* Removal of the last value will remove the attribute if the
* attribute is required to have at least one value.
* <p>
! * The value of this constant is {@code 3}.
*
* @see ModificationItem
* @see #modifyAttributes
*/
public final static int REMOVE_ATTRIBUTE = 3;
*** 389,404 ****
public void modifyAttributes(String name, ModificationItem[] mods)
throws NamingException;
/**
* Binds a name to an object, along with associated attributes.
! * If <tt>attrs</tt> is null, the resulting binding will have
! * the attributes associated with <tt>obj</tt> if <tt>obj</tt> is a
! * <tt>DirContext</tt>, and no attributes otherwise.
! * If <tt>attrs</tt> is non-null, the resulting binding will have
! * <tt>attrs</tt> as its attributes; any attributes associated with
! * <tt>obj</tt> are ignored.
*
* @param name
* the name to bind; may not be empty
* @param obj
* the object to bind; possibly null
--- 389,404 ----
public void modifyAttributes(String name, ModificationItem[] mods)
throws NamingException;
/**
* Binds a name to an object, along with associated attributes.
! * If {@code attrs} is null, the resulting binding will have
! * the attributes associated with {@code obj} if {@code obj} is a
! * {@code DirContext}, and no attributes otherwise.
! * If {@code attrs} is non-null, the resulting binding will have
! * {@code attrs} as its attributes; any attributes associated with
! * {@code obj} are ignored.
*
* @param name
* the name to bind; may not be empty
* @param obj
* the object to bind; possibly null
*** 436,455 ****
throws NamingException;
/**
* Binds a name to an object, along with associated attributes,
* overwriting any existing binding.
! * If <tt>attrs</tt> is null and <tt>obj</tt> is a <tt>DirContext</tt>,
! * the attributes from <tt>obj</tt> are used.
! * If <tt>attrs</tt> is null and <tt>obj</tt> is not a <tt>DirContext</tt>,
* any existing attributes associated with the object already bound
* in the directory remain unchanged.
! * If <tt>attrs</tt> is non-null, any existing attributes associated with
! * the object already bound in the directory are removed and <tt>attrs</tt>
! * is associated with the named object. If <tt>obj</tt> is a
! * <tt>DirContext</tt> and <tt>attrs</tt> is non-null, the attributes
! * of <tt>obj</tt> are ignored.
*
* @param name
* the name to bind; may not be empty
* @param obj
* the object to bind; possibly null
--- 436,455 ----
throws NamingException;
/**
* Binds a name to an object, along with associated attributes,
* overwriting any existing binding.
! * If {@code attrs} is null and {@code obj} is a {@code DirContext},
! * the attributes from {@code obj} are used.
! * If {@code attrs} is null and {@code obj} is not a {@code DirContext},
* any existing attributes associated with the object already bound
* in the directory remain unchanged.
! * If {@code attrs} is non-null, any existing attributes associated with
! * the object already bound in the directory are removed and {@code attrs}
! * is associated with the named object. If {@code obj} is a
! * {@code DirContext} and {@code attrs} is non-null, the attributes
! * of {@code obj} are ignored.
*
* @param name
* the name to bind; may not be empty
* @param obj
* the object to bind; possibly null
*** 490,501 ****
* 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 <tt>attrs</tt> is null, this method is equivalent to
! * <tt>Context.createSubcontext()</tt>.
*
* @param name
* the name of the context to create; may not be empty
* @param attrs
* the attributes to associate with the newly created context
--- 490,501 ----
* 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 {@code attrs} is null, this method is equivalent to
! * {@code Context.createSubcontext()}.
*
* @param name
* the name of the context to create; may not be empty
* @param attrs
* the attributes to associate with the newly created context
*** 577,603 ****
* specifies the object's <em>type</em> 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, <tt>getSchemaClassDefinition()</tt> would return a
! * <tt>DirContext</tt> representing the (directory's) object class
* definition of "Person".
*<p>
* The information that can be retrieved from an object class definition
* is directory-dependent.
*<p>
* 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 <tt>DirContext</tt> containing
* all of the named object's class definitions.
*
* @param name
* the name of the object whose object class
* definition is to be retrieved
! * @return the <tt>DirContext</tt> containing the named
* object's class definitions; never null
*
* @throws OperationNotSupportedException if schema not supported
* @throws NamingException if a naming exception is encountered
*/
--- 577,603 ----
* specifies the object's <em>type</em> 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, {@code getSchemaClassDefinition()} would return a
! * {@code DirContext} representing the (directory's) object class
* definition of "Person".
*<p>
* The information that can be retrieved from an object class definition
* is directory-dependent.
*<p>
* 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 {@code DirContext} containing
* all of the named object's class definitions.
*
* @param name
* the name of the object whose object class
* definition is to be retrieved
! * @return the {@code DirContext} containing the named
* object's class definitions; never null
*
* @throws OperationNotSupportedException if schema not supported
* @throws NamingException if a naming exception is encountered
*/
*** 610,620 ****
* See {@link #getSchemaClassDefinition(Name)} for details.
*
* @param name
* the name of the object whose object class
* definition is to be retrieved
! * @return the <tt>DirContext</tt> containing the named
* object's class definitions; never null
*
* @throws OperationNotSupportedException if schema not supported
* @throws NamingException if a naming exception is encountered
*/
--- 610,620 ----
* See {@link #getSchemaClassDefinition(Name)} for details.
*
* @param name
* the name of the object whose object class
* definition is to be retrieved
! * @return the {@code DirContext} containing the named
* object's class definitions; never null
*
* @throws OperationNotSupportedException if schema not supported
* @throws NamingException if a naming exception is encountered
*/
*** 654,664 ****
* to specify a different equality operation.
* For matching based on operations other than equality (such as
* substring comparison) use the version of the <code>search</code>
* method that takes a filter argument.
* <p>
! * When changes are made to this <tt>DirContext</tt>,
* the effect on enumerations returned by prior calls to this method
* is undefined.
*<p>
* If the object does not have the attribute
* specified, the directory will ignore the nonexistent attribute
--- 654,664 ----
* to specify a different equality operation.
* For matching based on operations other than equality (such as
* substring comparison) use the version of the <code>search</code>
* method that takes a filter argument.
* <p>
! * When changes are made to this {@code DirContext},
* the effect on enumerations returned by prior calls to this method
* is undefined.
*<p>
* If the object does not have the attribute
* specified, the directory will ignore the nonexistent attribute
*** 679,690 ****
* @param attributesToReturn
* the attributes to return. null indicates that
* all attributes are to be returned;
* an empty array indicates that none are to be returned.
* @return
! * a non-null enumeration of <tt>SearchResult</tt> objects.
! * Each <tt>SearchResult</tt> contains the attributes
* identified by <code>attributesToReturn</code>
* and the name of the corresponding object, named relative
* to the context named by <code>name</code>.
* @throws NamingException if a naming exception is encountered
*
--- 679,690 ----
* @param attributesToReturn
* the attributes to return. null indicates that
* all attributes are to be returned;
* an empty array indicates that none are to be returned.
* @return
! * a non-null enumeration of {@code SearchResult} objects.
! * Each {@code SearchResult} contains the attributes
* identified by <code>attributesToReturn</code>
* and the name of the corresponding object, named relative
* to the context named by <code>name</code>.
* @throws NamingException if a naming exception is encountered
*
*** 707,717 ****
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
* @param attributesToReturn
* the attributes to return
! * @return a non-null enumeration of <tt>SearchResult</tt> objects
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumeration<SearchResult>
search(String name,
Attributes matchingAttributes,
--- 707,717 ----
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
* @param attributesToReturn
* the attributes to return
! * @return a non-null enumeration of {@code SearchResult} objects
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumeration<SearchResult>
search(String name,
Attributes matchingAttributes,
*** 721,740 ****
/**
* 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 <tt>attributesToReturn</tt> parameter to the method
* <code>search(Name, Attributes, String[])</code>.
* <br>
* See {@link #search(Name, Attributes, String[])} for a full description.
*
* @param name
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
! * @return an enumeration of <tt>SearchResult</tt> objects
* @throws NamingException if a naming exception is encountered
*
* @see #search(Name, Attributes, String[])
*/
public NamingEnumeration<SearchResult>
--- 721,740 ----
/**
* 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 {@code attributesToReturn} parameter to the method
* <code>search(Name, Attributes, String[])</code>.
* <br>
* See {@link #search(Name, Attributes, String[])} for a full description.
*
* @param name
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
! * @return an enumeration of {@code SearchResult} objects
* @throws NamingException if a naming exception is encountered
*
* @see #search(Name, Attributes, String[])
*/
public NamingEnumeration<SearchResult>
*** 748,758 ****
*
* @param name
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
! * @return an enumeration of <tt>SearchResult</tt> objects
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumeration<SearchResult>
search(String name, Attributes matchingAttributes)
throws NamingException;
--- 748,758 ----
*
* @param name
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
! * @return an enumeration of {@code SearchResult} objects
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumeration<SearchResult>
search(String name, Attributes matchingAttributes)
throws NamingException;
*** 805,826 ****
*<p>
* Not all of the operators defined in RFC 2254 are applicable to all
* attributes. When an operator is not applicable, the exception
* <code>InvalidSearchFilterException</code> is thrown.
* <p>
! * The result is returned in an enumeration of <tt>SearchResult</tt>s.
! * Each <tt>SearchResult</tt> 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 <code>name</code> parameter), or
* it is a URL string. If the target context is included in
* the enumeration (as is possible when
* <code>cons</code> specifies a search scope of
* <code>SearchControls.OBJECT_SCOPE</code> or
* <code>SearchControls.SUBSTREE_SCOPE</code>), its name is the empty
! * string. The <tt>SearchResult</tt> may also contain attributes of the
! * matching object if the <tt>cons</tt> argument specified that attributes
* be returned.
*<p>
* 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.
--- 805,826 ----
*<p>
* Not all of the operators defined in RFC 2254 are applicable to all
* attributes. When an operator is not applicable, the exception
* <code>InvalidSearchFilterException</code> is thrown.
* <p>
! * The result is returned in an enumeration of {@code SearchResult}s.
! * Each {@code 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 <code>name</code> parameter), or
* it is a URL string. If the target context is included in
* the enumeration (as is possible when
* <code>cons</code> specifies a search scope of
* <code>SearchControls.OBJECT_SCOPE</code> or
* <code>SearchControls.SUBSTREE_SCOPE</code>), its name is the empty
! * string. The {@code SearchResult} may also contain attributes of the
! * matching object if the {@code cons} argument specified that attributes
* be returned.
*<p>
* 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.
*** 837,848 ****
* @param filter
* the filter expression to use for the search; may not be null
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to <tt>(new SearchControls())</tt>).
! * @return an enumeration of <tt>SearchResult</tt>s of
* the objects that satisfy the filter; never null
*
* @throws InvalidSearchFilterException if the search filter specified is
* not supported or understood by the underlying directory
* @throws InvalidSearchControlsException if the search controls
--- 837,848 ----
* @param filter
* the filter expression to use for the search; may not be null
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to {@code (new SearchControls())}).
! * @return an enumeration of {@code SearchResult}s of
* the objects that satisfy the filter; never null
*
* @throws InvalidSearchFilterException if the search filter specified is
* not supported or understood by the underlying directory
* @throws InvalidSearchControlsException if the search controls
*** 870,882 ****
* @param filter
* the filter expression to use for the search; may not be null
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to <tt>(new SearchControls())</tt>).
*
! * @return an enumeration of <tt>SearchResult</tt>s for
* the objects that satisfy the filter.
* @throws InvalidSearchFilterException if the search filter specified is
* not supported or understood by the underlying directory
* @throws InvalidSearchControlsException if the search controls
* contain invalid settings
--- 870,882 ----
* @param filter
* the filter expression to use for the search; may not be null
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to {@code (new SearchControls())}).
*
! * @return an enumeration of {@code SearchResult}s for
* the objects that satisfy the filter.
* @throws InvalidSearchFilterException if the search filter specified is
* not supported or understood by the underlying directory
* @throws InvalidSearchControlsException if the search controls
* contain invalid settings
*** 933,944 ****
* <code>cons</code> specifies a search scope of
* <code>SearchControls.OBJECT_SCOPE</code> or
* <code>SearchControls.SUBSTREE_SCOPE</code>),
* its name is the empty string.
*<p>
! * The <tt>SearchResult</tt> may also contain attributes of the matching
! * object if the <tt>cons</tt> argument specifies that attributes be
* returned.
*<p>
* 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.
--- 933,944 ----
* <code>cons</code> specifies a search scope of
* <code>SearchControls.OBJECT_SCOPE</code> or
* <code>SearchControls.SUBSTREE_SCOPE</code>),
* its name is the empty string.
*<p>
! * The {@code SearchResult} may also contain attributes of the matching
! * object if the {@code cons} argument specifies that attributes be
* returned.
*<p>
* 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.
*** 970,990 ****
* occurrence of "<code>{i}</code>".
* If null, equivalent to an empty array.
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to <tt>(new SearchControls())</tt>).
! * @return an enumeration of <tt>SearchResult</tt>s of the objects
* that satisfy the filter; never null
*
! * @throws ArrayIndexOutOfBoundsException if <tt>filterExpr</tt> contains
* <code>{i}</code> expressions where <code>i</code> is outside
* the bounds of the array <code>filterArgs</code>
! * @throws InvalidSearchControlsException if <tt>cons</tt> contains
* invalid settings
! * @throws InvalidSearchFilterException if <tt>filterExpr</tt> with
! * <tt>filterArgs</tt> represents an invalid search filter
* @throws NamingException if a naming exception is encountered
*
* @see #search(Name, Attributes, String[])
* @see java.text.MessageFormat
*/
--- 970,990 ----
* occurrence of "<code>{i}</code>".
* If null, equivalent to an empty array.
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to {@code (new SearchControls())}).
! * @return an enumeration of {@code SearchResult}s of the objects
* that satisfy the filter; never null
*
! * @throws ArrayIndexOutOfBoundsException if {@code filterExpr} contains
* <code>{i}</code> expressions where <code>i</code> is outside
* the bounds of the array <code>filterArgs</code>
! * @throws InvalidSearchControlsException if {@code cons} contains
* invalid settings
! * @throws InvalidSearchFilterException if {@code filterExpr} with
! * {@code filterArgs} represents an invalid search filter
* @throws NamingException if a naming exception is encountered
*
* @see #search(Name, Attributes, String[])
* @see java.text.MessageFormat
*/
*** 1015,1035 ****
* occurrence of "<code>{i}</code>".
* If null, equivalent to an empty array.
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to <tt>(new SearchControls())</tt>).
! * @return an enumeration of <tt>SearchResult</tt>s of the objects
* that satisfy the filter; never null
*
! * @throws ArrayIndexOutOfBoundsException if <tt>filterExpr</tt> contains
* <code>{i}</code> expressions where <code>i</code> is outside
* the bounds of the array <code>filterArgs</code>
! * @throws InvalidSearchControlsException if <tt>cons</tt> contains
* invalid settings
! * @throws InvalidSearchFilterException if <tt>filterExpr</tt> with
! * <tt>filterArgs</tt> represents an invalid search filter
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumeration<SearchResult>
search(String name,
String filterExpr,
--- 1015,1035 ----
* occurrence of "<code>{i}</code>".
* If null, equivalent to an empty array.
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
! * to {@code (new SearchControls())}).
! * @return an enumeration of {@code SearchResult}s of the objects
* that satisfy the filter; never null
*
! * @throws ArrayIndexOutOfBoundsException if {@code filterExpr} contains
* <code>{i}</code> expressions where <code>i</code> is outside
* the bounds of the array <code>filterArgs</code>
! * @throws InvalidSearchControlsException if {@code cons} contains
* invalid settings
! * @throws InvalidSearchFilterException if {@code filterExpr} with
! * {@code filterArgs} represents an invalid search filter
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumeration<SearchResult>
search(String name,
String filterExpr,
< prev index next >