directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r985411 [1/11] - in /directory: apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/ apacheds...
Date Sat, 14 Aug 2010 00:22:40 GMT
Author: elecharny
Date: Sat Aug 14 00:22:38 2010
New Revision: 985411

URL: http://svn.apache.org/viewvc?rev=985411&view=rev
Log:
o Merged the Response from API and shared-ldap.
o Removed all the ldap-API responses

Removed:
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AbstractResponseWithResult.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/AddResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/BindResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/CompareResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/DeleteResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/ExtendedIntermediateResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/ExtendedResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/LdapResult.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/ModifyDnResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/ModifyResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/Response.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/ResponseWithResult.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/SearchIntermediateResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/SearchResponse.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/SearchResultDone.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/SearchResultEntry.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/message/SearchResultReference.java
Modified:
    directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
    directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/AdministrativePointServiceIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/ComparePerfIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/moveAndRename/MoveAndRenamePerfIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchBinaryIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java
    directory/apacheds/branches/apacheds-codec-merge/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java
    directory/apacheds/branches/apacheds-codec-merge/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaDitStoreUtil.java
    directory/apacheds/branches/apacheds-codec-merge/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/lookup/LookupPerfIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
    directory/apacheds/branches/apacheds-codec-merge/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/SearchCursor.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/AddListener.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/BindListener.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/CompareListener.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/DeleteListener.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ExtendedListener.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyDnListener.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/ModifyListener.java
    directory/clients/ldap/branches/ldap-client-codec-merge/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/listener/SearchListener.java
    directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareResponseImpl.java
    directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java
    directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareResponse.java

Modified: directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java Sat Aug 14 00:22:38 2010
@@ -23,14 +23,15 @@ package org.apache.directory.server.core
 
 import java.util.Iterator;
 
-import org.apache.directory.ldap.client.api.message.LdapResult;
-import org.apache.directory.ldap.client.api.message.SearchResultDone;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.cursor.ClosureMonitor;
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.SearchResultDoneImpl;
+import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultDone;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 
 
 /**
@@ -39,29 +40,33 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class EntryToResponseCursor<SearchResponse> implements Cursor<SearchResponse>
+public class EntryToResponseCursor<InternalResponse> implements Cursor<InternalResponse>
 {
     /** the underlying cursor */
-    private Cursor wrapped;
+    private Cursor<InternalResponse> wrapped;
 
     /** a reference to hold the SearchResultDone response */
-    private SearchResultDone searchDoneResp;
+    private InternalSearchResultDone searchDoneResp;
 
     private boolean done;
 
-    public EntryToResponseCursor( Cursor wrapped )
+    private int messageId;
+
+
+    public EntryToResponseCursor( int messageId, Cursor<InternalResponse> wrapped )
     {
         this.wrapped = wrapped;
+        this.messageId = messageId;
     }
 
 
-    public Iterator<SearchResponse> iterator()
+    public Iterator<InternalResponse> iterator()
     {
         throw new UnsupportedOperationException();
     }
 
 
-    public void after( SearchResponse resp ) throws Exception
+    public void after( InternalResponse resp ) throws Exception
     {
         throw new UnsupportedOperationException();
     }
@@ -79,7 +84,7 @@ public class EntryToResponseCursor<Searc
     }
 
 
-    public void before( SearchResponse resp ) throws Exception
+    public void before( InternalResponse resp ) throws Exception
     {
         throw new UnsupportedOperationException();
     }
@@ -109,13 +114,13 @@ public class EntryToResponseCursor<Searc
     }
 
 
-    public SearchResponse get() throws Exception
+    public InternalResponse get() throws Exception
     {
         ClonedServerEntry entry = ( ClonedServerEntry ) wrapped.get();
-        SearchResultEntry se = new SearchResultEntry();
+        InternalSearchResultEntry se = new SearchResultEntryImpl( messageId );
         se.setEntry( entry );
 
-        return ( SearchResponse ) se;
+        return ( InternalResponse ) se;
     }
 
 
@@ -124,7 +129,7 @@ public class EntryToResponseCursor<Searc
      *
      * @return the SearchResultDone message, null if the search operation fails for any reason
      */
-    public SearchResultDone getSearchDone()
+    public InternalSearchResultDone getSearchDone()
     {
         return searchDoneResp;
     }
