directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r937653 [2/2] - in /directory: apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/ apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ apacheds/trunk/core-api/src/main/java/org/apac...
Date Sat, 24 Apr 2010 17:18:09 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java?rev=937653&r1=937652&r2=937653&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
Sat Apr 24 17:18:08 2010
@@ -27,8 +27,8 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
@@ -232,7 +232,7 @@ public class ModifyRequestImpl extends A
             }
             else
                 
-            if ( !item.equals((ClientModification) mods.get( i ) ) )
+            if ( !item.equals((DefaultModification) mods.get( i ) ) )
             {
                 return false;
             }
@@ -261,7 +261,7 @@ public class ModifyRequestImpl extends A
             for ( int i = 0; i < mods.size(); i++ )
             {
 
-                ClientModification modification = ( ClientModification ) mods.get( i );
+                DefaultModification modification = ( DefaultModification ) mods.get( i );
 
                 sb.append( "            Modification[" ).append( i ).append( "]\n" );
                 sb.append( "                Operation : " );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientModificationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientModificationTest.java?rev=937653&r1=937652&r2=937653&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientModificationTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientModificationTest.java
Sat Apr 24 17:18:08 2010
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
+import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -37,7 +38,7 @@ import org.junit.Test;
 
 
 /**
- * Test the ClientModification class
+ * Test the DefaultModification class
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -45,9 +46,9 @@ import org.junit.Test;
 public class ClientModificationTest
 {
     /**
-     * Serialize a ClientModification
+     * Serialize a DefaultModification
      */
-    private ByteArrayOutputStream serializeValue( ClientModification value ) throws IOException
+    private ByteArrayOutputStream serializeValue( DefaultModification value ) throws IOException
     {
         ObjectOutputStream oOut = null;
         ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -82,9 +83,9 @@ public class ClientModificationTest
     
     
     /**
-     * Deserialize a ClientModification
+     * Deserialize a DefaultModification
      */
-    private ClientModification deserializeValue( ByteArrayOutputStream out ) throws IOException,
ClassNotFoundException
+    private DefaultModification deserializeValue( ByteArrayOutputStream out ) throws IOException,
ClassNotFoundException
     {
         ObjectInputStream oIn = null;
         ByteArrayInputStream in = new ByteArrayInputStream( out.toByteArray() );
@@ -93,7 +94,7 @@ public class ClientModificationTest
         {
             oIn = new ObjectInputStream( in );
 
-            ClientModification value = ( ClientModification ) oIn.readObject();
+            DefaultModification value = ( DefaultModification ) oIn.readObject();
 
             return value;
         }
@@ -124,7 +125,7 @@ public class ClientModificationTest
         EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
-        Modification mod = new ClientModification( ModificationOperation.ADD_ATTRIBUTE, attribute
);
+        Modification mod = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attribute );
         Modification clone = mod.clone();
         
         attribute.remove( "test2" );
@@ -146,7 +147,7 @@ public class ClientModificationTest
         EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
-        ClientModification mod = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attribute );
+        DefaultModification mod = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attribute );
         
         Modification modSer = deserializeValue( serializeValue( mod ) );
         
@@ -160,7 +161,7 @@ public class ClientModificationTest
         EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
-        ClientModification mod = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE,
attribute );
+        DefaultModification mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
attribute );
         
         Modification modSer = deserializeValue( serializeValue( mod ) );
         
@@ -174,7 +175,7 @@ public class ClientModificationTest
         EntryAttribute attribute = new DefaultEntryAttribute( "cn" );
         attribute.add( "test1", "test2" );
         
-        ClientModification mod = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE,
attribute );
+        DefaultModification mod = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
attribute );
         
         Modification modSer = deserializeValue( serializeValue( mod ) );
         
@@ -185,7 +186,7 @@ public class ClientModificationTest
     @Test
     public void testSerializationModificationNoAttribute() throws ClassNotFoundException,
IOException
     {
-        ClientModification mod = new ClientModification();
+        DefaultModification mod = new DefaultModification();
         
         mod.setOperation( ModificationOperation.ADD_ATTRIBUTE );
         

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?rev=937653&r1=937652&r2=937653&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
Sat Apr 24 17:18:08 2010
@@ -30,11 +30,11 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
@@ -76,18 +76,18 @@ public class ModifyRequestImplTest
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        Modification item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         req.addModification( item );
 
         attr = new DefaultEntryAttribute( "attr1" );
         attr.add( "val3" );
-        item = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
+        item = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
         req.addModification( item );
 
         attr = new DefaultEntryAttribute( "attr2" );
         attr.add( "val4" );
         attr.add( "val5" );
-        item = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, attr );
+        item = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attr );
         req.addModification( item );
 
         return req;
@@ -162,7 +162,7 @@ public class ModifyRequestImplTest
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        Modification item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -170,7 +170,7 @@ public class ModifyRequestImplTest
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        item = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
+        item = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -189,7 +189,7 @@ public class ModifyRequestImplTest
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        Modification item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -210,7 +210,7 @@ public class ModifyRequestImplTest
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        Modification item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -218,7 +218,7 @@ public class ModifyRequestImplTest
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE, attr );
+        item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -237,7 +237,7 @@ public class ModifyRequestImplTest
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        Modification item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -246,7 +246,7 @@ public class ModifyRequestImplTest
         attr.add( "val1" );
         attr.add( "val2" );
         attr.add( "val3" );
-        item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE, attr );
+        item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -269,18 +269,18 @@ public class ModifyRequestImplTest
                 attr.add( "val0" );
                 attr.add( "val1" );
                 attr.add( "val2" );
-                Modification item = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+                Modification item = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
                 list.add( item );
 
                 attr = new DefaultEntryAttribute( "attr1" );
                 attr.add( "val3" );
-                item = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE, attr
);
+                item = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attr
);
                 list.add( item );
 
                 attr = new DefaultEntryAttribute( "attr2" );
                 attr.add( "val4" );
                 attr.add( "val5" );
-                item = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, attr
);
+                item = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
attr );
                 list.add( item );
 
                 return list;

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java?rev=937653&r1=937652&r2=937653&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java
Sat Apr 24 17:18:08 2010
@@ -27,13 +27,13 @@ import static org.junit.Assert.assertTru
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 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.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.junit.Test;
@@ -54,7 +54,7 @@ public class AttributeUtilsTest
     {
         Entry entry = new DefaultClientEntry();
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
-        Modification modification = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get(  "cn" ) );
         assertEquals( 1, entry.size() );
@@ -73,7 +73,7 @@ public class AttributeUtilsTest
         assertEquals( 1, entry.size() );
 
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
-        Modification modification = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
 
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get(  "cn" ) );
@@ -94,7 +94,7 @@ public class AttributeUtilsTest
         assertEquals( 1, entry.size() );
 
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
-        Modification modification = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get(  "cn" ) );
         assertEquals( 1, entry.size() );
@@ -132,7 +132,7 @@ public class AttributeUtilsTest
         assertEquals( 1, entry.size() );
 
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
-        Modification modification = new ClientModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attr );
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get( "cn" ) );
         assertEquals( 1, entry.size() );
@@ -168,7 +168,7 @@ public class AttributeUtilsTest
 
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
 
-        Modification modification = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
         AttributeUtils.applyModification( entry, modification );
         assertNull( entry.get( "cn" ) );
         assertEquals( 0, entry.size() );
@@ -188,7 +188,7 @@ public class AttributeUtilsTest
         
         EntryAttribute cn = new DefaultEntryAttribute( "cn", "test" );
         
-        Modification modification = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE,
cn );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
cn );
         
         AttributeUtils.applyModification( entry, modification );
         
@@ -213,7 +213,7 @@ public class AttributeUtilsTest
         
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
         
-        Modification modification = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
         
         AttributeUtils.applyModification( entry, modification );
         
@@ -236,7 +236,7 @@ public class AttributeUtilsTest
         
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
 
-        Modification modification = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
         
         AttributeUtils.applyModification( entry, modification );
         
@@ -259,7 +259,7 @@ public class AttributeUtilsTest
         
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
         
-        Modification modification = new ClientModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
attr );
         
         AttributeUtils.applyModification( entry, modification );
         
@@ -296,7 +296,7 @@ public class AttributeUtilsTest
         EntryAttribute attr = new DefaultEntryAttribute( "cn", "test" );
 
         
-        Modification modification = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
attr );
         AttributeUtils.applyModification( entry, modification );
         assertNotNull( entry.get( "cn" ) );
         assertEquals( 1, entry.size() );
@@ -317,7 +317,7 @@ public class AttributeUtilsTest
         
         EntryAttribute attr = new DefaultEntryAttribute( "cn" );
 
-        Modification modification = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE,
attr );
+        Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
attr );
         AttributeUtils.applyModification( entry, modification );
         assertNull( entry.get( "cn" ) );
         assertEquals( 0, entry.size() );
@@ -340,7 +340,7 @@ public class AttributeUtilsTest
         
         EntryAttribute newOu = new DefaultEntryAttribute( "ou", "Big Company", "directory"
);
         
-        Modification modification = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE,
newOu );
+        Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
newOu );
         
         AttributeUtils.applyModification( entry, modification );
         
@@ -384,7 +384,7 @@ public class AttributeUtilsTest
         
         EntryAttribute newOu = new DefaultEntryAttribute( "ou" );
         
-        Modification modification = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE,
newOu );
+        Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
newOu );
         
         AttributeUtils.applyModification( entry, modification );
         



Mime
View raw message