You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/11/11 02:15:02 UTC

svn commit: r1200681 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/api/interceptor/ core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ core-api/src/test/java/org/apache/directory/s...

Author: elecharny
Date: Fri Nov 11 01:15:01 2011
New Revision: 1200681

URL: http://svn.apache.org/viewvc?rev=1200681&view=rev
Log:
Moved the MoveAndRename operation out of the InterceptorChain

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AddOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModifyOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
    directory/apacheds/trunk/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
    directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
    directory/apacheds/trunk/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/trunk/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
    directory/apacheds/trunk/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/trunk/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
    directory/apacheds/trunk/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
    directory/apacheds/trunk/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
    directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/trunk/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
    directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java Fri Nov 11 01:15:01 2011
@@ -235,7 +235,7 @@ public abstract class BaseInterceptor im
         /**
          * {@inheritDoc}
          */
-        public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+        public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
         {
             nexus.moveAndRename( moveAndRenameContext );
         }
@@ -385,6 +385,20 @@ public abstract class BaseInterceptor im
 
 
     /**
+     * Calls the next interceptor for the add operation.
+     * 
+     * @param addContext The context in which we are executing this operation
+     * @throws LdapException If something went wrong
+     */
+    protected final void next( AddOperationContext addContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( addContext );
+
+        interceptor.add( addContext );
+    }
+
+
+    /**
      * {@inheritDoc}
      */
     public void bind( BindOperationContext bindContext ) throws LdapException
@@ -453,20 +467,6 @@ public abstract class BaseInterceptor im
 
 
     /**
-     * Calls the next interceptor for the add operation.
-     * 
-     * @param addContext The context in which we are executing this operation
-     * @throws LdapException If something went wrong
-     */
-    protected final void next( AddOperationContext addContext ) throws LdapException
-    {
-        Interceptor interceptor = getNextInterceptor( addContext );
-        
-        interceptor.add( addContext );
-    }
-    
-    
-    /**
      * {@inheritDoc}
      */
     public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
@@ -564,9 +564,26 @@ public abstract class BaseInterceptor im
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void modify( ModifyOperationContext modifyContext ) throws LdapException
     {
-       // Nothing to do
+        // Nothing to do
+    }
+
+
+    /**
+     * Calls the next interceptor for the modify operation.
+     * 
+     * @param modifyContext The context in which we are executing this operation
+     * @throws LdapException If something went wrong
+     */
+    protected final void next( ModifyOperationContext modifyContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( modifyContext );
+
+        interceptor.modify( modifyContext );
     }
 
 
@@ -575,7 +592,7 @@ public abstract class BaseInterceptor im
      */
     public void move( MoveOperationContext moveContext ) throws LdapException
     {
-        // Nothing to do
+        // Do nothing
     }
 
 
@@ -593,9 +610,23 @@ public abstract class BaseInterceptor im
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
-        next.moveAndRename( moveAndRenameContext );
+        // Do nothing
+    }
+
+
+    /**
+     * Calls the next interceptor for the moveAndRename operation.
+     * 
+     * @param moveAndRenameContext The context in which we are executing this operation
+     * @throws LdapException If something went wrong
+     */
+    protected final void next( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( moveAndRenameContext );
+
+        interceptor.moveAndRename( moveAndRenameContext );
     }
 
 
@@ -649,19 +680,4 @@ public abstract class BaseInterceptor im
 
         interceptor.unbind( unbindContext );
     }
-    
-    
-    /**
-     * Calls the next interceptor for the modify operation.
-     * 
-     * @param modifyContext The context in which we are executing this operation
-     * @throws LdapException If something went wrong
-     */
-    protected final void next( ModifyOperationContext modifyContext ) throws LdapException
-    {
-        Interceptor interceptor = getNextInterceptor( modifyContext );
-        
-        interceptor.modify( modifyContext );
-    }
-
 }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java Fri Nov 11 01:15:01 2011
@@ -196,7 +196,7 @@ public interface Interceptor
     /**
      * Filters {@link Partition#moveAndRename( MoveAndRenameOperationContext) } call.
      */
-    void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException;
+    void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException;
 
 
     /**

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java Fri Nov 11 01:15:01 2011
@@ -96,7 +96,7 @@ public class InterceptorChain
          */
         public void add( AddOperationContext addContext ) throws LdapException
         {
-            nexus.add( addContext );
+            // Do nothing
         }
 
 
@@ -156,31 +156,31 @@ public class InterceptorChain
 
         public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
         {
-            return nexus.lookup( lookupContext );
+            return null;
         }
 
 
         public void modify( ModifyOperationContext modifyContext ) throws LdapException
         {
-            nexus.modify( modifyContext );
+            // Do nothing
         }
 
 
         public void move( MoveOperationContext moveContext ) throws LdapException
         {
-            nexus.move( moveContext );
+            // Do nothing
         }
 
 
-        public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+        public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
         {
-            nexus.moveAndRename( moveAndRenameContext );
+            // Do nothing
         }
 
 
         public void rename( RenameOperationContext renameContext ) throws LdapException
         {
-            nexus.rename( renameContext );
+            // Do nothing
         }
 
 
@@ -577,49 +577,6 @@ public class InterceptorChain
     }
 
 
-    public void add( AddOperationContext addContext ) throws LdapException
-    {
-        Element node = getStartingEntry();
-        Interceptor head = node.interceptor;
-        NextInterceptor next = node.nextInterceptor;
-
-        try
-        {
-            head.add( addContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-        }
-    }
-
-
-    public void modify( ModifyOperationContext modifyContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-        eagerlyPopulateFields( modifyContext );
-
-        try
-        {
-            head.modify( modifyContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-        }
-    }
-
-
     public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
     {
         Element entry = getStartingEntry();
@@ -642,28 +599,6 @@ public class InterceptorChain
     }
 
 
-    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-        moveAndRenameContext.setOriginalEntry( getOriginalEntry( moveAndRenameContext ) );
-        moveAndRenameContext.setModifiedEntry( moveAndRenameContext.getOriginalEntry().clone() );
-
-        try
-        {
-            head.moveAndRename( next, moveAndRenameContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-        }
-    }
-
     /**
      * Represents an internal entry of this chain.
      */
@@ -732,50 +667,6 @@ public class InterceptorChain
                 }
 
 
-                public void add( AddOperationContext addContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", addRequest" );
-                        interceptor.add( addContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", addRequest" );
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                    }
-                }
-
-
-                public void modify( ModifyOperationContext modifyContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", modifyRequest" );
-                        interceptor.modify( modifyContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", modifyRequest" );
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                    }
-                }
-
-
                 public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
                 {
                     Element next = getNextEntry();
@@ -799,28 +690,6 @@ public class InterceptorChain
                         throw new InternalError(); // Should be unreachable
                     }
                 }
-
-
-                public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", moveAndRenameRequest" );
-                        interceptor.moveAndRename( next.nextInterceptor, moveAndRenameContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", moveAndRenameRequest" );
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                    }
-                }
             };
         }
     }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java Fri Nov 11 01:15:01 2011
@@ -21,9 +21,6 @@ package org.apache.directory.server.core
 
 
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 
@@ -38,24 +35,6 @@ import org.apache.directory.shared.ldap.
 public interface NextInterceptor
 {
     /**
-     * Calls the next interceptor's {@link Interceptor#add( AddOperationContext )}.
-     */
-    void add( AddOperationContext addContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#modify( ModifyOperationContext )}.
-     */
-    void modify( ModifyOperationContext modifyContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#moveAndRename( NextInterceptor, MoveAndRenameOperationContext )}.
-     */
-    void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException;
-
-
-    /**
      * Calls the next interceptor's {@link Interceptor#search( NextInterceptor, SearchOperationContext searchContext )}.
      */
     EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException;

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AddOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AddOperationContext.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AddOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AddOperationContext.java Fri Nov 11 01:15:01 2011
@@ -6,22 +6,20 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.api.interceptor.context;
 
 
-import java.util.Collections;
-
 import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.OperationEnum;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
@@ -45,7 +43,7 @@ public class AddOperationContext extends
     /**
      * Creates a new instance of AddOperationContext.
      * 
-     * @param session the current Session 
+     * @param session the current Session
      */
     public AddOperationContext( CoreSession session )
     {
@@ -61,7 +59,7 @@ public class AddOperationContext extends
     /**
      * Creates a new instance of AddOperationContext.
      * 
-     * @param session the current Session 
+     * @param session the current Session
      * @param dn the name of the entry being added
      */
     public AddOperationContext( CoreSession session, Dn dn )
@@ -78,7 +76,7 @@ public class AddOperationContext extends
     /**
      * Creates a new instance of AddOperationContext.
      * 
-     * @param session the current Session 
+     * @param session the current Session
      * @param entry the entry being added
      */
     public AddOperationContext( CoreSession session, Entry entry )
@@ -95,19 +93,19 @@ public class AddOperationContext extends
     /**
      * Creates a new instance of ModifyOperationContext.
      *
-     * @param session the current Session 
+     * @param session the current Session
      * @param dn the name of the entry being added
      * @param entry the entry being added
      */
     public AddOperationContext( CoreSession session, Dn dn, Entry entry )
     {
         super( session, dn );
-        
+
         if ( session != null )
         {
             setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.ADD ) );
         }
-        
+
         this.entry = new ClonedServerEntry( entry );
     }
 
@@ -120,12 +118,12 @@ public class AddOperationContext extends
         {
             setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.ADD ) );
         }
-        
-        entry = new ClonedServerEntry( 
+
+        entry = new ClonedServerEntry(
             new DefaultEntry( session.getDirectoryService().getSchemaManager(), addRequest.getEntry() ) );
         dn = addRequest.getEntry().getDn();
         requestControls = addRequest.getControls();
-        
+
         if ( requestControls.containsKey( ManageDsaIT.OID ) )
         {
             ignoreReferral();
@@ -145,7 +143,7 @@ public class AddOperationContext extends
         return MessageTypeEnum.ADD_REQUEST.name();
     }
 
-    
+
     /**
      * @see Object#toString()
      */

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModifyOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModifyOperationContext.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModifyOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModifyOperationContext.java Fri Nov 11 01:15:01 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.api.interceptor.context;
 
@@ -61,6 +61,7 @@ public class ModifyOperationContext exte
     public ModifyOperationContext( CoreSession session )
     {
         super( session );
+
         if ( session != null )
         {
             setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MODIFY ) );
@@ -77,12 +78,12 @@ public class ModifyOperationContext exte
     public ModifyOperationContext( CoreSession session, Dn dn, List<Modification> modItems )
     {
         super( session, dn );
-        
+
         if ( session != null )
         {
             setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MODIFY ) );
         }
-        
+
         this.modItems = modItems;
     }
 
@@ -90,12 +91,12 @@ public class ModifyOperationContext exte
     public ModifyOperationContext( CoreSession session, ModifyRequest modifyRequest ) throws LdapException
     {
         super( session, modifyRequest.getName() );
-        
+
         if ( session != null )
         {
             setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MODIFY ) );
         }
-        
+
         modItems = ServerEntryUtils.toServerModification( modifyRequest.getModifications().toArray(
             new DefaultModification[0] ), session.getDirectoryService().getSchemaManager() );
 
@@ -133,7 +134,7 @@ public class ModifyOperationContext exte
 
     public static List<Modification> createModItems( Entry serverEntry, ModificationOperation modOp )
         throws LdapException
-    {
+        {
         List<Modification> items = new ArrayList<Modification>( serverEntry.size() );
 
         for ( Attribute attribute : serverEntry )
@@ -142,7 +143,7 @@ public class ModifyOperationContext exte
         }
 
         return items;
-    }
+        }
 
 
     /**
@@ -155,7 +156,7 @@ public class ModifyOperationContext exte
 
 
     /**
-     * Returns the entry after it has been renamed and potentially changed for 
+     * Returns the entry after it has been renamed and potentially changed for
      * Rdn alterations.
      *
      * @return the new renamed entry

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java Fri Nov 11 01:15:01 2011
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
 
 
 import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
@@ -46,6 +47,7 @@ public class MoveAndRenameOperationConte
     public MoveAndRenameOperationContext( CoreSession session )
     {
         super( session );
+        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
     }
 
 
@@ -61,7 +63,8 @@ public class MoveAndRenameOperationConte
     {
         super( session, oldDn, newRdn, delOldRdn );
         this.newSuperiorDn = newSuperiorDn;
-        
+        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
+
         try
         {
             newDn = newSuperiorDn.add( newRdn );
@@ -78,6 +81,7 @@ public class MoveAndRenameOperationConte
         // super sets the newRdn and the delOldRdn members and tests
         super( session, modifyDnRequest );
         this.newSuperiorDn = modifyDnRequest.getNewSuperior();
+        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
 
         if ( newSuperiorDn == null )
         {

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java (original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java Fri Nov 11 01:15:01 2011
@@ -182,10 +182,10 @@ public class MockInterceptor extends Bas
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         interceptors.add( this );
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java Fri Nov 11 01:15:01 2011
@@ -710,8 +710,8 @@ public class DefaultOperationManager imp
 
             // populate the context with the old entry
             eagerlyPopulateFields( modifyContext );
-            
-            // Call the Add method
+
+            // Call the Modify method
             Interceptor head = directoryService.getInterceptor( modifyContext.getNextInterceptor() );
 
             head.modify( modifyContext );
@@ -923,9 +923,13 @@ public class DefaultOperationManager imp
             // Unlock the ReferralManager
             directoryService.getReferralManager().unlock();
 
-            // Call the Add method
-            InterceptorChain interceptorChain = directoryService.getInterceptorChain();
-            interceptorChain.moveAndRename( moveAndRenameContext );
+            moveAndRenameContext.setOriginalEntry( getOriginalEntry( moveAndRenameContext ) );
+            moveAndRenameContext.setModifiedEntry( moveAndRenameContext.getOriginalEntry().clone() );
+
+            // Call the MoveAndRename method
+            Interceptor head = directoryService.getInterceptor( moveAndRenameContext.getNextInterceptor() );
+
+            head.moveAndRename( moveAndRenameContext );
         }
         finally
         {

Modified: directory/apacheds/trunk/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java Fri Nov 11 01:15:01 2011
@@ -54,7 +54,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
@@ -1458,7 +1457,7 @@ public class AdministrativePointIntercep
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext )
         throws LdapException
         {
         LOG.debug( ">>> Entering into the Administrative Interceptor, moveAndRenameRequest" );
@@ -1470,7 +1469,7 @@ public class AdministrativePointIntercep
         if ( adminPoint == null )
         {
             // Nope, go on.
-            next.moveAndRename( moveAndRenameContext );
+            next( moveAndRenameContext );
 
             LOG.debug( "Exit from Administrative Interceptor" );
 

Modified: directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Fri Nov 11 01:15:01 2011
@@ -751,9 +751,8 @@ public class AuthenticationInterceptor e
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
-        {
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    {
         if ( IS_DEBUG )
         {
             LOG.debug( "Operation Context: {}", moveAndRenameContext );
@@ -761,9 +760,9 @@ public class AuthenticationInterceptor e
 
         checkAuthenticated( moveAndRenameContext );
         checkPwdReset( moveAndRenameContext );
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
         invalidateAuthenticatorCaches( moveAndRenameContext.getDn() );
-        }
+    }
 
 
     /**

Modified: directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Fri Nov 11 01:15:01 2011
@@ -1026,7 +1026,7 @@ public class AciAuthorizationInterceptor
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Dn oldDn = moveAndRenameContext.getDn();
         CoreSession session = moveAndRenameContext.getSession();
@@ -1040,7 +1040,8 @@ public class AciAuthorizationInterceptor
         // bypass authz code if we are disabled
         if ( !directoryService.isAccessControlEnabled() )
         {
-            next.moveAndRename( moveAndRenameContext );
+            next( moveAndRenameContext );
+
             return;
         }
 
@@ -1049,7 +1050,7 @@ public class AciAuthorizationInterceptor
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
         {
-            next.moveAndRename( moveAndRenameContext );
+            next( moveAndRenameContext );
             tupleCache.subentryRenamed( oldDn, newDn );
             groupCache.groupRenamed( oldDn, newDn );
 
@@ -1111,7 +1112,7 @@ public class AciAuthorizationInterceptor
 
         engine.checkPermission( aciContext );
 
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
         tupleCache.subentryRenamed( oldDn, newDn );
         groupCache.groupRenamed( oldDn, newDn );
     }

Modified: directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Fri Nov 11 01:15:01 2011
@@ -330,14 +330,14 @@ public class DefaultAuthorizationInterce
     }
 
 
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         if ( !moveAndRenameContext.getSession().getDirectoryService().isAccessControlEnabled() )
         {
             protectDnAlterations( moveAndRenameContext, moveAndRenameContext.getDn() );
         }
 
-        nextInterceptor.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java Fri Nov 11 01:15:01 2011
@@ -30,7 +30,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.entry.ServerEntryUtils;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
@@ -323,9 +322,8 @@ public class ChangeLogInterceptor extend
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
-        {
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    {
         Entry serverEntry = null;
 
         if ( changeLog.isEnabled() )
@@ -334,7 +332,7 @@ public class ChangeLogInterceptor extend
             serverEntry = moveAndRenameContext.getOriginalEntry();
         }
 
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
 
         if ( !changeLog.isEnabled() )
         {
@@ -359,7 +357,7 @@ public class ChangeLogInterceptor extend
         }
 
         moveAndRenameContext.setChangeLogEvent( changeLog.log( getPrincipal( moveAndRenameContext ), forward, reverses ) );
-        }
+    }
 
 
     /**

Modified: directory/apacheds/trunk/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java Fri Nov 11 01:15:01 2011
@@ -38,7 +38,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.event.NotificationCriteria;
 import org.apache.directory.server.core.api.event.RegistrationEntry;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
@@ -272,11 +271,11 @@ public class EventInterceptor extends Ba
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, final MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( final MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Entry oriEntry = moveAndRenameContext.getOriginalEntry();
         List<RegistrationEntry> selecting = getSelectingRegistrations( moveAndRenameContext.getDn(), oriEntry );
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
 
         if ( selecting.isEmpty() )
         {

Modified: directory/apacheds/trunk/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Fri Nov 11 01:15:01 2011
@@ -27,7 +27,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.filtering.BaseEntryFilteringCursor;
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.EntryOperationContext;
@@ -361,7 +360,7 @@ public class ExceptionInterceptor extend
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Dn oldDn = moveAndRenameContext.getDn();
 
@@ -381,7 +380,7 @@ public class ExceptionInterceptor extend
             }
         }
 
-        nextInterceptor.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java Fri Nov 11 01:15:01 2011
@@ -23,7 +23,6 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
@@ -284,9 +283,8 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
-        {
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    {
         long opRevision = 0;
 
         if ( journalEnabled )
@@ -306,7 +304,7 @@ public class JournalInterceptor extends 
 
         try
         {
-            next.moveAndRename( moveAndRenameContext );
+            next( moveAndRenameContext );
 
             if ( journalEnabled )
             {
@@ -324,7 +322,7 @@ public class JournalInterceptor extends 
 
             throw e;
         }
-        }
+    }
 
 
     /**

Modified: directory/apacheds/trunk/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java Fri Nov 11 01:15:01 2011
@@ -458,10 +458,10 @@ public class TimerInterceptor extends Ba
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
         long delta = System.nanoTime() - t0;
 
         if ( IS_DEBUG_STATS )

Modified: directory/apacheds/trunk/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Fri Nov 11 01:15:01 2011
@@ -216,9 +216,8 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
-
         if ( !moveAndRenameContext.getNewRdn().isSchemaAware() )
         {
             moveAndRenameContext.getNewRdn().apply( schemaManager );
@@ -239,7 +238,7 @@ public class NormalizationInterceptor ex
             moveAndRenameContext.getNewSuperiorDn().apply( schemaManager );
         }
 
-        nextInterceptor.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Fri Nov 11 01:15:01 2011
@@ -375,7 +375,7 @@ public class OperationalAttributeInterce
     }
 
 
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Entry modifiedEntry = moveAndRenameContext.getOriginalEntry().clone();
         modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( moveAndRenameContext ).getName() );
@@ -383,7 +383,7 @@ public class OperationalAttributeInterce
         modifiedEntry.setDn( moveAndRenameContext.getNewDn() );
         moveAndRenameContext.setModifiedEntry( modifiedEntry );
 
-        nextInterceptor.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Fri Nov 11 01:15:01 2011
@@ -26,7 +26,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.ReferralManager;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
@@ -310,12 +309,12 @@ public class ReferralInterceptor extends
     /**
      * {@inheritDoc}
      **/
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         // Check if the entry is a referral itself
         boolean isReferral = isReferral( moveAndRenameContext.getOriginalEntry() );
 
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
 
         if ( isReferral )
         {

Modified: directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Fri Nov 11 01:15:01 2011
@@ -1332,7 +1332,7 @@ public class SubentryInterceptor extends
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Dn oldDn = moveAndRenameContext.getDn();
         Dn newSuperiorDn = moveAndRenameContext.getNewSuperiorDn();
@@ -1353,7 +1353,7 @@ public class SubentryInterceptor extends
 
             directoryService.getSubentryCache().addSubentry( newName, subentry );
 
-            next.moveAndRename( moveAndRenameContext );
+            next( moveAndRenameContext );
 
             subentry = directoryService.getSubentryCache().getSubentry( newName );
 
@@ -1409,7 +1409,7 @@ public class SubentryInterceptor extends
                 throw new LdapSchemaViolationException( ResultCodeEnum.NOT_ALLOWED_ON_RDN, msg );
             }
 
-            next.moveAndRename( moveAndRenameContext );
+            next( moveAndRenameContext );
 
             // calculate the new Dn now for use below to modify subentry operational
             // attributes contained within this regular entry with name changes

Modified: directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java?rev=1200681&r1=1200680&r2=1200681&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java Fri Nov 11 01:15:01 2011
@@ -31,7 +31,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
@@ -405,7 +404,7 @@ public class TriggerInterceptor extends 
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
         Dn oldDn = moveAndRenameContext.getDn();
         Dn newSuperiorDn = moveAndRenameContext.getNewSuperiorDn();
@@ -415,7 +414,7 @@ public class TriggerInterceptor extends 
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.moveAndRename( moveAndRenameContext );
+            next( moveAndRenameContext );
             return;
         }
 
@@ -468,7 +467,7 @@ public class TriggerInterceptor extends 
         Map<ActionTime, List<TriggerSpecification>> importTriggerMap = getActionTimeMappedTriggerSpecsForOperation(
             importTriggerSpecs, LdapOperation.MODIFYDN_IMPORT );
 
-        next.moveAndRename( moveAndRenameContext );
+        next( moveAndRenameContext );
         triggerSpecCache.subentryRenamed( oldDN, newDn);
 
         // Fire AFTER Triggers.