directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1087504 [3/4] - in /directory/shared/trunk: dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ dsml/parser/src/test/java/org/apache/directory/shared/d...
Date Thu, 31 Mar 2011 23:21:52 GMT
Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifRevertor.java Thu Mar 31 23:21:50 2011
@@ -30,7 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -94,7 +94,7 @@ public final class LdifRevertor
         entry.setDn( dn );
         entry.setChangeType( ChangeType.Add );
 
-        for ( EntryAttribute attribute : deletedEntry )
+        for ( Attribute attribute : deletedEntry )
         {
             entry.addAttribute( attribute );
         }
@@ -146,9 +146,9 @@ public final class LdifRevertor
             switch ( modification.getOperation() )
             {
                 case ADD_ATTRIBUTE:
-                    EntryAttribute mod = modification.getAttribute();
+                    Attribute mod = modification.getAttribute();
 
-                    EntryAttribute previous = clonedEntry.get( mod.getId() );
+                    Attribute previous = clonedEntry.get( mod.getId() );
 
                     if ( mod.equals( previous ) )
                     {
@@ -214,7 +214,7 @@ public final class LdifRevertor
 
                     if ( previous == null )
                     {
-                        EntryAttribute emptyAttribute = new DefaultEntryAttribute( mod.getId() );
+                        Attribute emptyAttribute = new DefaultEntryAttribute( mod.getId() );
                         reverseModification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
                             emptyAttribute );
                         reverseModifications.add( 0, reverseModification );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifUtils.java Thu Mar 31 23:21:50 2011
@@ -28,7 +28,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.model.entry.AttributeUtils;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -302,7 +302,7 @@ public final class LdifUtils
         }
 
         // Then all the attributes
-        for ( EntryAttribute attribute : entry )
+        for ( Attribute attribute : entry )
         {
             sb.append( convertToLdif( attribute, length ) );
         }
@@ -324,7 +324,7 @@ public final class LdifUtils
         StringBuilder sb = new StringBuilder();
 
         // Then all the attributes
-        for ( EntryAttribute attribute : entry )
+        for ( Attribute attribute : entry )
         {
             sb.append( convertToLdif( attribute, length ) );
         }
@@ -416,7 +416,7 @@ public final class LdifUtils
                 }
 
                 // Now, iterate through all the attributes
-                for ( EntryAttribute attribute : entry.getEntry() )
+                for ( Attribute attribute : entry.getEntry() )
                 {
                     sb.append( convertToLdif( attribute, length ) );
                 }
@@ -439,7 +439,7 @@ public final class LdifUtils
                 }
 
                 // Stores the new Rdn
-                EntryAttribute newRdn = new DefaultEntryAttribute( "newrdn", entry.getNewRdn() );
+                Attribute newRdn = new DefaultEntryAttribute( "newrdn", entry.getNewRdn() );
                 sb.append( convertToLdif( newRdn, length ) );
 
                 // Stores the deleteoldrdn flag
@@ -459,7 +459,7 @@ public final class LdifUtils
                 // Stores the optional newSuperior
                 if ( !Strings.isEmpty(entry.getNewSuperior()) )
                 {
-                    EntryAttribute newSuperior = new DefaultEntryAttribute( "newsuperior", entry.getNewSuperior() );
+                    Attribute newSuperior = new DefaultEntryAttribute( "newsuperior", entry.getNewSuperior() );
                     sb.append( convertToLdif( newSuperior, length ) );
                 }
 
@@ -530,7 +530,7 @@ public final class LdifUtils
      * @return the corresponding LDIF code as a String
      * @throws LdapException If a naming exception is encountered.
      */
-    public static String convertToLdif( EntryAttribute attr ) throws LdapException
+    public static String convertToLdif( Attribute attr ) throws LdapException
     {
         return convertToLdif( attr, DEFAULT_LINE_LENGTH );
     }
@@ -544,7 +544,7 @@ public final class LdifUtils
      * @return the corresponding LDIF code as a String
      * @throws LdapException If a naming exception is encountered.
      */
-    public static String convertToLdif( EntryAttribute attr, int length ) throws LdapException
+    public static String convertToLdif( Attribute attr, int length ) throws LdapException
     {
         StringBuilder sb = new StringBuilder();
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java Thu Mar 31 23:21:50 2011
@@ -23,7 +23,7 @@ package org.apache.directory.shared.ldap
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -44,7 +44,7 @@ public class AddRequestImpl extends Abst
     private AddResponse response;
 
     /** The current attribute being decoded */
-    private EntryAttribute currentAttribute;
+    private Attribute currentAttribute;
 
 
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequest.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequest.java Thu Mar 31 23:21:50 2011
@@ -22,7 +22,7 @@ package org.apache.directory.shared.ldap
 
 import java.util.Collection;
 
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -174,10 +174,10 @@ public interface ModifyRequest extends S
      *
      * @param attr the attribute to be added
      */
-    void remove( EntryAttribute attr );
+    void remove( Attribute attr );
 
 
-    void addModification( EntryAttribute attr, ModificationOperation modOp );
+    void addModification( Attribute attr, ModificationOperation modOp );
 
 
     /**
@@ -201,7 +201,7 @@ public interface ModifyRequest extends S
      *
      * @param attr the attribute to be added
      */
-    void add( EntryAttribute attr );
+    void add( Attribute attr );
 
 
     /**
@@ -231,5 +231,5 @@ public interface ModifyRequest extends S
      *
      * @param attr the attribute to be added
      */
-    void replace( EntryAttribute attr );
+    void replace( Attribute attr );
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/ModifyRequestImpl.java Thu Mar 31 23:21:50 2011
@@ -28,7 +28,7 @@ import java.util.List;
 
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -128,19 +128,19 @@ public class ModifyRequestImpl extends A
 
     private void addModification( ModificationOperation modOp, String attributeName, byte[]... attributeValue )
     {
-        EntryAttribute attr = new DefaultEntryAttribute( attributeName, attributeValue );
+        Attribute attr = new DefaultEntryAttribute( attributeName, attributeValue );
         addModification( attr, modOp );
     }
 
 
     private void addModification( ModificationOperation modOp, String attributeName, String... attributeValue )
     {
-        EntryAttribute attr = new DefaultEntryAttribute( attributeName, attributeValue );
+        Attribute attr = new DefaultEntryAttribute( attributeName, attributeValue );
         addModification( attr, modOp );
     }
 
 
-    public void addModification( EntryAttribute attr, ModificationOperation modOp )
+    public void addModification( Attribute attr, ModificationOperation modOp )
     {
         mods.add( new DefaultModification( modOp, attr ) );
     }
@@ -175,7 +175,7 @@ public class ModifyRequestImpl extends A
      *
      * @param attr the attribute to be added
      */
-    public void add( EntryAttribute attr )
+    public void add( Attribute attr )
     {
         addModification( attr, ModificationOperation.ADD_ATTRIBUTE );
     }
@@ -219,7 +219,7 @@ public class ModifyRequestImpl extends A
      *
      * @param attr the attribute to be added
      */
-    public void replace( EntryAttribute attr )
+    public void replace( Attribute attr )
     {
         addModification( attr, ModificationOperation.REPLACE_ATTRIBUTE );
     }
@@ -264,7 +264,7 @@ public class ModifyRequestImpl extends A
      *
      * @param attr the attribute to be added
      */
-    public void remove( EntryAttribute attr )
+    public void remove( Attribute attr )
     {
         addModification( attr, ModificationOperation.REMOVE_ATTRIBUTE );
     }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java Thu Mar 31 23:21:50 2011
@@ -29,7 +29,7 @@ import java.util.UUID;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -76,9 +76,9 @@ public final class SchemaUtils
                     break;
 
                 case ADD_ATTRIBUTE :
-                    EntryAttribute combined = mod.getAttribute().clone();
-                    EntryAttribute toBeAdded = mod.getAttribute();
-                    EntryAttribute existing = entry.get( id );
+                    Attribute combined = mod.getAttribute().clone();
+                    Attribute toBeAdded = mod.getAttribute();
+                    Attribute existing = entry.get( id );
 
                     if ( existing != null )
                     {
@@ -97,7 +97,7 @@ public final class SchemaUtils
                     break;
 
                 case REMOVE_ATTRIBUTE :
-                    EntryAttribute toBeRemoved = mod.getAttribute();
+                    Attribute toBeRemoved = mod.getAttribute();
 
                     if ( toBeRemoved.size() == 0 )
                     {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java Thu Mar 31 23:21:50 2011
@@ -32,7 +32,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.model.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.util.StringConstants;
 import org.apache.directory.shared.util.Strings;
@@ -177,7 +177,7 @@ public abstract class AbstractSchemaLoad
             throw new IllegalArgumentException( I18n.err( I18n.ERR_04261 ) );
         }
 
-        EntryAttribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
+        Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
         boolean isSchema = false;
 
         for ( Value<?> value : objectClasses )
@@ -224,7 +224,7 @@ public abstract class AbstractSchemaLoad
         if ( entry.get( MetaSchemaConstants.M_DEPENDENCIES_AT ) != null )
         {
             Set<String> depsSet = new HashSet<String>();
-            EntryAttribute depsAttr = entry.get( MetaSchemaConstants.M_DEPENDENCIES_AT );
+            Attribute depsAttr = entry.get( MetaSchemaConstants.M_DEPENDENCIES_AT );
 
             for ( Value<?> value : depsAttr )
             {

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/AttributeUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/AttributeUtilsTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/AttributeUtilsTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/AttributeUtilsTest.java Thu Mar 31 23:21:50 2011
@@ -73,7 +73,7 @@ public class AttributeUtilsTest
     public void testApplyAddModificationToEmptyEntry() throws LdapException
     {
         Entry entry = new DefaultEntry();
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
         Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attr );
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get(  "cn" ) );
@@ -92,7 +92,7 @@ public class AttributeUtilsTest
         entry.add( "dc", "apache" );
         assertEquals( 1, entry.size() );
 
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
         Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attr );
 
         AttributeUtils.applyModification( entry, modification );
@@ -113,13 +113,13 @@ public class AttributeUtilsTest
         entry.put( "cn", "apache" );
         assertEquals( 1, entry.size() );
 
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
         Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attr );
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get(  "cn" ) );
         assertEquals( 1, entry.size() );
         
-        EntryAttribute attribute = entry.get( "cn" );
+        Attribute attribute = entry.get( "cn" );
         
         assertTrue( attribute.size() != 0 );
         
@@ -151,13 +151,13 @@ public class AttributeUtilsTest
         entry.put( "cn", "test", "apache" );
         assertEquals( 1, entry.size() );
 
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
         Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attr );
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get( "cn" ) );
         assertEquals( 1, entry.size() );
         
-        EntryAttribute cnAttr = entry.get( "cn" );
+        Attribute cnAttr = entry.get( "cn" );
         
         assertTrue( cnAttr.size() != 0 );
         
@@ -186,7 +186,7 @@ public class AttributeUtilsTest
     {
         Entry entry = new DefaultEntry();
 
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
 
         Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
         AttributeUtils.applyModification( entry, modification );
@@ -203,10 +203,10 @@ public class AttributeUtilsTest
     {
         Entry entry = new DefaultEntry();
 
-        EntryAttribute dc = new DefaultEntryAttribute( "dc", "apache" );
+        Attribute dc = new DefaultEntryAttribute( "dc", "apache" );
         entry.put( dc );
         
-        EntryAttribute cn = new DefaultEntryAttribute( "cn", "test" );
+        Attribute cn = new DefaultEntryAttribute( "cn", "test" );
         
         Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, cn );
         
@@ -228,10 +228,10 @@ public class AttributeUtilsTest
     {
         Entry entry = new DefaultEntry();
 
-        EntryAttribute cn = new DefaultEntryAttribute( "cn", "apache" );
+        Attribute cn = new DefaultEntryAttribute( "cn", "apache" );
         entry.put( cn );
         
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
         
         Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
         
@@ -254,7 +254,7 @@ public class AttributeUtilsTest
         Entry entry = new DefaultEntry();
         entry.put( "cn", "test" );
         
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
 
         Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
         
@@ -277,7 +277,7 @@ public class AttributeUtilsTest
         Entry entry = new DefaultEntry();
         entry.put( "cn", "test", "apache" );
         
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
         
         Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
         
@@ -286,7 +286,7 @@ public class AttributeUtilsTest
         assertNotNull( entry.get( "cn" ) );
         assertEquals( 1, entry.size() );
         
-        EntryAttribute modifiedAttr = entry.get( "cn" );
+        Attribute modifiedAttr = entry.get( "cn" );
         
         assertTrue( modifiedAttr.size() != 0 );
         
@@ -313,7 +313,7 @@ public class AttributeUtilsTest
     {
         Entry entry = new DefaultEntry();
         
-        EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
+        Attribute attr = new DefaultEntryAttribute( "cn", "test" );
 
         
         Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attr );
@@ -335,7 +335,7 @@ public class AttributeUtilsTest
     {
         Entry entry = new DefaultEntry();
         
-        EntryAttribute attr = new DefaultEntryAttribute( "cn" );
+        Attribute attr = new DefaultEntryAttribute( "cn" );
 
         Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attr );
         AttributeUtils.applyModification( entry, modification );
@@ -358,7 +358,7 @@ public class AttributeUtilsTest
         entry.put( "cn", "test" );
         entry.put( "ou", "apache", "acme corp" );
         
-        EntryAttribute newOu = new DefaultEntryAttribute( "ou", "Big Company", "directory" );
+        Attribute newOu = new DefaultEntryAttribute( "ou", "Big Company", "directory" );
         
         Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, newOu );
         
@@ -369,7 +369,7 @@ public class AttributeUtilsTest
         assertNotNull( entry.get( "cn" ) );
         assertNotNull( entry.get( "ou" ) );
         
-        EntryAttribute modifiedAttr = entry.get( "ou" );
+        Attribute modifiedAttr = entry.get( "ou" );
         
         assertTrue( modifiedAttr.size() != 0 );
         
@@ -402,7 +402,7 @@ public class AttributeUtilsTest
         entry.put(  "cn", "test" );
         entry.put( "ou", "apache", "acme corp" );
         
-        EntryAttribute newOu = new DefaultEntryAttribute( "ou" );
+        Attribute newOu = new DefaultEntryAttribute( "ou" );
         
         Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, newOu );
         

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttributeTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttributeTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttributeTest.java Thu Mar 31 23:21:50 2011
@@ -164,7 +164,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testDefaultClientAttribute()
     {
-        EntryAttribute attr = new DefaultEntryAttribute();
+        Attribute attr = new DefaultEntryAttribute();
         
         assertFalse( attr.isHumanReadable() );
         assertEquals( 0, attr.size() );
@@ -179,7 +179,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testDefaultClientAttributeString()
     {
-        EntryAttribute attr = new DefaultEntryAttribute( "TEST" );
+        Attribute attr = new DefaultEntryAttribute( "TEST" );
         
         assertFalse( attr.isHumanReadable() );
         assertEquals( 0, attr.size() );
@@ -194,7 +194,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testDefaultClientAttributeStringValueArray()
     {
-        EntryAttribute attr = new DefaultEntryAttribute( "Test", STR_VALUE1, STR_VALUE2 );
+        Attribute attr = new DefaultEntryAttribute( "Test", STR_VALUE1, STR_VALUE2 );
         
         assertTrue( attr.isHumanReadable() );
         assertEquals( 2, attr.size() );
@@ -211,7 +211,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testDefaultClientAttributeStringStringArray()
     {
-        EntryAttribute attr = new DefaultEntryAttribute( "Test", "a", "b" );
+        Attribute attr = new DefaultEntryAttribute( "Test", "a", "b" );
         
         assertTrue( attr.isHumanReadable() );
         assertEquals( 2, attr.size() );
@@ -228,7 +228,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testDefaultClientAttributeStringBytesArray()
     {
-        EntryAttribute attr = new DefaultEntryAttribute( "Test", BYTES1, BYTES2 );
+        Attribute attr = new DefaultEntryAttribute( "Test", BYTES1, BYTES2 );
         
         assertFalse( attr.isHumanReadable() );
         assertEquals( 2, attr.size() );
@@ -245,17 +245,17 @@ public class DefaultEntryAttributeTest
     @Test
     public void testGetBytes() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         attr1.add( (byte[])null );
         assertNull( attr1.getBytes() );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         attr2.add( BYTES1, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, attr2.getBytes() ) );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         attr3.add( "a", "b" );
         
@@ -277,17 +277,17 @@ public class DefaultEntryAttributeTest
     @Test
     public void testGetString() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         attr1.add( (String)null );
         assertEquals( "", attr1.getString() );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         attr2.add( "a", "b" );
         assertEquals( "a", attr2.getString() );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         attr3.add( BYTES1, BYTES2 );
         
@@ -309,7 +309,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testGetId()
     {
-        EntryAttribute attr = new DefaultEntryAttribute();
+        Attribute attr = new DefaultEntryAttribute();
 
         assertNull( attr.getId() );
         
@@ -327,7 +327,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testSetId()
     {
-        EntryAttribute attr = new DefaultEntryAttribute();
+        Attribute attr = new DefaultEntryAttribute();
 
         try
         {
@@ -373,7 +373,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testGetUpId()
     {
-        EntryAttribute attr = new DefaultEntryAttribute();
+        Attribute attr = new DefaultEntryAttribute();
 
         assertNull( attr.getUpId() );
         
@@ -391,7 +391,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testSetUpId()
     {
-        EntryAttribute attr = new DefaultEntryAttribute();
+        Attribute attr = new DefaultEntryAttribute();
 
         try
         {
@@ -439,7 +439,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testIsValidSyntaxChecker() throws LdapException
     {
-        EntryAttribute attr = new DefaultEntryAttribute( "test" );
+        Attribute attr = new DefaultEntryAttribute( "test" );
         
         attr.add( "test", "another test" );
         
@@ -456,7 +456,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testIterator() throws LdapException
     {
-        EntryAttribute attr = new DefaultEntryAttribute();
+        Attribute attr = new DefaultEntryAttribute();
         attr.add(  "a", "b", "c" );
         
         Iterator<Value<?>> iter = attr.iterator();
@@ -480,21 +480,21 @@ public class DefaultEntryAttributeTest
     @Test
     public void testAddValueArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         int nbAdded = attr1.add( new StringValue( (String)null ) );
         assertEquals( 1, nbAdded );
         assertTrue( attr1.isHumanReadable() );
         assertEquals( NULL_STRING_VALUE, attr1.get() );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr2.add( new BinaryValue( (byte[])null ) );
         assertEquals( 1, nbAdded );
         assertFalse( attr2.isHumanReadable() );
         assertEquals( NULL_BINARY_VALUE, attr2.get() );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr3.add( new StringValue( "a" ), new StringValue( "b" ) );
         assertEquals( 2, nbAdded );
@@ -502,7 +502,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr3.contains( "a" ) );
         assertTrue( attr3.contains( "b" ) );
         
-        EntryAttribute attr4 = new DefaultEntryAttribute( "test" );
+        Attribute attr4 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr4.add( new BinaryValue( BYTES1 ), new BinaryValue( BYTES2 ) );
         assertEquals( 2, nbAdded );
@@ -510,7 +510,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr4.contains( BYTES1 ) );
         assertTrue( attr4.contains( BYTES2 ) );
         
-        EntryAttribute attr5 = new DefaultEntryAttribute( "test" );
+        Attribute attr5 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr5.add( new StringValue( "c" ), new BinaryValue( BYTES1 ) );
         assertEquals( 2, nbAdded );
@@ -518,7 +518,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr5.contains( "ab" ) );
         assertTrue( attr5.contains( "c" ) );
 
-        EntryAttribute attr6 = new DefaultEntryAttribute( "test" );
+        Attribute attr6 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr6.add( new BinaryValue( BYTES1 ), new StringValue( "c" ) );
         assertEquals( 2, nbAdded );
@@ -526,7 +526,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr6.contains( BYTES1 ) );
         assertTrue( attr6.contains( BYTES3 ) );
 
-        EntryAttribute attr7 = new DefaultEntryAttribute( "test" );
+        Attribute attr7 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr7.add( new BinaryValue( (byte[])null ), new StringValue( "c" ) );
         assertEquals( 2, nbAdded );
@@ -534,7 +534,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr7.contains( NULL_BINARY_VALUE ) );
         assertTrue( attr7.contains( BYTES3 ) );
 
-        EntryAttribute attr8 = new DefaultEntryAttribute( "test" );
+        Attribute attr8 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr8.add( new StringValue( (String)null ), new BinaryValue( BYTES1 ) );
         assertEquals( 2, nbAdded );
@@ -550,28 +550,28 @@ public class DefaultEntryAttributeTest
     @Test
     public void testAddStringArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         int nbAdded = attr1.add( (String)null );
         assertEquals( 1, nbAdded );
         assertTrue( attr1.isHumanReadable() );
         assertEquals( NULL_STRING_VALUE, attr1.get() );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr2.add( "" );
         assertEquals( 1, nbAdded );
         assertTrue( attr2.isHumanReadable() );
         assertEquals( "", attr2.getString() );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr3.add( "t" );
         assertEquals( 1, nbAdded );
         assertTrue( attr3.isHumanReadable() );
         assertEquals( "t", attr3.getString() );
         
-        EntryAttribute attr4 = new DefaultEntryAttribute( "test" );
+        Attribute attr4 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr4.add( "a", "b", "c", "d" );
         assertEquals( 4, nbAdded );
@@ -603,7 +603,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr4.contains( "e" ) );
         assertFalse( attr4.contains( "ab" ) );
         
-        EntryAttribute attr5 = new DefaultEntryAttribute( "test" );
+        Attribute attr5 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr5.add( "a", "b", (String)null, "d" );
         assertEquals( 4, nbAdded );
@@ -613,7 +613,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr5.contains( (String)null ) );
         assertTrue( attr5.contains( "d" ) );
 
-        EntryAttribute attr6 = new DefaultEntryAttribute( "test" );
+        Attribute attr6 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr6.add( "a", (String)null );
         assertEquals( 2, nbAdded );
@@ -621,7 +621,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr6.contains( "a" ) );
         assertTrue( attr6.contains( (String)null ) );
         
-        EntryAttribute attr7 = new DefaultEntryAttribute( "test" );
+        Attribute attr7 = new DefaultEntryAttribute( "test" );
         
         attr7.add( "a", "b" );
         assertEquals( 2, attr7.size() );
@@ -638,28 +638,28 @@ public class DefaultEntryAttributeTest
     @Test
     public void testAddByteArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         int nbAdded = attr1.add( (byte[])null );
         assertEquals( 1, nbAdded );
         assertFalse( attr1.isHumanReadable() );
         assertTrue( Arrays.equals( NULL_BINARY_VALUE.getBytes(), attr1.getBytes() ) );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr2.add( StringConstants.EMPTY_BYTES );
         assertEquals( 1, nbAdded );
         assertFalse( attr2.isHumanReadable() );
         assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, attr2.getBytes() ) );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr3.add( BYTES1 );
         assertEquals( 1, nbAdded );
         assertFalse( attr3.isHumanReadable() );
         assertTrue( Arrays.equals( BYTES1, attr3.getBytes() ) );
         
-        EntryAttribute attr4 = new DefaultEntryAttribute( "test" );
+        Attribute attr4 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr4.add( BYTES1, BYTES2, BYTES3, BYTES4 );
         assertEquals( 4, nbAdded );
@@ -669,7 +669,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr4.contains( BYTES3 ) );
         assertTrue( attr4.contains( BYTES4 ) );
         
-        EntryAttribute attr5 = new DefaultEntryAttribute( "test" );
+        Attribute attr5 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr5.add( BYTES1, BYTES2, (byte[])null, BYTES3 );
         assertEquals( 4, nbAdded );
@@ -679,7 +679,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr5.contains( (byte[])null ) );
         assertTrue( attr5.contains( BYTES3 ) );
 
