directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r691179 [2/2] - in /directory: apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ apacheds/trunk/core-integ/src/test/java/org/apach...
Date Tue, 02 Sep 2008 09:58:47 GMT
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
Tue Sep  2 02:58:45 2008
@@ -26,7 +26,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertNotNull;
@@ -41,6 +40,7 @@
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
@@ -111,8 +111,8 @@
         Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( "autonomousArea" );
         attribute.add( "triggerSpecificArea" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute
);
-        sysRoot.modifyAttributes( "", new ModificationItemImpl[] { item } );
+        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attribute
);
+        sysRoot.modifyAttributes( "", new ModificationItem[] { item } );
     }
 
 
@@ -255,8 +255,8 @@
 
         Attribute subtreeSpecification = new BasicAttribute( "subtreeSpecification" );
         subtreeSpecification.add( "{ base \"ou=configuration\", specificExclusions { chopBefore:\"ou=interceptors\"
} }" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE,
subtreeSpecification );
-        sysRoot.modifyAttributes( "cn=testsubentry", new ModificationItemImpl[] { item }
);
+        ModificationItem item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, subtreeSpecification
);
+        sysRoot.modifyAttributes( "cn=testsubentry", new ModificationItem[] { item } );
         results = getAllEntries();
 
         // --------------------------------------------------------------------

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
(original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
Tue Sep  2 02:58:45 2008
@@ -41,7 +41,6 @@
 import javax.naming.ldap.LdapContext;
 
 import org.apache.directory.shared.ldap.exception.LdapServiceUnavailableException;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 
 import javax.naming.Binding;
@@ -117,12 +116,6 @@
     }
 
 
-    public void modifyAttributes( String name, ModificationItem[] mods ) throws NamingException
-    {
-        throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE
);
-    }
-
-
     public Attributes getAttributes( Name name ) throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE
);
@@ -164,13 +157,7 @@
     }
 
 
-    public void modifyAttributes( String name, ModificationItemImpl[] mods ) throws NamingException
-    {
-        throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE
);
-    }
-
-
-    public void modifyAttributes( Name name, ModificationItemImpl[] mods ) throws NamingException
+    public void modifyAttributes( String name, ModificationItem[] mods ) throws NamingException
     {
         throw new LdapServiceUnavailableException( EXCEPTION_MSG, ResultCodeEnum.UNAVAILABLE
);
     }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
(original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
Tue Sep  2 02:58:45 2008
@@ -42,7 +42,6 @@
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
@@ -198,16 +197,16 @@
      */
     public void modifyAttributes( Name name, int modOp, Attributes attrs ) throws NamingException
     {
-        List<ModificationItemImpl> modItems = null;
+        List<ModificationItem> modItems = null;
 
         if ( attrs != null )
         {
-            modItems = new ArrayList<ModificationItemImpl>( attrs.size() );
+            modItems = new ArrayList<ModificationItem>( attrs.size() );
             NamingEnumeration<? extends Attribute> e = ( NamingEnumeration<? extends
Attribute> ) attrs.getAll();
 
             while ( e.hasMore() )
             {
-                modItems.add( new ModificationItemImpl( modOp, e.next() ) );
+                modItems.add( new ModificationItem( modOp, e.next() ) );
             }
         }
 
@@ -239,23 +238,6 @@
      */
     public void modifyAttributes( String name, ModificationItem[] mods ) throws NamingException
     {
-        ModificationItemImpl[] newMods = new ModificationItemImpl[mods.length];
-
-        for ( int i = 0; i < mods.length; i++ )
-        {
-            newMods[i] = new ModificationItemImpl( mods[i] );
-        }
-
-        modifyAttributes( new LdapDN( name ), newMods );
-    }
-
-
-    /**
-     * @see javax.naming.directory.DirContext#modifyAttributes(java.lang.String,
-     *      javax.naming.directory.ModificationItem[])
-     */
-    public void modifyAttributes( String name, ModificationItemImpl[] mods ) throws NamingException
-    {
         modifyAttributes( new LdapDN( name ), mods );
     }
 
@@ -283,7 +265,7 @@
      * @see javax.naming.directory.DirContext#modifyAttributes(
      * javax.naming.Name, javax.naming.directory.ModificationItem[])
      */
-    public void modifyAttributes( Name name, List<ModificationItemImpl> mods ) throws
NamingException
+    public void modifyAttributes( Name name, List<ModificationItem> mods ) throws NamingException
     {
         List<Modification> newMods = ServerEntryUtils
             .convertToServerModification( mods, 

Modified: directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java
(original)
+++ directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java
Tue Sep  2 02:58:45 2008
@@ -35,7 +35,6 @@
 import junit.framework.Assert;
 
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.OidNormalizer;
@@ -171,7 +170,7 @@
         String newValue = "anything";
         
         ctxA.modifyAttributes( dn, new ModificationItem[] {
-            new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "ou",
newValue ))} );
+            new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "ou",
newValue ))} );
 
         replicationServices.get( "A" ).replicate();
         

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
Tue Sep  2 02:58:45 2008
@@ -31,7 +31,6 @@
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.Context;
@@ -42,6 +41,8 @@
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.ModificationItem;
+
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.List;
@@ -111,8 +112,8 @@
         if ( isKrb5KdcDisabled )
         {
             Attribute disabled = new BasicAttribute( "m-disabled" );
-            ModificationItemImpl[] mods = new ModificationItemImpl[]
-                    {new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, disabled )};
+            ModificationItem[] mods = new ModificationItem[]
+                    {new ModificationItem( DirContext.REMOVE_ATTRIBUTE, disabled )};
             schemaRoot.modifyAttributes( "cn=Krb5kdc", mods );
         }
         

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
Tue Sep  2 02:58:45 2008
@@ -51,7 +51,6 @@
 import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.server.protocol.shared.SocketAcceptor;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.mina.util.AvailablePortFinder;
 import org.junit.Before;
 import org.junit.Test;
