directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1072822 [1/2] - in /directory: project/trunk/resources/ shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/...
Date Mon, 21 Feb 2011 02:02:27 GMT
Author: akarasulu
Date: Mon Feb 21 02:02:24 2011
New Revision: 1072822

URL: http://svn.apache.org/viewvc?rev=1072822&view=rev
Log:
DISHARED-86: removed use of JNDI interfaces and enhanced generics for ResultResponse

Modified:
    directory/project/trunk/resources/dictionary
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java
    directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
    directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java
    directory/shared/branches/akarasulu/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/branches/akarasulu/ldap-codec-standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java
    directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java
    directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreExtendedResponseValue.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestFactory.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedResponseDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/LdapCodecService.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequest.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResultResponseRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SingleReplyRequestDecorator.java
    directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/osgi/DefaultLdapCodecService.java
    directory/shared/branches/akarasulu/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java
    directory/shared/branches/akarasulu/ldap-codec/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
    directory/shared/branches/akarasulu/ldap-extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java
    directory/shared/branches/akarasulu/ldap-extras/util/src/main/java/org/apache/directory/shared/ldap/util/JndiUtils.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/BindRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/CompareRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedResponse.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ExtendedResponseImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ManyReplyRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/ResultResponseRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/SearchRequestImpl.java
    directory/shared/branches/akarasulu/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/message/SingleReplyRequest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/AddRequestImplTest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/BindRequestImplTest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/CompareRequestImplTest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/DeleteRequestImplTest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/ExtendedRequestImplTest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/ExtendedResponseImplTest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/ModifyDnRequestImplTest.java
    directory/shared/branches/akarasulu/ldap-model/src/test/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImplTest.java

Modified: directory/project/trunk/resources/dictionary
URL: http://svn.apache.org/viewvc/directory/project/trunk/resources/dictionary?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/project/trunk/resources/dictionary (original)
+++ directory/project/trunk/resources/dictionary Mon Feb 21 02:02:24 2011
@@ -186,3 +186,5 @@ felix
 configs
 osgi
 offline