@@ -151,12 +156,11 @@ public class EntryToResponseCursor<Searc
     public boolean next() throws Exception
     {
         done = wrapped.next();
-        if( !done )
+
+        if ( !done )
         {
-            searchDoneResp = new SearchResultDone();
-            LdapResult ldapResult = new LdapResult();
-            ldapResult.setResultCode( ResultCodeEnum.SUCCESS );
-            searchDoneResp.setLdapResult( ldapResult );
+            searchDoneResp = new SearchResultDoneImpl( messageId );
+            searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
         }
 
         return done;
@@ -174,6 +178,7 @@ public class EntryToResponseCursor<Searc
         wrapped.setClosureMonitor( monitor );
     }
 
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java Sat Aug 14 00:22:38 2010
@@ -29,25 +29,14 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.directory.ldap.client.api.LdapConnection;
 import org.apache.directory.ldap.client.api.message.AbandonRequest;
-import org.apache.directory.ldap.client.api.message.AbstractMessage;
 import org.apache.directory.ldap.client.api.message.AddRequest;
-import org.apache.directory.ldap.client.api.message.AddResponse;
 import org.apache.directory.ldap.client.api.message.BindRequest;
-import org.apache.directory.ldap.client.api.message.BindResponse;
 import org.apache.directory.ldap.client.api.message.CompareRequest;
-import org.apache.directory.ldap.client.api.message.CompareResponse;
 import org.apache.directory.ldap.client.api.message.DeleteRequest;
-import org.apache.directory.ldap.client.api.message.DeleteResponse;
 import org.apache.directory.ldap.client.api.message.ExtendedRequest;
-import org.apache.directory.ldap.client.api.message.ExtendedResponse;
-import org.apache.directory.ldap.client.api.message.LdapResult;
 import org.apache.directory.ldap.client.api.message.ModifyDnRequest;
-import org.apache.directory.ldap.client.api.message.ModifyDnResponse;
 import org.apache.directory.ldap.client.api.message.ModifyRequest;
-import org.apache.directory.ldap.client.api.message.ModifyResponse;
 import org.apache.directory.ldap.client.api.message.SearchRequest;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.shared.asn1.primitives.OID;
@@ -64,21 +53,40 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AddRequestImpl;
+import org.apache.directory.shared.ldap.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.message.BindResponseImpl;
 import org.apache.directory.shared.ldap.message.CompareRequestImpl;
+import org.apache.directory.shared.ldap.message.CompareResponseImpl;
 import org.apache.directory.shared.ldap.message.DeleteRequestImpl;
+import org.apache.directory.shared.ldap.message.DeleteResponseImpl;
+import org.apache.directory.shared.ldap.message.LdapResultImpl;
 import org.apache.directory.shared.ldap.message.ModifyDnRequestImpl;
+import org.apache.directory.shared.ldap.message.ModifyDnResponseImpl;
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
+import org.apache.directory.shared.ldap.message.ModifyResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
+import org.apache.directory.shared.ldap.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;
+import org.apache.directory.shared.ldap.message.internal.InternalAddResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalCompareRequest;
+import org.apache.directory.shared.ldap.message.internal.InternalCompareResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
+import org.apache.directory.shared.ldap.message.internal.InternalDeleteResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalExtendedResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
+import org.apache.directory.shared.ldap.message.internal.InternalMessage;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyDnResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchRequest;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -157,17 +165,17 @@ public class LdapCoreSessionConnection i
     }
 
 
-    private LdapResult getDefaultResult()
+    private InternalLdapResult getDefaultResult()
     {
-        LdapResult result = new LdapResult();
+        InternalLdapResult result = new LdapResultImpl();
         result.setResultCode( ResultCodeEnum.SUCCESS );
         return result;
     }
 
 
-    private LdapResult getDefaultCompareResult()
+    private InternalLdapResult getDefaultCompareResult()
     {
-        LdapResult result = new LdapResult();
+        InternalLdapResult result = new LdapResultImpl();
         result.setResultCode( ResultCodeEnum.COMPARE_TRUE );
         return result;
     }