-        EntryAttribute attr6 = new DefaultEntryAttribute( "test" );
+        Attribute attr6 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr6.add( BYTES1, (byte[])null );
         assertEquals( 2, nbAdded );
@@ -695,7 +695,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testClear() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         assertEquals( 0, attr1.size() );
         
@@ -706,7 +706,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr1.isHumanReadable() );
         assertEquals( 0, attr1.size() );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         attr2.add( BYTES1, BYTES2 );
         assertEquals( 2, attr2.size() );
         assertFalse( attr2.isHumanReadable() );
@@ -722,7 +722,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testContainsValueArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         assertEquals( 0, attr1.size() );
         assertFalse( attr1.contains( STR_VALUE1 ) );
@@ -746,7 +746,7 @@ public class DefaultEntryAttributeTest
         assertFalse( attr1.contains( NULL_STRING_VALUE ) );
         assertTrue( attr1.contains( STR_VALUE1, BIN_VALUE2 ) );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         assertEquals( 0, attr2.size() );
         assertFalse( attr2.contains( BYTES1 ) );
         assertFalse( attr2.contains( NULL_BINARY_VALUE ) );
@@ -775,7 +775,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testContainsStringArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         assertEquals( 0, attr1.size() );
         assertFalse( attr1.contains( "a" ) );
@@ -797,7 +797,7 @@ public class DefaultEntryAttributeTest
         assertFalse( attr1.contains( "e" ) );
         assertFalse( attr1.contains( (String)null ) );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         assertEquals( 0, attr2.size() );
         assertFalse( attr2.contains( BYTES1 ) );
         assertFalse( attr2.contains( (byte[])null ) );
@@ -825,7 +825,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testContainsByteArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         assertEquals( 0, attr1.size() );
         assertFalse( attr1.contains( BYTES1 ) );
@@ -847,7 +847,7 @@ public class DefaultEntryAttributeTest
         assertFalse( attr1.contains( BYTES4 ) );
         assertFalse( attr1.contains( (byte[])null ) );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         assertEquals( 0, attr2.size() );
         assertFalse( attr2.contains( "a" ) );
         assertFalse( attr2.contains( (String)null ) );
@@ -875,12 +875,12 @@ public class DefaultEntryAttributeTest
     @Test
     public void testGet() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         attr1.add( (String)null );
         assertEquals( NULL_STRING_VALUE,attr1.get() );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         attr2.add( "a", "b", "c" );
         assertEquals( "a", attr2.get().getString() );
@@ -894,7 +894,7 @@ public class DefaultEntryAttributeTest
         attr2.remove( "c" );
         assertNull( attr2.get() );
 
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         attr3.add( BYTES1, BYTES2, BYTES3 );
         assertTrue( Arrays.equals( BYTES1, attr3.get().getBytes() ) );
@@ -916,7 +916,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testGetAll() throws LdapException
     {
-        EntryAttribute attr = new DefaultEntryAttribute( "test" );
+        Attribute attr = new DefaultEntryAttribute( "test" );
         
         Iterator<Value<?>> iterator = attr.getAll(); 
         assertFalse( iterator.hasNext() );
@@ -948,14 +948,14 @@ public class DefaultEntryAttributeTest
     @Test
     public void testSize() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
 
         assertEquals( 0, attr1.size() );
         
         attr1.add( (String)null );
         assertEquals( 1, attr1.size() );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         attr2.add( "a", "b" );
         assertEquals( 2, attr2.size() );
@@ -971,7 +971,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testRemoveValueArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
 
         assertFalse( attr1.remove( STR_VALUE1 ) );
         assertFalse( attr1.remove( STR_VALUE1 ) );
@@ -1001,7 +1001,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr1.remove( NULL_STRING_VALUE, STR_VALUE1 ) );
         assertEquals( 1, attr1.size() );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
 
         assertFalse( attr2.remove( BIN_VALUE1 ) );
         
@@ -1040,7 +1040,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testRemoveByteArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
 
         assertFalse( attr1.remove( BYTES1 ) );
         
@@ -1063,7 +1063,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr1.remove( (byte[])null, BYTES1 ) );
         assertEquals( 1, attr1.size() );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         attr2.add( "ab", "b", "c" );
         
@@ -1079,7 +1079,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testRemoveStringArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
 
         assertFalse( attr1.remove( "a" ) );
         
@@ -1102,7 +1102,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr1.remove( (String )null, "a" ) );
         assertEquals( 1, attr1.size() );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         attr2.add( BYTES1, BYTES2, BYTES3 );
         
@@ -1118,28 +1118,28 @@ public class DefaultEntryAttributeTest
     @Test
     public void testPutStringArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         int nbAdded = attr1.add( (String)null );
         assertEquals( 1, nbAdded );
         assertTrue( attr1.isHumanReadable() );
         assertEquals( NULL_STRING_VALUE, attr1.get() );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr2.add( "" );
         assertEquals( 1, nbAdded );
         assertTrue( attr2.isHumanReadable() );
         assertEquals( "", attr2.getString() );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr3.add( "t" );
         assertEquals( 1, nbAdded );
         assertTrue( attr3.isHumanReadable() );
         assertEquals( "t", attr3.getString() );
         
-        EntryAttribute attr4 = new DefaultEntryAttribute( "test" );
+        Attribute attr4 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr4.add( "a", "b", "c", "d" );
         assertEquals( 4, nbAdded );
@@ -1149,7 +1149,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr4.contains( "c" ) );
         assertTrue( attr4.contains( "d" ) );
         
-        EntryAttribute attr5 = new DefaultEntryAttribute( "test" );
+        Attribute attr5 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr5.add( "a", "b", (String)null, "d" );
         assertEquals( 4, nbAdded );
@@ -1159,7 +1159,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr5.contains( (String)null ) );
         assertTrue( attr5.contains( "d" ) );
 
-        EntryAttribute attr6 = new DefaultEntryAttribute( "test" );
+        Attribute attr6 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr6.add( "a", (String)null );
         assertEquals( 2, nbAdded );
@@ -1175,28 +1175,28 @@ public class DefaultEntryAttributeTest
     @Test
     public void testPutByteArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         int nbAdded = attr1.add( (byte[])null );
         assertEquals( 1, nbAdded );
         assertFalse( attr1.isHumanReadable() );
         assertTrue( Arrays.equals( NULL_BINARY_VALUE.getBytes(), attr1.getBytes() ) );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr2.add( StringConstants.EMPTY_BYTES );
         assertEquals( 1, nbAdded );
         assertFalse( attr2.isHumanReadable() );
         assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, attr2.getBytes() ) );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr3.add( BYTES1 );
         assertEquals( 1, nbAdded );
         assertFalse( attr3.isHumanReadable() );
         assertTrue( Arrays.equals( BYTES1, attr3.getBytes() ) );
         
-        EntryAttribute attr4 = new DefaultEntryAttribute( "test" );
+        Attribute attr4 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr4.add( BYTES1, BYTES2 );
         assertEquals( 2, nbAdded );
@@ -1210,7 +1210,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr4.contains( BYTES3 ) );
         assertTrue( attr4.contains( BYTES4 ) );
         
-        EntryAttribute attr5 = new DefaultEntryAttribute( "test" );
+        Attribute attr5 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr5.add( BYTES1, BYTES2, (byte[])null, BYTES3 );
         assertEquals( 4, nbAdded );
@@ -1220,7 +1220,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr5.contains( (byte[])null ) );
         assertTrue( attr5.contains( BYTES3 ) );
 
-        EntryAttribute attr6 = new DefaultEntryAttribute( "test" );
+        Attribute attr6 = new DefaultEntryAttribute( "test" );
         
         nbAdded = attr6.add( BYTES1, (byte[])null );
         assertEquals( 2, nbAdded );
@@ -1236,7 +1236,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testPutValueArray() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         assertEquals( 0, attr1.size() );
         
@@ -1266,7 +1266,7 @@ public class DefaultEntryAttributeTest
         assertTrue( attr1.contains( STR_VALUE3 ) );
         
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         assertEquals( 0, attr2.size() );
         
         attr2.add( NULL_BINARY_VALUE );
@@ -1295,7 +1295,7 @@ public class DefaultEntryAttributeTest
     @Test
     public void testToString() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         assertEquals( "    test: (null)\n", attr1.toString() );
         
@@ -1305,7 +1305,7 @@ public class DefaultEntryAttributeTest
         attr1.add( "b" );
         assertEquals( "    test: a\n    test: b\n", attr1.toString() );
 
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
 
         attr2.add( BYTES1 );
         assertEquals( "    test: '0x61 0x62 '\n", attr2.toString() );
@@ -1321,11 +1321,11 @@ public class DefaultEntryAttributeTest
     @Test
     public void testHashCode() throws InvalidAttributeValueException, LdapException
     {
-        EntryAttribute attr = new DefaultEntryAttribute();
+        Attribute attr = new DefaultEntryAttribute();
         assertEquals( 37, attr.hashCode() );
 
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         assertEquals( attr1.hashCode(), attr2.hashCode() );
         
@@ -1348,8 +1348,8 @@ public class DefaultEntryAttributeTest
         attr2.add( "c", "b", "a" );
         assertNotSame( attr1.hashCode(), attr2.hashCode() );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
-        EntryAttribute attr4 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr4 = new DefaultEntryAttribute( "test" );
         
         attr3.add( BYTES1, BYTES2 );
         attr4.add( BYTES1, BYTES2 );
@@ -1378,11 +1378,11 @@ public class DefaultEntryAttributeTest
     @Test
     public void testEquals() throws LdapException
     {
-        EntryAttribute attr1 = new DefaultEntryAttribute( "test" );
+        Attribute attr1 = new DefaultEntryAttribute( "test" );
         
         assertFalse( attr1.equals( null ) );
         
-        EntryAttribute attr2 = new DefaultEntryAttribute( "test" );
+        Attribute attr2 = new DefaultEntryAttribute( "test" );
         
         assertTrue( attr1.equals( attr2 ) );
         
@@ -1401,29 +1401,29 @@ public class DefaultEntryAttributeTest
         
         assertTrue( attr1.equals( attr2 ) );
         
-        EntryAttribute attr3 = new DefaultEntryAttribute( "test" );
-        EntryAttribute attr4 = new DefaultEntryAttribute( "test" );
+        Attribute attr3 = new DefaultEntryAttribute( "test" );
+        Attribute attr4 = new DefaultEntryAttribute( "test" );
         
         attr3.add( NULL_BINARY_VALUE );
         attr4.add( NULL_BINARY_VALUE );
         assertTrue( attr3.equals( attr4 ) );
         
-        EntryAttribute attr5 = new DefaultEntryAttribute( "test" );
-        EntryAttribute attr6 = new DefaultEntryAttribute( "test" );
+        Attribute attr5 = new DefaultEntryAttribute( "test" );
+        Attribute attr6 = new DefaultEntryAttribute( "test" );
         
         attr5.add( NULL_BINARY_VALUE );
         attr6.add( NULL_STRING_VALUE );
         assertFalse( attr5.equals( attr6 ) );
 
-        EntryAttribute attr7 = new DefaultEntryAttribute( "test" );
-        EntryAttribute attr8 = new DefaultEntryAttribute( "test" );
+        Attribute attr7 = new DefaultEntryAttribute( "test" );
+        Attribute attr8 = new DefaultEntryAttribute( "test" );
         
         attr7.add( "a" );
         attr8.add( BYTES2 );
         assertFalse( attr7.equals( attr8 ) );
 
-        EntryAttribute attr9 = new DefaultEntryAttribute( "test" );
-        EntryAttribute attr10 = new DefaultEntryAttribute( "test" );
+        Attribute attr9 = new DefaultEntryAttribute( "test" );
+        Attribute attr10 = new DefaultEntryAttribute( "test" );
         
         attr7.add( "a" );
         attr7.add( BYTES2 );
@@ -1438,9 +1438,9 @@ public class DefaultEntryAttributeTest
     @Test
     public void testClone() throws LdapException
     {
-        EntryAttribute attr = new DefaultEntryAttribute( "test" );
+        Attribute attr = new DefaultEntryAttribute( "test" );
         
-        EntryAttribute clone = attr.clone();
+        Attribute clone = attr.clone();
         
         assertEquals( attr, clone );
         attr.setUpId( "new" );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializationTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializationTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializationTest.java Thu Mar 31 23:21:50 2011
@@ -49,7 +49,7 @@ public class EntryAttributeSerialization
     @Test
     public void testEntryAttributeNoStringValueSerialization() throws IOException, ClassNotFoundException
     {
-        EntryAttribute attribute1 = new DefaultEntryAttribute( "CN" );
+        Attribute attribute1 = new DefaultEntryAttribute( "CN" );
         
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -61,7 +61,7 @@ public class EntryAttributeSerialization
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        EntryAttribute attribute2 = new DefaultEntryAttribute();
+        Attribute attribute2 = new DefaultEntryAttribute();
         attribute2.readExternal( in );
 
         assertEquals( attribute1, attribute2 );
@@ -71,7 +71,7 @@ public class EntryAttributeSerialization
     @Test
     public void testEntryAttributeOneStringValueSerialization() throws IOException, ClassNotFoundException
     {
-        EntryAttribute attribute1 = new DefaultEntryAttribute( "CN", "test" );
+        Attribute attribute1 = new DefaultEntryAttribute( "CN", "test" );
         
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -83,7 +83,7 @@ public class EntryAttributeSerialization
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        EntryAttribute attribute2 = new DefaultEntryAttribute();
+        Attribute attribute2 = new DefaultEntryAttribute();
         attribute2.readExternal( in );
 
         assertEquals( attribute1, attribute2 );
@@ -93,7 +93,7 @@ public class EntryAttributeSerialization
     @Test
     public void testEntryAttributeManyStringValuesSerialization() throws IOException, ClassNotFoundException
     {
-        EntryAttribute attribute1 = new DefaultEntryAttribute( "CN", "test1", "test2", "test3" );
+        Attribute attribute1 = new DefaultEntryAttribute( "CN", "test1", "test2", "test3" );
         
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -105,7 +105,7 @@ public class EntryAttributeSerialization
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        EntryAttribute attribute2 = new DefaultEntryAttribute();
+        Attribute attribute2 = new DefaultEntryAttribute();
         attribute2.readExternal( in );
 
         assertEquals( attribute1, attribute2 );
@@ -115,7 +115,7 @@ public class EntryAttributeSerialization
     @Test
     public void testEntryAttributeNoBinaryValueSerialization() throws IOException, ClassNotFoundException
     {
-        EntryAttribute attribute1 = new DefaultEntryAttribute( "UserCertificate" );
+        Attribute attribute1 = new DefaultEntryAttribute( "UserCertificate" );
         
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -127,7 +127,7 @@ public class EntryAttributeSerialization
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        EntryAttribute attribute2 = new DefaultEntryAttribute();
+        Attribute attribute2 = new DefaultEntryAttribute();
         attribute2.readExternal( in );
 
         assertEquals( attribute1, attribute2 );
@@ -137,7 +137,7 @@ public class EntryAttributeSerialization
     @Test
     public void testEntryAttributeOneBinaryValueSerialization() throws IOException, ClassNotFoundException
     {
-        EntryAttribute attribute1 = new DefaultEntryAttribute( "UserCertificate", data1 );
+        Attribute attribute1 = new DefaultEntryAttribute( "UserCertificate", data1 );
         
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -149,7 +149,7 @@ public class EntryAttributeSerialization
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        EntryAttribute attribute2 = new DefaultEntryAttribute();
+        Attribute attribute2 = new DefaultEntryAttribute();
         attribute2.readExternal( in );
 
         assertEquals( attribute1, attribute2 );
@@ -159,7 +159,7 @@ public class EntryAttributeSerialization
     @Test
     public void testEntryAttributeManyBinaryValuesSerialization() throws IOException, ClassNotFoundException
     {
-        EntryAttribute attribute1 = new DefaultEntryAttribute( "UserCertificate", data1, data2, data3 );
+        Attribute attribute1 = new DefaultEntryAttribute( "UserCertificate", data1, data2, data3 );
         
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -171,7 +171,7 @@ public class EntryAttributeSerialization
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        EntryAttribute attribute2 = new DefaultEntryAttribute();
+        Attribute attribute2 = new DefaultEntryAttribute();
         attribute2.readExternal( in );
 
         assertEquals( attribute1, attribute2 );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/ModificationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/ModificationTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/ModificationTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/entry/ModificationTest.java Thu Mar 31 23:21:50 2011
@@ -124,7 +124,7 @@ public class ModificationTest
     @Test 
     public void testCreateServerModification() throws LdapException
     {
-        EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
+        Attribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
         Modification mod = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attribute );
@@ -132,7 +132,7 @@ public class ModificationTest
         
         attribute.remove( "test2" );
         
-        EntryAttribute clonedAttribute = clone.getAttribute();
+        Attribute clonedAttribute = clone.getAttribute();
         
         assertEquals( 1, mod.getAttribute().size() );
         assertTrue( mod.getAttribute().contains( "test1" ) );
@@ -146,7 +146,7 @@ public class ModificationTest
     @Test
     public void testSerializationModificationADD() throws ClassNotFoundException, IOException, LdapException
     {
-        EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
+        Attribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
         DefaultModification mod = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attribute );
@@ -160,7 +160,7 @@ public class ModificationTest
     @Test
     public void testSerializationModificationREPLACE() throws ClassNotFoundException, IOException, LdapException
     {
-        EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
+        Attribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
         DefaultModification mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
@@ -174,7 +174,7 @@ public class ModificationTest
     @Test
     public void testSerializationModificationREMOVE() throws ClassNotFoundException, IOException, LdapException
     {
-        EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
+        Attribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
         DefaultModification mod = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attribute );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReaderTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReaderTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReaderTest.java Thu Mar 31 23:21:50 2011
@@ -33,21 +33,21 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -156,7 +156,7 @@ public class LdifAttributesReaderTest
         assertEquals( 1, reader.getVersion() );
         assertNotNull( entry );
 
-        EntryAttribute attr = entry.get( "displayname" );
+        Attribute attr = entry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
     }
 
@@ -177,7 +177,7 @@ public class LdifAttributesReaderTest
         Entry entry = reader.parseEntry( ldif );
         assertNotNull( entry );
 
-        EntryAttribute attr = entry.get( "displayname" );
+        Attribute attr = entry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
 
     }
@@ -194,7 +194,7 @@ public class LdifAttributesReaderTest
 
         assertNotNull( entry );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1" ) );
 
         attr = entry.get( "objectclass" );
@@ -224,7 +224,7 @@ public class LdifAttributesReaderTest
 
         assertNotNull( entry );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1#another comment" ) );
 
         attr = entry.get( "objectclass" );
@@ -254,7 +254,7 @@ public class LdifAttributesReaderTest
 
         assertNotNull( entry );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1#another comment" ) );
 
         attr = entry.get( "objectclass" );
@@ -284,7 +284,7 @@ public class LdifAttributesReaderTest
 
         assertNotNull( entry );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "Emmanuel L\u00e9charny".getBytes( "UTF-8" ) ) );
 
         attr = entry.get( "objectclass" );
@@ -314,7 +314,7 @@ public class LdifAttributesReaderTest
 
         assertNotNull( entry );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "Emmanuel L\u00e9charny  ".getBytes( "UTF-8" ) ) );
 
         attr = entry.get( "objectclass" );
@@ -342,7 +342,7 @@ public class LdifAttributesReaderTest
         LdifAttributesReader reader = new LdifAttributesReader();
         Entry entry = reader.parseEntry( ldif );
 
-        EntryAttribute attr = entry.get( "objectclass" );
+        Attribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -379,7 +379,7 @@ public class LdifAttributesReaderTest
         LdifAttributesReader reader = new LdifAttributesReader();
         Entry entry = reader.parseEntry( ldif );
 
-        EntryAttribute attr = entry.get( "objectclass" );
+        Attribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -421,7 +421,7 @@ public class LdifAttributesReaderTest
         LdifAttributesReader reader = new LdifAttributesReader();
         Attributes attributes = reader.parseAttributes( ldif );
 
-        Attribute attr = attributes.get( "objectclass" );
+        javax.naming.directory.Attribute attr = attributes.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -459,7 +459,7 @@ public class LdifAttributesReaderTest
         LdifAttributesReader reader = new LdifAttributesReader();
         Attributes attributes = reader.parseAttributes( ldif );
 
-        Attribute attr = attributes.get( "objectclass" );
+        javax.naming.directory.Attribute attr = attributes.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -510,7 +510,7 @@ public class LdifAttributesReaderTest
 
         for ( int j = 0; j < values.length; j++ )
         {
-            Attribute attr = attributes.get( values[j][0] );
+            javax.naming.directory.Attribute attr = attributes.get( values[j][0] );
 
             if ( attr.contains( values[j][1] ) )
             {
@@ -550,12 +550,12 @@ public class LdifAttributesReaderTest
         {
             if ( "jpegphoto".equalsIgnoreCase( values[i][0] ) )
             {
-                Attribute attr = attributes.get( values[i][0] );
+                javax.naming.directory.Attribute attr = attributes.get( values[i][0] );
                 assertEquals( Strings.dumpBytes(data), Strings.dumpBytes((byte[]) attr.get()) );
             }
             else
             {
-                Attribute attr = attributes.get( values[i][0] );
+                javax.naming.directory.Attribute attr = attributes.get( values[i][0] );
 
                 if ( attr.contains( values[i][1] ) )
                 {
@@ -619,7 +619,7 @@ public class LdifAttributesReaderTest
 
         Attributes attributes = reader.parseAttributes( ldif );
 
-        Attribute attr = attributes.get( "objectclass" );
+        javax.naming.directory.Attribute attr = attributes.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "organizationalunit" ) );
 
@@ -672,7 +672,7 @@ public class LdifAttributesReaderTest
         LdifAttributesReader reader = new LdifAttributesReader();
         Attributes attributes = reader.parseAttributes( ldif );
 
-        Attribute attr = attributes.get( "objectClass" );
+        javax.naming.directory.Attribute attr = attributes.get( "objectClass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( SchemaConstants.SUBENTRY_OC ) );
         assertTrue( attr.contains( "accessControlSubentry" ) );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifEntryTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifEntryTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifEntryTest.java Thu Mar 31 23:21:50 2011
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
@@ -112,7 +112,7 @@ public class LdifEntryTest
         assertTrue( ldifEntry.isLdifContent() );
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", ldifEntry.getDn().getName() );
 
-        EntryAttribute attr = ldifEntry.get( "displayname" );
+        Attribute attr = ldifEntry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
     }
     
@@ -260,7 +260,7 @@ public class LdifEntryTest
         assertFalse( ldifEntry.hasControls() );
         assertTrue( ldifEntry.isLdifChange() );
 
-        EntryAttribute attr = ldifEntry.get( "displayname" );
+        Attribute attr = ldifEntry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
     }
     
@@ -290,7 +290,7 @@ public class LdifEntryTest
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", ldifEntry.getDn().getName() );
         assertTrue( ldifEntry.isLdifChange() );
 
-        EntryAttribute attr = ldifEntry.get( "displayname" );
+        Attribute attr = ldifEntry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
         assertTrue( ldifEntry.hasControls() );
         
@@ -328,7 +328,7 @@ public class LdifEntryTest
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", ldifEntry.getDn().getName() );
         assertTrue( ldifEntry.isLdifChange() );
 
-        EntryAttribute attr = ldifEntry.get( "displayname" );
+        Attribute attr = ldifEntry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
         assertTrue( ldifEntry.hasControls() );
         
@@ -529,7 +529,7 @@ public class LdifEntryTest
         for ( Modification modification : ldifEntry.getModificationItems() )
         {
             assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
-            EntryAttribute attribute = modification.getAttribute();
+            Attribute attribute = modification.getAttribute();
 
             assertNotNull( attribute );
             assertEquals( "cn", attribute.getId() );
@@ -597,7 +597,7 @@ public class LdifEntryTest
         for ( Modification modification : ldifEntry.getModificationItems() )
         {
             assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
-            EntryAttribute attribute = modification.getAttribute();
+            Attribute attribute = modification.getAttribute();
 
             assertNotNull( attribute );
             assertEquals( "cn", attribute.getId() );
@@ -668,7 +668,7 @@ public class LdifEntryTest
         for ( Modification modification : ldifEntry.getModificationItems() )
         {
             assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
-            EntryAttribute attribute = modification.getAttribute();
+            Attribute attribute = modification.getAttribute();
 
             assertNotNull( attribute );
             assertEquals( "cn", attribute.getId() );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifReaderTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifReaderTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifReaderTest.java Thu Mar 31 23:21:50 2011
@@ -36,7 +36,7 @@ import java.util.List;
 
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -207,7 +207,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "displayname" );
+        Attribute attr = entry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
     }
 
@@ -267,7 +267,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "displayname" );
+        Attribute attr = entry.get( "displayname" );
         assertTrue( attr.contains( "app1" ) );
 
     }
@@ -317,7 +317,7 @@ public class LdifReaderTest
 
         List<Modification> mods = entry.getModificationItems();
         assertTrue( mods.size() == 1 );
-        EntryAttribute attr = mods.get( 0 ).getAttribute();
+        Attribute attr = mods.get( 0 ).getAttribute();
         assertTrue( attr.getId().equals( "administrativerole" ) );
         assertEquals( attr.getString(), "accessControlSpecificArea" );
     }
@@ -521,7 +521,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1" ) );
 
         attr = entry.get( "objectclass" );
@@ -567,7 +567,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1#another comment" ) );
 
         attr = entry.get( "objectclass" );
@@ -613,7 +613,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "app1#another comment" ) );
 
         attr = entry.get( "objectclass" );
@@ -658,7 +658,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "Emmanuel L\u00e9charny".getBytes( "UTF-8" ) ) );
 
         attr = entry.get( "objectclass" );
