directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject Re: [apacheds] A question on return values of ContextPartition.list(Name)
Date Thu, 30 Jun 2005 11:55:37 GMT
Trustin Lee wrote:

> Hi,
> JNDI API doc says the return value of Context.list(Name) is 
> NamingEnumeration<NameClassPair>, but it seems 
> ContextPartition.list(Name) returns NamingEnumeration<SearchResult>.  
> Is this behavior correct?

Yes it is correct because a SearchResut inherits from Binding which is 
derived from a NameClassPair.  Heirarchical namespaces often return a 
SearchResult while flat namespaces return Bindings and NameClassPairs.  
It's just a matter of specialization.

> Another question, I want to retrieve the whole attributes of all 
> decendant entries under a base name (it would be nice if the result 
> includes the base entry itself, too).  How can I do that?

The scope parameter can be used to control the search.  One level scope 
to list the children of a base entry does not return the base.  This is 
part of the LDAP specifications so we cannot change this.  You will have 
to use subtree scope which will include the base.


View raw message