+newrdn
+deleteoldrdn

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java Mon Feb 21 02:02:24 2011
@@ -1864,7 +1864,7 @@ public final class Dsmlv2ResponseGrammar
     {
         public void action( Dsmlv2Container container ) throws XmlPullParserException
         {
-            ExtendedResponse extendedResponse = ( ExtendedResponse ) container.getBatchResponse().getCurrentResponse();
+            ExtendedResponseDsml extendedResponse = ( ExtendedResponseDsml ) container.getBatchResponse().getCurrentResponse();
 
             XmlPullParser xpp = container.getParser();
 

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java Mon Feb 21 02:02:24 2011
@@ -41,6 +41,7 @@ public class ExtendedResponseDsml extend
     implements ExtendedResponse
 {
     private static final long serialVersionUID = -3989420095112650346L;
+    private byte[] response;
 
 
     /**
@@ -94,7 +95,7 @@ public class ExtendedResponseDsml extend
         }
 
         // Response
-        Object response = extendedResponse.getResponseValue();
+        Object response = getResponseValue();
 
         if ( response != null )
         {
@@ -121,6 +122,15 @@ public class ExtendedResponseDsml extend
 
 
     /**
+     * {@inheritDoc}
+     */
+    public void setResponseName( String oid )
+    {
+        getDecorated().setResponseName( oid );
+    }
+
+    
+    /**
      * Get the extended response name
      * 
      * @return Returns the name.
@@ -149,7 +159,7 @@ public class ExtendedResponseDsml extend
      */
     public byte[] getResponseValue()
     {
-        return getDecorated().getResponseValue();
+        return this.response;
     }
 
 
@@ -160,33 +170,6 @@ public class ExtendedResponseDsml extend
      */
     public void setResponseValue( byte[] response )
     {
-        getDecorated().setResponseValue( response );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getID()
-    {
-        return getDecorated().getID();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public byte[] getEncodedValue()
-    {
-        return getDecorated().getEncodedValue();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setResponseName( String oid )
-    {
-        getDecorated().setResponseName( oid );
+        this.response = response;
     }
 }
\ No newline at end of file

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractResultResponseRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -37,9 +37,9 @@ import org.dom4j.Element;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractResultResponseRequestDsml<E extends ResultResponseRequest> 
+public abstract class AbstractResultResponseRequestDsml<E extends ResultResponseRequest<F>, F extends ResultResponse> 
     extends AbstractRequestDsml<E> 
-    implements ResultResponseRequest, AbandonableRequest
+    implements ResultResponseRequest<F>, AbandonableRequest
 {
     /**
      * Creates a new instance of AbstractRequestDsml.
@@ -137,7 +137,7 @@ public abstract class AbstractResultResp
     /**
      * {@inheritDoc}
      */
-    public ResultResponse getResultResponse()
+    public F getResultResponse()
     {
         return getDecorated().getResultResponse();
     }

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
+import org.apache.directory.shared.ldap.model.message.AddResponse;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.dom4j.Element;
@@ -42,7 +43,7 @@ import org.dom4j.QName;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class AddRequestDsml 
-    extends AbstractResultResponseRequestDsml<AddRequest> 
+    extends AbstractResultResponseRequestDsml<AddRequest, AddResponse> 
     implements AddRequest
 {
 

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/BindRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -23,6 +23,7 @@ package org.apache.directory.shared.dsml
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.model.message.BindRequestImpl;
+import org.apache.directory.shared.ldap.model.message.BindResponse;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.dom4j.Element;
@@ -34,7 +35,7 @@ import org.dom4j.Element;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class BindRequestDsml 
-    extends AbstractResultResponseRequestDsml<BindRequest>
+    extends AbstractResultResponseRequestDsml<BindRequest, BindResponse>
     implements BindRequest
 {
     /**

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -24,6 +24,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.message.CompareRequest;
 import org.apache.directory.shared.ldap.model.message.CompareRequestImpl;
+import org.apache.directory.shared.ldap.model.message.CompareResponse;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.dom4j.Element;
@@ -35,7 +36,7 @@ import org.dom4j.Element;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class CompareRequestDsml 
-    extends AbstractResultResponseRequestDsml<CompareRequest>
+    extends AbstractResultResponseRequestDsml<CompareRequest, CompareResponse>
     implements CompareRequest
 {
     /**

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -23,6 +23,7 @@ package org.apache.directory.shared.dsml
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.model.message.DeleteRequest;
 import org.apache.directory.shared.ldap.model.message.DeleteRequestImpl;
+import org.apache.directory.shared.ldap.model.message.DeleteResponse;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.dom4j.Element;
@@ -34,7 +35,7 @@ import org.dom4j.Element;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class DelRequestDsml 
-    extends AbstractResultResponseRequestDsml<DeleteRequest>
+    extends AbstractResultResponseRequestDsml<DeleteRequest, DeleteResponse>
     implements DeleteRequest
 {
     /**

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java Mon Feb 21 02:02:24 2011
@@ -57,7 +57,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.CompareRequestImpl;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.DeleteRequestImpl;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequestImpl;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequestImpl;
 import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
@@ -1558,7 +1557,7 @@ public final class Dsmlv2Grammar extends
     {
         public void action( Dsmlv2Container container ) throws XmlPullParserException
         {
-            ExtendedRequest extendedRequest = ( ExtendedRequest ) container.getBatchRequest().getCurrentRequest();
+            ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) container.getBatchRequest().getCurrentRequest();
 
             XmlPullParser xpp = container.getParser();
 
@@ -1598,7 +1597,7 @@ public final class Dsmlv2Grammar extends
     {
         public void action( Dsmlv2Container container ) throws XmlPullParserException
         {
-            ExtendedRequest extendedRequest = ( ExtendedRequest ) container.getBatchRequest().getCurrentRequest();
+            ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) container.getBatchRequest().getCurrentRequest();
 
             XmlPullParser xpp = container.getParser();
 

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -25,6 +25,7 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequestImpl;
+import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
@@ -37,9 +38,12 @@ import org.dom4j.QName;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class ExtendedRequestDsml 
-    extends AbstractResultResponseRequestDsml<ExtendedRequest>
-    implements ExtendedRequest
+    extends AbstractResultResponseRequestDsml<ExtendedRequest<ExtendedResponse>, ExtendedResponse>
+    implements ExtendedRequest<ExtendedResponse>
 {
+    private byte[] requestValue;
+
+
     /**
      * Creates a new getDecoratedMessage() of ExtendedRequestDsml.
      */
@@ -55,7 +59,7 @@ public class ExtendedRequestDsml 
      * @param ldapMessage
      *      the message to decorate
      */
-    public ExtendedRequestDsml( LdapCodecService codec, ExtendedRequest ldapMessage )
+    public ExtendedRequestDsml( LdapCodecService codec, ExtendedRequest<ExtendedResponse> ldapMessage )
     {
         super( codec, ldapMessage );
     }
@@ -91,7 +95,7 @@ public class ExtendedRequestDsml 
         element.getDocument().getRootElement().add( xsiNamespace );
 
         Element valueElement = element.addElement( "requestValue" ).addText(
-            ParserUtils.base64Encode( getDecorated().getRequestValue() ) );
+            ParserUtils.base64Encode( getRequestValue() ) );
         valueElement.addAttribute( new QName( "type", xsiNamespace ), 
             "xsd:" + ParserUtils.BASE64BINARY );
 
@@ -128,7 +132,7 @@ public class ExtendedRequestDsml 
      */
     public byte[] getRequestValue()
     {
-        return getDecorated().getRequestValue();
+        return this.requestValue;
     }
 
 
@@ -139,7 +143,7 @@ public class ExtendedRequestDsml 
      */
     public void setRequestValue( byte[] requestValue )
     {
-        getDecorated().setRequestValue( requestValue );
+        this.requestValue = requestValue;
     }
 
 

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -24,6 +24,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequestImpl;
+import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.dom4j.Element;
@@ -35,7 +36,7 @@ import org.dom4j.Element;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class ModifyDNRequestDsml 
-    extends AbstractResultResponseRequestDsml<ModifyDnRequest>
+    extends AbstractResultResponseRequestDsml<ModifyDnRequest, ModifyDnResponse>
     implements ModifyDnRequest
 {
     /**

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -34,6 +34,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
+import org.apache.directory.shared.ldap.model.message.ModifyResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
@@ -46,7 +47,7 @@ import org.dom4j.QName;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class ModifyRequestDsml 
-    extends AbstractResultResponseRequestDsml<ModifyRequest>
+    extends AbstractResultResponseRequestDsml<ModifyRequest, ModifyResponse>
     implements ModifyRequest
 {
 

Modified: directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java Mon Feb 21 02:02:24 2011
@@ -47,6 +47,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
+import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
@@ -59,7 +60,7 @@ import org.dom4j.QName;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class SearchRequestDsml 
-    extends AbstractResultResponseRequestDsml<SearchRequest>
+    extends AbstractResultResponseRequestDsml<SearchRequest, SearchResultDone>
     implements SearchRequest
 {
     /** A temporary storage for a terminal Filter */

Modified: directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java Mon Feb 21 02:02:24 2011
@@ -17,7 +17,6 @@
  *  under the License. 
  *  
  */
-
 package org.apache.directory.shared.dsmlv2.extendedRequest;
 
 
@@ -33,8 +32,8 @@ import java.util.Map;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.DsmlControl;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.dsmlv2.request.ExtendedRequestDsml;
 import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -73,7 +72,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 456, extendedRequest.getMessageId() );
     }
@@ -110,7 +109,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
         Map<String, Control> controls = extendedRequest.getControls();
 
         assertEquals( 1, extendedRequest.getControls().size() );
@@ -145,7 +144,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
         Map<String, Control> controls = extendedRequest.getControls();
 
         assertEquals( 1, extendedRequest.getControls().size() );
@@ -180,7 +179,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
         Map<String, Control> controls = extendedRequest.getControls();
 
         assertEquals( 1, extendedRequest.getControls().size() );
@@ -215,7 +214,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
         Map<String, Control> controls = extendedRequest.getControls();
 
         assertEquals( 2, extendedRequest.getControls().size() );
@@ -250,7 +249,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
         Map<String, Control> controls = extendedRequest.getControls();
 
         assertEquals( 3, extendedRequest.getControls().size() );
@@ -285,7 +284,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( "foobar", new String( extendedRequest.getRequestValue() ) );
     }
@@ -312,7 +311,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( "DSMLv2.0 rocks!!", new String( extendedRequest.getRequestValue() ) );
     }
@@ -369,7 +368,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser
+        ExtendedRequestDsml extendedRequest = ( ExtendedRequestDsml ) parser
             .getBatchRequest().getCurrentRequest();
         assertNull( extendedRequest.getRequestValue() );
     }

Modified: directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java (original)
+++ directory/shared/branches/akarasulu/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java Mon Feb 21 02:02:24 2011
@@ -36,6 +36,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.DsmlControl;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.shared.dsmlv2.reponse.ExtendedResponseDsml;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -636,7 +637,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponseDsml extendedResponse = ( ExtendedResponseDsml ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( "This is a response", Strings.utf8ToString(extendedResponse.getResponseValue()) );
     }
@@ -663,7 +664,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponseDsml extendedResponse = ( ExtendedResponseDsml ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( "DSMLv2.0 rocks!!", new String( ( byte[] ) extendedResponse.getResponseValue() ) );
     }
@@ -690,7 +691,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponseDsml extendedResponse = ( ExtendedResponseDsml ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( "", Strings.utf8ToString(extendedResponse.getResponseValue()) );
     }
@@ -717,8 +718,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser
-            .getBatchResponse().getCurrentResponse();
+        ExtendedResponseDsml extendedResponse = ( ExtendedResponseDsml ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( "This is a response", Strings.utf8ToString(extendedResponse.getResponseValue()) );
 

Modified: directory/shared/branches/akarasulu/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/shared/branches/akarasulu/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Mon Feb 21 02:02:24 2011
@@ -28,7 +28,6 @@ import java.net.SocketAddress;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -123,15 +122,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.UnbindRequest;
 import org.apache.directory.shared.ldap.model.message.UnbindRequestImpl;
 import org.apache.directory.shared.ldap.model.message.controls.OpaqueControl;
-import org.apache.directory.shared.ldap.model.message.extended.AddNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.BindNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.CompareNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.DeleteNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.ExtendedNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.ModifyDnNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.ModifyNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.NoticeOfDisconnect;
-import org.apache.directory.shared.ldap.model.message.extended.SearchNoDResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
@@ -146,6 +136,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.util.StringConstants;
 import org.apache.directory.shared.util.Strings;
+import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.mina.core.filterchain.IoFilter;
 import org.apache.mina.core.future.CloseFuture;
 import org.apache.mina.core.future.ConnectFuture;
@@ -2929,11 +2920,12 @@ public class LdapNetworkConnection exten
      */
     public ExtendedResponse extended( OID oid, byte[] value ) throws LdapException
     {
-        ExtendedRequest extendedRequest = new ExtendedRequestImpl();
+        ExtendedRequest<?> extendedRequest = new ExtendedRequestImpl();
         extendedRequest.setRequestName( oid.toString() );
-        extendedRequest.setRequestValue( value );
+        // extendedRequest.setRequestValue( value );
 
-        return extended( extendedRequest );
+        // return extended( extendedRequest );
+        throw new NotImplementedException( "need to figure out what to do with request value" );
     }
 
 

Modified: directory/shared/branches/akarasulu/ldap-codec-standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec-standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec-standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec-standalone/src/main/java/org/apache/directory/shared/ldap/codec/standalone/StandaloneLdapCodecService.java Mon Feb 21 02:02:24 2011
@@ -48,8 +48,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesFactory;
 import org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolCodecFactory;
 import org.apache.directory.shared.ldap.model.message.Control;
+import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
-import org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl;
 import org.apache.directory.shared.ldap.model.message.Message;
 import org.apache.directory.shared.ldap.model.message.controls.OpaqueControl;
 import org.apache.directory.shared.util.exception.NotImplementedException;
@@ -714,23 +714,25 @@ public class StandaloneLdapCodecService 
      */
     public javax.naming.ldap.ExtendedResponse toJndi( final ExtendedResponse modelResponse ) throws EncoderException
     {
-        final byte[] encodedValue = new byte[ modelResponse.getEncodedValue().length ];
-        System.arraycopy( modelResponse.getEncodedValue(), 0, encodedValue, 0, modelResponse.getEncodedValue().length );
-        
-        return new javax.naming.ldap.ExtendedResponse()
-        {
-            private static final long serialVersionUID = 2955142105375495493L;
+        throw new NotImplementedException( "Figure out how to transform" );
 
-            public String getID()
-            {
-                return modelResponse.getID();
-            }
-
-            public byte[] getEncodedValue()
-            {
-                return encodedValue;
-            }
-        };
+//        final byte[] encodedValue = new byte[ modelResponse.getEncodedValue().length ];
+//        System.arraycopy( modelResponse.getEncodedValue(), 0, encodedValue, 0, modelResponse.getEncodedValue().length );
+//        
+//        return new javax.naming.ldap.ExtendedResponse()
+//        {
+//            private static final long serialVersionUID = 2955142105375495493L;
+//
+//            public String getID()
+//            {
+//                return modelResponse.getID();
+//            }
+//
+//            public byte[] getEncodedValue()
+//            {
+//                return encodedValue;
+//            }
+//        };
     }
     
 
@@ -739,25 +741,27 @@ public class StandaloneLdapCodecService 
      */
     public ExtendedResponse fromJndi( javax.naming.ldap.ExtendedResponse jndiResponse ) throws DecoderException
     {   
-        ExtendedResponse modelResponse;
-        ExtendedRequestFactory<?,?> extendedRequestFactory = extReqFactories.get( jndiResponse.getID() );
-        UnsolicitedResponseFactory<?> unsolicitedResponseFactory = unsolicitedFactories.get( jndiResponse.getID() );
-        
-        if ( unsolicitedResponseFactory != null )
-        {
-            modelResponse = unsolicitedResponseFactory.newResponse( jndiResponse.getEncodedValue() );
-        }
-        else if ( extendedRequestFactory != null )
-        {
-            modelResponse = extendedRequestFactory.newResponse( jndiResponse.getEncodedValue() );
-        }
-        else
-        {
-            modelResponse = new ExtendedResponseImpl( jndiResponse.getID() );
-            modelResponse.setResponseValue( jndiResponse.getEncodedValue() );
-        }
-        
-        return modelResponse;
+        throw new NotImplementedException( "Figure out how to transform" );
+
+//        ExtendedResponse modelResponse;
+//        ExtendedRequestFactory<?,?> extendedRequestFactory = extReqFactories.get( jndiResponse.getID() );
+//        UnsolicitedResponseFactory<?> unsolicitedResponseFactory = unsolicitedFactories.get( jndiResponse.getID() );
+//        
+//        if ( unsolicitedResponseFactory != null )
+//        {
+//            modelResponse = unsolicitedResponseFactory.newResponse( jndiResponse.getEncodedValue() );
+//        }
+//        else if ( extendedRequestFactory != null )
+//        {
+//            modelResponse = extendedRequestFactory.newResponse( jndiResponse.getEncodedValue() );
+//        }
+//        else
+//        {
+//            modelResponse = new ExtendedResponseImpl( jndiResponse.getID() );
+//            modelResponse.setResponseValue( jndiResponse.getEncodedValue() );
+//        }
+//        
+//        return modelResponse;
     }
 
 
@@ -777,4 +781,18 @@ public class StandaloneLdapCodecService 
     {
         return unsolicitedFactories.remove( oid );
     }
+
+
+    public ExtendedRequest<?> fromJndi( javax.naming.ldap.ExtendedRequest jndiRequest ) throws DecoderException
+    {
+        // TODO Auto-generated method stub
+        throw new NotImplementedException();
+    }
+
+
+    public javax.naming.ldap.ExtendedRequest toJndi( ExtendedRequest<?> modelRequest ) throws EncoderException
+    {
+        // TODO Auto-generated method stub
+        throw new NotImplementedException();
+    }
 }

Modified: directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java Mon Feb 21 02:02:24 2011
@@ -37,7 +37,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.ExtendedRequestDecorator;
 import org.apache.directory.shared.ldap.codec.osgi.AbstractCodecServiceTest;
 import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -91,8 +90,7 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequest extendedRequest = container
-            .getMessage();
+        ExtendedRequestDecorator extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
@@ -163,7 +161,7 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequest extendedRequest = container.getMessage();
+        ExtendedRequestDecorator extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
@@ -245,7 +243,7 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequest extendedRequest = container.getMessage();
+        ExtendedRequestDecorator extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
@@ -428,7 +426,7 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequest extendedRequest = container.getMessage();
+        ExtendedRequestDecorator extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
@@ -494,11 +492,11 @@ public class ExtendedRequestTest extends
         }
 
         // Check the decoded ExtendedRequest PDU
-        ExtendedRequest extendedRequest = container.getMessage();
+        ExtendedRequestDecorator extendedRequest = container.getMessage();
 
         assertEquals( 1, extendedRequest.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
-        assertEquals( "", Strings.utf8ToString(extendedRequest.getRequestValue()) );
+        assertEquals( "", Strings.utf8ToString( extendedRequest.getRequestValue() ) );
 
         // Check the encoding
         try
@@ -508,7 +506,7 @@ public class ExtendedRequestTest extends
             // Check the length
             assertEquals( 0x18, bb.limit() );
 
-            String encodedPdu = Strings.dumpBytes(bb.array());
+            String encodedPdu = Strings.dumpBytes( bb.array() );
 
             assertEquals( encodedPdu, decodedPdu );
         }

Modified: directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec-standalone/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java Mon Feb 21 02:02:24 2011
@@ -100,14 +100,14 @@ public class ExtendedResponseTest extend
         }
 
         // Check the decoded ExtendedResponse PDU
-        ExtendedResponse extendedResponse = container.getMessage();
+        ExtendedResponseDecorator extendedResponse = container.getMessage();
 
         assertEquals( 1, extendedResponse.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
-        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getID() );
-        assertEquals( "value", Strings.utf8ToString((byte[]) extendedResponse.getEncodedValue()) );
+        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
+        assertEquals( "value", Strings.utf8ToString((byte[]) extendedResponse.getResponseValue()) );
 
         // Check the encoding
         try
@@ -192,14 +192,14 @@ public class ExtendedResponseTest extend
         }
 
         // Check the decoded ExtendedResponse PDU
