directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1743011 [3/13] - in /directory/shared/branches/shared-value: dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/ dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/response/ dsml/parser/src/test/java/org/apache/direct...
Date Mon, 09 May 2016 17:22:21 GMT
Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java Mon May  9 17:22:19 2016
@@ -47,8 +47,8 @@ public class AttributeValueAssertion
     /** The attribute description */
     private String attributeDesc;
 
-    /** The assertion value */
-    private Value assertionValue;
+    /** The assertion as we received it */
+    private byte[] assertion;
 
 
     /**
@@ -89,31 +89,6 @@ public class AttributeValueAssertion
     }
 
 
-    // ~ Methods
-    // ------------------------------------------------------------------------------------
-
-    /**
-     * Get the assertion value
-     * 
-     * @return Returns the assertionValue.
-     */
-    public Value getAssertionValue()
-    {
-        return assertionValue;
-    }
-
-
-    /**
-     * Set the assertion value
-     * 
-     * @param assertionValue The assertionValue to set.
-     */
-    public void setAssertionValue( Value assertionValue )
-    {
-        this.assertionValue = assertionValue;
-    }
-
-
     /**
      * Get the attribute description
      * 
@@ -150,7 +125,7 @@ public class AttributeValueAssertion
         sb.append( tabs ).append( "    Assertion description : '" );
         sb.append( attributeDesc != null ? attributeDesc : "null" );
         sb.append( "'\n" );
-        sb.append( tabs ).append( "    Assertion value : '" ).append( dumpObject( assertionValue ) ).append( "'\n" );
+        sb.append( tabs ).append( "    Assertion value : '" ).append( dumpObject( assertion ) ).append( "'\n" );
 
         return sb.toString();
     }
@@ -191,12 +166,34 @@ public class AttributeValueAssertion
                 throw new IllegalArgumentException( "Unexpected filter type: " + filterType );
         }
 
-        sb.append( dumpObject( assertionValue ) );
+        sb.append( dumpObject( assertion ) );
 
         return sb.toString();
     }
 
 
+    /**
+     * @return the assertion
+     */
+    public byte[] getAssertion()
+    {
+        return assertion;
+    }
+
+
+    /**
+     * @param assertion the assertion to set
+     */
+    public void setAssertion( byte[] assertion )
+    {
+        if ( assertion != null )
+        {
+            this.assertion = new byte[assertion.length];
+            System.arraycopy( assertion, 0, this.assertion, 0, assertion.length );
+        }
+    }
+
+
     /**
      * Get a String representation of an AttributeValueAssertion
      * 

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitAssertionValueFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitAssertionValueFilter.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitAssertionValueFilter.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitAssertionValueFilter.java Mon May  9 17:22:19 2016
@@ -27,8 +27,6 @@ import org.apache.directory.api.ldap.cod
 import org.apache.directory.api.ldap.codec.api.LdapMessageContainer;
 import org.apache.directory.api.ldap.codec.decorators.SearchRequestDecorator;
 import org.apache.directory.api.ldap.codec.search.AttributeValueAssertionFilter;
-import org.apache.directory.api.ldap.model.entry.Value;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -67,46 +65,19 @@ public class InitAssertionValueFilter ex
         TLV tlv = container.getCurrentTLV();
 
         // The value can be null.
-        Value assertionValue = null;
-
-        if ( tlv.getLength() != 0 )
-        {
-            assertionValue = new Value( tlv.getValue().getData() );
-        }
-        else
-        {
-            assertionValue = new Value( StringConstants.EMPTY_BYTES );
-        }
-
+        byte[] assertion = tlv.getValue().getData();
+        
         AttributeValueAssertionFilter terminalFilter = ( AttributeValueAssertionFilter )
             searchRequestDecorator.getTerminalFilter();
-        AttributeValueAssertion assertion = terminalFilter.getAssertion();
+        AttributeValueAssertion attributeValueAssertion = terminalFilter.getAssertion();
 
-        if ( container.isBinary( assertion.getAttributeDesc() ) )
+        if ( assertion == null )
         {
-            if ( tlv.getLength() != 0 )
-            {
-                assertionValue = new Value( tlv.getValue().getData() );
-            }
-            else
-            {
-                assertionValue = new Value( StringConstants.EMPTY_BYTES );
-            }
-
-            assertion.setAssertionValue( assertionValue );
+            attributeValueAssertion.setAssertion( Strings.EMPTY_BYTES );
         }
         else
         {
-            if ( tlv.getLength() != 0 )
-            {
-                assertionValue = new Value( Strings.utf8ToString( tlv.getValue().getData() ) );
-            }
-            else
-            {
-                assertionValue = new Value( "" );
-            }
-
-            assertion.setAssertionValue( assertionValue );
+            attributeValueAssertion.setAssertion( assertion );
         }
 
         // We now have to get back to the nearest filter which is

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitExtensibleMatchFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitExtensibleMatchFilter.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitExtensibleMatchFilter.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitExtensibleMatchFilter.java Mon May  9 17:22:19 2016
@@ -26,7 +26,6 @@ import org.apache.directory.api.ldap.cod
 import org.apache.directory.api.ldap.codec.decorators.SearchRequestDecorator;
 import org.apache.directory.api.ldap.codec.search.ExtensibleMatchFilter;
 import org.apache.directory.api.ldap.codec.search.Filter;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitOrFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitOrFilter.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitOrFilter.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitOrFilter.java Mon May  9 17:22:19 2016
@@ -28,7 +28,6 @@ import org.apache.directory.api.ldap.cod
 import org.apache.directory.api.ldap.codec.decorators.SearchRequestDecorator;
 import org.apache.directory.api.ldap.codec.search.Filter;
 import org.apache.directory.api.ldap.codec.search.OrFilter;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/CompareRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/CompareRequestDecorator.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/CompareRequestDecorator.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/CompareRequestDecorator.java Mon May  9 17:22:19 2016
@@ -56,6 +56,9 @@ public class CompareRequestDecorator ext
 
     /** The attribute value assertion length */
     private int avaLength;
