directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [apacheds] A question on return values of ContextPartition.list(Name)
Date Thu, 30 Jun 2005 03:06:40 GMT
2005/6/30, Trustin Lee <trustin@gmail.com>: 
> 
> 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?
> 
 I found the solution after some trials and errors:
  SearchControls ctrl = new SearchControls();
ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE ); 
NamingEnumeration e = nexus.search( new LdapName( "uid=admin,ou=system"), 
factoryCfg.getEnvironment(), new PresenceNode( "objectClass" ), ctrl );
while( e.hasMore() )
{
SearchResult sr = ( SearchResult ) e.next();
System.out.println( "Name: " + sr.getName() + ", Attrs: " + sr.getAttributes() 
);
}
 Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message