directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r633535 [1/4] - in /directory: apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ apacheds/branches/bigbang/c...
Date Tue, 04 Mar 2008 16:35:19 GMT
Author: elecharny
Date: Tue Mar  4 08:35:12 2008
New Revision: 633535

URL: http://svn.apache.org/viewvc?rev=633535&view=rev
Log:
Partially refactored the Value/ClientValue/ServerValue hierarchy. 
Added tests for Client[String|Binary]Value
Removed the StreamedValue class

Added:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AbstractValue.java
      - copied, changed from r631986, directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AbstractBinaryValue.java
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValueTest.java
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java
Removed:
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStreamedValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AbstractBinaryValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AbstractStreamedValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AbstractStringValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientValue.java
Modified:
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/AbstractServerAttribute.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ObjectClassAttribute.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java
    directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
    directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
    directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerBinaryValueTest.java
    directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerStringValueTest.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/OriginalChangeLogInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/enumeration/ReferralHandlingEnumeration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AttributeClassLoader.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaEntityFactory.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaOperationControl.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyInterceptor.java
    directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Value.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/AbstractClientAttribute.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientAttribute.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttribute.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ComparableComparator.java

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/AbstractServerAttribute.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/AbstractServerAttribute.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/AbstractServerAttribute.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/AbstractServerAttribute.java Tue Mar  4 08:35:12 2008
@@ -21,6 +21,7 @@
 
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -47,7 +48,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( AbstractServerAttribute.class );
 
     /** The set of contained values */
-    protected List<ServerValue<?>> values = new ArrayList<ServerValue<?>>();
+    protected List<Value<?>> values = new ArrayList<Value<?>>();
     
     /** The associated AttributeType */
     protected transient AttributeType attributeType;
@@ -234,7 +235,7 @@
             return false;
         }
 