+    
+    /** The DN as a byte[] */
+    private byte[] dnBytes;
 
 
     /**
@@ -207,8 +210,8 @@ public class CompareRequestDecorator ext
     public int computeLength()
     {
         // The entry Dn
-        Dn entry = getName();
-        compareRequestLength = 1 + TLV.getNbBytes( Dn.getNbBytes( entry ) ) + Dn.getNbBytes( entry );
+        dnBytes = Strings.getBytesUtf8( getName().getName() );
+        compareRequestLength = 1 + TLV.getNbBytes( dnBytes.length ) + dnBytes.length;
 
         // The attribute value assertion
         attrIdBytes = Strings.getBytesUtf8( getAttributeId() );
@@ -223,7 +226,7 @@ public class CompareRequestDecorator ext
         }
         else
         {
-            attrValBytes = Strings.getBytesUtf8( getAssertionValue().getString() );
+            attrValBytes = Strings.getBytesUtf8( getAssertionValue().getValue() );
             avaLength += 1 + TLV.getNbBytes( attrValBytes.length ) + attrValBytes.length;
         }
 
@@ -254,7 +257,7 @@ public class CompareRequestDecorator ext
             buffer.put( TLV.getBytes( compareRequestLength ) );
 
             // The entry
-            BerValue.encode( buffer, Dn.getBytes( getName() ) );
+            BerValue.encode( buffer, dnBytes );
 
             // The attributeValueAssertion sequence Tag
             buffer.put( UniversalTag.SEQUENCE.getValue() );

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyDnRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyDnRequestDecorator.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyDnRequestDecorator.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyDnRequestDecorator.java Mon May  9 17:22:19 2016
@@ -46,6 +46,12 @@ public class ModifyDnRequestDecorator ex
 {
     /** The modify Dn request length */
     private int modifyDnRequestLength;
+    
+    /** The DN as a byte[] */
+    private byte[] dnBytes;
+    
+    /** The new superior as a byte[] */
+    private byte[] newSuperiorBytes;
 
 
     /**
@@ -221,14 +227,14 @@ public class ModifyDnRequestDecorator ex
         int newRdnlength = Strings.getBytesUtf8( getNewRdn().getName() ).length;
 
         // deleteOldRDN
-        modifyDnRequestLength = 1 + TLV.getNbBytes( Dn.getNbBytes( getName() ) )
-            + Dn.getNbBytes( getName() ) + 1 + TLV.getNbBytes( newRdnlength ) + newRdnlength + 1 + 1
-            + 1;
+        dnBytes = Strings.getBytesUtf8( getName().getName() );
+        modifyDnRequestLength = 1 + TLV.getNbBytes( dnBytes.length ) + dnBytes.length + 1 + TLV.getNbBytes( newRdnlength ) 
+            + newRdnlength + 1 + 1 + 1;
 
         if ( getNewSuperior() != null )
         {
-            modifyDnRequestLength += 1 + TLV.getNbBytes( Dn.getNbBytes( getNewSuperior() ) )
-                + Dn.getNbBytes( getNewSuperior() );
+            newSuperiorBytes = Strings.getBytesUtf8( getNewSuperior().getName() );
+            modifyDnRequestLength += 1 + TLV.getNbBytes( newSuperiorBytes.length ) + newSuperiorBytes.length;
         }
 
         return 1 + TLV.getNbBytes( modifyDnRequestLength ) + modifyDnRequestLength;
@@ -259,7 +265,7 @@ public class ModifyDnRequestDecorator ex
 
             // The entry
 
-            BerValue.encode( buffer, Dn.getBytes( getName() ) );
+            BerValue.encode( buffer, dnBytes );
 
             // The newRDN
             BerValue.encode( buffer, getNewRdn().getName() );
@@ -273,13 +279,13 @@ public class ModifyDnRequestDecorator ex
                 // Encode the reference
                 buffer.put( ( byte ) LdapCodecConstants.MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG );
 
-                int newSuperiorLength = Dn.getNbBytes( getNewSuperior() );
+                int newSuperiorLength = newSuperiorBytes.length;
 
                 buffer.put( TLV.getBytes( newSuperiorLength ) );
 
                 if ( newSuperiorLength != 0 )
                 {
-                    buffer.put( Dn.getBytes( getNewSuperior() ) );
+                    buffer.put( newSuperiorBytes );
                 }
             }
         }

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java Mon May  9 17:22:19 2016
@@ -43,6 +43,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.message.Control;
 import org.apache.directory.api.ldap.model.message.ModifyRequest;
 import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.util.Strings;
 
 
 /**
@@ -73,6 +74,9 @@ public class ModifyRequestDecorator exte
 
     /** A local storage for the operation */
     private ModificationOperation currentOperation;
