directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sathyanarayan, Harish" <Harish.Sathyanara...@virtustream.com>
Subject RE: EntryFilteringCursor question
Date Fri, 01 Sep 2017 17:48:39 GMT
What I am returning back from the interceptor to the client if that may help:

return  new EntryFilteringCursorImpl(cursor, searchContext, service.getSchemaManager());

-----Original Message-----
From: Sathyanarayan, Harish [mailto:Harish.Sathyanarayan@virtustream.com] 
Sent: Friday, September 01, 2017 1:26 PM
To: Apache Directory Developers List <dev@directory.apache.org>
Subject: RE: EntryFilteringCursor question

Yes, that what I am doing but my client is throwing  ERR_02014_UNSUPPORTED_OPERATION The method

org.apache.directory.ldap.client.api.EntryCursorImpl.beforeFirst() is not supported'

my simple client code is 	Entry cursor = connection.search(searchDn, "(objectclass=*)", SearchScope.SUBTREE);

typecasting does not work

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Friday, September 01, 2017 1:03 PM
To: Apache Directory Developers List <dev@directory.apache.org>
Subject: Re: EntryFilteringCursor question



Le 01/09/2017 à 17:47, Sathyanarayan, Harish a écrit :
> I am intercepting the search request via custom interceptor and searching a third-party
ldap but want to return back the result to the client. However I cannot return the EntryFilteringCursorImpl.
Any techniques to achieve this by passing the result to the client. I have an EntryCursor
with mutltiple entries.  Next(searchContext) is not going to work obviously.
>
> Am overriding this
> @Override
> public EntryFilteringCursor search(SearchOperationContext 
> searchContext) throws LdapException

Results are managed by the cursor the interceptor is retruning. If you interceptor get the
results from a remote LDAP server, bypassing teh rest of the chain, than you need to wrap
a cursor around the entries you get, and return this cursor ::

    public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
    {
        EntryFilteringCursor cursor = <grab the data from the remote LDAP server>

        return cursor;
    }

--
Emmanuel Lecharny

Symas.com
directory.apache.org

The information contained in this electronic mail transmission may be privileged and confidential,
and therefore, protected from disclosure. If you have received this communication in error,
please notify us immediately by replying to this message and deleting the email and its attachments
from all computers without copying or disclosing it.
The information contained in this electronic mail transmission may be privileged and confidential,
and therefore, protected from disclosure. If you have received this communication in error,
please notify us immediately by replying to this message and deleting the email and its attachments
from all computers without copying or disclosing it.
Mime
View raw message