-        for ( ServerValue<?> value : values )
+        for ( Value<?> value : values )
         {
             if ( ! value.isValid() )
             {
@@ -249,11 +250,11 @@
     /**
      * @see EntryAttribute#add(org.apache.directory.shared.ldap.entry.Value...)
      */
-    public int add( ServerValue<?>... vals ) throws InvalidAttributeValueException, NamingException
+    public int add( Value<?>... vals ) throws InvalidAttributeValueException, NamingException
     {
         int nbAdded = 0;
         
-        for ( ServerValue<?> val:vals )
+        for ( Value<?> val:vals )
         {
             if ( attributeType.getSyntax().isHumanReadable() )
             {
@@ -288,7 +289,7 @@
     /**
      * @see EntryAttribute#put(org.apache.directory.shared.ldap.entry.Value...)
      */
-    public int put( ServerValue<?>... vals ) throws InvalidAttributeValueException, NamingException
+    public int put( Value<?>... vals ) throws InvalidAttributeValueException, NamingException
     {
         values.clear();
         return add( vals );
@@ -421,9 +422,9 @@
             // Copy the values. The attributeType is immutable.
             if ( ( values != null ) && ( values.size() != 0 ) )
             {
-                clone.values = new ArrayList<ServerValue<?>>( values.size() );
+                clone.values = new ArrayList<Value<?>>( values.size() );
                 
-                for ( ServerValue<?> value:values )
+                for ( Value<?> value:values )
                 {
                     clone.values.add( value.clone() );
                 }
@@ -442,7 +443,7 @@
     /**
      * @see EntryAttribute#contains(org.apache.directory.shared.ldap.entry.Value)
      */
-    public boolean contains( ServerValue<?> val ) throws NamingException
+    public boolean contains( Value<?> val ) throws NamingException
     {
         val.normalize();
         
@@ -453,11 +454,11 @@
     /**
      * @see EntryAttribute#contains(org.apache.directory.shared.ldap.entry.Value...)
      */
-    public boolean contains( ServerValue<?>... vals ) throws NamingException
+    public boolean contains( Value<?>... vals ) throws NamingException
     {
         // Iterate through all the values, and quit if we 
         // don't find one in the values
-        for ( ServerValue<?> val:vals )
+        for ( Value<?> val:vals )
         {
             if ( !values.contains( val ) )
             {
@@ -615,7 +616,7 @@
      * 
      *  @return The first value for this attribute.
      */
-    public ServerValue<?> get()
+    public Value<?> get()
     {
         if ( values.isEmpty() )
         {
@@ -631,7 +632,7 @@
      * 
      * @return An iterator over the values stored into the attribute
      */
-    public Iterator<ServerValue<?>> getAll()
+    public Iterator<Value<?>> getAll()
     {
         return iterator();
     }
@@ -652,7 +653,7 @@
     /**
      * @see EntryAttribute#remove(org.apache.directory.shared.ldap.entry.Value)
      */
-    public boolean remove( ServerValue<?> val )
+    public boolean remove( Value<?> val )
     {
         return values.remove( val );
     }
@@ -661,13 +662,13 @@
     /**
      * @see EntryAttribute#remove(org.apache.directory.shared.ldap.entry.Value...)
      */
-    public boolean remove( ServerValue<?>... vals )
+    public boolean remove( Value<?>... vals )
     {
         boolean removed = false;
         
         // Loop through all the values to remove. If one of
         // them is not present, the method will return false.
-        for ( ServerValue<?> val:vals )
+        for ( Value<?> val:vals )
         {
             removed &= values.remove( val );
         }
@@ -735,7 +736,7 @@
      * 
      * @return an iterator over the stored values.
      */
-    public Iterator<ServerValue<?>> iterator()
+    public Iterator<Value<?>> iterator()
     {
         return values.iterator();
     }
@@ -778,7 +779,7 @@
          
          result = result*17 + attributeType.hashCode();
          
-         for ( ServerValue<?> value:values )
+         for ( Value<?> value:values )
          {
              result = result*17 + value.hashCode();
          }
@@ -814,7 +815,7 @@
              return false;
          }
          
-         for ( ServerValue<?> value:this )
+         for ( Value<?> value:this )
          {
              try
              {

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java Tue Mar  4 08:35:12 2008
@@ -19,9 +19,9 @@
 package org.apache.directory.server.core.entry;
 
 
-import org.apache.directory.shared.ldap.entry.AbstractBinaryValue;
+import org.apache.directory.shared.ldap.entry.AbstractValue;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.AbstractStringValue;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -86,14 +86,14 @@
      * Doc me more!
      *
      * If the value does not correspond to the same attributeType, then it's
-     * wrapped value is copied into a new ServerValue which uses the specified
+     * wrapped value is copied into a new Value which uses the specified
      * attributeType.
      *
      * @param attributeType the attribute type according to the schema
      * @param vals an initial set of values for this attribute
      * @throws NamingException if there are problems creating the new attribute
      */
-    public DefaultServerAttribute( AttributeType attributeType, ServerValue<?>... vals ) throws NamingException
+    public DefaultServerAttribute( AttributeType attributeType, Value<?>... vals ) throws NamingException
     {
         this( null, attributeType, vals );
     }
@@ -103,7 +103,7 @@
      * Doc me more!
      *
      * If the value does not correspond to the same attributeType, then it's
-     * wrapped value is copied into a new ServerValue which uses the specified
+     * wrapped value is copied into a new Value which uses the specified
      * attributeType.
      * 
      * Otherwise, the value is stored, but as a reference. It's not a copy.
@@ -113,7 +113,7 @@
      * @param vals an initial set of values for this attribute
      * @throws NamingException if there are problems creating the new attribute
      */
-    public DefaultServerAttribute( String upId, AttributeType attributeType, ServerValue<?>... vals ) throws NamingException
+    public DefaultServerAttribute( String upId, AttributeType attributeType, Value<?>... vals ) throws NamingException
     {
         if ( attributeType == null )
         {
@@ -136,21 +136,33 @@
         }
         else
         {
-            for ( ServerValue<?> val:vals )
+            for ( Value<?> val:vals )
             {
-                if ( attributeType.equals( val.getAttributeType() ) )
-                {
-                    add( val );
-                }
-                else if ( val instanceof ServerStringValue )
+                if ( val instanceof ServerStringValue )
                 {
                     ServerStringValue serverString = ( ServerStringValue ) val;
-                    add( new ServerStringValue( attributeType, serverString.get() ) );
+
+                    if ( attributeType.equals( serverString.getAttributeType() ) )
+                    {
+                        add( val );
+                    }
+                    else
+                    {
+                        add( new ServerStringValue( attributeType, serverString.get() ) );
+                    }
                 }
                 else if ( val instanceof ServerBinaryValue )
                 {
                     ServerBinaryValue serverBinary = ( ServerBinaryValue ) val;
-                    add( new ServerBinaryValue( attributeType, serverBinary.getCopy() ) );
+
+                    if ( attributeType.equals( serverBinary.getAttributeType() ) )
+                    {
+                        add( val );
+                    }
+                    else
+                    {
+                        add( new ServerBinaryValue( attributeType, serverBinary.getCopy() ) );
+                    }
                 }
                 else
                 {
@@ -271,7 +283,7 @@
             return false;
         }
 
-        for ( ServerValue<?> value : values )
+        for ( Value<?> value : values )
         {
             if ( ! value.isValid() )
             {
@@ -286,13 +298,13 @@
     /**
      * @see EntryAttribute#add(org.apache.directory.shared.ldap.entry.Value)
      */
-    public boolean add( ServerValue<?> val ) throws InvalidAttributeValueException, NamingException
+    public boolean add( Value<?> val ) throws InvalidAttributeValueException, NamingException
     {
         if ( attributeType.getSyntax().isHumanReadable() )
         {
             if ( val == null )
             {
-                ServerValue<String> nullSV = new ServerStringValue( attributeType, (String)null );
+                Value<String> nullSV = new ServerStringValue( attributeType, (String)null );
                 
                 if ( values.contains( nullSV ) )
                 {
@@ -305,7 +317,7 @@
                 }
             }
             
-            if ( !( val instanceof AbstractStringValue ) )
+            if ( !( val instanceof ServerStringValue ) )
             {
                 String message = "The value must be a String, as its AttributeType is H/R";
                 LOG.error( message );
@@ -316,7 +328,7 @@
         {
             if ( val == null )
             {
-                ServerValue<byte[]> nullSV = new ServerBinaryValue( attributeType, (byte[])null );
+                Value<byte[]> nullSV = new ServerBinaryValue( attributeType, (byte[])null );
                 
                 if ( values.contains( nullSV ) )
                 {
@@ -329,7 +341,7 @@
                 }
             }
             
-            if ( !( val instanceof AbstractBinaryValue ) )
+            if ( !( val instanceof AbstractValue ) )
             {
                 String message = "The value must be a byte[], as its AttributeType is not H/R";
                 LOG.error( message );
@@ -349,11 +361,11 @@
     /**
      * @see EntryAttribute#add(org.apache.directory.shared.ldap.entry.Value...)
      */
-    public int add( ServerValue<?>... vals ) throws InvalidAttributeValueException, NamingException
+    public int add( Value<?>... vals ) throws InvalidAttributeValueException, NamingException
     {
         int nbAdded = 0;
         
-        for ( ServerValue<?> val:vals )
+        for ( Value<?> val:vals )
         {
             if ( add( val ) )
             {
@@ -452,7 +464,7 @@
     /**
      * @see EntryAttribute#contains(org.apache.directory.shared.ldap.entry.Value)
      */
-    public boolean contains( ServerValue<?> val )
+    public boolean contains( Value<?> val )
     {
         return values.contains( val );
     }
@@ -461,11 +473,11 @@
     /**
      * @see EntryAttribute#contains(org.apache.directory.shared.ldap.entry.Value...)
      */
-    public boolean contains( ServerValue<?>... vals )
+    public boolean contains( Value<?>... vals )
     {
         // Iterate through all the values, and quit if we 
         // don't find one in the values
-        for ( ServerValue<?> val:vals )
+        for ( Value<?> val:vals )
         {
             if ( !values.contains( val ) )
             {
@@ -572,7 +584,7 @@
      * 
      *  @return The first value for this attribute.
      */
-    public ServerValue<?> get()
+    public Value<?> get()
     {
         if ( values.isEmpty() )
         {
@@ -592,7 +604,7 @@
      */
     public String getString() throws InvalidAttributeValueException
     {
-        ServerValue<?> value = get();
+        Value<?> value = get();
         
         if ( value instanceof ServerStringValue )
         {
@@ -616,7 +628,7 @@
      */
     public byte[] getBytes() throws InvalidAttributeValueException
     {
-        ServerValue<?> value = get();
+        Value<?> value = get();
         
         if ( value instanceof ServerBinaryValue )
         {
@@ -636,7 +648,7 @@
      * 
      * @return An iterator over the values stored into the attribute
      */
-    public Iterator<ServerValue<?>> getAll()
+    public Iterator<Value<?>> getAll()
     {
         return iterator();
     }
@@ -657,7 +669,7 @@
     /**
      * @see EntryAttribute#remove(org.apache.directory.shared.ldap.entry.Value)
      */
-    public boolean remove( ServerValue<?> val )
+    public boolean remove( Value<?> val )
     {
         return values.remove( val );
     }
@@ -666,13 +678,13 @@
     /**
      * @see EntryAttribute#remove(org.apache.directory.shared.ldap.entry.Value...)
      */
-    public boolean remove( ServerValue<?>... vals )
+    public boolean remove( Value<?>... vals )
     {
         boolean removed = false;
         
         // Loop through all the values to remove. If one of
         // them is not present, the method will return false.
-        for ( ServerValue<?> val:vals )
+        for ( Value<?> val:vals )
         {
             removed &= values.remove( val );
         }
@@ -740,7 +752,7 @@
      * 
      * @return an iterator over the stored values.
      */
-    public Iterator<ServerValue<?>> iterator()
+    public Iterator<Value<?>> iterator()
     {
         return values.iterator();
     }
@@ -755,7 +767,7 @@
         
         if ( ( values != null ) && ( values.size() != 0 ) )
         {
-            for ( ServerValue<?> value:values )
+            for ( Value<?> value:values )
             {
                 sb.append( "    " ).append( upId ).append( ": " ).append( value ).append( '\n' );
             }

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java Tue Mar  4 08:35:12 2008
@@ -455,7 +455,7 @@
         
         if ( currentOc != null )
         {
-            for ( ServerValue<?> value:objectClassAttribute )
+            for ( Value<?> value:objectClassAttribute )
             {
                 currentOc.add( value );
             }
@@ -803,7 +803,7 @@
      * @throws NamingException If some values conflict with the attributeType
      * 
      */
-    public ServerAttribute put( AttributeType attributeType, ServerValue<?>... values ) throws NamingException
+    public ServerAttribute put( AttributeType attributeType, Value<?>... values ) throws NamingException
     {
         return put( null, attributeType, values );
     }
@@ -819,7 +819,7 @@
      * @return The existing attribute if any
      * @throws NamingException 
      */
-    public ServerAttribute put( String upId, AttributeType attributeType, ServerValue<?>... values ) throws NamingException
+    public ServerAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException
     {
         upId = getUpId( upId, attributeType );
         attributeType = getAttributeType( upId, attributeType );
@@ -847,14 +847,14 @@
      * If the attribute already exists, the previous attribute will be 
      * replaced and returned.
      * <p>
-     * The values are stored as ServerValue<?> objects.
+     * The values are stored as Value<?> objects.
      *
      * @param upId The attribute ID
-     * @param values The list of ServerValue<?> objects to inject. It can be empty.
+     * @param values The list of Value<?> objects to inject. It can be empty.
      * @return The replaced attribute
      * @throws NamingException If the attribute does not exist
      */
-    public ServerAttribute put( String upId, ServerValue<?>... values ) throws NamingException
+    public ServerAttribute put( String upId, Value<?>... values ) throws NamingException
     {
         return put( upId, getAttributeType( upId ), values );
     }
@@ -1098,7 +1098,7 @@
         
         if ( serverAttributeMap.containsKey( attributeType ) )
         {
-            return serverAttributeMap.get( attributeType ).contains( (ServerValue<?>)value );
+            return serverAttributeMap.get( attributeType ).contains( (Value<?>)value );
         }
         else
         {
@@ -1130,7 +1130,7 @@
         }
         else if ( serverAttributeMap.containsKey( attributeType ) )
         {
-            return serverAttributeMap.get( attributeType ).contains( (ServerValue<?>)value );
+            return serverAttributeMap.get( attributeType ).contains( (Value<?>)value );
         }
         else
         {
@@ -1301,7 +1301,7 @@
      * 
      * Updates the objectClassAttribute and the serverAttributeMap.
      */
-    private void addObjectClass( String upId, ServerValue<?>... values ) throws NamingException, InvalidAttributeValueException
+    private void addObjectClass( String upId, Value<?>... values ) throws NamingException, InvalidAttributeValueException
     {
         ServerAttribute attribute = serverAttributeMap.get( OBJECT_CLASS_AT );
         
@@ -1324,7 +1324,7 @@
      * 
      * Updates the serverAttributeMap.
      */
-    private void createAttribute( String upId, AttributeType attributeType, ServerValue<?>... values ) throws NamingException, InvalidAttributeValueException
+    private void createAttribute( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException, InvalidAttributeValueException
     {
         ServerAttribute attribute = new DefaultServerAttribute( attributeType, values );
         attribute.setUpId( upId, attributeType );
@@ -1392,7 +1392,7 @@
      * some values to
      * @param values The list of Values to add
      * @throws NamingException
-     */
+     *
     public void add( String upId, Value<?>... values ) throws NamingException
     {
         
@@ -1488,15 +1488,15 @@
 
 
     /**
-     * Add a new attribute with some ServerValue values into the entry.
+     * Add a new attribute with some Value values into the entry.
      * <p>
      * 
      * @param attributeType The attributeType to add
-     * @param values The associated ServerValue values
+     * @param values The associated Value values
      * @throws NamingException If some values conflict with the attributeType
      * 
      */
-    public void add( AttributeType attributeType, ServerValue<?>... values ) throws NamingException
+    public void add( AttributeType attributeType, Value<?>... values ) throws NamingException
     {
         if ( attributeType == null )
         {
@@ -1555,13 +1555,13 @@
 
 
     /**
-     * Add an attribute (represented by its ID and ServerValue values) into an entry. 
+     * Add an attribute (represented by its ID and Value values) into an entry. 
      *
      * @param upId The attribute ID
-     * @param values The list of ServerValue values to inject. It can be empty
+     * @param values The list of Value values to inject. It can be empty
      * @throws NamingException If the attribute does not exist
      */
-    public void add( String upId, ServerValue<?>... values ) throws NamingException
+    public void add( String upId, Value<?>... values ) throws NamingException
     {
         add( upId, getAttributeType( upId ), values );
     }
@@ -1653,15 +1653,15 @@
 
 
     /**
-     * Adds a new attribute with some ServerValue values into an entry, setting
+     * Adds a new attribute with some Value values into an entry, setting
      * the User Provided ID in the same time.
      *
      * @param upId The User provided ID
      * @param attributeType The associated AttributeType
-     * @param values The ServerValue values to store into the new Attribute
+     * @param values The Value values to store into the new Attribute
      * @throws NamingException 
      */
-    public void add( String upId, AttributeType attributeType, ServerValue<?>... values ) throws NamingException
+    public void add( String upId, AttributeType attributeType, Value<?>... values ) throws NamingException
     {
         if ( attributeType == null )
         {
@@ -1764,7 +1764,7 @@
                 {
                     out.writeInt( nbValues );
 
-                    for ( ServerValue<?> value:attribute )
+                    for ( Value<?> value:attribute )
                     {
                         out.writeObject( value );
                     }
@@ -1819,7 +1819,7 @@
                 
                 for ( int j = 0; j < nbValues; j++ )
                 {
-                    ServerValue<?> value = (ServerValue<?>)in.readObject();
+                    Value<?> value = (Value<?>)in.readObject();
                     attribute.add( value );
                 }
                 

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ObjectClassAttribute.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ObjectClassAttribute.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ObjectClassAttribute.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ObjectClassAttribute.java Tue Mar  4 08:35:12 2008
@@ -20,6 +20,7 @@
 
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.slf4j.Logger;
@@ -137,7 +138,7 @@
             {
                 // Iterate through the attribute values and store them in the ObjectClass,
                 // if they are valid.
-                for ( ServerValue<?> value:serverAttribute )
+                for ( Value<?> value:serverAttribute )
                 {
                     if ( value instanceof ServerStringValue )
                     {
@@ -185,10 +186,10 @@
      * Doc me more!
      *
      * If the values does not correspond to the same attributeType, then it's
-     * wrapped value is copied into a new ServerValue which uses the specified
+     * wrapped value is copied into a new Value which uses the specified
      * attributeType.
      */
-    public ObjectClassAttribute( Registries registries, ServerValue<?>... values ) throws NamingException
+    public ObjectClassAttribute( Registries registries, Value<?>... values ) throws NamingException
     {
         this( registries, null, values );
     }
@@ -198,10 +199,10 @@
      * Doc me more!
      *
      * If the value does not correspond to the same attributeType, then it's
-     * wrapped value is copied into a new ServerValue which uses the specified
+     * wrapped value is copied into a new Value which uses the specified
      * attributeType.
      */
-    public ObjectClassAttribute( Registries registries, String upId, ServerValue<?>... vals ) throws NamingException
+    public ObjectClassAttribute( Registries registries, String upId, Value<?>... vals ) throws NamingException
     {
         this.registries = registries;
         attributeType = registries.getAttributeTypeRegistry().lookup( SchemaConstants.OBJECT_CLASS_AT_OID );
@@ -212,7 +213,7 @@
         }
         else
         {
-            for ( ServerValue<?> val:vals )
+            for ( Value<?> val:vals )
             {
                 if ( ! ( val instanceof ServerStringValue ) )
                 {
@@ -469,7 +470,7 @@
      */
     public String getString() throws InvalidAttributeValueException
     {
-        ServerValue<?> value = get();
+        Value<?> value = get();
         
         if ( value instanceof ServerStringValue )
         {
@@ -563,7 +564,7 @@
         {
             boolean isFirst = true;
             
-            for ( ServerValue<?> objectClass:values )
+            for ( Value<?> objectClass:values )
             {
                 if ( isFirst )
                 {

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerAttribute.java Tue Mar  4 08:35:12 2008
@@ -21,6 +21,7 @@
 
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.entry.Value;
 
 import javax.naming.NamingException;
 import javax.naming.directory.InvalidAttributeValueException;
@@ -33,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public interface ServerAttribute extends EntryAttribute<ServerValue<?>>
+public interface ServerAttribute extends EntryAttribute<Value<?>>
 {
     /**
      * Gets the attribute type associated with this ServerAttribute.

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java Tue Mar  4 08:35:12 2008
@@ -20,7 +20,8 @@
 
 
 import org.apache.directory.shared.ldap.NotImplementedException;
-import org.apache.directory.shared.ldap.entry.AbstractBinaryValue;
+import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.ByteArrayComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
@@ -48,7 +49,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ServerBinaryValue extends AbstractBinaryValue implements ServerValue<byte[]>, Externalizable
+public class ServerBinaryValue extends ClientBinaryValue
 {
     /** Used for serialization */
     public static final long serialVersionUID = 2L;
@@ -59,16 +60,53 @@
     /** reference to the attributeType which is not serialized */
     private transient AttributeType attributeType;
 
-    /** the canonical representation of the wrapped binary value */
-    private transient byte[] normalizedValue;
-    
     /** A flag set if the normalized data is different from the wrapped data */
     private transient boolean same;
 
-    /** cached results of the isValid() method call */
-    private transient Boolean valid;
 
+    // -----------------------------------------------------------------------
+    // utility methods
+    // -----------------------------------------------------------------------
+    /**
+     * Utility method to get some logs if an assert fails
+     */
+    protected String logAssert( String message )
+    {
+        LOG.error(  message );
+        return message;
+    }
 
+    
+    /**
+     *  Check the attributeType member. It should not be null, 
+     *  and it should contains a syntax.
+     */
+    protected String checkAttributeType( AttributeType attributeType )
+    {
+        try
+        {
+            if ( attributeType == null )
+            {
+                return "The AttributeType parameter should not be null";
+            }
+            
+            if ( attributeType.getSyntax() == null )
+            {
+                return "There is no Syntax associated with this attributeType";
+            }
+
+            return null;
+        }
+        catch ( NamingException ne )
+        {
+            return "This AttributeType is incorrect";
+        }
+    }
+
+    
+    // -----------------------------------------------------------------------
+    // Constructors
+    // -----------------------------------------------------------------------
     /**
      * Creates a ServerBinaryValue without an initial wrapped value.
      *
@@ -76,6 +114,7 @@
      */
     public ServerBinaryValue( AttributeType attributeType )
     {
+        super();
         assert checkAttributeType( attributeType) == null : logAssert( checkAttributeType( attributeType ) );
 
         try
@@ -91,7 +130,6 @@
         }
 
         this.attributeType = attributeType;
-        setNormalized( false );
     }
 
 
@@ -104,8 +142,7 @@
     public ServerBinaryValue( AttributeType attributeType, byte[] wrapped )
     {
         this( attributeType );
-        super.set( wrapped );
-        setNormalized( false );
+        this.wrapped = wrapped;
     }
 
 
@@ -119,46 +156,12 @@
      */
     /** No protection */ ServerBinaryValue( AttributeType attributeType, byte[] wrapped, byte[] normalizedValue, boolean same, boolean valid )
     {
-        setNormalized( true );
+        super( wrapped );
+        this.normalized = true;
         this.attributeType = attributeType;
-        super.set( wrapped );
-        setNormalizedValue( normalizedValue );
-        this.same = same;
+        this.normalizedValue = normalizedValue;
         this.valid = valid;
-    }
-
-
-    // -----------------------------------------------------------------------
-    // Value<String> Methods
-    // -----------------------------------------------------------------------
-
-
-    /**
-     * Sets the wrapped binary value.  Has the side effect of setting the
-     * normalizedValue and the valid flags to null if the wrapped value is
-     * different than what is already set.  These cached values must be
-     * recomputed to be correct with different values.
-     *
-     * @see ServerValue#set(Object)
-     */
-    public final void set( byte[] wrapped )
-    {
-        // Why should we invalidate the normalized value if it's we're setting the
-        // wrapper to it's current value?
-        byte[] value = getReference();
-        
-        if ( value != null )
-        {
-            if ( Arrays.equals( wrapped, value ) )
-            {
-                return;
-            }
-        }
-
-        normalizedValue = null;
-        valid = null;
-        setNormalized( false );
-        super.set( wrapped );
+        this.same = same;
     }
 
 
@@ -217,7 +220,7 @@
      * @return a reference to the normalized version of the wrapped value
      * @throws NamingException with failures to normalize
      */
-    public byte[] getNormalizedReference() throws NamingException
+    public byte[] getNormalizedValueReference()
     {
         if ( isNull() )
         {
@@ -226,7 +229,16 @@
 
         if ( !isNormalized() )
         {
-            normalize();
+            try
+            {
+                normalize();
+            }
+            catch ( NamingException ne )
+            {
+                String message = "Cannot normalize the value :" + ne.getMessage();
+                LOG.warn( message );
+                normalized = false;
+            }
         }
 
         return normalizedValue;
@@ -234,21 +246,38 @@
 
 
     /**
-     * Sets this value's wrapped value to a copy of the src array.
+     * Gets the normalized (canonical) representation for the wrapped byte[].
+     * If the wrapped byte[] is null, null is returned, otherwise the normalized
+     * form is returned.  If no the normalizedValue is null, then this method
+     * will attempt to generate it from the wrapped value: repeated calls to
+     * this method do not unnecessarily normalize the wrapped value.  Only changes
+     * to the wrapped value result in attempts to normalize the wrapped value.
      *
-     * @param wrapped the byte array to use as the wrapped value
+     * @return gets the normalized value
+     * @throws NamingException if the value cannot be properly normalized
      */
-    private void setNormalizedValue( byte[] normalizedValue )
+    public byte[] getNormalizedValue() 
     {
-        if ( normalizedValue != null )
+        if ( isNull() )
         {
-            this.normalizedValue = new byte[ normalizedValue.length ];
-            System.arraycopy( normalizedValue, 0, this.normalizedValue, 0, normalizedValue.length );
+            return null;
         }
-        else
+
+        if ( !normalized )
         {
-            this.normalizedValue = null;
+            try
+            {
+                normalize();
+            }
+            catch ( NamingException ne )
+            {
+                String message = "Cannot normalize the value :" + ne.getMessage();
+                LOG.warn( message );
+                normalized = false;
+            }
         }
+
+        return normalizedValue;
     }
 
 
@@ -261,16 +290,37 @@
      * @return the normalized version of the wrapped value
      * @throws NamingException if schema entity resolution fails or normalization fails
      */
-    public byte[] getNormalizedCopy() throws NamingException
+    public byte[] getNormalizedValueCopy()
     {
+        if ( isNull() )
+        {
+            return null;
+        }
+
         if ( normalizedValue == null )
         {
-            getNormalizedReference();
+            try
+            {
+                normalize();
+            }
+            catch ( NamingException ne )
+            {
+                String message = "Cannot normalize the value :" + ne.getMessage();
+                LOG.warn( message );
+                normalized = false;
+            }
         }
 
-        byte[] copy = new byte[ normalizedValue.length ];
-        System.arraycopy( normalizedValue, 0, copy, 0, normalizedValue.length );
-        return copy;
+        if ( normalizedValue != null )
+        {
+            byte[] copy = new byte[ normalizedValue.length ];
+            System.arraycopy( normalizedValue, 0, copy, 0, normalizedValue.length );
+            return copy;
+        }
+        else
+        {
+            return null;
+        }
     }
 
 
@@ -283,14 +333,24 @@
      *
      * @see ServerValue#isValid()
      */
-    public final boolean isValid() throws NamingException
+    public final boolean isValid()
     {
         if ( valid != null )
         {
             return valid;
         }
 
-        valid = attributeType.getSyntax().getSyntaxChecker().isValidSyntax( getReference() );
+        try
+        {
+            valid = attributeType.getSyntax().getSyntaxChecker().isValidSyntax( getReference() );
+        }
+        catch ( NamingException ne )
+        {
+            String message = "Cannot check the syntax : " + ne.getMessage();
+            LOG.error( message );
+            valid = false;
+        }
+        
         return valid;
     }
 
@@ -335,36 +395,17 @@
         {
             ServerBinaryValue binaryValue = ( ServerBinaryValue ) value;
 
-            // Normalizes the compared value
-            try
-            {
-                binaryValue.normalize();
-            }
-            catch ( NamingException ne )
-            {
-                LOG.error( "Cannot nnormalize the wrapped value '" + binaryValue.get() + "'" );
-            }
-            
-            // Normalizes the value
-            try
-            {
-                normalize();
-            }
-            catch ( NamingException ne )
-            {
-                LOG.error( "Cannot normalize the wrapped value '" + get() + "'" );
-            }
             try
             {
-                Comparator comparator = getComparator();
+                Comparator<? super Value<byte[]>> comparator = getComparator();
                 
                 if ( comparator != null )
                 {
-                    return getComparator().compare( getNormalizedReference(), binaryValue.getNormalizedReference() );
+                    return getComparator().compare( getNormalizedValueReference(), binaryValue.getNormalizedValueReference() );
                 }
                 else
                 {
-                    return ByteArrayComparator.INSTANCE.compare( getNormalizedReference(), binaryValue.getNormalizedReference() );
+                    return ByteArrayComparator.INSTANCE.compare( getNormalizedValueReference(), binaryValue.getNormalizedValueReference() );
                 }
             }
             catch ( NamingException e )
@@ -376,11 +417,17 @@
             }
         }
 
-        throw new NotImplementedException( "I don't really know how to compare anything other " +
-                "than ServerBinaryValues at this point in time." );
+        String message = "I don't really know how to compare anything other " +
+        "than ServerBinaryValues at this point in time.";
+        LOG.error( message );
+        throw new NotImplementedException( message );
     }
 
 
+    /**
+     * Get the associated AttributeType
+     * @return The AttributeType
+     */
     public AttributeType getAttributeType()
     {
         return attributeType;
@@ -388,7 +435,15 @@
 
 
     /**
-     * @see ServerValue#instanceOf(AttributeType)
+     * Check if the value is stored into an instance of the given 
+     * AttributeType, or one of its ascendant.
+     * 
+     * For instance, if the Value is associated with a CommonName,
+     * checking for Name will match.
+     * 
+     * @param attributeType The AttributeType we are looking at
+     * @return <code>true</code> if the value is associated with the given
+     * attributeType or one of its ascendant
      */
     public boolean instanceOf( AttributeType attributeType ) throws NamingException
     {
@@ -404,8 +459,6 @@
     // -----------------------------------------------------------------------
     // Object Methods
     // -----------------------------------------------------------------------
-
-
     /**
      * @see Object#hashCode()
      * @throws IllegalStateException on failures to extract the comparator, or the
@@ -420,16 +473,7 @@
             return 0;
         }
 
-        try
-        {
-            return Arrays.hashCode( getNormalizedReference() );
-        }
-        catch ( NamingException e )
-        {
-            String msg = "Failed to normalize \"" + toString() + "\" while trying to get hashCode()";
-            LOG.error( msg, e );
-            throw new IllegalStateException( msg, e );
-        }
+        return Arrays.hashCode( getNormalizedValueReference() );
     }
 
 
@@ -455,25 +499,44 @@
 
         ServerBinaryValue other = ( ServerBinaryValue ) obj;
         
-        if ( isNull() && other.isNull() )
+        if ( isNull() )
         {
-            return true;
+            return other.isNull();
         }
 
-        if ( isNull() != other.isNull() )
+        // Shortcut : if the values are equals, no need to compare
+        // the normalized values
+        if ( Arrays.equals( wrapped, other.get() ) )
         {
-            return false;
+            return true;
         }
+        else
+        {
+            try
+            {
+                Comparator<byte[]> comparator = getComparator();
 
-        return compareTo( (ServerValue<byte[]>)other ) == 0;
+                // Compare normalized values
+                if ( comparator == null )
+                {
+                    return Arrays.equals( getNormalizedValueReference(), other.getNormalizedValueReference() );
+                }
+                else
+                {
+                    return comparator.compare( getNormalizedValueReference(), other.getNormalizedValueReference() ) == 0;
+                }
+            }
+            catch ( NamingException ne )
+            {
+                return false;
+            }
+        }
     }
 
 
     // -----------------------------------------------------------------------
     // Private Helper Methods (might be put into abstract base class)
     // -----------------------------------------------------------------------
-
-
     /**
      * Find a matchingRule to use for normalization and comparison.  If an equality
      * matchingRule cannot be found it checks to see if other matchingRules are

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntry.java Tue Mar  4 08:35:12 2008
@@ -20,6 +20,7 @@
 
 
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 
@@ -254,7 +255,7 @@
      *         <code>null</code>
      * @throws NamingException if there are resolution issues
      */
-    ServerAttribute put( AttributeType attributeType, ServerValue<?>... values ) throws NamingException;
+    ServerAttribute put( AttributeType attributeType, Value<?>... values ) throws NamingException;
 
     /**
      * Places a new attribute with the supplied attributeType and value into this
@@ -272,7 +273,7 @@
      *         <code>null</code>
      * @throws NamingException if there are failures
      */
-    ServerAttribute put( String upId, ServerValue<?>... values ) throws NamingException;
+    ServerAttribute put( String upId, Value<?>... values ) throws NamingException;
 
 
     /**

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntrySerializer.java Tue Mar  4 08:35:12 2008
@@ -26,6 +26,7 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.name.LdapDNSerializer;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -109,7 +110,7 @@
             // The number of values
             out.writeInt( attribute.size() );
 
-            for ( ServerValue<?> value:attribute )
+            for ( Value<?> value:attribute )
             {
                 serializeValue( value, out );
             }
@@ -134,7 +135,7 @@
      *  [UP value]
      *  [Norm value] (will be null if normValue == upValue)
      */
-    private void serializeValue( ServerValue<?> value, ObjectOutput out ) throws IOException, NamingException
+    private void serializeValue( Value<?> value, ObjectOutput out ) throws IOException, NamingException
     {
         out.writeBoolean( value.isValid() );
         
@@ -155,7 +156,7 @@
                 // Save the UP value and the normalized value
                 out.writeUTF( ssv.get() );
                 ssv.normalize();
-                out.writeUTF( ssv.getNormalized() );
+                out.writeUTF( ssv.getNormalizedValue() );
             }
         }
         else if ( value instanceof ServerBinaryValue )
@@ -181,8 +182,8 @@
                 {
                     sbv.normalize();
                     
-                    out.writeInt( sbv.getNormalizedReference().length );
-                    out.write( sbv.getNormalizedReference() );
+                    out.writeInt( sbv.getNormalizedValueReference().length );
+                    out.write( sbv.getNormalizedValueReference() );
                 }
             }
         }
@@ -203,7 +204,7 @@
      *  [UP value]
      *  [Norm value] (will be null if normValue == upValue)
      */
-    private ServerValue<?> deserializeValue( ObjectInput in, AttributeType attributeType ) throws IOException, NamingException
+    private Value<?> deserializeValue( ObjectInput in, AttributeType attributeType ) throws IOException, NamingException
     {
         boolean isValid = in.readBoolean();
         boolean isHR = in.readBoolean();
@@ -228,7 +229,7 @@
                 }
                 
                 
-                ServerValue<?> ssv = new ServerStringValue( attributeType, value, normalized, isValid );
+                Value<?> ssv = new ServerStringValue( attributeType, value, normalized, isValid );
                 
                 return ssv;
             }
@@ -270,7 +271,7 @@
                     normalized = value;
                 }
                 
-                ServerValue<?> sbv = new ServerBinaryValue( attributeType, value, normalized, same, isValid );
+                Value<?> sbv = new ServerBinaryValue( attributeType, value, normalized, same, isValid );
                 
                 return sbv;
             }
@@ -313,7 +314,7 @@
             
             for ( int j = 0; j < nbValues; j++ )
             {
-                ServerValue<?> value = deserializeValue( in, attributeType );
+                Value<?> value = deserializeValue( in, attributeType );
                 serverAttribute.add( value );
             }
             

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java Tue Mar  4 08:35:12 2008
@@ -19,7 +19,6 @@
 package org.apache.directory.server.core.entry;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -41,6 +40,7 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -89,9 +89,9 @@
             
             Attribute attribute = new AttributeImpl( attributeType.getName() );
             
-            for ( Iterator<ServerValue<?>> iter = attr.iterator(); iter.hasNext();)
+            for ( Iterator<Value<?>> iter = attr.iterator(); iter.hasNext();)
             {
-                ServerValue<?> value = iter.next();
+                Value<?> value = iter.next();
                 attribute.add( value.get() );
             }
             
@@ -218,9 +218,9 @@
             
             ServerAttribute attr = entry.get( attributeType );
             
-            for ( Iterator<ServerValue<?>> iter = attr.iterator(); iter.hasNext();)
+            for ( Iterator<Value<?>> iter = attr.iterator(); iter.hasNext();)
             {
-                ServerValue<?> value = iter.next();
+                Value<?> value = iter.next();
                 attribute.add( value );
             }
             
@@ -240,7 +240,7 @@
     {
         Attribute attribute = new BasicAttribute( attr.getUpId(), false );
 
-        for ( ServerValue<?> value:attr )
+        for ( Value<?> value:attr )
         {
             attribute.add( value.get() );
         }
@@ -258,7 +258,7 @@
     {
         Attribute attribute = new AttributeImpl( attr.getUpId() );
 
-        for ( ServerValue<?> value:attr )
+        for ( Value<?> value:attr )
         {
             attribute.add( value.get() );
         }
@@ -302,7 +302,7 @@
 
                     if ( existing != null )
                     {
-                        for ( ServerValue<?> value:toBeRemoved )
+                        for ( Value<?> value:toBeRemoved )
                         {
                             existing.remove( value );
                         }
@@ -317,13 +317,13 @@
 
                 if ( existing != null )
                 {
-                    for ( ServerValue<?> value:existing )
+                    for ( Value<?> value:existing )
                     {
                         combined.add( value );
                     }
                 }
 
-                for ( ServerValue<?> value:toBeAdded )
+                for ( Value<?> value:toBeAdded )
                 {
                     combined.add( value );
                 }
@@ -375,7 +375,7 @@
 
         if ( attr0 != null )
         {
-            for ( ServerValue<?> value:attr1 )
+            for ( Value<?> value:attr1 )
             {
                 attr.add( value );
             }

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java Tue Mar  4 08:35:12 2008
@@ -20,7 +20,8 @@
 
 
 import org.apache.directory.shared.ldap.NotImplementedException;
-import org.apache.directory.shared.ldap.entry.AbstractStringValue;
+import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -45,7 +46,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ServerStringValue extends AbstractStringValue implements ServerValue<String>, Externalizable
+public class ServerStringValue extends ClientStringValue
 {
     /** Used for serialization */
     public static final long serialVersionUID = 2L;
@@ -56,13 +57,50 @@
     /** reference to the attributeType which is not serialized */
     private transient AttributeType attributeType;
 
-    /** the canonical representation of the wrapped String value */
-    private String normalizedValue;
 
-    /** cached results of the isValid() method call */
-    private transient Boolean valid;
+    // -----------------------------------------------------------------------
+    // utility methods
+    // -----------------------------------------------------------------------
+    /**
+     * Utility method to get some logs if an assert fails
+     */
+    protected String logAssert( String message )
+    {
+        LOG.error(  message );
+        return message;
+    }
+
+    
+    /**
+     *  Check the attributeType member. It should not be null, 
+     *  and it should contains a syntax.
+     */
+    protected String checkAttributeType( AttributeType attributeType )
+    {
+        try
+        {
+            if ( attributeType == null )
+            {
+                return "The AttributeType parameter should not be null";
+            }
+            
+            if ( attributeType.getSyntax() == null )
+            {
+                return "There is no Syntax associated with this attributeType";
+            }
 
+            return null;
+        }
+        catch ( NamingException ne )
+        {
+            return "This AttributeType is incorrect";
+        }
+    }
 
+    
+    // -----------------------------------------------------------------------
+    // Constructors
+    // -----------------------------------------------------------------------
     /**
      * Creates a ServerStringValue without an initial wrapped value.
      *
@@ -70,7 +108,8 @@
      */
     public ServerStringValue( AttributeType attributeType )
     {
-        assert checkAttributeType( attributeType) == null : logAssert( checkAttributeType( attributeType ) );
+        super();
+        assert checkAttributeType( attributeType ) == null : logAssert( checkAttributeType( attributeType ) );
 
         try
         {
@@ -86,7 +125,6 @@
         }
 
         this.attributeType = attributeType;
-        setNormalized( false );
     }
 
 
@@ -99,9 +137,7 @@
     public ServerStringValue( AttributeType attributeType, String wrapped )
     {
         this( attributeType );
-        set( wrapped );
-        super.set( wrapped );
-        setNormalized( false );
+        this.wrapped = wrapped;
     }
 
 
@@ -115,87 +151,28 @@
      */
     /** No protection */ ServerStringValue( AttributeType attributeType, String wrapped, String normalizedValue, boolean valid )
     {
-        setNormalized( true );
+        super( wrapped );
+        this.normalized = true;
         this.attributeType = attributeType;
-        super.set( wrapped );
         this.normalizedValue = normalizedValue;
         this.valid = valid;
     }
 
 
     // -----------------------------------------------------------------------
-    // Value<String> Methods
+    // Value<String> Methods, overloaded
     // -----------------------------------------------------------------------
-
-
     /**
-     * Sets the wrapped String value.  Has the side effect of setting the
-     * normalizedValue and the valid flags to null if the wrapped value is
-     * different than what is already set.  These cached values must be
-     * recomputed to be correct with different values.
-     *
-     * @see ServerValue#set(Object)
+     * @return a copy of the current value
      */
-    public final void set( String wrapped )
+    public ServerStringValue clone()
     {
-        // Why should we invalidate the normalized value if it's we're setting the
-        // wrapper to it's current value?
-        if ( ( wrapped != null ) && wrapped.equals( get() ) )
-        {
-            return;
-        }
-
-        setNormalized( false );
-        valid = null;
-        super.set( wrapped );
-
-        /*
-        try
-        {
-            Normalizer normalizer = getNormalizer();
-            
-            if ( normalizer != null )
-            {
-                normalizedValue = (String)getNormalizer().normalize( wrapped );
-            }
-            else
-            {
-                normalizedValue = wrapped;
-            }
-            
-            // This is a special case : null values are allowed in LDAP 
-            if ( normalizedValue == null )
-            {
-                valid = true;
-                return;
-            }
-
-            valid = attributeType.getSyntax().getSyntaxChecker().isValidSyntax( normalizedValue );
-            
-            if ( !valid )
-            {
-                String message = "The wrapped value '" + wrapped + "'is not valid";
-                LOG.warn( message );
-            }
-        }
-        catch ( NamingException ne )
-        {
-            String message = "The wrapped value '" + wrapped + "'is not valid";
-            try
-            {
-                Normalizer normalizer = getNormalizer();
-                normalizedValue = (String)getNormalizer().normalize( wrapped );
-                valid = attributeType.getSyntax().getSyntaxChecker().isValidSyntax( normalizedValue );
-            }
-            catch ( Exception e )
-            {
-                
-            }
-            LOG.error( message );
-            throw new IllegalArgumentException( message );
-        }
-        */
+        ServerStringValue clone = (ServerStringValue)super.clone();
+        
+        return clone;
     }
+    
+    
 
 
     // -----------------------------------------------------------------------
@@ -210,7 +187,7 @@
     public void normalize() throws NamingException
     {
         // If the value is already normalized, get out.
-        if ( isNormalized() )
+        if ( normalized )
         {
             return;
         }
@@ -219,15 +196,16 @@
 
         if ( normalizer == null )
         {
-            normalizedValue = get();
-            setNormalized( false );
+            normalizedValue = wrapped;
         }
         else
         {
-            normalizedValue = ( String ) normalizer.normalize( get() );
-            setNormalized( true );
+            normalizedValue = ( String ) normalizer.normalize( wrapped );
         }
+
+        normalized = true;
     }
+    
 
     /**
      * Gets the normalized (canonical) representation for the wrapped string.
@@ -240,16 +218,25 @@
      * @return gets the normalized value
      * @throws NamingException if the value cannot be properly normalized
      */
-    public String getNormalized() throws NamingException
+    public String getNormalizedValue() 
     {
         if ( isNull() )
         {
             return null;
         }
 
-        if ( !isNormalized() )
+        if ( !normalized )
         {
-            normalize();
+            try
+            {
+                normalize();
+            }
+            catch ( NamingException ne )
+            {
+                String message = "Cannot normalize the value :" + ne.getMessage();
+                LOG.warn( message );
+                normalized = false;
+            }
         }
 
         return normalizedValue;
@@ -265,14 +252,24 @@
      *
      * @see ServerValue#isValid()
      */
-    public final boolean isValid() throws NamingException
+    public final boolean isValid()
     {
         if ( valid != null )
         {
             return valid;
         }
 
-        valid = attributeType.getSyntax().getSyntaxChecker().isValidSyntax( get() );
+        try
+        {
+            valid = attributeType.getSyntax().getSyntaxChecker().isValidSyntax( get() );
+        }
+        catch ( NamingException ne )
+        {
+            String message = "Cannot check the syntax : " + ne.getMessage();
+            LOG.error( message );
+            valid = false;
+        }
+        
         return valid;
     }
 
@@ -282,7 +279,7 @@
      * @throws IllegalStateException on failures to extract the comparator, or the
      * normalizers needed to perform the required comparisons based on the schema
      */
-    public int compareTo( ServerValue<String> value )
+    public int compareTo( Value<String> value )
     {
         if ( isNull() )
         {
@@ -311,7 +308,8 @@
             }
             catch ( NamingException ne )
             {
-                LOG.error( "Cannot nnormalize the wrapped value '" + stringValue.get() + "'" );
+                String message = "Cannot normalize the wrapped value " + stringValue; 
+                LOG.error( message );
             }
             
             // Normalizes the value
@@ -321,26 +319,33 @@
             }
             catch ( NamingException ne )
             {
-                LOG.error( "Cannot normalize the wrapped value '" + get() + "'" );
+                String message = "Cannot normalize the wrapped value " + this;
+                LOG.error( message );
             }
 
             try
             {
                 //noinspection unchecked
-                return getComparator().compare( getNormalized(), stringValue.getNormalized() );
+                return getComparator().compare( getNormalizedValue(), stringValue.getNormalizedValue() );
             }
             catch ( NamingException e )
             {
-                String msg = "Failed to compare normalized values for " + get() + " and " + value;
+                String msg = "Failed to compare normalized values for " + this + " and " + value;
                 LOG.error( msg, e );
                 throw new IllegalStateException( msg, e );
             }
         }
 
-        throw new NotImplementedException( "I don't know what to do if value is not a ServerStringValue" );
+        String message = "I don't know what to do if value is not a ServerStringValue";
+        LOG.error( message );
+        throw new NotImplementedException( message );
     }
 
 
+    /**
+     * Get the associated AttributeType
+     * @return The AttributeType
+     */
     public AttributeType getAttributeType()
     {
         return attributeType;
@@ -348,7 +353,15 @@
 
 
     /**
-     * @see ServerValue#instanceOf(AttributeType)
+     * Check if the value is stored into an instance of the given 
+     * AttributeType, or one of its ascendant.
+     * 
+     * For instance, if the Value is associated with a CommonName,
+     * checking for Name will match.
+     * 
+     * @param attributeType The AttributeType we are looking at
+     * @return <code>true</code> if the value is associated with the given
+     * attributeType or one of its ascendant
      */
     public boolean instanceOf( AttributeType attributeType ) throws NamingException
     {
@@ -364,35 +377,6 @@
     // -----------------------------------------------------------------------
     // Object Methods
     // -----------------------------------------------------------------------
-
-
-    /**
-     * @see Object#hashCode()
-     * @throws IllegalStateException on failures to extract the comparator, or the
-     * normalizers needed to perform the required comparisons based on the schema
-     */
-    public int hashCode()
-    {
-        // return zero if the value is null so only one null value can be
-        // stored in an attribute - the binary version does the same 
-        if ( isNull() )
-        {
-            return 0;
-        }
-
-        try
-        {
-            return getNormalized().hashCode();
-        }
-        catch ( NamingException e )
-        {
-            String msg = "Failed to normalize \"" + get() + "\" while trying to get hashCode()";
-            LOG.error( msg, e );
-            throw new IllegalStateException( msg, e );
-        }
-    }
-
-
     /**
      * Checks to see if this ServerStringValue equals the supplied object.
      *
@@ -407,7 +391,7 @@
         {
             return true;
         }
-
+        
         if ( ! ( obj instanceof ServerStringValue ) )
         {
             return false;
@@ -415,14 +399,9 @@
 
         ServerStringValue other = ( ServerStringValue ) obj;
         
-        if ( isNull() && other.isNull() )
-        {
-            return true;
-        }
-
-        if ( isNull() != other.isNull() )
+        if ( isNull() )
         {
-            return false;
+            return other.isNull();
         }
 
         // Shortcut : compare the values without normalization
@@ -437,20 +416,22 @@
         {
             try
             {
+                Comparator<String> comparator = getComparator();
+
                 // Compare normalized values
-                if ( getComparator() == null )
+                if ( comparator == null )
                 {
-                    ServerStringValue stringValue = ( ServerStringValue )other;
-
-                    return getNormalized().equals( stringValue.getNormalized() );
+                    return getNormalizedValue().equals( other.getNormalizedValue() );
+                }
+                else
+                {
+                    return comparator.compare( getNormalizedValue(), other.getNormalizedValue() ) == 0;
                 }
             }
             catch ( NamingException ne )
             {
-                return this.get().equals( other.get() );
+                return false;
             }
-
-            return ( compareTo( other ) == 0 );
         }
     }
 
@@ -524,24 +505,6 @@
         }
 
         return mr.getComparator();
-    }
-    
-    
-    /**
-     * @return a copy of the current value
-     */
-    public ServerStringValue clone()
-    {
-        try
-        {
-            ServerStringValue clone = (ServerStringValue)super.clone();
-            
-            return clone;
-        }
-        catch ( CloneNotSupportedException cnse )
-        {
-            return null;
-        }
     }
     
     

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerValue.java Tue Mar  4 08:35:12 2008
@@ -52,40 +52,14 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public interface ServerValue<T> extends Value<T>, Comparable<ServerValue<T>>
+public interface ServerValue<T> extends Value<T>
 {
-    /**
-     * Checks to see if this ServerValue is valid according to the syntax
-     * of the ServerAttribute which contains it.
-     *
-     * @return true if valid according to syntax, false otherwise
-     * @throws NamingException if schema entity resolution fails or the syntaxChecker fails
-     */
-    boolean isValid() throws NamingException;
-
-
-    /**
-     * Compares two ServerValue objects for ordering based on the matchingRules
-     * associated with the ServerAttribute containing this ServerValue.
-     * Implementations should be using the normalized versions of the wrapped
-     * value when conducting comparisons.
-     *
-     * @param value the ServerValue object to compare this ServerValue to
-     * @return 0 if the objects are equivalent according to equals(), 1 or greater
-     * if this ServerValue is greater than the supplied ServerValue, -1 or lesser
-     * if this ServerValue is less than the supplied ServerValue.
-     */
-    int compareTo( ServerValue<T> value );
-
-
     AttributeType getAttributeType();
 
     
     boolean instanceOf( AttributeType attributeType ) throws NamingException;
-    
-    ServerValue<T> clone();
-    
-    
+
+
     /**
      * Compute the normalized value
      *

Modified: directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java?rev=633535&r1=633534&r2=633535&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java (original)
+++ directory/apacheds/branches/bigbang/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java Tue Mar  4 08:35:12 2008
@@ -26,6 +26,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.InvalidAttributeValueException;
 
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.junit.Test;
 
@@ -55,7 +56,7 @@
         
         assertTrue( attr.getType().getSyntax().isHumanReadable() );
         
-        ServerValue<?> value = attr.get();
+        Value<?> value = attr.get();
         
         assertTrue( value instanceof ServerStringValue );
         assertEquals( "test", ((ServerStringValue)value).get() );
@@ -71,8 +72,8 @@
             assertTrue( true );
         }
         
-        // Add a ServerValue
-        ServerValue<?> ssv = new ServerStringValue( at, "test2" );
+        // Add a Value
+        Value<?> ssv = new ServerStringValue( at, "test2" );
         
         attr.add( ssv );
         
@@ -82,7 +83,7 @@
         expected.add( "test" );
         expected.add( "test2" );
         
-        for ( ServerValue<?> val:attr )
+        for ( Value<?> val:attr )
         {
             if ( expected.contains( val.get() ) )
             {
@@ -116,7 +117,7 @@
         expected.add( "test" );
         expected.add( "test2" );
         
-        for ( ServerValue<?> val:attr )
+        for ( Value<?> val:attr )
         {
             if ( expected.contains( val.get() ) )
             {
@@ -145,7 +146,7 @@
         
         assertTrue( attr.getType().getSyntax().isHumanReadable() );
         
-        ServerValue<?> value = attr.get();
+        Value<?> value = attr.get();
         
         assertTrue( value instanceof ServerStringValue );
         assertNull( ((ServerStringValue)value).get() );



Mime
View raw message