directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987606 [2/25] - in /directory/shared/trunk: ./ all/ asn1-codec/ asn1-codec/src/main/java/org/apache/directory/shared/asn1/codec/ asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/ asn1/src/main/java/org/apache/directory...
Date Fri, 20 Aug 2010 19:23:37 GMT
Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2StatesEnum.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2StatesEnum.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarAction.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarAction.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarTransition.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/GrammarTransition.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IAction.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IAction.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IGrammar.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IGrammar.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IStates.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/IStates.java:980350-980351

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java Fri Aug 20 19:23:27 2010
@@ -21,35 +21,31 @@
 package org.apache.directory.shared.dsmlv2;
 
 
-import java.nio.ByteBuffer;
-import java.util.List;
+import java.util.Map;
 
-import org.apache.directory.shared.asn1.AbstractAsn1Object;
-import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
-import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
-import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
-import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
-import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
-import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
-import org.apache.directory.shared.ldap.codec.compare.CompareRequestCodec;
-import org.apache.directory.shared.ldap.codec.compare.CompareResponseCodec;
-import org.apache.directory.shared.ldap.codec.del.DelRequestCodec;
-import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedRequestCodec;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
-import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
-import org.apache.directory.shared.ldap.codec.modify.ModifyResponseCodec;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
-import org.apache.directory.shared.ldap.codec.unbind.UnBindRequestCodec;
+import org.apache.directory.shared.ldap.message.AbandonRequest;
+import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.AddResponse;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.CompareResponse;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.Message;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.ModifyDnResponse;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.ModifyResponse;
+import org.apache.directory.shared.ldap.message.Response;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.SearchResultDone;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.message.SearchResultReference;
+import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.control.Control;
 
 
@@ -59,19 +55,18 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class LdapMessageDecorator extends LdapMessageCodec
+public abstract class LdapMessageDecorator implements Message
 {
     /** The decorated instance */
-    protected LdapMessageCodec instance;
+    protected Message instance;
 
 
     /**
      * Creates a new instance of LdapMessageDecorator.
      *
-     * @param ldapMessage
-     *      the message to decorate
+     * @param ldapMessage the message to decorate
      */
-    public LdapMessageDecorator( LdapMessageCodec ldapMessage )
+    public LdapMessageDecorator( Message ldapMessage )
     {
         instance = ldapMessage;
     }
@@ -80,7 +75,6 @@ public abstract class LdapMessageDecorat
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#addControl(org.apache.directory.shared.ldap.codec.Control)
      */
-    @Override
     public void addControl( Control control )
     {
         instance.addControl( control );
@@ -88,105 +82,72 @@ public abstract class LdapMessageDecorat
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#computeLength()
-     */
-    @Override
-    public int computeLength()
-    {
-        return 0;
-    }
-
-    @Override
-    public int computeLengthProtocolOp()
-    {
-        return 0;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#encode(java.nio.ByteBuffer)
-     */
-    @Override
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
-    {
-        return null;
-    }
-
-
-    @Override
-    public void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
-    {
-    }
-
-
-    /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getAbandonRequest()
      */
-    public AbandonRequestCodec getAbandonRequest()
+    public AbandonRequest getAbandonRequest()
     {
-        return (AbandonRequestCodec)instance;
+        return ( AbandonRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getAddRequest()
      */
-    public AddRequestCodec getAddRequest()
+    public AddRequest getAddRequest()
     {
-        return (AddRequestCodec)instance;
+        return ( AddRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getAddResponse()
      */
-    public AddResponseCodec getAddResponse()
+    public AddResponse getAddResponse()
     {
-        return (AddResponseCodec)instance;
+        return ( AddResponse ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getBindRequest()
      */
-    public BindRequestCodec getBindRequest()
+    public BindRequest getBindRequest()
     {
-        return (BindRequestCodec)instance;
+        return ( BindRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getBindResponse()
      */
-    public BindResponseCodec getBindResponse()
+    public BindResponse getBindResponse()
     {
-        return (BindResponseCodec)instance;
+        return ( BindResponse ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getCompareRequest()
      */
-    public CompareRequestCodec getCompareRequest()
+    public CompareRequest getCompareRequest()
     {
-        return (CompareRequestCodec)instance;
+        return ( CompareRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getCompareResponse()
      */
-    public CompareResponseCodec getCompareResponse()
+    public CompareResponse getCompareResponse()
     {
-        return (CompareResponseCodec)instance;
+        return ( CompareResponse ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getControls()
      */
-    @Override
-    public List<Control> getControls()
+    public Map<String, Control> getControls()
     {
         return instance.getControls();
     }
@@ -195,72 +156,60 @@ public abstract class LdapMessageDecorat
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getControls(int)
      */
-    @Override
-    public Control getControls( int i )
-    {
-        return instance.getControls( i );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getCurrentControl()
-     */
-    @Override
-    public Control getCurrentControl()
+    public Control getControl( String oid )
     {
-        return instance.getCurrentControl();
+        return instance.getControl( oid );
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getDelRequest()
      */
-    public DelRequestCodec getDelRequest()
+    public DeleteRequest getDelRequest()
     {
-        return (DelRequestCodec)instance;
+        return ( DeleteRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getDelResponse()
      */
-    public DelResponseCodec getDelResponse()
+    public DeleteResponse getDelResponse()
     {
-        return (DelResponseCodec)instance;
+        return ( DeleteResponse ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getExtendedRequest()
      */
-    public ExtendedRequestCodec getExtendedRequest()
+    public ExtendedRequest getExtendedRequest()
     {
-        return (ExtendedRequestCodec)instance;
+        return ( ExtendedRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getExtendedResponse()
      */
-    public ExtendedResponseCodec getExtendedResponse()
+    public ExtendedResponse getExtendedResponse()
     {
-        return (ExtendedResponseCodec)instance;
+        return ( ExtendedResponse ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getLdapResponse()
      */
-    public LdapResponseCodec getLdapResponse()
+    public Response getLdapResponse()
     {
-        return (LdapResponseCodec)instance;
+        return ( Response ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getMessageId()
      */
-    @Override
     public int getMessageId()
     {
         return instance.getMessageId();
@@ -268,110 +217,98 @@ public abstract class LdapMessageDecorat
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getMessageType()
+     * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getType()
      */
-    @Override
-    public MessageTypeEnum getMessageType()
+    public MessageTypeEnum getType()
     {
-        return instance.getMessageType();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getMessageTypeName()
-     */
-    @Override
-    public String getMessageTypeName()
-    {
-        return instance.getMessageTypeName();
+        return instance.getType();
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getModifyDNRequest()
      */
-    public ModifyDNRequestCodec getModifyDNRequest()
+    public ModifyDnRequest getModifyDNRequest()
     {
-        return (ModifyDNRequestCodec)instance;
+        return ( ModifyDnRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getModifyDNResponse()
      */
-    public ModifyDNResponseCodec getModifyDNResponse()
+    public ModifyDnResponse getModifyDNResponse()
     {
-        return (ModifyDNResponseCodec)instance;
+        return ( ModifyDnResponse ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getModifyRequest()
      */
-    public ModifyRequestCodec getModifyRequest()
+    public ModifyRequest getModifyRequest()
     {
-        return (ModifyRequestCodec)instance;
+        return ( ModifyRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getModifyResponse()
      */
-    public ModifyResponseCodec getModifyResponse()
+    public ModifyResponse getModifyResponse()
     {
-        return (ModifyResponseCodec)instance;
+        return ( ModifyResponse ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getSearchRequest()
      */
-    public SearchRequestCodec getSearchRequest()
+    public SearchRequest getSearchRequest()
     {
-        return (SearchRequestCodec)instance;
+        return ( SearchRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getSearchResultDone()
      */
-    public SearchResultDoneCodec getSearchResultDone()
+    public SearchResultDone getSearchResultDone()
     {
-        return (SearchResultDoneCodec)instance;
+        return ( SearchResultDone ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getSearchResultEntry()
      */
-    public SearchResultEntryCodec getSearchResultEntry()
+    public SearchResultEntry getSearchResultEntry()
     {
-        return (SearchResultEntryCodec)instance;
+        return ( SearchResultEntry ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getSearchResultReference()
      */
-    public SearchResultReferenceCodec getSearchResultReference()
+    public SearchResultReference getSearchResultReference()
     {
-        return (SearchResultReferenceCodec)instance;
+        return ( SearchResultReference ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#getUnBindRequest()
      */
-    public UnBindRequestCodec getUnBindRequest()
+    public UnbindRequest getUnBindRequest()
     {
-        return (UnBindRequestCodec)instance;
+        return ( UnbindRequest ) instance;
     }
 
 
     /* (non-Javadoc)
      * @see org.apache.directory.shared.ldap.codec.LdapMessageCodec#setMessageId(int)
      */
-    @Override
     public void setMessageId( int messageId )
     {
         instance.setMessageId( messageId );
@@ -386,73 +323,4 @@ public abstract class LdapMessageDecorat
     {
         return instance.toString();
     }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.asn1.Asn1Object#addLength(int)
-     */
-    @Override
-    public void addLength( int length ) throws DecoderException
-    {
-        instance.addLength( length );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.asn1.Asn1Object#getCurrentLength()
-     */
-    @Override
-    public int getCurrentLength()
-    {
-        return instance.getCurrentLength();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.asn1.Asn1Object#getExpectedLength()
-     */
-    @Override
-    public int getExpectedLength()
-    {
-        return instance.getExpectedLength();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.asn1.Asn1Object#getParent()
-     */
-    @Override
-    public AbstractAsn1Object getParent()
-    {
-        return instance.getParent();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.asn1.Asn1Object#setCurrentLength(int)
-     */
-    @Override
-    public void setCurrentLength( int currentLength )
-    {
-        instance.setCurrentLength( currentLength );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.asn1.Asn1Object#setExpectedLength(int)
-     */
-    @Override
-    public void setExpectedLength( int expectedLength )
-    {
-        instance.setExpectedLength( expectedLength );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.shared.asn1.Asn1Object#setParent(org.apache.directory.shared.asn1.Asn1Object)
-     */
-    public void setParent( AbstractAsn1Object parent )
-    {
-        instance.setParent( parent );
-    }
 }

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/LdapMessageDecorator.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/LdapMessageDecorator.java:980350-980351

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java Fri Aug 20 19:23:27 2010
@@ -22,7 +22,7 @@ package org.apache.directory.shared.dsml
 
 
 import java.util.Arrays;
-import java.util.List;
+import java.util.Collection;
 
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
@@ -193,19 +193,15 @@ public class ParserUtils
     /**
      * Adds Controls to the given Element.
      *
-     * @param element
-     *      the element to add the Controls to
-     * @param controls
-     *      a List of Controls
+     * @param element the element to add the Controls to
+     * @param controls a List of Controls
      */
-    public static void addControls( Element element, List<Control> controls )
+    public static void addControls( Element element, Collection<Control> controls )
     {
         if ( controls != null )
         {
-            for ( int i = 0; i < controls.size(); i++ )
+            for ( Control control : controls )
             {
-                Control control = controls.get( i );
-
                 Element controlElement = element.addElement( "control" );
 
                 if ( control.getOid() != null )
@@ -219,7 +215,7 @@ public class ParserUtils
                 }
 
                 byte[] value = control.getValue();
-                
+
                 if ( value != null )
                 {
                     if ( ParserUtils.needsBase64Encoding( value ) )
@@ -236,7 +232,7 @@ public class ParserUtils
                     }
                     else
                     {
-                        controlElement.addElement( "controlValue" ).setText( Arrays.toString( value ));
+                        controlElement.addElement( "controlValue" ).setText( Arrays.toString( value ) );
                     }
                 }
             }
@@ -301,7 +297,6 @@ public class ParserUtils
         }
         catch ( TransformerException e )
         {
-            e.printStackTrace();
             // return original document
             return document;
         }

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Tag.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Tag.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine:980350-980351

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java Fri Aug 20 19:23:27 2010
@@ -24,15 +24,9 @@ package org.apache.directory.shared.dsml
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-
-import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
-import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
+
+import org.apache.directory.ldap.client.api.LdapConnection;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
@@ -46,7 +40,6 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.reponse.ModDNResponseDsml;
 import org.apache.directory.shared.dsmlv2.reponse.ModifyResponseDsml;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResponseDsml;
-import org.apache.directory.shared.dsmlv2.reponse.SearchResultDoneDsml;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResultEntryDsml;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResultReferenceDsml;
 import org.apache.directory.shared.dsmlv2.reponse.ErrorResponse.ErrorResponseType;
@@ -55,25 +48,32 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.request.BatchRequest.Processing;
 import org.apache.directory.shared.dsmlv2.request.BatchRequest.ResponseOrder;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
-import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
-import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
-import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
-import org.apache.directory.shared.ldap.codec.bind.LdapAuthentication;
-import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
-import org.apache.directory.shared.ldap.codec.compare.CompareResponseCodec;
-import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
-import org.apache.directory.shared.ldap.codec.modify.ModifyResponseCodec;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
+import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.message.AbandonRequest;
+import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.AddResponse;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.BindRequestImpl;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.CompareResponse;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.Message;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.ModifyDnResponse;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.ModifyResponse;
+import org.apache.directory.shared.ldap.message.Response;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.message.SearchResultReference;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -89,8 +89,6 @@ import org.xmlpull.v1.XmlPullParserExcep
 public class Dsmlv2Engine
 {
     /** Socket used to connect to the server */
-    private SocketChannel channel;
-    private SocketAddress serverAddress;
 
     // server configuration
     private int port;
@@ -98,9 +96,8 @@ public class Dsmlv2Engine
     private String user;
     private String password;
 
-    private Asn1Decoder ldapDecoder = new Asn1Decoder();
-
-    private IAsn1Container ldapMessageContainer = new LdapMessageContainer();
+    /** The LDAP connection */
+    private LdapConnection connection;
 
     private Dsmlv2Parser parser;
 
@@ -117,21 +114,19 @@ public class Dsmlv2Engine
     /**
      * Creates a new instance of Dsmlv2Engine.
      * 
-     * @param host 
-     *      the server host
-     * @param port 
-     *      the server port
-     * @param user 
-     *      the server admin DN
-     * @param password 
-     *      the server admin's password
+     * @param host the server host
+     * @param port the server port
+     * @param user the server admin DN
+     * @param password the server admin's password
      */
-    public Dsmlv2Engine( String host, int port, String user, String password )
+    public Dsmlv2Engine( String host, int port, String user, String password ) throws IOException
     {
         this.host = host;
         this.port = port;
         this.user = user;
         this.password = password;
+
+        connection = new LdapNetworkConnection( host, port );
     }
 
 
@@ -149,6 +144,7 @@ public class Dsmlv2Engine
     {
         parser = new Dsmlv2Parser();
         parser.setInput( dsmlInput );
+
         return processDSML();
     }
 
@@ -169,6 +165,7 @@ public class Dsmlv2Engine
     {
         parser = new Dsmlv2Parser();
         parser.setInputFile( fileName );
+
         return processDSML();
     }
 
@@ -196,8 +193,7 @@ public class Dsmlv2Engine
     /**
      * Processes the Request document
      * 
-     * @return 
-     *      the XML response in DSMLv2 Format
+     * @return the XML response in DSMLv2 Format
      */
     private String processDSML()
     {
@@ -240,7 +236,8 @@ public class Dsmlv2Engine
         //    - Sending the request to the server
         //    - Getting and converting reponse(s) as XML
         //    - Looping until last request
-        LdapMessageCodec request = null;
+        Message request = null;
+
         try
         {
             request = parser.getNextRequest();
@@ -309,108 +306,87 @@ public class Dsmlv2Engine
     /**
      * Processes a single request
      * 
-     * @param request 
-     *      the request to process
+     * @param request the request to process
      * @throws EncoderException 
      * @throws IOException 
      * @throws DecoderException 
      */
-    private void processRequest( LdapMessageCodec request ) throws EncoderException, IOException, DecoderException
+    private void processRequest( Message request ) throws EncoderException, IOException, DecoderException,
+        LdapException, Exception
     {
-        ByteBuffer bb = request.encode();
-
-        bb.flip();
-
-        sendMessage( bb );
-
-        bb.clear();
-        bb.position( bb.capacity() );
-
-        // Get the response
-        LdapMessageCodec response = null;
-
-        response = readResponse( bb );
+        ResultCodeEnum resultCode = null;
 
-        switch ( response.getMessageType() )
+        switch ( request.getType() )
         {
-            case ADD_RESPONSE:
-                AddResponseCodec addResponse = ( AddResponseCodec ) response;
-                copyMessageIdAndControls( response, addResponse );
+            case ABANDON_REQUEST:
+                connection.abandon( ( AbandonRequest ) request );
+                return;
 
-                AddResponseDsml addResponseDsml = new AddResponseDsml( addResponse );
+            case ADD_REQUEST:
+                AddResponse response = connection.add( ( AddRequest ) request );
+                AddResponseDsml addResponseDsml = new AddResponseDsml( response );
                 batchResponse.addResponse( addResponseDsml );
-                break;
 
-            case BIND_RESPONSE:
-                BindResponseCodec bindResponse = ( BindResponseCodec ) response;
-                copyMessageIdAndControls( response, bindResponse );
+                break;
 
+            case BIND_REQUEST:
+                BindResponse bindResponse = connection.bind( ( BindRequest ) request );
                 AuthResponseDsml authResponseDsml = new AuthResponseDsml( bindResponse );
                 batchResponse.addResponse( authResponseDsml );
-                break;
 
-            case COMPARE_RESPONSE:
-                CompareResponseCodec compareResponse = ( CompareResponseCodec ) response;
-                copyMessageIdAndControls( response, compareResponse );
+                break;
 
+            case COMPARE_REQUEST:
+                CompareResponse compareResponse = connection.compare( ( CompareRequest ) request );
                 CompareResponseDsml compareResponseDsml = new CompareResponseDsml( compareResponse );
                 batchResponse.addResponse( compareResponseDsml );
-                break;
 
-            case DEL_RESPONSE:
-                DelResponseCodec delResponse = ( DelResponseCodec ) response;
-                copyMessageIdAndControls( response, delResponse );
+                break;
 
+            case DEL_REQUEST:
+                DeleteResponse delResponse = connection.delete( ( DeleteRequest ) request );
                 DelResponseDsml delResponseDsml = new DelResponseDsml( delResponse );
                 batchResponse.addResponse( delResponseDsml );
+
                 break;
 
-            case MODIFY_RESPONSE:
-                ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) response;
-                copyMessageIdAndControls( response, modifyResponse );
+            case EXTENDED_REQUEST:
+                ExtendedResponse extendedResponse = connection.extended( ( ExtendedRequest ) request );
+                ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( extendedResponse );
+                batchResponse.addResponse( extendedResponseDsml );
 
-                ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( modifyResponse );
-                batchResponse.addResponse( modifyResponseDsml );
                 break;
 
-            case MODIFYDN_RESPONSE:
-                ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) response;
-                copyMessageIdAndControls( response, modifyDNResponse );
+            case MODIFY_REQUEST:
+                ModifyResponse modifyResponse = connection.modify( ( ModifyRequest ) request );
+                ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( modifyResponse );
+                batchResponse.addResponse( modifyResponseDsml );
 
-                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( modifyDNResponse );
-                batchResponse.addResponse( modDNResponseDsml );
                 break;
 
-            case EXTENDED_RESPONSE:
-                ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) response;
-                copyMessageIdAndControls( response, extendedResponse );
+            case MODIFYDN_REQUEST:
+                ModifyDnResponse modifyDnResponse = connection.modifyDn( ( ModifyDnRequest ) request );
+                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( modifyDnResponse );
+                batchResponse.addResponse( modDNResponseDsml );
 
-                ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( extendedResponse );
-                batchResponse.addResponse( extendedResponseDsml );
                 break;
 
-            case SEARCH_RESULT_ENTRY:
-            case SEARCH_RESULT_REFERENCE:
-            case SEARCH_RESULT_DONE:
-                // A SearchResponse can contains multiple responses of 3 types:
-                //     - 0 to n SearchResultEntry
-                //     - O to n SearchResultReference
-                //     - 1 (only) SearchResultDone
-                // So we have to include those individual responses in a "General" SearchResponse
-                SearchResponseDsml searchResponseDsml = null;
-
-                // RequestID
-                int requestID = response.getMessageId();
+            case SEARCH_REQUEST:
+                Cursor<Response> searchResponses = connection.search( ( SearchRequest ) request );
 
-                while ( MessageTypeEnum.SEARCH_RESULT_DONE != response.getMessageType() )
+                while ( searchResponses.next() )
                 {
-                    if ( MessageTypeEnum.SEARCH_RESULT_ENTRY == response.getMessageType() )
+                    Response searchResponse = searchResponses.get();
+                    SearchResponseDsml searchResponseDsml = null;
+
+                    int requestID = searchResponse.getMessageId();
+
+                    if ( searchResponse.getType() == MessageTypeEnum.SEARCH_RESULT_ENTRY )
                     {
-                        SearchResultEntryCodec sre = ( SearchResultEntryCodec ) response;
-                        copyMessageIdAndControls( response, sre );
+                        SearchResultEntry searchResultEntry = ( SearchResultEntry ) searchResponse;
 
-                        SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( sre );
-                        searchResponseDsml = new SearchResponseDsml( ( LdapMessageCodec ) sre );
+                        SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( searchResultEntry );
+                        searchResponseDsml = new SearchResponseDsml( searchResultEntryDsml );
 
                         if ( requestID != 0 )
                         {
@@ -419,29 +395,32 @@ public class Dsmlv2Engine
 
                         searchResponseDsml.addResponse( searchResultEntryDsml );
                     }
-                    else if ( MessageTypeEnum.SEARCH_RESULT_REFERENCE == response.getMessageType() )
+                    else if ( searchResponse.getType() == MessageTypeEnum.SEARCH_RESULT_REFERENCE )
                     {
-                        SearchResultReferenceCodec srr = ( SearchResultReferenceCodec ) response;
-                        copyMessageIdAndControls( response, srr );
+                        SearchResultReference searchResultReference = ( SearchResultReference ) searchResponse;
+
+                        SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml(
+                            searchResultReference );
+                        searchResponseDsml = new SearchResponseDsml( searchResultReferenceDsml );
+
+                        if ( requestID != 0 )
+                        {
+                            searchResponseDsml.setMessageId( requestID );
+                        }
 
-                        SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml( srr );
                         searchResponseDsml.addResponse( searchResultReferenceDsml );
                     }
 
-                    response = readResponse( bb );
+                    batchResponse.addResponse( searchResponseDsml );
                 }
 
-                SearchResultDoneCodec srd = ( SearchResultDoneCodec ) response;
-                copyMessageIdAndControls( response, srd );
+                break;
 
-                SearchResultDoneDsml searchResultDoneDsml = new SearchResultDoneDsml( srd );
-                searchResponseDsml.addResponse( searchResultDoneDsml );
+            case UNBIND_REQUEST:
+                connection.unBind();
                 break;
         }
 
-        LdapResponseCodec realResponse = ( LdapResponseCodec ) response;
-        ResultCodeEnum resultCode = realResponse.getLdapResult().getResultCode();
-
         if ( ( !continueOnError ) && ( resultCode != ResultCodeEnum.SUCCESS )
             && ( resultCode != ResultCodeEnum.COMPARE_TRUE ) && ( resultCode != ResultCodeEnum.COMPARE_FALSE )
             && ( resultCode != ResultCodeEnum.REFERRAL ) )
@@ -452,11 +431,11 @@ public class Dsmlv2Engine
     }
 
 
-    private void copyMessageIdAndControls( LdapMessageCodec from, LdapMessageCodec to )
+    private void copyMessageIdAndControls( Message from, Message to )
     {
         to.setMessageId( from.getMessageId() );
 
-        for ( Control control : from.getControls() )
+        for ( Control control : from.getControls().values() )
         {
             to.addControl( control );
         }
@@ -498,139 +477,29 @@ public class Dsmlv2Engine
 
 
     /**
-     * Connect to the LDAP server through a socket and establish the Input and
-     * Output Streams. All the required information for the connection should be
-     * in the options from the command line, or the default values.
-     * 
-     * @throws UnknownHostException
-     *      if the hostname or the Address of server could not be found
-     * @throws IOException
-     *      if there was a error opening or establishing the socket
-     */
-    private void connect() throws UnknownHostException, IOException
-    {
-        serverAddress = new InetSocketAddress( host, port );
-        channel = SocketChannel.open( serverAddress );
-        channel.configureBlocking( true );
-    }
-
-
-    /**
-     * Sends a message
-     * 
-     * @param bb
-     *      the message as a byte buffer
-     * @throws IOException
-     *      if the message could not be sent
-     */
-    private void sendMessage( ByteBuffer bb ) throws IOException
-    {
-        channel.write( bb );
-        bb.clear();
-    }
-
-
-    /**
-     * Reads the response to a request
-     * 
-     * @param bb
-     *      the response as a byte buffer
-     * @return the response
-     *      the response as a LDAP message
-     * @throws IOException
-     * @throws DecoderException
-     */
-    private LdapMessageCodec readResponse( ByteBuffer bb ) throws IOException, DecoderException
-    {
-
-        LdapMessageCodec messageResp = null;
-
-        if ( bb.hasRemaining() )
-        {
-            bb.position( bbposition );
-            bb.limit( bbLimit );
-            ldapDecoder.decode( bb, ldapMessageContainer );
-            bbposition = bb.position();
-            bbLimit = bb.limit();
-        }
-        bb.flip();
-        while ( ldapMessageContainer.getState() != TLVStateEnum.PDU_DECODED )
-        {
-
-            int nbRead = channel.read( bb );
-
-            if ( nbRead == -1 )
-            {
-                System.err.println( "fsdfsdfsdfsd" );
-            }
-
-            bb.flip();
-            ldapDecoder.decode( bb, ldapMessageContainer );
-            bbposition = bb.position();
-            bbLimit = bb.limit();
-            bb.flip();
-        }
-
-        messageResp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-
-        if ( messageResp instanceof BindResponseCodec )
-        {
-            BindResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getBindResponse();
-
-            if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
-            {
-                System.err.println( "Error : " + resp.getLdapResult().getErrorMessage() );
-            }
-        }
-        else if ( messageResp instanceof ExtendedResponseCodec )
-        {
-            ExtendedResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getExtendedResponse();
-
-            if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
-            {
-                System.err.println( "Error : " + resp.getLdapResult().getErrorMessage() );
-            }
-        }
-
-        ( ( LdapMessageContainer ) ldapMessageContainer ).clean();
-
-        return messageResp;
-    }
-
-
-    /**
      * Binds to the ldap server
      * 
-     * @param messageId 
-     *      the message Id
+     * @param messageId the message Id
      * @throws EncoderException
      * @throws DecoderException
      * @throws IOException
      * @throws LdapInvalidDnException
      */
-    private void bind( int messageId ) throws EncoderException, DecoderException, IOException, LdapInvalidDnException
+    private void bind( int messageId ) throws LdapException, EncoderException, DecoderException, IOException,
+        LdapInvalidDnException
     {
-        BindRequestCodec bindRequest = new BindRequestCodec();
-        LdapAuthentication authentication = new SimpleAuthentication();
-        ( ( SimpleAuthentication ) authentication ).setSimple( StringTools.getBytesUtf8( password ) );
-
-        bindRequest.setAuthentication( authentication );
+        BindRequest bindRequest = new BindRequestImpl();
+        bindRequest.setSimple( true );
+        bindRequest.setCredentials( StringTools.getBytesUtf8( password ) );
         bindRequest.setName( new DN( user ) );
-        bindRequest.setVersion( 3 );
-
+        bindRequest.setVersion3( true );
         bindRequest.setMessageId( messageId );
 
-        // Encode and send the bind request
-        ByteBuffer bb = bindRequest.encode();
-        bb.flip();
-
-        connect();
-        sendMessage( bb );
-
-        bb.clear();
+        BindResponse bindResponse = connection.bind( bindRequest );
 
-        bb.position( bb.limit() );
-
-        readResponse( bb );
+        if ( bindResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
+        {
+            System.err.println( "Error : " + bindResponse.getLdapResult().getErrorMessage() );
+        }
     }
 }

Propchange: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:945830-946347
-/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse:980350-980351

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java Fri Aug 20 19:23:27 2010
@@ -21,9 +21,9 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
+import org.apache.directory.shared.ldap.message.AddResponse;
+import org.apache.directory.shared.ldap.message.AddResponseImpl;
 import org.dom4j.Element;
 
 
@@ -32,14 +32,14 @@ import org.dom4j.Element;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+public class AddResponseDsml extends AbstractResponseDsml
 {
     /**
      * Creates a new instance of AddResponseDsml.
      */
     public AddResponseDsml()
     {
-        super( new AddResponseCodec() );
+        super( new AddResponseImpl() );
     }
 
 
@@ -49,18 +49,18 @@ public class AddResponseDsml extends Lda
      * @param ldapMessage
      *      the message to decorate
      */
-    public AddResponseDsml( AddResponseCodec ldapMessage )
+    public AddResponseDsml( AddResponse ldapMessage )
     {
         super( ldapMessage );
     }
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getType()
      */
-    public MessageTypeEnum getMessageType()
+    public MessageTypeEnum getType()
     {
-        return instance.getMessageType();
+        return instance.getType();
     }
 
 
@@ -71,7 +71,7 @@ public class AddResponseDsml extends Lda
     {
         Element element = root.addElement( "addResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( AddResponseCodec ) instance ).getLdapResult(), instance );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( AddResponse ) instance ).getLdapResult(), instance );
         ldapResultDsml.toDsml( element );
         return element;
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java Fri Aug 20 19:23:27 2010
@@ -21,9 +21,9 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.BindResponseImpl;
 import org.dom4j.Element;
 
 
@@ -32,14 +32,14 @@ import org.dom4j.Element;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AuthResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+public class AuthResponseDsml extends AbstractResponseDsml
 {
     /**
      * Creates a new instance of AuthResponseDsml.
      */
     public AuthResponseDsml()
     {
-        super( new BindResponseCodec() );
+        super( new BindResponseImpl() );
     }
 
 
@@ -49,18 +49,18 @@ public class AuthResponseDsml extends Ld
      * @param ldapMessage
      *      the message to decorate
      */
-    public AuthResponseDsml( BindResponseCodec ldapMessage )
+    public AuthResponseDsml( BindResponse ldapMessage )
     {
         super( ldapMessage );
     }
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getType()
      */
-    public MessageTypeEnum getMessageType()
+    public MessageTypeEnum getType()
     {
-        return instance.getMessageType();
+        return instance.getType();
     }
 
 
@@ -71,7 +71,7 @@ public class AuthResponseDsml extends Ld
     {
         Element element = root.addElement( "authResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( BindResponseCodec ) instance ).getLdapResult(), instance );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( BindResponse ) instance ).getLdapResult(), instance );
         ldapResultDsml.toDsml( element );
         return element;
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/BatchResponse.java Fri Aug 20 19:23:27 2010
@@ -24,7 +24,7 @@ package org.apache.directory.shared.dsml
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
+import org.apache.directory.shared.ldap.message.Response;
 
 
 /**
@@ -38,7 +38,7 @@ public class BatchResponse
     /**
      * The responses contained in the Batch Response
      */
-    private List<LdapResponseCodec> responses;
+    private List<Response> responses;
 
     /**
      * The ID of the response
@@ -51,7 +51,7 @@ public class BatchResponse
      */
     public BatchResponse()
     {
-        responses = new ArrayList<LdapResponseCodec>();
+        responses = new ArrayList<Response>();
     }
 
 
@@ -63,7 +63,7 @@ public class BatchResponse
      * @return
      *      true (as per the general contract of the Collection.add method)
      */
-    public boolean addResponse( LdapResponseCodec response )
+    public boolean addResponse( Response response )
     {
         return responses.add( response );
     }
@@ -75,7 +75,7 @@ public class BatchResponse
      * @return
      *      the current response
      */
-    public LdapResponseCodec getCurrentResponse()
+    public Response getCurrentResponse()
     {
         return responses.get( responses.size() - 1 );
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java Fri Aug 20 19:23:27 2010
@@ -21,9 +21,9 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.codec.compare.CompareResponseCodec;
+import org.apache.directory.shared.ldap.message.CompareResponse;
+import org.apache.directory.shared.ldap.message.CompareResponseImpl;
 import org.dom4j.Element;
 
 
@@ -32,14 +32,14 @@ import org.dom4j.Element;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+public class CompareResponseDsml extends AbstractResponseDsml
 {
     /**
      * Creates a new instance of CompareResponseDsml.
      */
     public CompareResponseDsml()
     {
-        super( new CompareResponseCodec() );
+        super( new CompareResponseImpl() );
     }
 
 
@@ -49,18 +49,18 @@ public class CompareResponseDsml extends
      * @param ldapMessage
      *      the message to decorate
      */
-    public CompareResponseDsml( CompareResponseCodec ldapMessage )
+    public CompareResponseDsml( CompareResponse ldapMessage )
     {
         super( ldapMessage );
     }
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getType()
      */
-    public MessageTypeEnum getMessageType()
+    public MessageTypeEnum getType()
     {
-        return instance.getMessageType();
+        return instance.getType();
     }
 
 
@@ -71,7 +71,7 @@ public class CompareResponseDsml extends
     {
         Element element = root.addElement( "compareResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( CompareResponseCodec ) instance ).getLdapResult(), instance );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( CompareResponse ) instance ).getLdapResult(), instance );
         ldapResultDsml.toDsml( element );
         return element;
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java Fri Aug 20 19:23:27 2010
@@ -21,9 +21,9 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+import org.apache.directory.shared.ldap.message.DeleteResponseImpl;
 import org.dom4j.Element;
 
 
@@ -32,14 +32,14 @@ import org.dom4j.Element;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DelResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+public class DelResponseDsml extends AbstractResponseDsml
 {
     /**
      * Creates a new instance of DelResponseDsml.
      */
     public DelResponseDsml()
     {
-        super( new DelResponseCodec() );
+        super( new DeleteResponseImpl() );
     }
 
 
@@ -49,18 +49,18 @@ public class DelResponseDsml extends Lda
      * @param ldapMessage
      *      the message to decorate
      */
-    public DelResponseDsml( DelResponseCodec ldapMessage )
+    public DelResponseDsml( DeleteResponse ldapMessage )
     {
         super( ldapMessage );
     }
 
 
     /* (non-Javadoc)
-     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+     * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getType()
      */
-    public MessageTypeEnum getMessageType()
+    public MessageTypeEnum getType()
     {
-        return instance.getMessageType();
+        return instance.getType();
     }
 
 
@@ -71,7 +71,7 @@ public class DelResponseDsml extends Lda
     {
         Element element = root.addElement( "delResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( DelResponseCodec ) instance ).getLdapResult(), instance );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( DeleteResponse ) instance ).getLdapResult(), instance );
         ldapResultDsml.toDsml( element );
         return element;
     }



Mime
View raw message