-        ExtendedResponse extendedResponse = container.getMessage();
+        ExtendedResponseDecorator extendedResponse = container.getMessage();
 
         assertEquals( 1, extendedResponse.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
-        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getID() );
-        assertEquals( "value", Strings.utf8ToString((byte[]) extendedResponse.getEncodedValue()) );
+        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
+        assertEquals( "value", Strings.utf8ToString((byte[]) extendedResponse.getResponseValue() ) );
 
         // Check the Control
         Map<String, Control> controls = extendedResponse.getControls();
@@ -566,14 +566,14 @@ public class ExtendedResponseTest extend
         }
 
         // Check the decoded ExtendedResponse PDU
-        ExtendedResponse extendedResponse = container.getMessage();
+        ExtendedResponseDecorator extendedResponse = container.getMessage();
 
         assertEquals( 1, extendedResponse.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
-        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getID() );
-        assertEquals( "", Strings.utf8ToString((byte[]) extendedResponse.getEncodedValue()) );
+        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
+        assertEquals( "", Strings.utf8ToString((byte[]) extendedResponse.getResponseValue() ) );
 
         // Check the encoding
         try
@@ -653,14 +653,14 @@ public class ExtendedResponseTest extend
         }
 
         // Check the decoded ExtendedResponse PDU
-        ExtendedResponse extendedResponse = container.getMessage();
+        ExtendedResponseDecorator extendedResponse = container.getMessage();
 
         assertEquals( 1, extendedResponse.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
-        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getID() );
-        assertEquals( "", Strings.utf8ToString((byte[]) extendedResponse.getEncodedValue()) );
+        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
+        assertEquals( "", Strings.utf8ToString( ( byte[] ) extendedResponse.getResponseValue() ) );
 
         // Check the Control
         Map<String, Control> controls = extendedResponse.getControls();
@@ -746,14 +746,14 @@ public class ExtendedResponseTest extend
         }
 
         // Check the decoded ExtendedResponse PDU
-        ExtendedResponse extendedResponse = container.getMessage();
+        ExtendedResponseDecorator extendedResponse = container.getMessage();
 
         assertEquals( 1, extendedResponse.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
-        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getID() );
-        assertEquals( "", Strings.utf8ToString((byte[]) extendedResponse.getEncodedValue()) );
+        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
+        assertEquals( "", Strings.utf8ToString((byte[]) extendedResponse.getResponseValue() ) );
 
         // Check the encoding
         try
@@ -834,14 +834,14 @@ public class ExtendedResponseTest extend
         }
 
         // Check the decoded ExtendedResponse PDU
