directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@gmail.com>
Subject Re: Need some help with 2.0.1 LDAP API
Date Wed, 13 Jan 2021 10:21:33 GMT
Hi !

On 13/01/2021 11:09, Hrushikesh Agrawal wrote:
> Hello Experts,
>
> We are using the Apache LDAP API 1.0.3 with our product to communicate with
> different LDAP servers. We are upgrading the LDAP API jars from 1.0.3 to
> 2.0.1.
> We found that few classes like AdDirSyncImpl and AdDirSyncDecorator are
> missing in the latest JAR 2.0.1. These classes must be moved with different
> names or the purpose of these classes must be incorporated in another class.
> We are using these classes to find th cookies like below  -
>
>
>
>
>
>
>
>
> *if(cursor.isDone()){ SearchResultDone searchResultDone =
> cursor.getSearchResultDone(); Control control =
> searchResultDone.getControl(AdDirSyncImpl.OID);          if (control
> instanceof AdDirSyncDecorator){                AdDirSyncDecorator
> adDirSyncDecorator = (AdDirSyncDecorator)control;                cookie =
> adDirSyncDecorator.getCookie();           } }*
>
> Could you please help us on this to figure out the exact classes or way to
> implement this at our end.

We have rewritten those classes, you now have to use the following 
classes and interfaces :


AdDirSyncRequestImpl and AdDirSyncRequest

AdDirSyncResponseImpl and AdDirSyncResponse


They are in the org.apache.directory.api.ldap.extras.controls.ad package.


Getting the OID is just a matter of calling AdDirSyncRequest.OID,

The request control can be created with new AdDirSyncRequestImpl(), then 
you have methods to set the cookie, and other parameters (see 
https://nightlies.apache.org/directory/api/2.0.1/apidocs/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncRequestImpl.html)


The response control can be get from the response and casted to a 
AdDirSyncResponse, then you can fetch the content with specific method 
like getCookie() (see 
https://nightlies.apache.org/directory/api/2.0.1/apidocs/)


Hope it helps.



---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@directory.apache.org
For additional commands, e-mail: api-help@directory.apache.org


Mime
View raw message