|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Generates NdsIterator objects used to create a large virtual list based on a set of parameters. Five createIterator() methods are defined, each passing in a different set of parameters used in generating the NdsIterator objects.
NdsIterator
,
NdsIteratorControls
,
NdsIteratorInfo
,
NdsIteratorResult
Method Summary | |
NdsIterator |
createIterator(java.lang.String name,
javax.naming.directory.Attributes matchingAttributes)
Creates an NdsIterator object based on two parameters. |
NdsIterator |
createIterator(java.lang.String name,
javax.naming.directory.Attributes matchingAttributes,
java.lang.String[] attributesToReturn)
Creates an NdsIterator object based on three parameters. |
NdsIterator |
createIterator(java.lang.String name,
NdsIteratorControls cons,
java.lang.String className,
java.lang.String subordinateName)
Creates an NdsIterator object based on four parameters. |
NdsIterator |
createIterator(java.lang.String name,
java.lang.String filter,
NdsIteratorControls cons)
Creates an NdsIterator object based on three parameters. |
NdsIterator |
createIterator(java.lang.String name,
java.lang.String filterExpr,
java.lang.Object[] filterArgs,
NdsIteratorControls cons)
Creates an NdsIterator object based on four parameters. |
Method Detail |
public NdsIterator createIterator(java.lang.String name, javax.naming.directory.Attributes matchingAttributes, java.lang.String[] attributesToReturn) throws com.novell.service.jncp.NSIException
This NdsIterator() method searches in a single context for objects that contain a specified set of attributes, and then returns the entries or objects with the attributes specified by the attributesToReturn parameter in an NdsIterator object. The search is performed using the default NdsIteratorControls settings.
For an object to be selected, each attribute in the matchingAttributes parameter must match some attribute of the object. If matchingAttributes is empty or NULL, all objects in the target context are returned. The precise definition of equality used in comparing attribute values is defined by the underlying directory service. It might use the Java Object.equals method, or it might use a schema to specify a different equality operation.
name
- The non-NULL name of the context to search.matchingAttributes
- The attributes for which to search. If empty
or NULL, all objects in the target context
are returned.attributesToReturn
- The attributes to return. NULL indicates
that all attributes should be returned. An
empty array indicates that no attributes are
to be returned.NdsIteratorControls
,
NdsIteratorResult
public NdsIterator createIterator(java.lang.String name, javax.naming.directory.Attributes matchingAttributes) throws com.novell.service.jncp.NSIException
This NdsIterator() method searches in a single context for objects that contain a specified set of attributes, and then returns the objects with all their attributes in an NdsIterator. It is equivalent to supplying NULL for the attributesToReturn parameter.
name
- The non-NULL name of the context to search.matchingAttributes
- The attributes for which to search
(possibly NULL).NdsIteratorControls
,
NdsIteratorResult
public NdsIterator createIterator(java.lang.String name, java.lang.String filter, NdsIteratorControls cons) throws com.novell.service.jncp.NSIException
This NdsIterator() method searches in the named context or named object for entries that satisfy the given search filter and then returns the objects with all their attributes in an NdsIterator. It performs the search as specified by the iterator controls cons parameter, as defined in the NdsIteratorControls constructor.
After a call to NdsIterator.next or NdsIterator.previous, the result returned is an NdsIterator. Each NdsIteratorResult contains the name of the object and other information about the object (see NdsIteratorResult). The name is either relative to the target context of the search, which is named by the name parameter, or it is a URL string. If the target context is included in the enumeration (as is possible when the cons parameter specifies a search scope of NdsIteratorControls.OBJECT_SCOPE), its name is the empty string.
name
- The non-NULL name of the context or object at which
to perform the search.filter
- The non-NULL filter expression to use for the search.cons
- The iterator controls that control the search.
If NULL, it is equivalent to using the NULL
NdsIteratorControls constructor.NdsIteratorControls
,
NdsIteratorResult
public NdsIterator createIterator(java.lang.String name, java.lang.String filterExpr, java.lang.Object[] filterArgs, NdsIteratorControls cons) throws com.novell.service.jncp.NSIException
This NdsIterator() method searches in the named context or named object for entries that satisfy the given search filter and then returns the objects with all their attributes in an NdsIterator. It performs the search as specified by the iterator controls cons parameter, which is defined in the NdsIteratorControls constructor.
After a call to NdsIterator.next or NdsIterator.previous, this method returns an NdsIterator, which contains the name of the object and other information about the object (see NdsIteratorResult). The name is either relative to the target context of the search, which is named by the name parameter, or it is a URL string. If the target context is included in the enumeration (as is possible when the cons parameter specifies a search scope of NdsIteratorControls.OBJECT_SCOPE), its name is an empty string.
name
- The non-NULL name of the context or object at which
to perform the search.filterExpr
- The non-NULL filter expression to use for the search.
The expression may contain variables of the
form {i} where i is an integer.filterArgs
- The array of arguments (possibly NULL) to substitute
for the variables in filterExpr. The value of
filterArgs[i] will replace each occurrence of
{i}.cons
- The iterator controls that control the search.
If NULL, it is equivalent to using the no arguments
NdsIteratorControls constructor.NdsIteratorControls
public NdsIterator createIterator(java.lang.String name, NdsIteratorControls cons, java.lang.String className, java.lang.String subordinateName) throws com.novell.service.jncp.NSIException
This NdsIterator() method lists subordinates in the named context or named object for entries that satisfy the given filter of class and subordinate names, then returns the objects without attribute names or values in an NdsIterator.
Of the items stored in the NdsIteratorControls, the items that apply to the list iterator with their default values are:
The name given for the className filter is the name of an object class, such as User, Computer, or Server. The value given for subordinateName filter can be one of the following:
The location of the subordinate object(s) in the NDS tree is immediately subordinate to the object specified by objectName. The relationship between className and subordinateName is an AND relationship. When className and subordinateName are provided, a list of immediate subordinate objects restricted by both filters is returned. When className is NULL and subordinateName is NULL, a list of all immediate subordinates is returned. When className is provided and subordinateName is NULL, a list of immediate subordinates restricted only by the className filter is returned. When className is NULL and subordinateName is provided, a list of immediate subordinates restricted only by the subordinateName filter is returned.
The following examples show how to use wildcards for untyped names:
If the wildcard name specified for subordinateName includes a type, such as CN, the name must include the equals (=) sign. The following examples show how to use wildcards for typed names:
name
- The non-NULL name of the context or object at
which to perform the search.cons
- The iterator controls that control the search.
If NULL, it is equivalent to using the no
arguments NdsIteratorControls constructor.className
- The name of the object class filter.subordinateName
- The name of the subordinate filter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |