directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1065306 [1/3] - in /directory/shared/trunk: dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/rep...
Date Sun, 30 Jan 2011 15:42:39 GMT
Author: akarasulu
Date: Sun Jan 30 15:42:36 2011
New Revision: 1065306

URL: http://svn.apache.org/viewvc?rev=1065306&view=rev
Log:
got all of shared to compile

Modified:
    directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ParserUtils.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResultResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java
    directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
    directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/IDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaITDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/LdapResultDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchFactory.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesFactory.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/TestCodecControl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java

Modified: directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java (original)
+++ directory/shared/trunk/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java Sun Jan 30 15:42:36 2011
@@ -308,49 +308,49 @@ public class Dsmlv2Engine
 
             case ADD_REQUEST:
                 AddResponse response = connection.add( ( AddRequest ) request );
-                AddResponseDsml addResponseDsml = new AddResponseDsml( response );
+                AddResponseDsml addResponseDsml = new AddResponseDsml( connection.getCodecService(), response );
                 batchResponse.addResponse( addResponseDsml );
 
                 break;
 
             case BIND_REQUEST:
                 BindResponse bindResponse = connection.bind( ( BindRequest ) request );
-                AuthResponseDsml authResponseDsml = new AuthResponseDsml( bindResponse );
+                AuthResponseDsml authResponseDsml = new AuthResponseDsml( connection.getCodecService(), bindResponse );
                 batchResponse.addResponse( authResponseDsml );
 
                 break;
 
             case COMPARE_REQUEST:
                 CompareResponse compareResponse = connection.compare( ( CompareRequest ) request );
-                CompareResponseDsml compareResponseDsml = new CompareResponseDsml( compareResponse );
+                CompareResponseDsml compareResponseDsml = new CompareResponseDsml( connection.getCodecService(), compareResponse );
                 batchResponse.addResponse( compareResponseDsml );
 
                 break;
 
             case DEL_REQUEST:
                 DeleteResponse delResponse = connection.delete( ( DeleteRequest ) request );
-                DelResponseDsml delResponseDsml = new DelResponseDsml( delResponse );
+                DelResponseDsml delResponseDsml = new DelResponseDsml( connection.getCodecService(), delResponse );
                 batchResponse.addResponse( delResponseDsml );
 
                 break;
 
             case EXTENDED_REQUEST:
                 ExtendedResponse extendedResponse = connection.extended( ( ExtendedRequest ) request );
-                ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( extendedResponse );
+                ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( connection.getCodecService(), extendedResponse );
                 batchResponse.addResponse( extendedResponseDsml );
 
                 break;
 
             case MODIFY_REQUEST:
                 ModifyResponse modifyResponse = connection.modify( ( ModifyRequest ) request );
-                ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( modifyResponse );
+                ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( connection.getCodecService(), modifyResponse );
                 batchResponse.addResponse( modifyResponseDsml );
 
                 break;
 
             case MODIFYDN_REQUEST:
                 ModifyDnResponse modifyDnResponse = connection.modifyDn( ( ModifyDnRequest ) request );
-                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( modifyDnResponse );
+                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( connection.getCodecService(), modifyDnResponse );
                 batchResponse.addResponse( modDNResponseDsml );
 
                 break;