@@ -69,6 +68,8 @@
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.ModificationItem;
+
 import java.io.IOException;
 import java.security.InvalidKeyException;
 import java.util.Arrays;
@@ -198,8 +199,8 @@
         if ( isKrb5KdcDisabled )
         {
             Attribute disabled = new BasicAttribute( "m-disabled" );
-            ModificationItemImpl[] mods = new ModificationItemImpl[]
-                { new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, disabled ) };
+            ModificationItem[] mods = new ModificationItem[]
+                { new ModificationItem( DirContext.REMOVE_ATTRIBUTE, disabled ) };
             schemaRoot.modifyAttributes( "cn=Krb5kdc", mods );
         }
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
Tue Sep  2 02:58:45 2008
@@ -53,8 +53,6 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
-
 
 /**
  * Test case with different modify operations on a person entry. Each includes a
@@ -319,9 +317,9 @@
         
         // modify object classes, add a new value twice
         Attribute ocls = new BasicAttribute( "objectClass", "organizationalPerson" );
-        ModificationItemImpl[] modItems = new ModificationItemImpl[2];
-        modItems[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, ocls );
-        modItems[1] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, ocls );
+        ModificationItem[] modItems = new ModificationItem[2];
+        modItems[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, ocls );
+        modItems[1] = new ModificationItem( DirContext.ADD_ATTRIBUTE, ocls );
         try
         {
             ctx.modifyAttributes( RDN_TORI_AMOS, modItems );
@@ -352,9 +350,9 @@
         
         // add the same description value twice
         Attribute desc = new BasicAttribute( "description", "another description value besides
songwriter" );
-        ModificationItemImpl[] modItems = new ModificationItemImpl[2];
-        modItems[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, desc );
-        modItems[1] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, desc );
+        ModificationItem[] modItems = new ModificationItem[2];
+        modItems[0] = new ModificationItem( DirContext.ADD_ATTRIBUTE, desc );
+        modItems[1] = new ModificationItem( DirContext.ADD_ATTRIBUTE, desc );
         try
         {
             ctx.modifyAttributes( RDN_TORI_AMOS, modItems );
@@ -419,15 +417,15 @@
         desc1.add(descriptions[0]);
         desc1.add(descriptions[1]);
 
-        ModificationItemImpl addModOp = new ModificationItemImpl(
+        ModificationItem addModOp = new ModificationItem(
                 DirContext.ADD_ATTRIBUTE, desc1);
 
         Attribute desc2 = new BasicAttribute("description");
         desc2.add(descriptions[1]);
-        ModificationItemImpl delModOp = new ModificationItemImpl(
+        ModificationItem delModOp = new ModificationItem(
                 DirContext.REMOVE_ATTRIBUTE, desc2);
 
-        ctx.modifyAttributes(rdn, new ModificationItemImpl[] { addModOp,
+        ctx.modifyAttributes(rdn, new ModificationItem[] { addModOp,
                         delModOp });
 
         SearchControls sctls = new SearchControls();
@@ -460,7 +458,7 @@
     {
         DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
         
-        ModificationItem modifyOp = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, new
BasicAttribute(
+        ModificationItem modifyOp = new ModificationItem( DirContext.ADD_ATTRIBUTE, new BasicAttribute(
             "subschemaSubentry", "cn=anotherSchema" ) );
 
         try

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
Tue Sep  2 02:58:45 2008
@@ -49,8 +49,6 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
-
 
 /**
  * Test case with different modify operations on a person entry. Each includes a
@@ -411,8 +409,8 @@
 
         // replace attribute givenName with empty value (=> deletion)
         Attribute attr = new BasicAttribute( "givenname" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE,
attr );
-        ctx.modifyAttributes( rdn, new ModificationItemImpl[] { item } );
+        ModificationItem item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr
);
+        ctx.modifyAttributes( rdn, new ModificationItem[] { item } );
 
         SearchControls sctls = new SearchControls();
         sctls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -456,11 +454,11 @@
 
         // replace attribute cn with empty value (=> deletion)
         Attribute attr = new BasicAttribute( "cn" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE,
attr );
+        ModificationItem item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr
);
 
         try
         {
-            ctx.modifyAttributes( rdn, new ModificationItemImpl[]
+            ctx.modifyAttributes( rdn, new ModificationItem[]
                 { item } );
             fail( "modify should fail" );
         }
@@ -488,11 +486,11 @@
 
         // replace attribute cn with empty value (=> deletion)
         Attribute attr = new BasicAttribute( "cn" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE,
attr );
+        ModificationItem item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
 
         try
         {
-            ctx.modifyAttributes( rdn, new ModificationItemImpl[]
+            ctx.modifyAttributes( rdn, new ModificationItem[]
                 { item } );
             fail( "modify should fail" );
         }
@@ -520,11 +518,11 @@
 
         // replace attribute cn with empty value (=> deletion)
         Attribute attr = new BasicAttribute( "cn", "Kate Bush" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE,
attr );
+        ModificationItem item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
 
         try
         {
-            ctx.modifyAttributes( rdn, new ModificationItemImpl[]
+            ctx.modifyAttributes( rdn, new ModificationItem[]
                 { item } );
             fail( "modify should fail" );
         }
@@ -550,10 +548,10 @@
         String rdn = "cn=Kate Bush";
         ctx.createSubcontext(rdn, attrs);
 
-        ModificationItemImpl delModOp = new ModificationItemImpl(DirContext.REMOVE_ATTRIBUTE,
new BasicAttribute("objectclass", ""));
+        ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new
BasicAttribute("objectclass", ""));
 
         try {
-            ctx.modifyAttributes(rdn, new ModificationItemImpl[] { delModOp });
+            ctx.modifyAttributes(rdn, new ModificationItem[] { delModOp });
             fail("deletion of objectclass should fail");
         } catch (SchemaViolationException e) {
             // expected
@@ -583,10 +581,10 @@
         String rdn = "cn=Kate Bush";
         ctx.createSubcontext(rdn, attrs);
 
-        ModificationItemImpl delModOp = new ModificationItemImpl(DirContext.REMOVE_ATTRIBUTE,
new BasicAttribute("objectclass"));
+        ModificationItem delModOp = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, new
BasicAttribute("objectclass"));
 
         try {
-            ctx.modifyAttributes(rdn, new ModificationItemImpl[] { delModOp });
+            ctx.modifyAttributes(rdn, new ModificationItem[] { delModOp });
             fail("deletion of objectclass should fail");
         } catch (SchemaViolationException e) {
             // expected

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
Tue Sep  2 02:58:45 2008
@@ -33,6 +33,7 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
 
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
@@ -64,7 +65,6 @@
 import org.apache.directory.shared.ldap.ldif.ChangeType;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
@@ -435,7 +435,7 @@
 
         while ( modifications.hasNext() )
         {
-            ModificationItemImpl modification = ( ModificationItemImpl ) modifications.next();
+            ModificationItem modification = ( ModificationItem ) modifications.next();
 
             switch ( modification.getModificationOp() )
             {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
Tue Sep  2 02:58:45 2008
@@ -25,6 +25,7 @@
 import java.util.List;
 
 import javax.naming.InvalidNameException;
+import javax.naming.directory.ModificationItem;
 
 import org.apache.directory.shared.asn1.Asn1Object;
 import org.apache.directory.shared.asn1.codec.DecoderException;
@@ -92,7 +93,6 @@
 import org.apache.directory.shared.ldap.message.ExtendedResponseImpl;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
 import org.apache.directory.shared.ldap.message.Message;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ModifyDnRequestImpl;
 import org.apache.directory.shared.ldap.message.ModifyDnResponseImpl;
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
@@ -436,7 +436,7 @@
         if ( modifyRequest.getModifications() != null )
         {
             // Loop through the modifications
-            for ( ModificationItemImpl modification:modifyRequest.getModifications() )
+            for ( ModificationItem modification:modifyRequest.getModifications() )
             {
                 snickersMessage.addModification( modification );
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
Tue Sep  2 02:58:45 2008
@@ -31,6 +31,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
@@ -38,7 +39,6 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessage;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -87,7 +87,7 @@
     private LdapDN object;
 
     /** The modifications list. This is an array of ModificationItemImpl. */