@@ -704,7 +704,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "cn" );
+        Attribute attr = entry.get( "cn" );
         assertTrue( attr.contains( "Emmanuel L\u00e9charny  ".getBytes( "UTF-8" ) ) );
 
         attr = entry.get( "objectclass" );
@@ -759,7 +759,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "objectclass" );
+        Attribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -835,7 +835,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "objectclass" );
+        Attribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -894,7 +894,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "objectclass" );
+        Attribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -950,7 +950,7 @@ public class LdifReaderTest
 
         assertEquals( "cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "objectclass" );
+        Attribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "person" ) );
         assertTrue( attr.contains( "organizationalPerson" ) );
@@ -1092,7 +1092,7 @@ public class LdifReaderTest
                 }
                 else
                 {
-                    EntryAttribute attr = entry.get( values[i][j][0] );
+                    Attribute attr = entry.get( values[i][j][0] );
 
                     if ( attr.contains( values[i][j][1] ) )
                     {
@@ -1157,12 +1157,12 @@ public class LdifReaderTest
             }
             else if ( "jpegphoto".equalsIgnoreCase( values[i][0] ) )
             {
-                EntryAttribute attr = entry.get( values[i][0] );
+                Attribute attr = entry.get( values[i][0] );
                 assertEquals( Strings.dumpBytes(data), Strings.dumpBytes(attr.getBytes()) );
             }
             else
             {
-                EntryAttribute attr = entry.get( values[i][0] );
+                Attribute attr = entry.get( values[i][0] );
 
                 if ( attr.contains( values[i][1] ) )
                 {
@@ -1349,12 +1349,12 @@ public class LdifReaderTest
             }
             else if ( "jpegphoto".equalsIgnoreCase( values[0][i][0] ) )
             {
-                EntryAttribute attr = entry.get( values[0][i][0] );
+                Attribute attr = entry.get( values[0][i][0] );
                 assertEquals( Strings.dumpBytes(data), Strings.dumpBytes(attr.getBytes()) );
             }
             else
             {
-                EntryAttribute attr = entry.get( values[0][i][0] );
+                Attribute attr = entry.get( values[0][i][0] );
 
                 if ( attr.contains( values[0][i][1] ) )
                 {
@@ -1640,7 +1640,7 @@ public class LdifReaderTest
 
         assertEquals( "ou=Users, dc=example, dc=com", entry.getDn().getName() );
 
-        EntryAttribute attr = entry.get( "objectclass" );
+        Attribute attr = entry.get( "objectclass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( "organizationalunit" ) );
 
@@ -1699,7 +1699,7 @@ public class LdifReaderTest
         LdifEntry entry = entries.get( 0 );
 
         assertEquals( "cn=browseRootAci,dc=example,dc=com", entry.getDn().getName() );
-        EntryAttribute attr = entry.get( "objectClass" );
+        Attribute attr = entry.get( "objectClass" );
         assertTrue( attr.contains( "top" ) );
         assertTrue( attr.contains( SchemaConstants.SUBENTRY_OC ) );
         assertTrue( attr.contains( "accessControlSubentry" ) );
@@ -1768,7 +1768,7 @@ public class LdifReaderTest
 
         assertEquals( 1, entry.getEntry().size() );
 
-        EntryAttribute attr = entry.get( "attr1" );
+        Attribute attr = entry.get( "attr1" );
         assertTrue( attr.contains( "ATTR1" ) );
     }
     
@@ -1799,7 +1799,7 @@ public class LdifReaderTest
 
         assertEquals( 1, entry.getEntry().size() );
 
-        EntryAttribute attr = entry.get( "attr1" );
+        Attribute attr = entry.get( "attr1" );
         assertEquals( 2, attr.size() );
         assertTrue( attr.contains( "ATTR1" ) );
         assertTrue( attr.contains( "ATTR2" ) );
@@ -1833,12 +1833,12 @@ public class LdifReaderTest
 
         assertEquals( 2, entry.getEntry().size() );
 
-        EntryAttribute attr = entry.get( "attr1" );
+        Attribute attr = entry.get( "attr1" );
         assertEquals( 2, attr.size() );
         assertTrue( attr.contains( "ATTR1" ) );
         assertTrue( attr.contains( "ATTR2" ) );
 
-        EntryAttribute attr2 = entry.get( "attr2" );
+        Attribute attr2 = entry.get( "attr2" );
         assertEquals( 1, attr2.size() );
         assertTrue( attr2.contains( "ATTR1" ) );
     }



Mime
View raw message