-        ExtendedResponse extendedResponse = container.getMessage();
+        ExtendedResponseDecorator extendedResponse = container.getMessage();
 
         assertEquals( 1, extendedResponse.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
         assertEquals( "", extendedResponse.getLdapResult().getMatchedDn().getName() );
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
-        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getID() );
-        assertEquals( "", Strings.utf8ToString((byte[]) extendedResponse.getEncodedValue()) );
+        assertEquals( "1.3.6.1.5.5.2", extendedResponse.getResponseName() );
+        assertEquals( "", Strings.utf8ToString((byte[]) extendedResponse.getResponseValue() ) );
 
         // Check the Control
         Map<String, Control> controls = extendedResponse.getControls();

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java Mon Feb 21 02:02:24 2011
@@ -27,7 +27,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.ExtendedRequestDecorator;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -65,7 +64,7 @@ public class StoreExtendedRequestName ex
     public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
     {
         // We can allocate the ExtendedRequest Object
-        ExtendedRequest extendedRequest = container.getMessage();
+        ExtendedRequestDecorator extendedRequest = container.getMessage();
 
         // Get the Value and store it in the ExtendedRequest
         TLV tlv = container.getCurrentTLV();

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java Mon Feb 21 02:02:24 2011
@@ -25,7 +25,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.ExtendedRequestDecorator;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.util.StringConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,7 +62,7 @@ public class StoreExtendedRequestValue e
     public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
     {
         // We can allocate the ExtendedRequest Object
-        ExtendedRequest extendedRequest = container.getMessage();
+        ExtendedRequestDecorator extendedRequest = container.getMessage();
 
         // Get the Value and store it in the ExtendedRequest
         TLV tlv = container.getCurrentTLV();

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreExtendedResponseValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreExtendedResponseValue.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreExtendedResponseValue.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreExtendedResponseValue.java Mon Feb 21 02:02:24 2011
@@ -25,7 +25,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.api.ExtendedResponseDecorator;
-import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.directory.shared.util.StringConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -64,7 +63,7 @@ public class StoreExtendedResponseValue 
     public void action( LdapMessageContainer<ExtendedResponseDecorator> container ) throws DecoderException
     {
         // We can allocate the ExtendedResponse Object
-        ExtendedResponse extendedResponse = container.getMessage();
+        ExtendedResponseDecorator extendedResponse = container.getMessage();
 
         // Get the Value and store it in the ExtendedResponse
         TLV tlv = container.getCurrentTLV();

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -28,6 +28,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.directory.shared.util.Strings;
 
 
@@ -36,8 +37,8 @@ import org.apache.directory.shared.util.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ExtendedRequestDecorator extends SingleReplyRequestDecorator<ExtendedRequest> 
-    implements ExtendedRequest
+public class ExtendedRequestDecorator extends SingleReplyRequestDecorator<ExtendedRequest<ExtendedResponse>,ExtendedResponse> 
+    implements ExtendedRequest<ExtendedResponse>
 {
     /** The extended request length */
     private int extendedRequestLength;
@@ -45,13 +46,15 @@ public class ExtendedRequestDecorator ex
     /** The OID length */
     private byte[] requestNameBytes;
 
+    private byte[] requestValue;
+
 
     /**
      * Makes a ExtendedRequest a MessageDecorator.
      *
      * @param decoratedMessage the decorated ExtendedRequest
      */
-    public ExtendedRequestDecorator( LdapCodecService codec, ExtendedRequest decoratedMessage )
+    public ExtendedRequestDecorator( LdapCodecService codec, ExtendedRequest<ExtendedResponse> decoratedMessage )
     {
         super( codec, decoratedMessage );
     }
@@ -127,7 +130,7 @@ public class ExtendedRequestDecorator ex
      */
     public byte[] getRequestValue()
     {
-        return getDecorated().getRequestValue();
+        return requestValue;
     }
 
 
@@ -136,7 +139,7 @@ public class ExtendedRequestDecorator ex
      */
     public void setRequestValue( byte[] requestValue )
     {
-        getDecorated().setRequestValue( requestValue );
+        this.requestValue = requestValue;
     }
 
     

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestFactory.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestFactory.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedRequestFactory.java Mon Feb 21 02:02:24 2011
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public interface ExtendedRequestFactory<Q extends ExtendedRequest,P extends ExtendedResponse>
+public interface ExtendedRequestFactory<Q extends ExtendedRequest<P>,P extends ExtendedResponse>
 {
     /**
      * Gets the OID of the extended requests this factory generates.

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedResponseDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedResponseDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/ExtendedResponseDecorator.java Mon Feb 21 02:02:24 2011
@@ -48,6 +48,8 @@ public class ExtendedResponseDecorator e
     /** The encoded extendedResponse length */
     private int extendedResponseLength;
 
+    private byte[] responseValue;
+
 
     /**
      * Makes a ExtendedResponse encodable.
@@ -110,24 +112,6 @@ public class ExtendedResponseDecorator e
     /**
      * {@inheritDoc}
      */
-    public byte[] getEncodedValue()
-    {
-        return getDecorated().getEncodedValue();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getID()
-    {
-        return getDecorated().getID();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public String getResponseName()
     {
         return getDecorated().getResponseName();
@@ -148,7 +132,7 @@ public class ExtendedResponseDecorator e
      */
     public byte[] getResponseValue()
     {
-        return getDecorated().getEncodedValue();
+        return responseValue;
     }
 
 
@@ -157,7 +141,7 @@ public class ExtendedResponseDecorator e
      */
     public void setResponseValue( byte[] responseValue )
     {
-        getDecorated().setResponseValue( responseValue );
+        this.responseValue = responseValue;
     }
 
     

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/LdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/LdapCodecService.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/LdapCodecService.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/LdapCodecService.java Mon Feb 21 02:02:24 2011
@@ -26,6 +26,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.ldap.model.message.Control;
+import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 
@@ -200,10 +201,31 @@ public interface LdapCodecService
      * @throws EncoderException
      */
     javax.naming.ldap.ExtendedResponse toJndi( ExtendedResponse modelResponse ) throws EncoderException;
+
+    
+    /**
+     * Creates a model ExtendedResponse from the JNDI ExtendedResponse.
+     *
+     * @param jndiResponse The JNDI ExtendedResponse 
+     * @return The model ExtendedResponse
+     * @throws DecoderException if the response value cannot be decoded.
+     */
+    ExtendedRequest<?> fromJndi( javax.naming.ldap.ExtendedRequest jndiRequest ) throws DecoderException;
+    
+    
+    /**
+     * Creates a JNDI {@link javax.naming.ldap.ExtendedResponse} from the model 
+     * {@link ExtendedResponse}.
+     * 
+     * @param modelResponse
+     * @return
+     * @throws EncoderException
+     */
+    javax.naming.ldap.ExtendedRequest toJndi( ExtendedRequest<?> modelRequest ) throws EncoderException;
     
     
     // ------------------------------------------------------------------------
-    // Extended Request/Response Methods
+    // Other Methods
     // ------------------------------------------------------------------------
 
     

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/api/MessageDecorator.java Mon Feb 21 02:02:24 2011
@@ -96,6 +96,7 @@ public abstract class MessageDecorator<E
     private final LdapCodecService codec;
 
     
+    @SuppressWarnings("unchecked")
     public static MessageDecorator<? extends Message> getDecorator( LdapCodecService codec, Message decoratedMessage )
     {
         if ( decoratedMessage instanceof MessageDecorator )
@@ -144,7 +145,7 @@ public abstract class MessageDecorator<E
                 break;
                 
             case EXTENDED_REQUEST:
-                decorator = new ExtendedRequestDecorator( codec, ( ExtendedRequest ) decoratedMessage );
+                decorator = new ExtendedRequestDecorator( codec, ( ExtendedRequest<ExtendedResponse> ) decoratedMessage );
                 break;
                 
             case EXTENDED_RESPONSE:

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -23,6 +23,7 @@ package org.apache.directory.shared.ldap
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.model.message.AbandonListener;
 import org.apache.directory.shared.ldap.model.message.AbandonableRequest;
+import org.apache.directory.shared.ldap.model.message.ResultResponse;
 
 
 /**
@@ -30,8 +31,8 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbandonableRequestDecorator<M extends AbandonableResultResponseRequest> 
-    extends ResultResponseRequestDecorator<M> 
+public abstract class AbandonableRequestDecorator<M extends AbandonableResultResponseRequest<R>, R extends ResultResponse> 
+    extends ResultResponseRequestDecorator<M,R> 
     implements AbandonableRequest
 {
     /**

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequest.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequest.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequest.java Mon Feb 21 02:02:24 2011
@@ -20,6 +20,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.message.AbandonableRequest;
+import org.apache.directory.shared.ldap.model.message.ResultResponse;
 import org.apache.directory.shared.ldap.model.message.ResultResponseRequest;
 
 
@@ -28,6 +29,6 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface AbandonableResultResponseRequest extends ResultResponseRequest, AbandonableRequest
+public interface AbandonableResultResponseRequest<R extends ResultResponse> extends ResultResponseRequest<R>, AbandonableRequest
 {
 }

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AbandonableResultResponseRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -30,8 +30,8 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbandonableResultResponseRequestDecorator<M extends AbandonableResultResponseRequest> 
-    extends AbandonableRequestDecorator<M> implements ResultResponseRequest
+public abstract class AbandonableResultResponseRequestDecorator<M extends AbandonableResultResponseRequest<R>, 
+    R extends ResultResponse> extends AbandonableRequestDecorator<M,R> implements ResultResponseRequest<R>
 {
     /**
      * Makes Request a MessageDecorator.
@@ -56,7 +56,7 @@ public abstract class AbandonableResultR
     /**
      * {@inheritDoc}
      */
-    public ResultResponse getResultResponse()
+    public R getResultResponse()
     {
         return getDecorated().getResultResponse();
     }

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -37,6 +37,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
+import org.apache.directory.shared.ldap.model.message.AddResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 
 
@@ -45,7 +46,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public final class AddRequestDecorator extends SingleReplyRequestDecorator<AddRequest> implements AddRequest
+public final class AddRequestDecorator extends SingleReplyRequestDecorator<AddRequest,AddResponse> implements AddRequest
 {
     /** The add request length */
     private int addRequestLength;

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/BindRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -30,6 +30,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapConstants;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
+import org.apache.directory.shared.ldap.model.message.BindResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.util.Strings;
 
@@ -39,7 +40,7 @@ import org.apache.directory.shared.util.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindRequestDecorator extends SingleReplyRequestDecorator<BindRequest> 
+public class BindRequestDecorator extends SingleReplyRequestDecorator<BindRequest,BindResponse> 
     implements BindRequest
 {
     /** The bind request length */

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/CompareRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -32,6 +32,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.BinaryValue;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.message.CompareRequest;
+import org.apache.directory.shared.ldap.model.message.CompareResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.util.Strings;
 
@@ -41,7 +42,7 @@ import org.apache.directory.shared.util.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareRequestDecorator extends SingleReplyRequestDecorator<CompareRequest> 
+public class CompareRequestDecorator extends SingleReplyRequestDecorator<CompareRequest, CompareResponse> 
     implements CompareRequest
 {
     /** The bytes of the attribute id used in the comparison */

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/DeleteRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -29,6 +29,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapConstants;
 import org.apache.directory.shared.ldap.model.message.DeleteRequest;
+import org.apache.directory.shared.ldap.model.message.DeleteResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 
 
@@ -37,7 +38,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DeleteRequestDecorator extends SingleReplyRequestDecorator<DeleteRequest> 
+public class DeleteRequestDecorator extends SingleReplyRequestDecorator<DeleteRequest, DeleteResponse> 
     implements DeleteRequest
 {
     /**

Modified: directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java?rev=1072822&r1=1072821&r2=1072822&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java (original)
+++ directory/shared/branches/akarasulu/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyDnRequestDecorator.java Mon Feb 21 02:02:24 2011
@@ -30,6 +30,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapConstants;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.util.Strings;
@@ -40,7 +41,7 @@ import org.apache.directory.shared.util.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDnRequestDecorator extends SingleReplyRequestDecorator<ModifyDnRequest> 
+public class ModifyDnRequestDecorator extends SingleReplyRequestDecorator<ModifyDnRequest,ModifyDnResponse> 
     implements ModifyDnRequest
 {
     /** The modify Dn request length */



Mime
View raw message