let's move to the Search operation now. It's the most complex operation,
and we have to be carefull not to have a hundreds of overloaded methods.
We will try to keep the 90/10 approach.
Basically, the search operation has many parameters :
- baseDN
- scope
- derefAliases
- sizeLimit
- timeLimit
- typesOnly
- filter
- attributes
Out of them, the most used parameters are :
- baseDN
- filter
- scope
- attributes
- sizeLimit
The two firsts are absolutely mandatory. The three later are frequent.
Then you have the others.
What I would suggest is that the four first parameters are always
present in a search request :
search( String dn, String filter, ScopeEnum scope, String... attributes )
Note that the attributes is a varargs parameter.
Now, it makes it impossible to add a fifth parameter, as the varargs
must be the last one.
All other parameters can be set using the SearchRequest object, with
setters, and the following method :
search( SearchRequest request )
or
search( SearchRequest request, SearchListener listener ) for the
non-blocking form.
Do you have better ideas ?
Thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org