@@ -369,8 +369,9 @@ public class Dsmlv2Engine
                     {
                         SearchResultEntry searchResultEntry = ( SearchResultEntry ) searchResponse;
 
-                        SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( searchResultEntry );
-                        searchResponseDsml = new SearchResponseDsml( searchResultEntryDsml );
+                        SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( 
+                            connection.getCodecService(), searchResultEntry );
+                        searchResponseDsml = new SearchResponseDsml( connection.getCodecService(), searchResultEntryDsml );
 
                         if ( requestID > 0 )
                         {
@@ -384,8 +385,8 @@ public class Dsmlv2Engine
                         SearchResultReference searchResultReference = ( SearchResultReference ) searchResponse;
 
                         SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml(
-                            searchResultReference );
-                        searchResponseDsml = new SearchResponseDsml( searchResultReferenceDsml );
+                            connection.getCodecService(), searchResultReference );
+                        searchResponseDsml = new SearchResponseDsml( connection.getCodecService(), searchResultReferenceDsml );
 
                         if ( requestID > 0 )
                         {

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=1065306&r1=1065305&r2=1065306&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 Sun Jan 30 15:42:36 2011
@@ -34,6 +34,8 @@ 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.ICodecControl;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.util.Base64;
@@ -212,7 +214,7 @@ public final class ParserUtils
      * @param element the element to add the Controls to
      * @param controls a List of Controls
      */
-    public static void addControls( Element element, Collection<Control> controls )
+    public static void addControls( ILdapCodecService codec, Element element, Collection<Control> controls )
     {
         if ( controls != null )
         {
@@ -230,8 +232,16 @@ public final class ParserUtils
                     controlElement.addAttribute( "criticality", "true" );
                 }
 
-                byte[] value = control.getValue();
-
+                byte[] value;
+                if ( control instanceof ICodecControl<?> )
+                {
+                    value = ( ( ICodecControl<?> ) control ).getValue();
+                }
+                else
+                {
+                    value = codec.decorate( control ).getValue();
+                }
+                
                 if ( value != null )
                 {
                     if ( ParserUtils.needsBase64Encoding( value ) )

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResponseDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResponseDsml.java Sun Jan 30 15:42:36 2011
@@ -20,6 +20,9 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
+import java.nio.ByteBuffer;
+
+import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.ICodecControl;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
@@ -113,4 +116,16 @@ public abstract class AbstractResponseDs
 
     }
 
+
+    public int computeLength()
+    {
+        return 0;
+    }
+
+
+    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    {
+        return null;
+    }
+
 }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResultResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResultResponseDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResultResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AbstractResultResponseDsml.java Sun Jan 30 15:42:36 2011
@@ -20,6 +20,9 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
+import java.nio.ByteBuffer;
+
+import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.ICodecControl;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
@@ -113,4 +116,16 @@ public abstract class AbstractResultResp
 
     }
 
+
+    public int computeLength()
+    {
+        return 0;
+    }
+
+
+    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    {
+        return null;
+    }
+
 }

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=1065306&r1=1065305&r2=1065306&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 Sun Jan 30 15:42:36 2011
@@ -72,7 +72,8 @@ public class AddResponseDsml extends Abs
     {
         Element element = root.addElement( "addResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( AddResponse ) getDecorated() ).getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(), 
+            getDecorated().getLdapResult(), getDecorated() );
         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=1065306&r1=1065305&r2=1065306&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 Sun Jan 30 15:42:36 2011
@@ -72,7 +72,8 @@ public class AuthResponseDsml extends Ab
     {
         Element element = root.addElement( "authResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( BindResponse ) getDecorated() ).getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(), 
+            getDecorated().getLdapResult(), getDecorated() );
         ldapResultDsml.toDsml( element );
         return element;
     }

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=1065306&r1=1065305&r2=1065306&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 Sun Jan 30 15:42:36 2011
@@ -72,7 +72,8 @@ public class CompareResponseDsml extends
     {
         Element element = root.addElement( "compareResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( CompareResponse ) getDecorated() ).getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(), 
+            getDecorated().getLdapResult(), getDecorated() );
         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=1065306&r1=1065305&r2=1065306&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 Sun Jan 30 15:42:36 2011
@@ -72,7 +72,8 @@ public class DelResponseDsml extends Abs
     {
         Element element = root.addElement( "delResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( (DeleteResponse) getDecorated() ).getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(), 
+            getDecorated().getLdapResult(), getDecorated() );
         ldapResultDsml.toDsml( element );
         return element;
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java Sun Jan 30 15:42:36 2011
@@ -40,9 +40,8 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.reponse.ErrorResponse.ErrorResponseType;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ICodecControl;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
-import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
-import org.apache.directory.shared.ldap.codec.controls.ControlImpl;
 import org.apache.directory.shared.ldap.codec.decorators.AddResponseDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.BindResponseDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.CompareResponseDecorator;
@@ -61,6 +60,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.model.message.BindResponseImpl;
 import org.apache.directory.shared.ldap.model.message.CompareResponseImpl;
+import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.DeleteResponseImpl;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl;
@@ -76,6 +76,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
+import org.apache.directory.shared.ldap.model.message.controls.BasicControl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.util.Base64;
 import org.apache.directory.shared.util.Strings;
@@ -1200,7 +1201,7 @@ public final class Dsmlv2ResponseGrammar
      */
     private void createAndAddControl( Dsmlv2Container container, Message parent ) throws XmlPullParserException
     {
-        ControlDecorator control = null;
+        ICodecControl<? extends Control> control = null;
 
         XmlPullParser xpp = container.getParser();
 
@@ -1216,7 +1217,7 @@ public final class Dsmlv2ResponseGrammar
                 throw new XmlPullParserException( I18n.err( I18n.ERR_03006 ), xpp, null );
             }
 
-            control = new ControlDecorator( new ControlImpl( attributeValue ) );
+            control = codec.decorate( new BasicControl( attributeValue ) );
             parent.addControl( control );
         }
         else
@@ -1299,7 +1300,7 @@ public final class Dsmlv2ResponseGrammar
      */
     private void createAndAddControlValue( Dsmlv2Container container, Message parent ) throws XmlPullParserException
     {
-        ControlDecorator control = (ControlDecorator)((MessageDecorator)parent).getCurrentControl();
+        ICodecControl<? extends Control> control = ( ( MessageDecorator<?> ) parent ).getCurrentControl();
 
         XmlPullParser xpp = container.getParser();
         try

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java Sun Jan 30 15:42:36 2011
@@ -79,7 +79,8 @@ public class ExtendedResponseDsml extend
         ExtendedResponse extendedResponse = ( ExtendedResponse ) getDecorated();
 
         // LDAP Result
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( extendedResponse.getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(), 
+            getDecorated().getLdapResult(), getDecorated() );
         ldapResultDsml.toDsml( element );
 
         // ResponseName

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/LdapResultDsml.java Sun Jan 30 15:42:36 2011
@@ -26,6 +26,7 @@ import java.util.List;
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.dsmlv2.ParserUtils;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.LdapResult;
 import org.apache.directory.shared.ldap.model.message.Message;
@@ -47,6 +48,9 @@ public class LdapResultDsml implements D
 
     /** The associated LDAP Message */
     private Message message;
+    
+    /** The ldap codec service */
+    private ILdapCodecService codec;
 
 
     /**
@@ -56,9 +60,11 @@ public class LdapResultDsml implements D
      *      the LdapResult to decorate
      * @param message
      *      the associated message
+     * @param the ldap codec service 
      */
-    public LdapResultDsml( LdapResult result, Message message )
+    public LdapResultDsml( ILdapCodecService codec, LdapResult result, Message message )
     {
+        this.codec = codec;
         this.result = result;
         this.message = message;
     }
@@ -86,7 +92,7 @@ public class LdapResultDsml implements D
         }
 
         // Controls
-        ParserUtils.addControls( root, message.getControls().values() );
+        ParserUtils.addControls( codec, root, message.getControls().values() );
 
         // ResultCode
         Element resultCodeElement = root.addElement( "resultCode" );

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java Sun Jan 30 15:42:36 2011
@@ -72,7 +72,8 @@ public class ModDNResponseDsml extends A
     {
         Element element = root.addElement( "modDNResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( ModifyDnResponse ) getDecorated() ).getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(), 
+            getDecorated().getLdapResult(), getDecorated() );
         ldapResultDsml.toDsml( element );
         return element;
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java Sun Jan 30 15:42:36 2011
@@ -72,7 +72,8 @@ public class ModifyResponseDsml extends 
     {
         Element element = root.addElement( "modifyResponse" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( (ModifyResponse) getDecorated() ).getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = new LdapResultDsml( getCodecService(), 
+            getDecorated().getLdapResult(), getDecorated() );
         ldapResultDsml.toDsml( element );
         return element;
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java Sun Jan 30 15:42:36 2011
@@ -71,7 +71,8 @@ public class SearchResultDoneDsml extend
     {
         Element element = root.addElement( "searchResultDone" );
 
-        LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( SearchResultDone ) getDecorated() ).getLdapResult(), getDecorated() );
+        LdapResultDsml ldapResultDsml = 
+            new LdapResultDsml( getCodecService(), getDecorated().getLdapResult(), getDecorated() );
         if ( ldapResultDsml != null )
         {
             ldapResultDsml.toDsml( element );

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java Sun Jan 30 15:42:36 2011
@@ -20,6 +20,9 @@
 package org.apache.directory.shared.dsmlv2.request;
 
 
+import java.nio.ByteBuffer;
+
+import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.dsmlv2.ParserUtils;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
@@ -67,7 +70,7 @@ public abstract class AbstractRequestDsm
         }
 
         // Controls
-        ParserUtils.addControls( element, getDecorated().getControls().values() );
+        ParserUtils.addControls( getCodecService(), element, getDecorated().getControls().values() );
 
         return element;
     }
@@ -114,4 +117,16 @@ public abstract class AbstractRequestDsm
                 return "error";
         }
     }
+
+
+    public int computeLength()
+    {
+        return 0;
+    }
+
+
+    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    {
+        return null;
+    }
 }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java Sun Jan 30 15:42:36 2011
