Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 07DEB4EE7 for ; Wed, 11 May 2011 16:26:03 +0000 (UTC) Received: (qmail 6497 invoked by uid 500); 11 May 2011 16:26:02 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 6450 invoked by uid 500); 11 May 2011 16:26:02 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 6443 invoked by uid 99); 11 May 2011 16:26:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 16:26:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.42 as permitted sender) Received: from [74.125.82.42] (HELO mail-ww0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 16:25:55 +0000 Received: by wwk4 with SMTP id 4so4592766wwk.1 for ; Wed, 11 May 2011 09:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=EaByQ06cWtrZmfRmKnj9gA3pFIwNPSh1IwtZssQXkpk=; b=gks19joMAFb7ZgDe7DHVHyv5rysWEhTIQsQQ2HUAy3BfASp/KEM/a39fChd0ENwKA9 i4MNYFhEaJGe6G1GHTu+ya8ZT4SGHAUGz9YFgROTz99H/2x+y11dA0L7tHMSqSohPjxo Fv646VWViFROjIGplnwnA5QtcmW4tb1GIskPo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=guUjSOMZa/3zSiCbayC7vXle681+AgXP0Diz6Y67C/kiIr8zJkeIyBntzbqe/Ao9+b hcR8UgLxYaJFwWi86mDkwlZBgSTozzJnhVgAtyCI9564hPglOJarv/aS13eFmK5ztKjQ /BrwzzYxeVtI/F+Unl3T7hexWDmfTdSM5D7cU= Received: by 10.216.131.230 with SMTP id m80mr2546015wei.48.1305131134756; Wed, 11 May 2011 09:25:34 -0700 (PDT) Received: from emmanuel-lecharnys-MacBook-Pro.local (lon92-10-78-226-4-211.fbx.proxad.net [78.226.4.211]) by mx.google.com with ESMTPS id c54sm174859wer.6.2011.05.11.09.25.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 May 2011 09:25:33 -0700 (PDT) Message-ID: <4DCAB87C.9030202@gmail.com> Date: Wed, 11 May 2011 18:25:32 +0200 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Apache Directory Developers List Subject: API evolution Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi guys, those last three days, I made some modifications in the API following the discussions we has 2 weeks ago. Namely : 1) The 'simple' requests are not anymore returning a Response. If somethng went wrong, an exception will be thrown. For instance, instead of doing : BindResponse bindResponse = connection.bing( "jdoe", secret" ); if ( bindResponse.getResultCode() == ResultCodeEnum.SUCCESS ) { // do something } we now do : try { connection.bing( "jdoe", secret" ); } catch ( LdapException le ) { // Deal with the issue } Note that if you do a connection.bind( BindRequest ), then you get back a BindResponse. 2) The search request is now returning a EntryCursor for 'simple' searches. The code now looks like : EntryCursor cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "*" ); while ( cursor.next() ) { Entry result = cursor.get(); // do something with the Entry } instead of : Cursor cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "*" ); while ( cursor.next() ) { Entry result = ( ( SearchResultEntry ) cursor.get() ).getEntry(); // do something with the Entry } Again, using a connection.search( SearchRequest ), you get back a Cursor as a result. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com