searchContext.setScope( SearchScope.OBJECT );
cursors.add( partition.search( searchContext ) );
}
}
return new CursorList( cursors, searchContext );
}
else if ( isSublevelScope )
{
List<EntryFilteringCursor> cursors = new ArrayList<EntryFilteringCursor>();
for ( Partition partition : partitions.values() )
{
Entry entry = partition.lookup( new LookupOperationContext( directoryService.getAdminSession(),
partition.getSuffix() ) );
if ( entry != null )
{
Partition backend = getPartition( entry.getDn() );
searchContext.setDn( entry.getDn() );
cursors.add( backend.search( searchContext ) );
}
}
// don't feed the above Cursors' list to a BaseEntryFilteringCursor it is skipping the naming context entry of each partition
return new CursorList( cursors, searchContext );
}
// TODO : handle searches based on the RootDSE
throw new LdapNoSuchObjectException();
}