@@ -41,9 +41,9 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
 import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ICodecControl;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.AbandonRequestDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.AddRequestDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.BindRequestDecorator;
@@ -74,6 +74,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.BindRequestImpl;
 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.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;
@@ -81,6 +82,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
 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.controls.BasicControl;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.util.Base64;
@@ -2731,9 +2733,8 @@ public final class Dsmlv2Grammar extends
     {
         public void action( Dsmlv2Container container ) throws XmlPullParserException
         {
-            ControlDecorator control = null;
-
             XmlPullParser xpp = container.getParser();
+            ICodecControl<? extends Control> control;
 
             // Checking and adding the Control's attributes
             String attributeValue;
@@ -2747,7 +2748,7 @@ public final class Dsmlv2Grammar extends
                     throw new XmlPullParserException( I18n.err( I18n.ERR_03034 ), xpp, null );
                 }
 
-                control = new ControlDecorator( new ControlImpl( attributeValue ) );
+                control = codec.decorate( new BasicControl( attributeValue ) );
                 container.getBatchRequest().getCurrentRequest().addControl( control );
             }
             else
@@ -2783,7 +2784,8 @@ public final class Dsmlv2Grammar extends
     {
         public void action( Dsmlv2Container container ) throws XmlPullParserException
         {
-            ControlDecorator control = (ControlDecorator)((MessageDecorator)container.getBatchRequest().getCurrentRequest()).getCurrentControl();
+            MessageDecorator<?> messageDecorator = ( MessageDecorator<?> ) container.getBatchRequest().getCurrentRequest();
+            ICodecControl<? extends Control> control = messageDecorator.getCurrentControl();
 
             XmlPullParser xpp = container.getParser();
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractResponseTest.java Sun Jan 30 15:42:36 2011
@@ -31,7 +31,7 @@ import static org.junit.Assert.fail;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractResponseTest
+public abstract class AbstractResponseTest extends AbstractTest
 {
     /**
      * Asserts that parsing throws a correct XmlPullParserException due to an incorrect file

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java Sun Jan 30 15:42:36 2011
@@ -22,6 +22,8 @@ package org.apache.directory.shared.dsml
 
 
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.xmlpull.v1.XmlPullParserException;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -33,6 +35,16 @@ import static org.junit.Assert.fail;
  */
 public abstract class AbstractTest
 {
+    /** The LDAP encoder decoder service */
+    private ILdapCodecService codec = new DefaultLdapCodecService();
+    
+    
+    public ILdapCodecService getCodec()
+    {
+        return codec;
+    }
+    
+    
     /**
      * Asserts that parsing throws a correct XmlPullParserException due to an incorrect file
      *

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java Sun Jan 30 15:42:36 2011
@@ -33,6 +33,8 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.model.message.AbandonRequest;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.util.Strings;
@@ -155,7 +157,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -191,7 +193,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -227,7 +229,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -263,7 +265,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -299,7 +301,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java Sun Jan 30 15:42:36 2011
@@ -53,6 +53,7 @@ import org.junit.runner.RunWith;
 @Concurrent()
 public class AddRequestTest extends AbstractTest
 {
+    
     /**
      * Test parsing of a request without the dn attribute
      */
@@ -156,7 +157,7 @@ public class AddRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -191,7 +192,7 @@ public class AddRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -226,7 +227,7 @@ public class AddRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -260,7 +261,7 @@ public class AddRequestTest extends Abst
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -295,7 +296,7 @@ public class AddRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java Sun Jan 30 15:42:36 2011
@@ -123,7 +123,7 @@ public class AddResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -158,7 +158,7 @@ public class AddResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -192,7 +192,7 @@ public class AddResponseTest extends Abs
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -227,7 +227,7 @@ public class AddResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java Sun Jan 30 15:42:36 2011
@@ -153,7 +153,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -188,7 +188,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -223,7 +223,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -257,7 +257,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -292,7 +292,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java Sun Jan 30 15:42:36 2011
@@ -123,7 +123,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -158,7 +158,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -193,7 +193,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -228,7 +228,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java Sun Jan 30 15:42:36 2011
@@ -155,7 +155,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -190,7 +190,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -225,7 +225,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -260,7 +260,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -295,7 +295,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java Sun Jan 30 15:42:36 2011
@@ -124,7 +124,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -159,7 +159,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -194,7 +194,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -229,7 +229,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java Sun Jan 30 15:42:36 2011
@@ -152,7 +152,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -187,7 +187,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -222,7 +222,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -256,7 +256,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -291,7 +291,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java Sun Jan 30 15:42:36 2011
@@ -123,7 +123,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -158,7 +158,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -192,7 +192,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -227,7 +227,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java Sun Jan 30 15:42:36 2011
@@ -118,7 +118,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -153,7 +153,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -188,7 +188,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -223,7 +223,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -258,7 +258,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java Sun Jan 30 15:42:36 2011
@@ -126,7 +126,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -161,7 +161,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -196,7 +196,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -231,7 +231,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java Sun Jan 30 15:42:36 2011
@@ -117,7 +117,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -152,7 +152,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -187,7 +187,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -222,7 +222,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -257,7 +257,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java Sun Jan 30 15:42:36 2011
@@ -124,7 +124,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -159,7 +159,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -194,7 +194,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -229,7 +229,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java Sun Jan 30 15:42:36 2011
@@ -124,7 +124,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -159,7 +159,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -194,7 +194,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -229,7 +229,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -264,7 +264,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java Sun Jan 30 15:42:36 2011
@@ -124,7 +124,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -159,7 +159,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -194,7 +194,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -229,7 +229,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java Sun Jan 30 15:42:36 2011
@@ -170,7 +170,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -205,7 +205,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -240,7 +240,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -275,7 +275,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -310,7 +310,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java Sun Jan 30 15:42:36 2011
@@ -88,7 +88,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -124,7 +124,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -160,7 +160,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -196,7 +196,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java Sun Jan 30 15:42:36 2011
@@ -87,7 +87,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -123,7 +123,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 
@@ -159,7 +159,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) control.getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
     }
 
 
@@ -195,7 +195,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( control.hasValue() );
+        assertFalse( getCodec().decorate( control ).hasValue() );
     }
 
 



Mime
View raw message