directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1101873 [1/2] - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/ apacheds/trunk/core-integ/src/test/java/org/apache/direc...
Date Wed, 11 May 2011 13:40:45 GMT
Author: elecharny
Date: Wed May 11 13:40:44 2011
New Revision: 1101873

URL: http://svn.apache.org/viewvc?rev=1101873&view=rev
Log:
o Changed the search API to return an EntryCursor instead of a Cursor<Response>, for simple searches
o Removed the LdapConnection.shutdown() method

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchBinaryIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaDitStoreUtil.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NetworkSchemaLoader.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/EntryCursor.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java Wed May 11 13:40:44 2011
@@ -28,6 +28,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.directory.ldap.client.api.EntryCursorImpl;
 import org.apache.directory.ldap.client.api.LdapConnection;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
@@ -37,6 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
@@ -1010,7 +1012,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public SearchCursor search( Dn baseDn, String filter, SearchScope scope, String... attributes )
+    public EntryCursor search( Dn baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
         if ( baseDn == null )
@@ -1028,14 +1030,14 @@ public class LdapCoreSessionConnection i
         searchRequest.addAttributes( attributes );
         searchRequest.setDerefAliases( AliasDerefMode.DEREF_ALWAYS );
 
-        return search( searchRequest );
+        return new EntryCursorImpl( search( searchRequest ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public SearchCursor search( String baseDn, String filter, SearchScope scope, String... attributes )
+    public EntryCursor search( String baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
         return search( new Dn( schemaManager, baseDn ), filter, scope, attributes );
@@ -1274,17 +1276,4 @@ public class LdapCoreSessionConnection i
         this.directoryService = directoryService;
         this.schemaManager = directoryService.getSchemaManager();
     }
-
-
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void shutdown()
-    {
-        if ( codec != null )
-        {
-            codec.shutdown();
-        }
-    }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java Wed May 11 13:40:44 2011
@@ -34,13 +34,11 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
@@ -136,11 +134,11 @@ public class AuthorizationServiceAsAdmin
 
         HashSet<String> set = new HashSet<String>();
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "*" );
+        EntryCursor cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "*" );
 
         while ( cursor.next() )
         {
-            Entry result = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry result = cursor.get();
             set.add( result.getDn().getName() );
         }
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java Wed May 11 13:40:44 2011
@@ -44,12 +44,10 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.junit.After;
@@ -186,13 +184,13 @@ public class SearchAuthorizationIT exten
      */
     private void recursivelyDelete( Dn rdn ) throws Exception
     {
-        Cursor<Response> results = reusableAdminCon.search( rdn.getName(), "(objectClass=*)",
+        EntryCursor results = reusableAdminCon.search( rdn.getName(), "(objectClass=*)",
             SearchScope.ONELEVEL, "*" );
 
         while ( results.next() )
         {
-            SearchResultEntry result = ( SearchResultEntry ) results.get();
-            Dn childRdn = result.getEntry().getDn();
+            Entry result = results.get();
+            Dn childRdn = result.getDn();
             recursivelyDelete( childRdn );
         }
 
@@ -272,12 +270,12 @@ public class SearchAuthorizationIT exten
         Dn userDn = new Dn( "uid=" + uid + ",ou=users,ou=system" );
         results.clear();
         LdapConnection userCtx = getConnectionAs( userDn, password );
-        Cursor<Response> cursor = userCtx.search( base.getName(), filter, scope, "*" );
+        EntryCursor cursor = userCtx.search( base.getName(), filter, scope, "*" );
         int counter = 0;
 
         while ( cursor.next() )
         {
-            Entry result = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry result = cursor.get();
             results.put( result.getDn().getName(), result );
             counter++;
         }
@@ -312,12 +310,12 @@ public class SearchAuthorizationIT exten
 
         results.clear();
         LdapConnection userCtx = getConnectionAs( userDn, password );
-        Cursor<Response> cursor = userCtx.search( base.getName(), "(objectClass=*)", scope, "*" );
+        EntryCursor cursor = userCtx.search( base.getName(), "(objectClass=*)", scope, "*" );
         int counter = 0;
 
         while ( cursor.next() )
         {
-            Entry result = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry result = cursor.get();
             results.put( result.getDn().getName(), result );
             counter++;
         }
@@ -341,7 +339,7 @@ public class SearchAuthorizationIT exten
         LdapConnection connection = getAdminConnection();
         Dn base = addSearchData( new Dn( "ou=system" ), 3, 10 );
 
-        Cursor<Response> results = connection.search( base.getName(), "(objectClass=*)", SearchScope.SUBTREE,
+        EntryCursor results = connection.search( base.getName(), "(objectClass=*)", SearchScope.SUBTREE,
             "+" );
         int counter = 0;
 
@@ -878,16 +876,17 @@ public class SearchAuthorizationIT exten
      * @return the single search result if access is allowed or null
      * @throws Exception if the search fails w/ exception other than no permission
      */
-    private SearchResultEntry checkCanSearhSubentryAs( String uid, String password, Dn dn ) throws Exception
+    private Entry checkCanSearhSubentryAs( String uid, String password, Dn dn ) throws Exception
     {
         LdapConnection userCtx = getConnectionAs( new Dn( "uid=" + uid + ",ou=users,ou=system" ), password );
-        SearchResultEntry result = null;
-        Cursor<Response> list = null;
+        Entry result = null;
+        EntryCursor list = null;
 
         list = userCtx.search( dn.getName(), "(objectClass=*)", SearchScope.OBJECT, "*" );
+        
         if ( list.next() )
         {
-            result = (SearchResultEntry) list.get();
+            result = list.get();
         }
 
         list.close();
@@ -903,22 +902,45 @@ public class SearchAuthorizationIT exten
         createUser( "billyd", "billyd" );
 
         // now add a subentry that enables anyone to search below ou=system
-        createAccessControlSubentry( "anybodySearch", "{ " + "  identificationTag \"searchAci\", "
-            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
-            + "    userClasses { allUsers }, " + "    userPermissions " + "    { " + "      { "
-            + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
-            + "        grantsAndDenials { grantRead, grantReturnDN, grantBrowse } " + "      } " + "    } " + "  } "
-            + "}" );
+        createAccessControlSubentry( "anybodySearch", 
+            "{ " + 
+            "  identificationTag \"searchAci\", " +
+            "  precedence 14, " + 
+            "  authenticationLevel none, " + 
+            "  itemOrUserFirst userFirst: " + 
+            "  { " +
+            "    userClasses { allUsers }, " + 
+            "    userPermissions " + 
+            "    { " + 
+            "      { " +
+            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
+            "        grantsAndDenials { grantRead, grantReturnDN, grantBrowse } " + 
+            "      } " + 
+            "    } " + 
+            "  } " +
+            "}" );
 
         // check and see if we can access the subentry now
         assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new Dn( "cn=anybodySearch,ou=system" ) ) );
 
         // now add a denial to prevent all users except the admin from accessing the subentry
-        addSubentryACI( "{ " + "  identificationTag \"searchAci\", " + "  precedence 14, "
-            + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
-            + "    userClasses { allUsers }, " + "    userPermissions " + "    { " + "      { "
-            + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
-            + "        grantsAndDenials { denyRead, denyReturnDN, denyBrowse } " + "      } " + "    } " + "  } " + "}" );
+        addSubentryACI( 
+            "{ " + 
+            "  identificationTag \"searchAci\", " + 
+            "  precedence 14, " +
+            "  authenticationLevel none, " + 
+            "  itemOrUserFirst userFirst: " + 
+            "  { " +
+            "    userClasses { allUsers }, " + 
+            "    userPermissions " + 
+            "    { " + 
+            "      { " +
+            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
+            "        grantsAndDenials { denyRead, denyReturnDN, denyBrowse } " + 
+            "      } " + 
+            "    } " + 
+            "  } " + 
+            "}" );
 
         // now we should not be able to access the subentry with a search
         assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new Dn( "cn=anybodySearch,ou=system" ) ) );
@@ -933,13 +955,32 @@ public class SearchAuthorizationIT exten
 
         // now add a subentry that enables anyone to search/lookup and disclose on error
         // below ou=system, with the exclusion of ou=groups and everything below it
-        createAccessControlSubentry( "selectiveDiscloseOnError", "{ specificExclusions "
-            + "  { chopBefore:\"ou=groups\" } " + "}", "{ " + "  identificationTag \"searchAci\", "
-            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst:" + "  { "
-            + "    userClasses { allUsers }, " + "    userPermissions " + "    { " + "      { "
-            + "        protectedItems {entry, allUserAttributeTypesAndValues}, " + "        grantsAndDenials "
-            + "        { " + "          grantRead, " + "          grantReturnDN, " + "          grantBrowse, "
-            + "          grantDiscloseOnError " + "        } " + "      } " + "    } " + "  } " + "}" );
+        createAccessControlSubentry( "selectiveDiscloseOnError", 
+            "{ specificExclusions " +
+            "  { chopBefore:\"ou=groups\" } " + 
+            "}", 
+            "{ " + 
+            "  identificationTag \"searchAci\", " +
+            "  precedence 14, " + 
+            "  authenticationLevel none, " + 
+            "  itemOrUserFirst userFirst:" + 
+            "  { " +
+            "    userClasses { allUsers }, " + 
+            "    userPermissions " + 
+            "    { " + 
+            "      { " +
+            "        protectedItems {entry, allUserAttributeTypesAndValues}, " + 
+            "        grantsAndDenials " +
+            "        { " + 
+            "          grantRead, " + 
+            "          grantReturnDN, " + 
+            "          grantBrowse, " +
+            "          grantDiscloseOnError " + 
+            "        } " + 
+            "      } " + 
+            "    } " + 
+            "  } " + 
+            "}" );
 
         // get a context as the user and try a lookup of a non-existant entry under ou=groups,ou=system
         LdapConnection userCtx = getConnectionAs( "uid=billyd,ou=users,ou=system", "billyd" );
@@ -950,12 +991,29 @@ public class SearchAuthorizationIT exten
 
         // now delete and replace subentry with one that does not excluse ou=groups,ou=system
         deleteAccessControlSubentry( "selectiveDiscloseOnError" );
-        createAccessControlSubentry( "selectiveDiscloseOnError", "{ " + "  identificationTag \"searchAci\", "
-            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
-            + "    userClasses { allUsers }, " + "    userPermissions " + "    { " + "      { "
-            + "        protectedItems {entry, allUserAttributeTypesAndValues}, " + "        grantsAndDenials "
-            + "        { " + "          grantRead, " + "          grantReturnDN, " + "          grantBrowse, "
-            + "          grantDiscloseOnError " + "        } " + "      } " + "    } " + "  } " + "}" );
+        createAccessControlSubentry( "selectiveDiscloseOnError", 
+            "{ " + 
+            "  identificationTag \"searchAci\", " +
+            "  precedence 14, " + 
+            "  authenticationLevel none, " + 
+            "  itemOrUserFirst userFirst: " + 
+            "  { " +
+            "    userClasses { allUsers }, " + 
+            "    userPermissions " + 
+            "    { " + 
+            "      { " +
+            "        protectedItems {entry, allUserAttributeTypesAndValues}, " + 
+            "        grantsAndDenials " +
+            "        { " + 
+            "          grantRead, " + 
+            "          grantReturnDN, " + 
+            "          grantBrowse, " +
+            "          grantDiscloseOnError " + 
+            "        } " + 
+            "      } " + 
+            "    } " + 
+            "  } " + 
+            "}" );
 
         // now try a lookup of a non-existant entry under ou=groups,ou=system again
         entry = userCtx.lookup( "cn=blah,ou=groups" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java Wed May 11 13:40:44 2011
@@ -33,7 +33,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
@@ -44,8 +44,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.model.ldif.LdapLdifException;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.junit.After;
 import org.junit.Before;
@@ -136,18 +134,14 @@ public class CollectiveAttributeServiceI
     {
         Map<String, Entry> resultMap = new HashMap<String, Entry>();
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "+",
+        EntryCursor cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "+",
             "*" );
 
         while ( cursor.next() )
         {
-            Response result = cursor.get();
+            Entry entry = cursor.get();
 
-            if ( result instanceof SearchResultEntry )
-            {
-                Entry entry = ( (SearchResultEntry) result ).getEntry();
-                resultMap.put( entry.getDn().getName(), entry );
-            }
+            resultMap.put( entry.getDn().getName(), entry );
         }
 
         return resultMap;
@@ -158,17 +152,12 @@ public class CollectiveAttributeServiceI
     {
         Map<String, Entry> resultMap = new HashMap<String, Entry>();
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "cn" );
+        EntryCursor cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "cn" );
 
         while ( cursor.next() )
         {
-            Response result = cursor.get();
-
-            if ( result instanceof SearchResultEntry )
-            {
-                Entry entry = ( ( SearchResultEntry ) result ).getEntry();
-                resultMap.put( entry.getDn().getName(), entry );
-            }
+            Entry entry = cursor.get();
+            resultMap.put( entry.getDn().getName(), entry );
         }
 
         return resultMap;
@@ -179,18 +168,14 @@ public class CollectiveAttributeServiceI
     {
         Map<String, Entry> resultMap = new HashMap<String, Entry>();
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE,
+        EntryCursor cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE,
             "c-ou", "c-st" );
 
         while ( cursor.next() )
         {
-            Response result = cursor.get();
+            Entry entry = cursor.get();
 
-            if ( result instanceof SearchResultEntry )
-            {
-                Entry entry = ( ( SearchResultEntry ) result ).getEntry();
-                resultMap.put( entry.getDn().getName(), entry );
-            }
+            resultMap.put( entry.getDn().getName(), entry );
         }
 
         return resultMap;
@@ -347,20 +332,17 @@ public class CollectiveAttributeServiceI
         addAdministrativeRole( "collectiveAttributeSpecificArea" );
         connection.add( getTestSubentry( "cn=testsubentry,ou=system" ) );
         
-        Cursor<Response> cursor = connection.search( "ou=system", "(c-ou=configuration)", SearchScope.SUBTREE, "+",
+        EntryCursor cursor = connection.search( "ou=system", "(c-ou=configuration)", SearchScope.SUBTREE, "+",
             "*" );
 
         boolean found = false;
         
         while ( cursor.next() )
         {
-            Response result = cursor.get();
+            Entry entry = cursor.get();
 
-            if ( result instanceof SearchResultEntry )
-            {
-                found = true;
-                break;
-            }
+            found = true;
+            break;
         }
         
         assertTrue( found );
@@ -388,13 +370,12 @@ public class CollectiveAttributeServiceI
         // -------------------------------------------------------------------
         // Test searching for subtypes
         // -------------------------------------------------------------------
-        Cursor<Response> responses = connection.search( "ou=services,ou=configuration,ou=system",
+        EntryCursor responses = connection.search( "ou=services,ou=configuration,ou=system",
             "(ObjectClass=*)", SearchScope.OBJECT, "ou" );
 
         while ( responses.next() )
         {
-            SearchResultEntry resultEntry = ( SearchResultEntry ) responses.get();
-            entry = resultEntry.getEntry();
+            entry = responses.get();
 
             assertEquals( 2, entry.size() );
             assertTrue( entry.containsAttribute( "ou" ) );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java Wed May 11 13:40:44 2011
@@ -35,7 +35,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -49,7 +49,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
 import org.apache.directory.shared.ldap.model.message.ModifyResponse;
-import org.apache.directory.shared.ldap.model.message.Response;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -114,7 +113,7 @@ public class ExceptionServiceIT extends 
     @Test
     public void testFailSearchNoSuchObject() throws Exception
     {
-        Cursor<Response> cursor = getAdminConnection( getService() ).search( "ou=blah", "(objectClass=*)",
+        EntryCursor cursor = getAdminConnection( getService() ).search( "ou=blah", "(objectClass=*)",
             SearchScope.ONELEVEL, "*" );
         assertFalse( cursor.next() );
     }
@@ -129,7 +128,7 @@ public class ExceptionServiceIT extends 
     @Test
     public void testSearchControl() throws Exception
     {
-        Cursor<Response> cursor = getAdminConnection( getService() ).search( "ou=users,ou=system", "(objectClass=*)",
+        EntryCursor cursor = getAdminConnection( getService() ).search( "ou=users,ou=system", "(objectClass=*)",
             SearchScope.ONELEVEL, "*" );
 
         assertFalse( cursor.next() );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java Wed May 11 13:40:44 2011
@@ -33,7 +33,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
@@ -42,8 +42,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.util.Strings;
@@ -192,13 +190,12 @@ public class OperationalAttributeService
     @Test
     public void testSystemContextRoot() throws Exception
     {
-        Cursor<Response> responses = connection
+        EntryCursor responses = connection
             .search( "ou=system", "(objectClass=*)", SearchScope.OBJECT, "*" );
         responses.next();
-        SearchResultEntry result = (SearchResultEntry) responses.get();
+        Entry entry = responses.get();
 
         // test to make sure op attribute do not occur - this is the control
-        Entry entry = result.getEntry();
         assertNull( entry.get( "creatorsName" ) );
         assertNull( entry.get( "createTimestamp" ) );
 
@@ -206,9 +203,8 @@ public class OperationalAttributeService
         responses = connection.search( "ou=system", "(objectClass=*)", SearchScope.OBJECT, "creatorsName",
             "createTimestamp" );
         responses.next();
-        result = ( SearchResultEntry ) responses.get();
+        entry = responses.get();
 
-        entry = result.getEntry();
         assertNotNull( entry.get( "creatorsName" ) );
         assertNotNull( entry.get( "createTimestamp" ) );
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java Wed May 11 13:40:44 2011
@@ -32,9 +32,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.junit.After;
 import org.junit.Before;
@@ -195,12 +194,11 @@ public class LookupIT extends AbstractLd
     @Test
     public void testLookupWithAttrs() throws Exception
     {
-        SearchCursor cursor = connection.search( "cn=test,ou=system", "(ObjectClass=*)",SearchScope.SUBTREE, "name" );
+        EntryCursor cursor = connection.search( "cn=test,ou=system", "(ObjectClass=*)",SearchScope.SUBTREE, "name" );
         
         while ( cursor.next() )
         {
-            SearchResultEntry result = (SearchResultEntry)cursor.get();
-            Entry entry = result.getEntry();
+            Entry entry = cursor.get();
             assertNotNull( entry );
             assertEquals( 2, entry.size() );
             assertEquals( "test", entry.get( "cn" ).getString() );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchBinaryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchBinaryIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchBinaryIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchBinaryIT.java Wed May 11 13:40:44 2011
@@ -31,8 +31,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.message.Response;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -136,7 +135,7 @@ public class SearchBinaryIT extends Abst
         LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
 
         // Do a search with a filter based on certificate, get back all the entries
-        Cursor<Response> responses = connection.search( "ou=system", "(userCertificate=*)",
+        EntryCursor responses = connection.search( "ou=system", "(userCertificate=*)",
             SearchScope.SUBTREE, "*" );
 
         int i = 0;
@@ -212,7 +211,7 @@ public class SearchBinaryIT extends Abst
         LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
 
         // Check that searching for an entry using a valid SUBSTR filter works
-        Cursor<Response> responses = connection.search( "ou=system", "(binaryAttribute=\\01\\02*)",
+        EntryCursor responses = connection.search( "ou=system", "(binaryAttribute=\\01\\02*)",
             SearchScope.SUBTREE, "*" );
 
         int i = 0;

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java Wed May 11 13:40:44 2011
@@ -54,7 +54,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
@@ -65,8 +65,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.filter.LessEqNode;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
@@ -1827,12 +1825,14 @@ public class SearchIT extends AbstractLd
         Entry loadedEntry = null;
 
         Set<String> csnSet = new HashSet<String>( expectedCsns.length );
-        Cursor<Response> cursor = connection.search( "ou=system", filter.toString(), SearchScope.ONELEVEL, "*", "+" );
+        EntryCursor cursor = connection.search( "ou=system", filter.toString(), SearchScope.ONELEVEL, "*", "+" );
+        
         while ( cursor.next() )
         {
-            loadedEntry = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            loadedEntry = cursor.get();
             csnSet.add( loadedEntry.get( SchemaConstants.ENTRY_CSN_AT ).getString() );
         }
+        
         cursor.close();
 
         assertTrue( csnSet.size() >= expectedCsns.length );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java Wed May 11 13:40:44 2011
@@ -27,8 +27,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.message.Response;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -51,14 +51,14 @@ public class SearchPerfIT extends Abstra
     {
         LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
 
-        Cursor<Response> cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)",
+        EntryCursor cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)",
             SearchScope.OBJECT, "*" );
 
         int i = 0;
 
         while ( cursor.next() )
         {
-            Response response = cursor.get();
+            Entry entry = cursor.get();
             ++i;
         }
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java Wed May 11 13:40:44 2011
@@ -50,7 +50,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesDecorator;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -60,8 +60,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.message.controls.Subentries;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -314,18 +312,13 @@ public class SubentryServiceIT extends A
     {
         Map<String, Entry> results = new HashMap<String, Entry>();
 
-        Cursor<Response> responses = connection.search( dn, "(objectClass=*)", SearchScope.SUBTREE, "+", "*" );
+        EntryCursor responses = connection.search( dn, "(objectClass=*)", SearchScope.SUBTREE, "+", "*" );
 
         while ( responses.next() )
         {
-            Response response = responses.get();
+            Entry entry = responses.get();
 
-            if ( response instanceof SearchResultEntry)
-            {
-                Entry entry = ( ( SearchResultEntry ) response ).getEntry();
-
-                results.put( entry.getDn().getName(), entry );
-            }
+            results.put( entry.getDn().getName(), entry );
         }
 
         return results;

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java Wed May 11 13:40:44 2011
@@ -38,12 +38,10 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
 import org.apache.directory.shared.ldap.model.filter.EqualityNode;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.junit.After;
@@ -149,10 +147,10 @@ public class LdapConnectionTest extends 
 
         EqualityNode<String> filter = new EqualityNode<String>( SchemaConstants.ENTRY_UUID_AT, new StringValue( uuid ) );
 
-        Cursor<Response> cursor = connection.search( ADMIN_DN, filter.toString(), SearchScope.SUBTREE, "+" );
+        EntryCursor cursor = connection.search( ADMIN_DN, filter.toString(), SearchScope.SUBTREE, "+" );
         cursor.next();
 
-        Entry readEntry = ( (SearchResultEntry) cursor.get() ).getEntry();
+        Entry readEntry = cursor.get();
         assertEquals( uuid, readEntry.get( SchemaConstants.ENTRY_UUID_AT ).getString() );
 
         cursor.close();
@@ -191,12 +189,12 @@ public class LdapConnectionTest extends 
     @Test
     public void testSearchEmptyDNWithOneLevelScopeAndNoObjectClassPresenceFilter() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "", "(objectClass=*)", SearchScope.ONELEVEL, "*", "+" );
+        EntryCursor cursor = connection.search( "", "(objectClass=*)", SearchScope.ONELEVEL, "*", "+" );
         HashMap<String, Entry> map = new HashMap<String, Entry>();
 
         while ( cursor.next() )
         {
-            Entry result = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry result = cursor.get();
             map.put( result.getDn().getName(), result );
         }
         cursor.close();

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java Wed May 11 13:40:44 2011
@@ -33,6 +33,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.client.api.LdapApiIntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.message.AbandonRequest;
@@ -161,20 +162,19 @@ public class ClientAbandonRequestTest ex
         }
 
         // Launch the search now
-        Cursor<Response> cursor = connection.search( new Dn( "ou=system" ), "(cn=*)", SearchScope.ONELEVEL, "*" );
+        EntryCursor cursor = connection.search( new Dn( "ou=system" ), "(cn=*)", SearchScope.ONELEVEL, "*" );
 
-        Response searchResponse = null;
         int count = 0;
 
         while ( cursor.next() )
         {
-            searchResponse = cursor.get();
+            cursor.get();
             count++;
 
             if ( count > 10 )
             {
                 // Abandon the search request
-                AbandonRequest abandon = new AbandonRequestImpl( searchResponse.getMessageId() );
+                AbandonRequest abandon = new AbandonRequestImpl( cursor.getMessageId() );
                 connection.abandon( abandon );
             }
         }

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java Wed May 11 13:40:44 2011
@@ -23,7 +23,6 @@ package org.apache.directory.shared.clie
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.concurrent.TimeUnit;
 
@@ -36,7 +35,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.client.api.LdapApiIntegrationUtils;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
@@ -45,7 +44,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.junit.After;
@@ -104,15 +102,13 @@ public class ClientSearchRequestTest ext
     @Test
     public void testSimpleSearch() throws Exception
     {
-        SearchCursor cursor = connection.search( "ou=system", "(objectclass=*)", SearchScope.ONELEVEL );
+        EntryCursor cursor = connection.search( "ou=system", "(objectclass=*)", SearchScope.ONELEVEL );
         int count = 0;
         
         while ( cursor.next() )
         {
-            Response response = cursor.get();
-            assertNotNull( response );
-            assertTrue( response instanceof SearchResultEntry );
-            System.out.println( ((SearchResultEntry)response).getEntry() );
+            Entry entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
 
@@ -128,7 +124,7 @@ public class ClientSearchRequestTest ext
     @Test
     public void testSearch() throws Exception
     {
-        SearchCursor cursor = connection.search( "ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "ou=system", "(objectclass=*)",
             SearchScope.ONELEVEL,
             "*", "+" );
         int count = 0;
@@ -151,12 +147,13 @@ public class ClientSearchRequestTest ext
     @Test
     public void testSearchEquality() throws Exception
     {
-        SearchCursor cursor = connection.search( "ou=system", "(objectclass=organizationalUnit)",
+        EntryCursor cursor = connection.search( "ou=system", "(objectclass=organizationalUnit)",
             SearchScope.ONELEVEL, "*", "+" );
         int count = 0;
+        
         while ( cursor.next() )
         {
-            Entry entry = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry entry = cursor.get();
             assertNotNull( entry );
             count++;
         }

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java Wed May 11 13:40:44 2011
@@ -35,6 +35,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.client.api.LdapApiIntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.message.Response;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
@@ -89,24 +90,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchAll() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "*", "+" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 7, entry.size() );
         assertTrue( entry.containsAttribute( "objectClass" ) );
@@ -127,24 +125,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchAllUsers() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "*" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 3, entry.size() );
         assertTrue( entry.containsAttribute( "objectClass" ) );
@@ -161,24 +156,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchAllOperationals() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "+" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 4, entry.size() );
         assertTrue( entry.containsAttribute( "creatorsName" ) );
@@ -196,24 +188,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchAllUsersAndSomeOperationals() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "*", "entryCSN", "entryUUID" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 5, entry.size() );
         assertTrue( entry.containsAttribute( "objectClass" ) );
@@ -232,24 +221,22 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchAllOperationalAndSomeUsers() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "+", "cn", "sn" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
+        
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 6, entry.size() );
         assertTrue( entry.containsAttribute( "cn" ) );
@@ -269,24 +256,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchSomeOpsAndUsers() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "cn", "entryUUID", "sn", "entryCSN" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 4, entry.size() );
         assertTrue( entry.containsAttribute( "cn" ) );
@@ -304,24 +288,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchWithDuplicatedAttrs() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "cn", "entryUUID", "cn", "sn", "entryCSN", "entryUUID" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 4, entry.size() );
         assertTrue( entry.containsAttribute( "cn" ) );
@@ -339,24 +320,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchWithOIDAndtext() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "cn", "1.3.6.1.1.16.4", "surName", "entryCSN", "entryUUID" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 4, entry.size() );
         assertTrue( entry.containsAttribute( "cn" ) );
@@ -374,24 +352,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchWithMissingAttributes() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "cn", "1.3.6.1.1.16.4", "gn", "entryCSN", "entryUUID" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 3, entry.size() );
         assertTrue( entry.containsAttribute( "cn" ) );
@@ -408,24 +383,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchNoAttributes() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "1.1" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = (SearchResultEntry) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 0, entry.size() );
     }
@@ -439,24 +411,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchNoAttributesAndAttributes() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "1.1", "cn" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 1, entry.size() );
         assertTrue( entry.containsAttribute( "cn" ) );
@@ -471,24 +440,21 @@ public class SearchRequestReturningAttri
     @Test
     public void testSearchNoAttributesAllAttributes() throws Exception
     {
-        Cursor<Response> cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
+        EntryCursor cursor = connection.search( "cn=user1,ou=users,ou=system", "(objectclass=*)",
             SearchScope.OBJECT, "1.1", "*", "+" );
         int count = 0;
-        Response response = null;
+        Entry entry = null;
 
         while ( cursor.next() )
         {
-            response = cursor.get();
-            assertNotNull( response );
+            entry = cursor.get();
+            assertNotNull( entry );
             count++;
         }
         cursor.close();
 
         assertEquals( 1, count );
-        assertNotNull( response );
-        assertTrue( response instanceof SearchResultEntry );
-        SearchResultEntry resultEntry = ( SearchResultEntry ) response;
-        Entry entry = resultEntry.getEntry();
+        assertNotNull( entry );
 
         assertEquals( 7, entry.size() );
         assertTrue( entry.containsAttribute( "objectClass" ) );

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java Wed May 11 13:40:44 2011
@@ -40,9 +40,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.annotations.CreatePartition;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -77,11 +75,11 @@ public class TestClientApiPerf extends A
 
         long t2 = System.currentTimeMillis();
 
-        Cursor<Response> cursor = connection.search( "dc=example,dc=com", "(objectClass=*)", SearchScope.SUBTREE, "*" );
+        EntryCursor cursor = connection.search( "dc=example,dc=com", "(objectClass=*)", SearchScope.SUBTREE, "*" );
+        
         while ( cursor.next() )
         {
-            Response sr = cursor.get();
-            SearchResultEntry sre = ( SearchResultEntry ) sr;
+            cursor.get();
         }
 
         cursor.close();

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaDitStoreUtil.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaDitStoreUtil.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaDitStoreUtil.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaDitStoreUtil.java Wed May 11 13:40:44 2011
@@ -32,17 +32,15 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.event.EventType;
 import org.apache.directory.server.core.event.NotificationCriteria;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
@@ -155,15 +153,16 @@ public class ReplicaDitStoreUtil
     {
         List<ReplicaEventLog> replicas = new ArrayList<ReplicaEventLog>();
 
-        Cursor<Response> cursor = coreConnection.search( REPL_CONSUMER_DN, "(objectClass=ads-replConsumer)",
+        EntryCursor cursor = coreConnection.search( REPL_CONSUMER_DN, "(objectClass=ads-replConsumer)",
             SearchScope.ONELEVEL, "+", "*" );
 
         while ( cursor.next() )
         {
-            Entry entry = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry entry = cursor.get();
             ReplicaEventLog replica = convertEntryToReplica( entry );
             replicas.add( replica );
         }
+        
         cursor.close();
 
         return replicas;

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java Wed May 11 13:40:44 2011
@@ -30,13 +30,11 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.integ.ServerIntegrationUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.junit.Test;
@@ -90,16 +88,17 @@ public class AddingEntriesWithSpecialCha
         personEntry.setDn( new Dn( dn ) );
         connection.add( personEntry );
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(cn=Kate#Bush)", SearchScope.SUBTREE, "*" );
+        EntryCursor cursor = connection.search( "ou=system", "(cn=Kate#Bush)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
+        
         while ( cursor.next() )
         {
-            Entry sr = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry entry = cursor.get();
             entryFound = true;
 
-            assertTrue( personEntry.getDn().equals( sr.getDn() ) );
-            Attribute cn = sr.get( "cn" );
+            assertTrue( personEntry.getDn().equals( entry.getDn() ) );
+            Attribute cn = entry.get( "cn" );
             assertNotNull( cn );
             assertTrue( cn.contains( "Kate#Bush" ) );
         }
@@ -126,12 +125,13 @@ public class AddingEntriesWithSpecialCha
         entry.setDn( new Dn( dn ) );
         connection.add( entry );
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(cn=Bush, Kate)", SearchScope.SUBTREE, "*" );
+        EntryCursor cursor = connection.search( "ou=system", "(cn=Bush, Kate)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
+        
         while ( cursor.next() )
         {
-            Entry sr = ( (SearchResultEntry) cursor.get() ).getEntry();
+            Entry sr = cursor.get();
             entryFound = true;
 
             assertTrue( entry.getDn().equals( sr.getDn() ) );
@@ -161,12 +161,13 @@ public class AddingEntriesWithSpecialCha
         entry.setDn( new Dn( dn ) );
         connection.add( entry );
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(cn=Mackie \"The Knife\" Messer)",
+        EntryCursor cursor = connection.search( "ou=system", "(cn=Mackie \"The Knife\" Messer)",
             SearchScope.SUBTREE, "*" );
         boolean entryFound = false;
+        
         while ( cursor.next() )
         {
-            Entry sr = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry sr = cursor.get();
             entryFound = true;
             assertTrue( entry.getDn().equals( sr.getDn() ) );
             Attribute cn = sr.get( "cn" );
@@ -194,12 +195,12 @@ public class AddingEntriesWithSpecialCha
         entry.setDn( new Dn( dn ) );
         connection.add( entry );
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(ou=AC\\5CDC)", SearchScope.SUBTREE, "*" );
+        EntryCursor cursor = connection.search( "ou=system", "(ou=AC\\5CDC)", SearchScope.SUBTREE, "*" );
         boolean entryFound = false;
 
         while ( cursor.next() )
         {
-            Entry sr = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry sr = cursor.get();
             entryFound = true;
             assertTrue( entry.getDn().equals( sr.getDn() ) );
 
@@ -229,13 +230,14 @@ public class AddingEntriesWithSpecialCha
         entry.setDn( new Dn( dn ) );
         connection.add( entry );
 
-        Cursor<Response> cursor = connection
+        EntryCursor cursor = connection
             .search( "ou=system", "(ou=East -> West)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
+        
         while ( cursor.next() )
         {
-            Entry sr = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry sr = cursor.get();
             entryFound = true;
 
             assertTrue( entry.getDn().equals( sr.getDn() ) );
@@ -266,12 +268,13 @@ public class AddingEntriesWithSpecialCha
         entry.setDn( new Dn( dn ) );
         connection.add( entry );
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(ou=Scissors 8<)", SearchScope.SUBTREE, "*" );
+        EntryCursor cursor = connection.search( "ou=system", "(ou=Scissors 8<)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
+        
         while ( cursor.next() )
         {
-            Entry sr = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry sr = cursor.get();
             entryFound = true;
 
             assertTrue( entry.getDn().equals( sr.getDn() ) );
@@ -303,13 +306,14 @@ public class AddingEntriesWithSpecialCha
         entry.setDn( new Dn( dn ) );
         connection.add( entry );
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(ou=semicolon group;)", SearchScope.SUBTREE,
+        EntryCursor cursor = connection.search( "ou=system", "(ou=semicolon group;)", SearchScope.SUBTREE,
             "*" );
 
         boolean entryFound = false;
+        
         while ( cursor.next() )
         {
-            Entry sr = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry sr = cursor.get();
             entryFound = true;
 
             assertTrue( entry.getDn().equals( sr.getDn() ) );
@@ -340,13 +344,13 @@ public class AddingEntriesWithSpecialCha
         entry.setDn( new Dn( dn ) );
         connection.add( entry );
 
-        Cursor<Response> cursor = connection.search( "ou=system", "(ou=nomen=omen)", SearchScope.SUBTREE, "*" );
+        EntryCursor cursor = connection.search( "ou=system", "(ou=nomen=omen)", SearchScope.SUBTREE, "*" );
 
         boolean entryFound = false;
 
         while ( cursor.next() )
         {
-            Entry sr = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry sr = cursor.get();
             entryFound = true;
 
             assertTrue( entry.getDn().equals( sr.getDn() ) );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java Wed May 11 13:40:44 2011
@@ -55,6 +55,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -1617,7 +1618,7 @@ public class SearchIT extends AbstractLd
             }
 
             // Searches for all the entries in ou=system
-            Cursor<Response> cursor = asyncCnx.search( "ou=system", "(ObjectClass=*)", SearchScope.SUBTREE, "*" );
+            EntryCursor cursor = asyncCnx.search( "ou=system", "(ObjectClass=*)", SearchScope.SUBTREE, "*" );
 
             // Now loop on all the elements found, and abandon after 10 elements returned
             int count = 0;

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java?rev=1101873&r1=1101872&r2=1101873&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java Wed May 11 13:40:44 2011
@@ -29,9 +29,8 @@ import org.apache.directory.server.annot
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.Response;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -66,7 +65,7 @@ public class SearchPerfIT extends Abstra
             connection.bind( "uid=admin,ou=system", "secret" );
 
             // Searches for all the entries in ou=system
-            Cursor<Response> cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)",
+            EntryCursor cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)",
                 SearchScope.OBJECT, "*" );
 
             int i = 0;
@@ -83,9 +82,11 @@ public class SearchPerfIT extends Abstra
             for ( int j = 0; j < 10000; j++ )
             {
                 cursor = connection.search( "uid=admin,ou=system", "(ObjectClass=*)", SearchScope.OBJECT, "*" );
+                
                 while ( cursor.next() )
                 {
                 }
+                
                 cursor.close();
             }
 



Mime
View raw message