-    private List<ModificationItemImpl> modifications;
+    private List<ModificationItem> modifications;
 
     /** The current attribute being decoded */
     private Attribute currentAttribute;
@@ -142,7 +142,7 @@
      */
     public void initModifications()
     {
-        modifications = new ArrayList<ModificationItemImpl>();
+        modifications = new ArrayList<ModificationItem>();
     }
 
 
@@ -151,7 +151,7 @@
      * 
      * @return Returns the modifications.
      */
-    public List<ModificationItemImpl> getModifications()
+    public List<ModificationItem> getModifications()
     {
         return modifications;
     }
@@ -168,7 +168,7 @@
 
         if ( currentAttribute == null )
         {
-            modifications = new ArrayList<ModificationItemImpl>();
+            modifications = new ArrayList<ModificationItem>();
         }
     }
 
@@ -200,7 +200,7 @@
                 break;
         }
 
-        ModificationItemImpl modification = new ModificationItemImpl( operation, currentAttribute
);
+        ModificationItem modification = new ModificationItem( operation, currentAttribute
);
         modifications.add( modification );
     }
 
@@ -323,7 +323,7 @@
             modificationLength = new LinkedList<Integer>();
             valuesLength = new LinkedList<Integer>();
 
-            for ( ModificationItemImpl modification:modifications )
+            for ( ModificationItem modification:modifications )
             {
                 // Modification sequence length initialized with the operation
                 int localModificationSequenceLength = 1 + 1 + 1;
@@ -442,7 +442,7 @@
                 int modificationNumber = 0;
 
                 // Compute the modifications length
-                for ( ModificationItemImpl modification:modifications )
+                for ( ModificationItem modification:modifications )
                 {
                     // The modification sequence
                     buffer.put( UniversalTag.SEQUENCE_TAG );
@@ -541,7 +541,7 @@
         {
             int i = 0;
             
-            for ( ModificationItemImpl modification:modifications )
+            for ( ModificationItem modification:modifications )
             {
                 sb.append( "            Modification[" ).append( i ).append( "]\n" );
                 sb.append( "                Operation : " );

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=691179&r1=691178&r2=691179&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
Tue Sep  2 02:58:45 2008
@@ -228,9 +228,9 @@
 
         for ( int ii = 0; ii < mods.size(); ii++ )
         {
-            ModificationItemImpl item = ( ModificationItemImpl ) list.next();
+            ModificationItem item = ( ModificationItem ) list.next();
 
-            if ( !equals( ( ModificationItemImpl ) mods.get( ii ), item ) )
+            if ( !equals( ( ModificationItem ) mods.get( ii ), item ) )
             {
                 return false;
             }
@@ -250,7 +250,7 @@
      *            the second ModificationItem to compare
      * @return true if the ModificationItems are equal, false otherwise
      */
-    private boolean equals( ModificationItemImpl item0, ModificationItemImpl item1 )
+    private boolean equals( ModificationItem item0, ModificationItem item1 )
     {
         if ( item0 == item1 )
         {
@@ -343,7 +343,7 @@
             for ( int i = 0; i < mods.size(); i++ )
             {
 
-                ModificationItemImpl modification = ( ModificationItemImpl ) mods.get( i
);
+                ModificationItem modification = ( ModificationItem ) mods.get( i );
 
                 sb.append( "            Modification[" ).append( i ).append( "]\n" );
                 sb.append( "                Operation : " );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
Tue Sep  2 02:58:45 2008
@@ -40,7 +40,6 @@
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
@@ -244,7 +243,7 @@
      * @param type the attributeType spec of the Attribute to extract
      * @return the modification item on the attributeType specified
      */
-    public static final ModificationItem getModificationItem( List<ModificationItemImpl>
mods, AttributeType type )
+    public static final ModificationItem getModificationItem( List<ModificationItem>
mods, AttributeType type )
     {
         // optimization bypass to avoid cost of the loop below
         if ( type.getNamesRef().length == 1 )

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java?rev=691179&r1=691178&r2=691179&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
Tue Sep  2 02:58:45 2008
@@ -25,6 +25,7 @@
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
+import javax.naming.directory.ModificationItem;
 
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -37,7 +38,6 @@
 import org.apache.directory.shared.ldap.codec.ResponseCarryingException;
 import org.apache.directory.shared.ldap.codec.modify.ModifyRequest;
 import org.apache.directory.shared.ldap.message.Message;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ModifyResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -120,11 +120,11 @@
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        List<ModificationItemImpl> modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 2, modifications.size() );
 
-        ModificationItemImpl modification = modifications.get( 0 );
+        ModificationItem modification = modifications.get( 0 );
         Attribute attributeValue =  modification.getAttribute();
 
         assertEquals( "l", attributeValue.getID().toLowerCase() );
@@ -288,11 +288,11 @@
         assertEquals( 21, message.getMessageId() );
         assertEquals( "cn=Tori Amos,ou=playground,dc=apache,dc=org", modifyRequest.getObject().toString()
);
 
-        List<ModificationItemImpl> modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 2, modifications.size() );
 
-        ModificationItemImpl modification = modifications.get( 0 );
+        ModificationItem modification = modifications.get( 0 );
         Attribute attributeValue = modification.getAttribute();
 
         assertEquals( "telephonenumber", attributeValue.getID().toLowerCase() );
@@ -411,11 +411,11 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=Tori Amos,ou=playground,dc=apache,dc=org", modifyRequest.getObject().toString()
);
 
-        List<ModificationItemImpl> modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 3, modifications.size() );
 
-        ModificationItemImpl modification = modifications.get( 0 );
+        ModificationItem modification = modifications.get( 0 );
         Attribute attributeValue = modification.getAttribute();
 
         assertEquals( "description", attributeValue.getID().toLowerCase() );
@@ -542,11 +542,11 @@
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        List<ModificationItemImpl> modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 2, modifications.size() );
 
-        ModificationItemImpl modification = modifications.get( 0 );
+        ModificationItem modification = modifications.get( 0 );
         Attribute attributeValue = modification.getAttribute();
 
         assertEquals( "l", attributeValue.getID().toLowerCase() );
@@ -1073,11 +1073,11 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        List<ModificationItemImpl> modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 1, modifications.size() );
 
-        ModificationItemImpl modification = modifications.get( 0 );
+        ModificationItem modification = modifications.get( 0 );
         Attribute attributeValue = modification.getAttribute();
 
         assertEquals( "l", attributeValue.getID().toLowerCase() );
@@ -1156,11 +1156,11 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        List<ModificationItemImpl> modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 1, modifications.size() );
 
-        ModificationItemImpl modification = modifications.get( 0 );
+        ModificationItem modification = modifications.get( 0 );
         Attribute attributeValue = modification.getAttribute();
 
         assertEquals( "l", attributeValue.getID().toLowerCase() );
@@ -1247,11 +1247,11 @@
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString()
);
 
-        List<ModificationItemImpl> modifications = modifyRequest.getModifications();
+        List<ModificationItem> modifications = modifyRequest.getModifications();
 
         assertEquals( 1, modifications.size() );
 
-        ModificationItemImpl modification = modifications.get( 0 );
+        ModificationItem modification = modifications.get( 0 );
         Attribute attributeValue = modification.getAttribute();
 
         assertEquals( "l", attributeValue.getID().toLowerCase() );

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=691179&r1=691178&r2=691179&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
Tue Sep  2 02:58:45 2008
@@ -77,18 +77,18 @@
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
+        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
         req.addModification( item );
 
         attr = new BasicAttribute( "attr1" );
         attr.add( "val3" );
-        item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
+        item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
         req.addModification( item );
 
         attr = new BasicAttribute( "attr2" );
         attr.add( "val4" );
         attr.add( "val5" );
-        item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
+        item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
         req.addModification( item );
 
         return req;
@@ -158,7 +158,7 @@
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
+        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -166,7 +166,7 @@
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
+        item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -184,7 +184,7 @@
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
+        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -204,7 +204,7 @@
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
+        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -212,7 +212,7 @@
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
+        item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -230,7 +230,7 @@
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
+        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -239,7 +239,7 @@
         attr.add( "val1" );
         attr.add( "val2" );
         attr.add( "val3" );
-        item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
+        item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -261,18 +261,18 @@
                 attr.add( "val0" );
                 attr.add( "val1" );
                 attr.add( "val2" );
-                ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
attr );
+                ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr
);
                 list.add( item );
 
                 attr = new BasicAttribute( "attr1" );
                 attr.add( "val3" );
-                item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
+                item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
                 list.add( item );
 
                 attr = new BasicAttribute( "attr2" );
                 attr.add( "val4" );
                 attr.add( "val5" );
-                item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
+                item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
                 list.add( item );
 
                 return list;



Mime
View raw message