+    
+    /** The DN as a byte[] */
+    private byte[] dnBytes;
 
 
     /**
@@ -376,6 +380,7 @@ public class ModifyRequestDecorator exte
      * 
      * ModifyRequest :
      * 
+     * <pre>
      * 0x66 L1
      *  |
      *  +--> 0x04 L2 object
@@ -410,12 +415,13 @@ public class ModifyRequestDecorator exte
      *                          +--> 0x04 L8-2-i attributeValue
      *                          +--> ...
      *                          +--> 0x04 L8-2-n attributeValue
+     * </pre>
      */
     public int computeLength()
     {
         // Initialized with name
-        modifyRequestLength = 1 + TLV.getNbBytes( Dn.getNbBytes( getName() ) )
-            + Dn.getNbBytes( getName() );
+        dnBytes = Strings.getBytesUtf8( getName().getName() );
+        modifyRequestLength = 1 + TLV.getNbBytes( dnBytes.length ) + dnBytes.length;
 
         // All the changes length
         changesLength = 0;
@@ -510,7 +516,7 @@ public class ModifyRequestDecorator exte
             buffer.put( TLV.getBytes( modifyRequestLength ) );
 
             // The entry
-            BerValue.encode( buffer, Dn.getBytes( getName() ) );
+            BerValue.encode( buffer, dnBytes );
 
             // The modifications sequence
             buffer.put( UniversalTag.SEQUENCE.getValue() );
@@ -556,7 +562,7 @@ public class ModifyRequestDecorator exte
                         {
                             if ( value.isHumanReadable() )
                             {
-                                BerValue.encode( buffer, value.getString() );
+                                BerValue.encode( buffer, value.getValue() );
                             }
                             else
                             {

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java Mon May  9 17:22:19 2016
@@ -370,22 +370,23 @@ public class SearchRequestDecorator exte
 
                     // Transform =, >=, <=, ~= filters
                     int filterType = ( ( AttributeValueAssertionFilter ) filter ).getFilterType();
+                    
                     switch ( filterType )
                     {
                         case LdapCodecConstants.EQUALITY_MATCH_FILTER:
-                            branch = new EqualityNode( ava.getAttributeDesc(), ava.getAssertionValue() );
+                            branch = new EqualityNode( ava.getAttributeDesc(), ava.getAssertion() );
                             break;
 
                         case LdapCodecConstants.GREATER_OR_EQUAL_FILTER:
-                            branch = new GreaterEqNode( ava.getAttributeDesc(), ava.getAssertionValue() );
+                            branch = new GreaterEqNode( ava.getAttributeDesc(), ava.getAssertion() );
                             break;
 
                         case LdapCodecConstants.LESS_OR_EQUAL_FILTER:
-                            branch = new LessEqNode( ava.getAttributeDesc(), ava.getAssertionValue() );
+                            branch = new LessEqNode( ava.getAttributeDesc(), ava.getAssertion() );
                             break;
 
                         case LdapCodecConstants.APPROX_MATCH_FILTER:
-                            branch = new ApproximateNode( ava.getAttributeDesc(), ava.getAssertionValue() );
+                            branch = new ApproximateNode( ava.getAttributeDesc(), ava.getAssertion() );
                             break;
 
                         default:
@@ -511,7 +512,7 @@ public class SearchRequestDecorator exte
                         filter = new AttributeValueAssertionFilter( LdapCodecConstants.EQUALITY_MATCH_FILTER );
                         AttributeValueAssertion assertion = new AttributeValueAssertion();
                         assertion.setAttributeDesc( ( ( EqualityNode<?> ) exprNode ).getAttribute() );
-                        assertion.setAssertionValue( ( ( EqualityNode<?> ) exprNode ).getValue() );
+                        assertion.setAssertion( ( ( EqualityNode<?> ) exprNode ).getValue().getBytes() );
                         ( ( AttributeValueAssertionFilter ) filter ).setAssertion( assertion );
                     }
                     else if ( exprNode instanceof GreaterEqNode<?> )
@@ -519,7 +520,7 @@ public class SearchRequestDecorator exte
                         filter = new AttributeValueAssertionFilter( LdapCodecConstants.GREATER_OR_EQUAL_FILTER );
                         AttributeValueAssertion assertion = new AttributeValueAssertion();
                         assertion.setAttributeDesc( ( ( GreaterEqNode<?> ) exprNode ).getAttribute() );
-                        assertion.setAssertionValue( ( ( GreaterEqNode<?> ) exprNode ).getValue() );
+                        assertion.setAssertion( ( ( GreaterEqNode<?> ) exprNode ).getValue().getBytes() );
                         ( ( AttributeValueAssertionFilter ) filter ).setAssertion( assertion );
                     }
                     else if ( exprNode instanceof LessEqNode<?> )
@@ -527,7 +528,7 @@ public class SearchRequestDecorator exte
                         filter = new AttributeValueAssertionFilter( LdapCodecConstants.LESS_OR_EQUAL_FILTER );
                         AttributeValueAssertion assertion = new AttributeValueAssertion();
                         assertion.setAttributeDesc( ( ( LessEqNode<?> ) exprNode ).getAttribute() );
-                        assertion.setAssertionValue( ( ( LessEqNode<?> ) exprNode ).getValue() );
+                        assertion.setAssertion( ( ( LessEqNode<?> ) exprNode ).getValue().getBytes() );
                         ( ( AttributeValueAssertionFilter ) filter ).setAssertion( assertion );
                     }
                     else if ( exprNode instanceof ApproximateNode<?> )
@@ -535,7 +536,7 @@ public class SearchRequestDecorator exte
                         filter = new AttributeValueAssertionFilter( LdapCodecConstants.APPROX_MATCH_FILTER );
                         AttributeValueAssertion assertion = new AttributeValueAssertion();
                         assertion.setAttributeDesc( ( ( ApproximateNode<?> ) exprNode ).getAttribute() );
-                        assertion.setAssertionValue( ( ( ApproximateNode<?> ) exprNode ).getValue() );
+                        assertion.setAssertion( ( ( ApproximateNode<?> ) exprNode ).getValue().getBytes() );
                         ( ( AttributeValueAssertionFilter ) filter ).setAssertion( assertion );
                     }
                 }

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java Mon May  9 17:22:19 2016
@@ -152,11 +152,11 @@ public class AttributeValueAssertionFilt
 
         avaLength = 1 + TLV.getNbBytes( attributeDescLength ) + attributeDescLength;
 
-        org.apache.directory.api.ldap.model.entry.Value assertionValue = assertion.getAssertionValue();
+        byte[] assertionBytes = assertion.getAssertion();
 
         int assertionValueLength = 0;
 
-        assertionValueLength = assertionValue.getBytes().length;
+        assertionValueLength = assertionBytes.length;
 
         avaLength += 1 + TLV.getNbBytes( assertionValueLength ) + assertionValueLength;
 
@@ -224,14 +224,7 @@ public class AttributeValueAssertionFilt
         BerValue.encode( buffer, assertion.getAttributeDesc() );
 
         // The assertion desc
-        if ( assertion.getAssertionValue().isHumanReadable() )
-        {
-            BerValue.encode( buffer, assertion.getAssertionValue().getString() );
-        }
-        else
-        {
-            BerValue.encode( buffer, assertion.getAssertionValue().getBytes() );
-        }
+        BerValue.encode( buffer, assertion.getAssertion() );
 
         return buffer;
     }

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/ExtensibleMatchFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/ExtensibleMatchFilter.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/ExtensibleMatchFilter.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/ExtensibleMatchFilter.java Mon May  9 17:22:19 2016
@@ -28,6 +28,7 @@ import org.apache.directory.api.asn1.ber
 import org.apache.directory.api.asn1.ber.tlv.TLV;
 import org.apache.directory.api.i18n.I18n;
 import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
+import org.apache.directory.api.ldap.model.entry.Value;
 import org.apache.directory.api.util.Strings;
 
 
@@ -56,7 +57,7 @@ public class ExtensibleMatchFilter exten
     private byte[] typeBytes;
 
     /** Matching rule value */
-    private org.apache.directory.api.ldap.model.entry.Value matchValue;
+    private Value matchValue;
 
     /** The dnAttributes flag */
     private boolean dnAttributes = false;
@@ -139,7 +140,7 @@ public class ExtensibleMatchFilter exten
      * 
      * @return Returns the matchValue.
      */
-    public org.apache.directory.api.ldap.model.entry.Value getMatchValue()
+    public Value getMatchValue()
     {
         return matchValue;
     }
@@ -150,7 +151,7 @@ public class ExtensibleMatchFilter exten
      * 
      * @param matchValue The matchValue to set.
      */
-    public void setMatchValue( org.apache.directory.api.ldap.model.entry.Value matchValue )
+    public void setMatchValue( Value matchValue )
     {
         this.matchValue = matchValue;
     }

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/add/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/add/AddRequestTest.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/add/AddRequestTest.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/add/AddRequestTest.java Mon May  9 17:22:19 2016
@@ -1069,7 +1069,7 @@ public class AddRequestTest extends Abst
 
         for ( Value value : attribute )
         {
-            assertEquals( "", value.getString() );
+            assertEquals( "", value.getValue() );
         }
 
         // Check the encoding