@@ -176,16 +184,15 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public AddResponse add( AddRequest addRequest ) throws LdapException
+    public InternalAddResponse add( AddRequest addRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
 
         InternalAddRequest iadd = new AddRequestImpl( newId );
         iadd.setEntry( addRequest.getEntry() );
 
-        AddResponse resp = new AddResponse();
-        resp.setMessageId( newId );
-        resp.setLdapResult( getDefaultResult() );
+        InternalAddResponse resp = new AddResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         try
         {
@@ -207,22 +214,21 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public AddResponse add( Entry entry ) throws LdapException
+    public InternalAddResponse add( Entry entry ) throws LdapException
     {
-        return add ( new AddRequest( entry ) );
+        return add( new AddRequest( entry ) );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( CompareRequest compareRequest ) throws LdapException
+    public InternalCompareResponse compare( CompareRequest compareRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
 
-        CompareResponse resp = new CompareResponse();
-        resp.setLdapResult( getDefaultCompareResult() );
-        resp.setMessageId( newId );
+        InternalCompareResponse resp = new CompareResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.COMPARE_TRUE );
 
         InternalCompareRequest icompare = new CompareRequestImpl( newId );
 
@@ -259,7 +265,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( DN dn, String attributeName, byte[] value ) throws LdapException
+    public InternalCompareResponse compare( DN dn, String attributeName, byte[] value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequest();
         compareRequest.setEntryDn( dn );
@@ -273,7 +279,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( DN dn, String attributeName, String value ) throws LdapException
+    public InternalCompareResponse compare( DN dn, String attributeName, String value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequest();
         compareRequest.setEntryDn( dn );
@@ -287,7 +293,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( String dn, String attributeName, byte[] value ) throws LdapException
+    public InternalCompareResponse compare( String dn, String attributeName, byte[] value ) throws LdapException
     {
         return compare( new DN( dn ), attributeName, value );
     }
@@ -296,7 +302,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( String dn, String attributeName, String value ) throws LdapException
+    public InternalCompareResponse compare( String dn, String attributeName, String value ) throws LdapException
     {
         return compare( new DN( dn ), attributeName, value );
     }
@@ -305,7 +311,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( DN dn, String attributeName, Value<?> value ) throws LdapException
+    public InternalCompareResponse compare( DN dn, String attributeName, Value<?> value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequest();
         compareRequest.setEntryDn( dn );
@@ -319,7 +325,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public CompareResponse compare( String dn, String attributeName, Value<?> value ) throws LdapException
+    public InternalCompareResponse compare( String dn, String attributeName, Value<?> value ) throws LdapException
     {
         return compare( new DN( dn ), attributeName, value );
     }
@@ -328,13 +334,12 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
+    public InternalDeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
 
-        DeleteResponse resp = new DeleteResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalDeleteResponse resp = new DeleteResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalDeleteRequest idelete = new DeleteRequestImpl( newId );
 
@@ -359,7 +364,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public DeleteResponse delete( DN dn ) throws LdapException
+    public InternalDeleteResponse delete( DN dn ) throws LdapException
     {
         DeleteRequest delReq = new DeleteRequest( dn );
         return delete( delReq );
@@ -369,7 +374,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public DeleteResponse delete( String dn ) throws LdapException
+    public InternalDeleteResponse delete( String dn ) throws LdapException
     {
         return delete( new DN( dn ) );
     }
@@ -441,7 +446,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( DN dn, String... attributes ) throws LdapException
+    public InternalResponse lookup( DN dn, String... attributes ) throws LdapException
     {
         return _lookup( dn, attributes );
     }
@@ -451,16 +456,17 @@ public class LdapCoreSessionConnection i
      * this method exists solely for the purpose of calling from
      * lookup(DN dn) avoiding the varargs,
      */
-    private SearchResponse _lookup( DN dn, String... attributes )
+    private InternalResponse _lookup( DN dn, String... attributes )
     {
         int newId = messageId.incrementAndGet();
 
-        SearchResultEntry resp = null;
+        InternalSearchResultEntry resp = null;
 
         try
         {
             Entry entry = null;
-            if( attributes == null )
+
+            if ( attributes == null )
             {
                 entry = session.lookup( dn );
             }
@@ -469,9 +475,8 @@ public class LdapCoreSessionConnection i
                 entry = session.lookup( dn, attributes );
             }
 
-            resp = new SearchResultEntry();
+            resp = new SearchResultEntryImpl( newId );
             resp.setEntry( entry );
-            resp.setMessageId( newId );
         }
         catch ( LdapException e )
         {
@@ -485,7 +490,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( String dn, String... attributes ) throws LdapException
+    public InternalResponse lookup( String dn, String... attributes ) throws LdapException
     {
         return _lookup( new DN( dn ), attributes );
     }
@@ -494,7 +499,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( DN dn ) throws LdapException
+    public InternalResponse lookup( DN dn ) throws LdapException
     {
         return _lookup( dn );
     }
@@ -503,7 +508,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public SearchResponse lookup( String dn ) throws LdapException
+    public InternalResponse lookup( String dn ) throws LdapException
     {
         return _lookup( new DN( dn ) );
     }
@@ -512,13 +517,12 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( DN dn, Modification... modifications ) throws LdapException
+    public InternalModifyResponse modify( DN dn, Modification... modifications ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
 
-        ModifyResponse resp = new ModifyResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalModifyResponse resp = new ModifyResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalModifyRequest iModReq = new ModifyRequestImpl( newId );
 
@@ -549,7 +553,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( String dn, Modification... modifications ) throws LdapException
+    public InternalModifyResponse modify( String dn, Modification... modifications ) throws LdapException
     {
         return modify( new DN( dn ), modifications );
     }
@@ -558,12 +562,11 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( Entry entry, ModificationOperation modOp ) throws LdapException
+    public InternalModifyResponse modify( Entry entry, ModificationOperation modOp ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        ModifyResponse resp = new ModifyResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalModifyResponse resp = new ModifyResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalModifyRequest iModReq = new ModifyRequestImpl( newId );
 
@@ -595,13 +598,12 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyResponse modify( ModifyRequest modRequest ) throws LdapException
+    public InternalModifyResponse modify( ModifyRequest modRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
 
-        ModifyResponse resp = new ModifyResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalModifyResponse resp = new ModifyResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalModifyRequest iModReq = new ModifyRequestImpl( newId );
 
@@ -636,13 +638,12 @@ public class LdapCoreSessionConnection i
      *          cause this we call {@link CoreSession#move(InternalModifyDnRequest)} always from this method.
      *          Instead use other specific modifyDn operations like {@link #move(DN, DN)}, {@link #rename(DN, RDN)} etc..
      */
-    public ModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
+    public InternalModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
 
-        ModifyDnResponse resp = new ModifyDnResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalModifyDnResponse resp = new ModifyDnResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalModifyDnRequest iModDnReq = new ModifyDnRequestImpl( newId );
 
@@ -671,12 +672,11 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse move( DN entryDn, DN newSuperiorDn ) throws LdapException
+    public InternalModifyDnResponse move( DN entryDn, DN newSuperiorDn ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        ModifyDnResponse resp = new ModifyDnResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalModifyDnResponse resp = new ModifyDnResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalModifyDnRequest iModDnReq = new ModifyDnRequestImpl( newId );
 
@@ -703,7 +703,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse move( String entryDn, String newSuperiorDn ) throws LdapException
+    public InternalModifyDnResponse move( String entryDn, String newSuperiorDn ) throws LdapException
     {
         return move( new DN( entryDn ), new DN( newSuperiorDn ) );
     }
@@ -712,13 +712,12 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( DN entryDn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse rename( DN entryDn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
 
-        ModifyDnResponse resp = new ModifyDnResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalModifyDnResponse resp = new ModifyDnResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalModifyDnRequest iModDnReq = new ModifyDnRequestImpl( newId );
 
@@ -746,7 +745,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( DN entryDn, RDN newRdn ) throws LdapException
+    public InternalModifyDnResponse rename( DN entryDn, RDN newRdn ) throws LdapException
     {
         return rename( entryDn, newRdn, false );
     }
@@ -755,7 +754,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
     {
         return rename( new DN( entryDn ), new RDN( newRdn ), deleteOldRdn );
     }
@@ -764,7 +763,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ModifyDnResponse rename( String entryDn, String newRdn ) throws LdapException
+    public InternalModifyDnResponse rename( String entryDn, String newRdn ) throws LdapException
     {
         return rename( new DN( entryDn ), new RDN( newRdn ) );
     }
@@ -775,7 +774,7 @@ public class LdapCoreSessionConnection i
      *
      * @see #moveAndRename(DN, DN, boolean)
      */
-    public ModifyDnResponse moveAndRename( DN entryDn, DN newDn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( DN entryDn, DN newDn ) throws LdapException
     {
         return moveAndRename( entryDn, newDn, true );
     }
@@ -786,7 +785,7 @@ public class LdapCoreSessionConnection i
      *
      * @see #moveAndRename(DN, DN, boolean)
      */
-    public ModifyDnResponse moveAndRename( String entryDn, String newDn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( String entryDn, String newDn ) throws LdapException
     {
         return moveAndRename( new DN( entryDn ), new DN( newDn ), true );
     }
@@ -799,7 +798,7 @@ public class LdapCoreSessionConnection i
      * @param newDn The new Entry DN
      * @param deleteOldRdn Tells if the old RDN must be removed
      */
-    public ModifyDnResponse moveAndRename( DN entryDn, DN newDn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( DN entryDn, DN newDn, boolean deleteOldRdn ) throws LdapException
     {
         // Check the parameters first
         if ( entryDn == null )
@@ -824,9 +823,8 @@ public class LdapCoreSessionConnection i
 
         int newId = messageId.incrementAndGet();
 
-        ModifyDnResponse resp = new ModifyDnResponse();
-        resp.setLdapResult( getDefaultResult() );
-        resp.setMessageId( newId );
+        InternalModifyDnResponse resp = new ModifyDnResponseImpl( newId );
+        resp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         InternalModifyDnRequest iModDnReq = new ModifyDnRequestImpl( newId );
 
@@ -858,7 +856,8 @@ public class LdapCoreSessionConnection i
      * @param newDn The new Entry DN
      * @param deleteOldRdn Tells if the old RDN must be removed
      */
-    public ModifyDnResponse moveAndRename( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException
+    public InternalModifyDnResponse moveAndRename( String entryDn, String newDn, boolean deleteOldRdn )
+        throws LdapException
     {
         return moveAndRename( new DN( entryDn ), new DN( newDn ), deleteOldRdn );
     }
@@ -867,7 +866,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public Cursor<SearchResponse> search( SearchRequest searchRequest ) throws LdapException
+    public Cursor<InternalResponse> search( SearchRequest searchRequest ) throws LdapException
     {
         try
         {
@@ -894,21 +893,21 @@ public class LdapCoreSessionConnection i
             entryCursor.beforeFirst();
 
             //TODO enforce the size and time limits, similar in the way SearchHandler does
-            return new EntryToResponseCursor<SearchResponse>( entryCursor );
+            return new EntryToResponseCursor( newId, entryCursor );
         }
         catch ( Exception e )
         {
             LOG.warn( e.getMessage(), e );
         }
 
-        return new EntryToResponseCursor<SearchResponse>( new EmptyCursor<SearchResponse>() );
+        return new EntryToResponseCursor<InternalResponse>( -1, new EmptyCursor<InternalResponse>() );
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public Cursor<SearchResponse> search( DN baseDn, String filter, SearchScope scope, String... attributes )
+    public Cursor<InternalResponse> search( DN baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
         // generate some random operation number
@@ -927,7 +926,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public Cursor<SearchResponse> search( String baseDn, String filter, SearchScope scope, String... attributes )
+    public Cursor<InternalResponse> search( String baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
         return search( new DN( baseDn ), filter, scope, attributes );
@@ -951,7 +950,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( String oid ) throws LdapException
+    public InternalExtendedResponse extended( String oid ) throws LdapException
     {
         throw new UnsupportedOperationException(
             "extended operations are not supported on CoreSession based connection" );
@@ -961,7 +960,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( ExtendedRequest extendedRequest ) throws LdapException
+    public InternalExtendedResponse extended( ExtendedRequest extendedRequest ) throws LdapException
     {
         return extended( ( String ) null );
 
@@ -971,7 +970,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( OID oid, byte[] value ) throws LdapException
+    public InternalExtendedResponse extended( OID oid, byte[] value ) throws LdapException
     {
         return extended( ( String ) null );
     }
@@ -980,7 +979,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( OID oid ) throws LdapException
+    public InternalExtendedResponse extended( OID oid ) throws LdapException
     {
         return extended( ( String ) null );
     }
@@ -989,7 +988,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public ExtendedResponse extended( String oid, byte[] value ) throws LdapException
+    public InternalExtendedResponse extended( String oid, byte[] value ) throws LdapException
     {
         return extended( ( String ) null );
     }
@@ -1025,7 +1024,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind() throws LdapException, IOException
+    public InternalBindResponse bind() throws LdapException, IOException
     {
         BindRequest bindReq = new BindRequest();
         bindReq.setName( "" );
@@ -1038,7 +1037,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind( BindRequest bindRequest ) throws LdapException, IOException
+    public InternalBindResponse bind( BindRequest bindRequest ) throws LdapException, IOException
     {
         int newId = messageId.incrementAndGet();
 
@@ -1048,9 +1047,8 @@ public class LdapCoreSessionConnection i
 
         OperationManager operationManager = directoryService.getOperationManager();
 
-        BindResponse bindResp = new BindResponse();
-        bindResp.setMessageId( newId );
-        bindResp.setLdapResult( getDefaultResult() );
+        InternalBindResponse bindResp = new BindResponseImpl( newId );
+        bindResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
 
         try
         {
@@ -1062,12 +1060,12 @@ public class LdapCoreSessionConnection i
             operationManager.bind( bindContext );
             session = bindContext.getSession();
 
-            bindResp.add( bindContext.getResponseControls() );
+            bindResp.addAll( bindContext.getResponseControls() );
         }
         catch ( LdapOperationException e )
         {
             LOG.warn( e.getMessage(), e );
-            LdapResult res = bindResp.getLdapResult();
+            InternalLdapResult res = bindResp.getLdapResult();
             res.setErrorMessage( e.getMessage() );
             res.setResultCode( e.getResultCode() );
         }
@@ -1079,7 +1077,7 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind( DN name, String credentials ) throws LdapException, IOException
+    public InternalBindResponse bind( DN name, String credentials ) throws LdapException, IOException
     {
         byte[] credBytes = ( credentials == null ? StringTools.EMPTY_BYTES : StringTools.getBytesUtf8( credentials ) );
 
@@ -1094,17 +1092,17 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
-    public BindResponse bind( String name, String credentials ) throws LdapException, IOException
+    public InternalBindResponse bind( String name, String credentials ) throws LdapException, IOException
     {
         return bind( new DN( name ), credentials );
     }
 
 
-    private void addResponseControls( InternalResultResponseRequest iReq, AbstractMessage clientResp )
+    private void addResponseControls( InternalResultResponseRequest iReq, InternalMessage clientResp )
     {
         Collection<Control> ctrlSet = iReq.getResultResponse().getControls().values();
 
-        for( Control c : ctrlSet )
+        for ( Control c : ctrlSet )
         {
             clientResp.add( c );
         }
@@ -1123,5 +1121,4 @@ public class LdapCoreSessionConnection i
         this.schemaManager = directoryService.getSchemaManager();
     }
 
-
 }

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/AdministrativePointServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/AdministrativePointServiceIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/AdministrativePointServiceIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/AdministrativePointServiceIT.java Sat Aug 14 00:22:38 2010
@@ -25,11 +25,6 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.AddResponse;
-import org.apache.directory.ldap.client.api.message.ModifyDnResponse;
-import org.apache.directory.ldap.client.api.message.ModifyResponse;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
@@ -40,6 +35,11 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.internal.InternalAddResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyDnResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -51,7 +51,7 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
+@RunWith(FrameworkRunner.class)
 public class AdministrativePointServiceIT extends AbstractLdapTestUnit
 {
     // The shared LDAP connection
@@ -74,15 +74,16 @@ public class AdministrativePointServiceI
 
     private Entry getAdminRole( String dn ) throws Exception
     {
-        SearchResponse lookup = connection.lookup( dn, "administrativeRole" );
+        InternalResponse lookup = connection.lookup( dn, "administrativeRole" );
 
-        assertTrue( lookup instanceof SearchResultEntry );
+        assertTrue( lookup instanceof InternalSearchResultEntry );
 
-        Entry entry = ((SearchResultEntry)lookup).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) lookup ).getEntry();
 
         return entry;
     }
 
+
     // -------------------------------------------------------------------
     // Test the Add operation
     // -------------------------------------------------------------------
@@ -93,16 +94,11 @@ public class AdministrativePointServiceI
     @Test
     public void testAddAutonomousArea() throws Exception
     {
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: autonomousArea"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: autonomousArea" );
 
         // It should succeed
-        AddResponse response = connection.add( autonomousArea );
+        InternalAddResponse response = connection.add( autonomousArea );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
 
@@ -115,17 +111,11 @@ public class AdministrativePointServiceI
         assertFalse( entry.contains( "administrativeRole", "2.5.23.4" ) );
         assertFalse( entry.contains( "administrativeRole", "triggerExecutionSpecificArea" ) );
 
-        autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea2, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea2",
-            "administrativeRole: autonomousArea",
-            "administrativeRole: accessControlSpecificArea",
-            "administrativeRole: collectiveAttributeInnerArea",
+        autonomousArea = LdifUtils.createEntry( "ou=autonomousArea2, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea2", "administrativeRole: autonomousArea",
+            "administrativeRole: accessControlSpecificArea", "administrativeRole: collectiveAttributeInnerArea",
             "administrativeRole: 2.5.23.4", // This is the subSchemaSpecificArea OID
-            "administrativeRole: TRIGGEREXECUTIONSPECIFICAREA"
-            );
+            "administrativeRole: TRIGGEREXECUTIONSPECIFICAREA" );
 
         // It should fail, as an autonomous area is already defining the specific areas
         response = connection.add( autonomousArea );
@@ -141,23 +131,17 @@ public class AdministrativePointServiceI
     @Test
     public void testAddSpecificAreas() throws Exception
     {
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: accessControlSpecificArea",
-            "administrativeRole: TRIGGEREXECUTIONSPECIFICAREA"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: accessControlSpecificArea",
+            "administrativeRole: TRIGGEREXECUTIONSPECIFICAREA" );
 
-        AddResponse response = connection.add( autonomousArea );
+        InternalAddResponse response = connection.add( autonomousArea );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
 
         // Check that the entry is containing all the roles
         Entry entry = getAdminRole( "ou=autonomousArea, ou=system" );
 
-
         assertFalse( entry.contains( "administrativeRole", "autonomousArea" ) );
         assertTrue( entry.contains( "administrativeRole", "accessControlSpecificArea" ) );
         assertFalse( entry.contains( "administrativeRole", "collectiveAttributeSpecificArea" ) );
@@ -173,16 +157,11 @@ public class AdministrativePointServiceI
     @Test
     public void testAddInnerAreas() throws Exception
     {
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: accessControlINNERArea",
-            "administrativeRole: TRIGGEREXECUTIONINNERAREA"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: accessControlINNERArea",
+            "administrativeRole: TRIGGEREXECUTIONINNERAREA" );
 
-        AddResponse response = connection.add( autonomousArea );
+        InternalAddResponse response = connection.add( autonomousArea );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
 
@@ -202,16 +181,11 @@ public class AdministrativePointServiceI
     @Test
     public void testAddInvalidRole() throws Exception
     {
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: accessControlBadArea",
-            "administrativeRole: TRIGGEREXECUTIONINNERAREA"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: accessControlBadArea",
+            "administrativeRole: TRIGGEREXECUTIONINNERAREA" );
 
-        AddResponse response = connection.add( autonomousArea );
+        InternalAddResponse response = connection.add( autonomousArea );
 
         assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, response.getLdapResult().getResultCode() );
     }
@@ -224,16 +198,11 @@ public class AdministrativePointServiceI
     @Test
     public void testAddInnerAndSpecificRole() throws Exception
     {
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: accessControlSpecificArea",
-            "administrativeRole: accessControlInnerArea"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: accessControlSpecificArea",
+            "administrativeRole: accessControlInnerArea" );
 
-        AddResponse response = connection.add( autonomousArea );
+        InternalAddResponse response = connection.add( autonomousArea );
 
         assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, response.getLdapResult().getResultCode() );
     }
@@ -250,21 +219,15 @@ public class AdministrativePointServiceI
     public void testModifyAddSpecificArea() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.ADD_ATTRIBUTE,
-                                            new DefaultEntryAttribute( "administrativeRole", "accessControlSpecificArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "accessControlSpecificArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
         Entry entry = getAdminRole( "ou=caArea, ou=system" );
@@ -282,22 +245,15 @@ public class AdministrativePointServiceI
     public void testModifyAddInnerArea() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.ADD_ATTRIBUTE,
-                                            new DefaultEntryAttribute(
-                                                "administrativeRole", "accessControlInnerArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "accessControlInnerArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
         Entry entry = getAdminRole( "ou=caArea, ou=system" );
@@ -315,22 +271,15 @@ public class AdministrativePointServiceI
     public void testModifyAddInnerAreaToSameSpecificArea() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.ADD_ATTRIBUTE,
-                                            new DefaultEntryAttribute(
-                                                "administrativeRole", "collectiveAttributeInnerArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "collectiveAttributeInnerArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, response.getLdapResult().getResultCode() );
     }
@@ -344,22 +293,15 @@ public class AdministrativePointServiceI
     public void testModifyAddSameSpecificArea() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.ADD_ATTRIBUTE,
-                                            new DefaultEntryAttribute(
-                                                "administrativeRole", "collectiveAttributeSpecificArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "collectiveAttributeSpecificArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.ATTRIBUTE_OR_VALUE_EXISTS, response.getLdapResult().getResultCode() );
     }
@@ -373,22 +315,16 @@ public class AdministrativePointServiceI
     public void testModifyDeleteAll() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea",
-            "administrativeRole: accessControlSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea",
+            "administrativeRole: accessControlSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.REMOVE_ATTRIBUTE,
-                                            new DefaultEntryAttribute( "administrativeRole" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
         Entry entry = getAdminRole( "ou=caArea, ou=system" );
@@ -405,24 +341,17 @@ public class AdministrativePointServiceI
     public void testModifyDeleteAll2() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea",
-            "administrativeRole: accessControlSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea",
+            "administrativeRole: accessControlSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.REMOVE_ATTRIBUTE,
-                                            new DefaultEntryAttribute(
-                                                "administrativeRole",
-                                                    "collectiveAttributeSpecificArea", "accessControlSpecificArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "collectiveAttributeSpecificArea",
+                "accessControlSpecificArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
         Entry entry = getAdminRole( "ou=caArea, ou=system" );
@@ -439,24 +368,16 @@ public class AdministrativePointServiceI
     public void testModifyDeleteSomeRole() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea",
-            "administrativeRole: accessControlSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea",
+            "administrativeRole: accessControlSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.REMOVE_ATTRIBUTE,
-                                            new DefaultEntryAttribute(
-                                                "administrativeRole",
-                                                    "accessControlSpecificArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "accessControlSpecificArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
         Entry entry = getAdminRole( "ou=caArea, ou=system" );
@@ -475,24 +396,16 @@ public class AdministrativePointServiceI
     public void testModifyDeleteSomeInexistingRole() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea",
-            "administrativeRole: accessControlSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea",
+            "administrativeRole: accessControlSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.REMOVE_ATTRIBUTE,
-                                            new DefaultEntryAttribute(
-                                                "administrativeRole",
-                                                    "triggerExecutionSpecificArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "triggerExecutionSpecificArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         assertEquals( ResultCodeEnum.NO_SUCH_ATTRIBUTE, response.getLdapResult().getResultCode() );
     }
@@ -506,30 +419,20 @@ public class AdministrativePointServiceI
     public void testModifyCombined() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea",
-            "administrativeRole: accessControlSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea",
+            "administrativeRole: accessControlSpecificArea" );
 
         connection.add( caArea );
 
         // Add another specific area
-        Modification modification1 = new DefaultModification(
-            ModificationOperation.ADD_ATTRIBUTE,
-            new DefaultEntryAttribute(
-                "administrativeRole",
-                    "triggerExecutionSpecificArea" ) );
-        Modification modification2 = new DefaultModification(
-            ModificationOperation.REMOVE_ATTRIBUTE,
-            new DefaultEntryAttribute(
-                "administrativeRole",
-                    "triggerExecutionSpecificArea" ) );
+        Modification modification1 = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "triggerExecutionSpecificArea" ) );
+        Modification modification2 = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "triggerExecutionSpecificArea" ) );
 
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification1, modification2, modification1);
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification1, modification2,
+            modification1 );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
         Entry entry = getAdminRole( "ou=caArea, ou=system" );
@@ -549,21 +452,15 @@ public class AdministrativePointServiceI
     public void testModifyReplace() throws Exception
     {
         // Inject an CASA
-        Entry caArea = LdifUtils.createEntry(
-            "ou=caArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: caArea",
-            "administrativeRole: collectiveAttributeSpecificArea"
-            );
+        Entry caArea = LdifUtils.createEntry( "ou=caArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: caArea", "administrativeRole: collectiveAttributeSpecificArea" );
 
         connection.add( caArea );
 
         // Try to modify it to an InnerArea
-        Modification modification = new DefaultModification(
-                                            ModificationOperation.REPLACE_ATTRIBUTE,
-                                            new DefaultEntryAttribute( "administrativeRole", "collectiveAttributeSpecificArea" ) );
-        ModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
+        Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
+            new DefaultEntryAttribute( "administrativeRole", "collectiveAttributeSpecificArea" ) );
+        InternalModifyResponse response = connection.modify( "ou=caArea, ou=system", modification );
 
         // Should fail
         assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, response.getLdapResult().getResultCode() );
@@ -581,18 +478,13 @@ public class AdministrativePointServiceI
     public void testMoveAutonomousArea() throws Exception
     {
         // Inject an AAA
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: autonomousArea"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: autonomousArea" );
 
         connection.add( autonomousArea );
 
         // It should fail, as we haven't injected all the roles
-        ModifyDnResponse response = connection.move( "ou=autonomousArea, ou=system", "uid=admin, ou=system" );
+        InternalModifyDnResponse response = connection.move( "ou=autonomousArea, ou=system", "uid=admin, ou=system" );
 
         assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, response.getLdapResult().getResultCode() );
     }
@@ -609,18 +501,14 @@ public class AdministrativePointServiceI
     public void testMoveAndRenameAutonomousArea() throws Exception
     {
         // Inject an AAA
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: autonomousArea"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: autonomousArea" );
 
         connection.add( autonomousArea );
 
         // It should fail, as we haven't injected all the roles
-        ModifyDnResponse response = connection.moveAndRename( "ou=autonomousArea, ou=system", "ou=new autonomousArea, uid=admin, ou=system" );
+        InternalModifyDnResponse response = connection.moveAndRename( "ou=autonomousArea, ou=system",
+            "ou=new autonomousArea, uid=admin, ou=system" );
 
         assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, response.getLdapResult().getResultCode() );
     }
@@ -637,18 +525,13 @@ public class AdministrativePointServiceI
     public void testRenameAutonomousArea() throws Exception
     {
         // Inject an AAA
-        Entry autonomousArea = LdifUtils.createEntry(
-            "ou=autonomousArea, ou=system",
-            "ObjectClass: top",
-            "ObjectClass: organizationalUnit",
-            "ou: autonomousArea",
-            "administrativeRole: autonomousArea"
-            );
+        Entry autonomousArea = LdifUtils.createEntry( "ou=autonomousArea, ou=system", "ObjectClass: top",
+            "ObjectClass: organizationalUnit", "ou: autonomousArea", "administrativeRole: autonomousArea" );
 
         connection.add( autonomousArea );
 
         // It should fail, as we haven't injected all the roles
-        ModifyDnResponse response = connection.rename( "ou=autonomousArea, ou=system", "ou=new autonomousArea" );
+        InternalModifyDnResponse response = connection.rename( "ou=autonomousArea, ou=system", "ou=new autonomousArea" );
 
         assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, response.getLdapResult().getResultCode() );
     }



Mime
View raw message