@@ -1223,7 +1223,7 @@ public class AddRequestTest extends Abst
 
         for ( Value value : attribute )
         {
-            assertEquals( "", value.getString() );
+            assertEquals( "", value.getValue() );
         }
 
         // Check the Control

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java Mon May  9 17:22:19 2016
@@ -672,7 +672,7 @@ public class SearchRequestMatchingRuleAs
 
         assertEquals( "test", extensibleNode.getMatchingRuleId() );
         assertNull( extensibleNode.getAttribute() );
-        assertNull( extensibleNode.getValue().getValue() );
+        assertEquals( "", extensibleNode.getValue().getValue() );
         assertFalse( extensibleNode.hasDnAttributes() );
 
         List<String> attributes = searchRequest.getAttributes();
@@ -1239,7 +1239,7 @@ public class SearchRequestMatchingRuleAs
 
         assertNull( extensibleNode.getMatchingRuleId() );
         assertNull( extensibleNode.getAttribute() );
-        assertEquals( "test", extensibleNode.getValue().getString() );
+        assertEquals( "test", extensibleNode.getValue().getValue() );
         assertFalse( extensibleNode.hasDnAttributes() );
 
         List<String> attributes = searchRequest.getAttributes();

Modified: directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestTest.java?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestTest.java (original)
+++ directory/shared/branches/shared-value/ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestTest.java Mon May  9 17:22:19 2016
@@ -338,14 +338,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "objectclass", equalityNode.getAttribute() );
-        assertEquals( "top", equalityNode.getValue().getString() );
+        assertEquals( "top", equalityNode.getValue().getValue() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (...
         equalityNode = ( EqualityNode<?> ) orNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "ou", equalityNode.getAttribute() );
-        assertEquals( "contacts", equalityNode.getValue().getString() );
+        assertEquals( "contacts", equalityNode.getValue().getValue() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (! ...
         NotNode notNode = ( NotNode ) andNodes.get( 1 );
@@ -356,7 +356,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "objectclass", equalityNode.getAttribute() );
-        assertEquals( "ttt", equalityNode.getValue().getString() );
+        assertEquals( "ttt", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
 
@@ -609,14 +609,14 @@ public class SearchRequestTest extends A
         assertNotNull( approxNode );
 
         assertEquals( "objectclass", approxNode.getAttribute() );
-        assertEquals( "top", approxNode.getValue().getString() );
+        assertEquals( "top", approxNode.getValue().getValue() );
 
         // (& (| (objectclass~=top) (ou<=contacts) ) (...
         LessEqNode<?> lessOrEqualNode = ( LessEqNode<?> ) orNodes.get( 1 );
         assertNotNull( lessOrEqualNode );
 
         assertEquals( "ou", lessOrEqualNode.getAttribute() );
-        assertEquals( "contacts", lessOrEqualNode.getValue().getString() );
+        assertEquals( "contacts", lessOrEqualNode.getValue().getValue() );
 
         // (& (| (objectclass~=top) (ou<=contacts) ) (! ...
         NotNode notNode = ( NotNode ) andNodes.get( 1 );
@@ -627,7 +627,7 @@ public class SearchRequestTest extends A
         assertNotNull( greaterOrEqual );
 
         assertEquals( "objectclass", greaterOrEqual.getAttribute() );
-        assertEquals( "ttt", greaterOrEqual.getValue().getString() );
+        assertEquals( "ttt", greaterOrEqual.getValue().getValue() );
 
         // The attributes
         List<String> attributes = searchRequest.getAttributes();
@@ -891,7 +891,7 @@ public class SearchRequestTest extends A
         assertNotNull( greaterOrEqual );
 
         assertEquals( "objectclass", greaterOrEqual.getAttribute() );
-        assertEquals( "ttt", greaterOrEqual.getValue().getString() );
+        assertEquals( "ttt", greaterOrEqual.getValue().getValue() );
 
         // The attributes
         List<String> attributes = searchRequest.getAttributes();
@@ -1549,31 +1549,31 @@ public class SearchRequestTest extends A
         EqualityNode<?> equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 0 );
 
         assertEquals( "uid", equalityNode.getAttribute() );
-        assertEquals( "akarasulu", equalityNode.getValue().getString() );
+        assertEquals( "akarasulu", equalityNode.getValue().getValue() );
 
         // cn=aok
         equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 1 );
 
         assertEquals( "cn", equalityNode.getAttribute() );
-        assertEquals( "aok", equalityNode.getValue().getString() );
+        assertEquals( "aok", equalityNode.getValue().getValue() );
 
         // ou = Human Resources
         equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 2 );
 
         assertEquals( "ou", equalityNode.getAttribute() );
-        assertEquals( "Human Resources", equalityNode.getValue().getString() );
+        assertEquals( "Human Resources", equalityNode.getValue().getValue() );
 
         // l=Santa Clara
         equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 3 );
 
         assertEquals( "l", equalityNode.getAttribute() );
-        assertEquals( "Santa Clara", equalityNode.getValue().getString() );
+        assertEquals( "Santa Clara", equalityNode.getValue().getValue() );
 
         // cn=abok
         equalityNode = ( EqualityNode<?> ) orNode.getChildren().get( 4 );
 
         assertEquals( "cn", equalityNode.getAttribute() );
-        assertEquals( "abok", equalityNode.getValue().getString() );
+        assertEquals( "abok", equalityNode.getValue().getValue() );
 
         // The attributes
         List<String> attributes = searchRequest.getAttributes();
@@ -2209,14 +2209,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "objectclass", equalityNode.getAttribute() );
-        assertEquals( "top", equalityNode.getValue().getString() );
+        assertEquals( "top", equalityNode.getValue().getValue() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (...
         equalityNode = ( EqualityNode<?> ) orNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "2.5.4.11", equalityNode.getAttribute() );
-        assertEquals( "contacts", equalityNode.getValue().getString() );
+        assertEquals( "contacts", equalityNode.getValue().getValue() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (! ...
         NotNode notNode = ( NotNode ) andNodes.get( 1 );
@@ -2227,7 +2227,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "organizationalUnitName", equalityNode.getAttribute() );
-        assertEquals( "ttt", equalityNode.getValue().getString() );
+        assertEquals( "ttt", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
 
@@ -2679,14 +2679,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "objectclass", equalityNode.getAttribute() );
-        assertEquals( "top", equalityNode.getValue().getString() );
+        assertEquals( "top", equalityNode.getValue().getValue() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (...
         equalityNode = ( EqualityNode<?> ) orNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "ou", equalityNode.getAttribute() );
-        assertEquals( "contacts", equalityNode.getValue().getString() );
+        assertEquals( "contacts", equalityNode.getValue().getValue() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (! ...
         NotNode notNode = ( NotNode ) andNodes.get( 1 );
@@ -2697,7 +2697,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "objectclass", equalityNode.getAttribute() );
-        assertEquals( "ttt", equalityNode.getValue().getString() );
+        assertEquals( "ttt", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
 
@@ -4843,7 +4843,7 @@ public class SearchRequestTest extends A
         assertNotNull( greaterOrEqual );
 
         assertEquals( "test", greaterOrEqual.getAttribute() );
-        assertEquals( "", greaterOrEqual.getValue().getString() );
+        assertEquals( "", greaterOrEqual.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
 
@@ -4879,76 +4879,28 @@ public class SearchRequestTest extends A
     public void testDecodeSearchRequestEmptyGreaterOrEqualEmptyAttrValueStar()
     {
         byte[] asn1BER = new byte[]
-            { 0x30, 0x44,
-                0x02,
-                0x01,
-                0x04, // messageID
-                0x63,
-                0x3F,
-                0x04,
-                0x1F, // baseObject LDAPDN,
-                'u',
-                'i',
-                'd',
-                '=',
-                'a',
-                'k',
-                'a',
-                'r',
-                'a',
-                's',
-                'u',
-                'l',
-                'u',
-                ',',
-                'd',
-                'c',
-                '=',
-                'e',
-                'x',
-                'a',
-                'm',
-                'p',
-                'l',
-                'e',
-                ',',
-                'd',
-                'c',
-                '=',
-                'c',
-                'o',
-                'm',
-                0x0A,
-                0x01,
-                0x01,
-                0x0A,
-                0x01,
-                0x03,
-                0x02,
-                0x01,
-                0x00,
-                0x02,
-                0x01,
-                0x00,
-                0x01,
-                0x01,
-                ( byte ) 0xFF,
-                ( byte ) 0xA5,
-                0x08,
-                0x04,
-                0x04,
-                't',
-                'e',
-                's',
-                't',
-                0x04,
-                0x00,
-                0x30,
-                0x03, // AttributeDescriptionList ::= SEQUENCE
-                // OF AttributeDescription
-                0x04,
-                0x01,
-                '*' };
+            { 
+              0x30, 0x44,
+                0x02, 0x01, 0x04, // messageID
+                0x63, 0x3F,
+                  0x04, 0x1F, // baseObject LDAPDN,
+                    'u', 'i', 'd', '=', 'a', 'k', 'a', 'r',
+                    'a', 's', 'u', 'l', 'u', ',', 'd', 'c',
+                    '=', 'e', 'x', 'a', 'm', 'p', 'l', 'e',
+                    ',', 'd', 'c', '=', 'c', 'o', 'm',
+                  0x0A, 0x01, 0x01,
+                  0x0A, 0x01, 0x03,
+                  0x02, 0x01, 0x00,
+                  0x02, 0x01, 0x00,
+                  0x01, 0x01, ( byte ) 0xFF,
+                  ( byte ) 0xA5, 0x08,
+                    0x04, 0x04,
+                      't', 'e', 's', 't',
+                    0x04, 0x00,
+                  0x30, 0x03,             // AttributeDescriptionList ::= SEQUENCE
+                                          // OF AttributeDescription
+                    0x04, 0x01, '*' 
+            };
 
         Asn1Decoder ldapDecoder = new Asn1Decoder();
 
@@ -4990,7 +4942,7 @@ public class SearchRequestTest extends A
         assertNotNull( greaterOrEqual );
 
         assertEquals( "test", greaterOrEqual.getAttribute() );
-        assertEquals( "", greaterOrEqual.getValue().getString() );
+        assertEquals( "", greaterOrEqual.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
 
@@ -5136,7 +5088,7 @@ public class SearchRequestTest extends A
         assertNotNull( greaterOrEqual );
 
         assertEquals( "test", greaterOrEqual.getAttribute() );
-        assertEquals( "", greaterOrEqual.getValue().getString() );
+        assertEquals( "", greaterOrEqual.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
 
@@ -5599,7 +5551,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "pgpdisabled", equalityNode.getAttribute() );
-        assertEquals( "0", equalityNode.getValue().getString() );
+        assertEquals( "0", equalityNode.getValue().getValue() );
 
         // Check the encoding
         // We won't check the whole PDU, as it may differs because
@@ -5720,7 +5672,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -5854,7 +5806,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -5998,14 +5950,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         // (&(a=b)(c=d))
         equalityNode = ( EqualityNode<?> ) andNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "c", equalityNode.getAttribute() );
-        assertEquals( "d", equalityNode.getValue().getString() );
+        assertEquals( "d", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -6146,7 +6098,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -6298,14 +6250,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         // (&(&(a=b)(c=d)
         equalityNode = ( EqualityNode<?> ) andNodes2.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "c", equalityNode.getAttribute() );
-        assertEquals( "d", equalityNode.getValue().getString() );
+        assertEquals( "d", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -6456,14 +6408,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         // (&(&(a=b))(c=d))
         equalityNode = ( EqualityNode<?> ) andNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "c", equalityNode.getAttribute() );
-        assertEquals( "d", equalityNode.getValue().getString() );
+        assertEquals( "d", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -6623,21 +6575,21 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         // (&(&(a=b)(c=d)...
         equalityNode = ( EqualityNode<?> ) andNodes2.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "c", equalityNode.getAttribute() );
-        assertEquals( "d", equalityNode.getValue().getString() );
+        assertEquals( "d", equalityNode.getValue().getValue() );
 
         // (&(&(a=b)(c=d))(e=f))
         equalityNode = ( EqualityNode<?> ) andNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "e", equalityNode.getAttribute() );
-        assertEquals( "f", equalityNode.getValue().getString() );
+        assertEquals( "f", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -6790,7 +6742,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         // (&(a=b)(|(...
         OrNode orNode = ( OrNode ) andNodes.get( 1 );
@@ -6804,14 +6756,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "c", equalityNode.getAttribute() );
-        assertEquals( "d", equalityNode.getValue().getString() );
+        assertEquals( "d", equalityNode.getValue().getValue() );
 
         // (&(a=b)(|(c=d)(e=f)))
         equalityNode = ( EqualityNode<?> ) orNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "e", equalityNode.getAttribute() );
-        assertEquals( "f", equalityNode.getValue().getString() );
+        assertEquals( "f", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -6964,7 +6916,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         // (&(&(a=b))(&...
         andNode2 = ( AndNode ) andNodes.get( 1 );
@@ -6978,7 +6930,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "c", equalityNode.getAttribute() );
-        assertEquals( "d", equalityNode.getValue().getString() );
+        assertEquals( "d", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -7140,14 +7092,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "a", equalityNode.getAttribute() );
-        assertEquals( "b", equalityNode.getValue().getString() );
+        assertEquals( "b", equalityNode.getValue().getValue() );
 
         // (&(&(a=b)(c=d))...
         equalityNode = ( EqualityNode<?> ) andNodes2.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "c", equalityNode.getAttribute() );
-        assertEquals( "d", equalityNode.getValue().getString() );
+        assertEquals( "d", equalityNode.getValue().getValue() );
 
         // (&(&(a=b)(c=d))(&...
         andNode2 = ( AndNode ) andNodes.get( 1 );
@@ -7161,7 +7113,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "e", equalityNode.getAttribute() );
-        assertEquals( "f", equalityNode.getValue().getString() );
+        assertEquals( "f", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -7336,7 +7288,7 @@ public class SearchRequestTest extends A
         assertNotNull( greaterEqNode );
 
         assertEquals( "e", greaterEqNode.getAttribute() );
-        assertEquals( "f", greaterEqNode.getValue().getString() );
+        assertEquals( "f", greaterEqNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -7549,14 +7501,14 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "uid", equalityNode.getAttribute() );
-        assertEquals( "buster ", equalityNode.getValue().getString() );
+        assertEquals( "buster ", equalityNode.getValue().getValue() );
 
         // (&(uid=buster)(sbAttribute=Buy))
         equalityNode = ( EqualityNode<?> ) andNodes.get( 1 );
         assertNotNull( equalityNode );
 
         assertEquals( "sbAttribute", equalityNode.getAttribute() );
-        assertEquals( "Buy ", equalityNode.getValue().getString() );
+        assertEquals( "Buy ", equalityNode.getValue().getValue() );
 
         List<String> attributes = searchRequest.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -7736,7 +7688,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "objectClass", equalityNode.getAttribute() );
-        assertEquals( "person", equalityNode.getValue().getString() );
+        assertEquals( "person", equalityNode.getValue().getValue() );
 
         // (&(a=b)(|
         OrNode orNode = ( OrNode ) andNodes.get( 1 );
@@ -7759,7 +7711,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "sn", equalityNode.getAttribute() );
-        assertEquals( "Jagger", equalityNode.getValue().getString() );
+        assertEquals( "Jagger", equalityNode.getValue().getValue() );
     }
 
 
@@ -7852,7 +7804,7 @@ public class SearchRequestTest extends A
         assertNotNull( equalityNode );
 
         assertEquals( "objectclass", equalityNode.getAttribute() );
-        assertEquals( "groupofnames", equalityNode.getValue().getString() );
+        assertEquals( "groupofnames", equalityNode.getValue().getValue() );
 
         // (&(|(&(objectClass=groupOfNames)))(owner=*))
         PresenceNode presenceNode = ( PresenceNode ) andNodes.get( 1 );

Modified: directory/shared/branches/shared-value/ldap/extras/aci/src/main/antlr/ACIItem.g
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/extras/aci/src/main/antlr/ACIItem.g?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/extras/aci/src/main/antlr/ACIItem.g (original)
+++ directory/shared/branches/shared-value/ldap/extras/aci/src/main/antlr/ACIItem.g Mon May  9 17:22:19 2016
@@ -495,16 +495,11 @@ attributeValue
     {
         // A Dn can be considered as a set of attributeTypeAndValues
         // So, parse the set as a Dn and extract each attributeTypeAndValue
-        Dn attributeTypeAndValueSetAsDn = new Dn( token.getText() );
-        
-        if ( schemaManager != null )
-        {        
-          attributeTypeAndValueSetAsDn.apply( schemaManager );
-        }
+        Dn attributeTypeAndValueSetAsDn = new Dn( schemaManager, token.getText() );
         
         for ( Rdn rdn : attributeTypeAndValueSetAsDn )
         {
-            attributeTypeAndValue = rdn.getNormName();
+            attributeTypeAndValue = rdn.getName();
             attributeType = DnUtils.getRdnAttributeType( attributeTypeAndValue );
             attributeValue = DnUtils.getRdnValue( attributeTypeAndValue );
             
@@ -542,7 +537,7 @@ rangeOfValues
     {
         protectedItemsMap.put( "rangeOfValues",
                 new RangeOfValuesItem(
-                        FilterParser.parse( token.getText() ) ) );
+                        FilterParser.parse( schemaManager, token.getText() ) ) );
         log.debug( "filterParser parsed " + token.getText() );
     }
     ;
@@ -1254,11 +1249,8 @@ distinguishedName returns [ Dn name ]
     :
     token:SAFEUTF8STRING
     {
-        name = new Dn( token.getText() );
-        if ( schemaManager != null )
-        {
-            name.apply( schemaManager );
-        }
+        name = new Dn( schemaManager, token.getText() );
+
         log.debug( "recognized a DistinguishedName: " + token.getText() );
     }
     ;
@@ -1313,7 +1305,7 @@ item returns [ LeafNode node ]
     :
     ID_item ( SP )* COLON ( SP )* oid=oid
     {
-        node = new EqualityNode( SchemaConstants.OBJECT_CLASS_AT , new Value( oid ) );
+        node = new EqualityNode( SchemaConstants.OBJECT_CLASS_AT , oid );
     }
     ;
 

Modified: directory/shared/branches/shared-value/ldap/model/src/checkstyle/suppressions.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/checkstyle/suppressions.xml?rev=1743011&r1=1743010&r2=1743011&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/model/src/checkstyle/suppressions.xml (original)
+++ directory/shared/branches/shared-value/ldap/model/src/checkstyle/suppressions.xml Mon May  9 17:22:19 2016
@@ -48,6 +48,7 @@
     <suppress files="org.apache.directory.api.ldap.model.constants.SchemaConstants" checks="FileLength" />
     <suppress files="org.apache.directory.api.ldap.model.message.ResultCodeEnum" checks="FileLength" />
     <suppress files="org.apache.directory.api.ldap.model.schema.PrepareString" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.name.Ava" checks="FileLength" />
     <suppress files="org.apache.directory.api.ldap.model.url.LdapUrl" checks="FileLength" />
     <suppress files="org.apache.directory.api.ldap.model.schema.registries.Registries" checks="FileLength" />
     <suppress files="org.apache.directory.api.ldap.model.entry.DefaultAttribute" checks="FileLength" />



Mime
View raw message