directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1200434 - 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...
Date Thu, 10 Nov 2011 17:14:46 GMT
Author: elecharny
Date: Thu Nov 10 17:14:45 2011
New Revision: 1200434

URL: http://svn.apache.org/viewvc?rev=1200434&view=rev
Log:
Moved the Rename 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/RenameOperationContext.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/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -244,7 +244,7 @@ public abstract class BaseInterceptor im
         /**
          * {@inheritDoc}
          */
-        public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+        public void rename( RenameOperationContext renameContext ) throws LdapException
         {
             nexus.rename( renameContext );
         }
@@ -571,9 +571,26 @@ public abstract class BaseInterceptor im
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    /**
+     * {@inheritDoc}
+     */
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
-        next.rename( renameContext );
+        // Nothing to do
+    }
+
+
+    /**
+     * Calls the next interceptor for the rename operation.
+     * 
+     * @param renameContext The context in which we are executing this operation
+     * @throws LdapException If something went wrong
+     */
+    protected final void next( RenameOperationContext renameContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( renameContext );
+
+        interceptor.rename( renameContext );
     }
 
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -203,7 +203,7 @@ public interface Interceptor
     /**
      * Filters {@link Partition#rename( RenameOperationContext )} call.
      */
-    void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException;
+    void rename( RenameOperationContext renameContext ) 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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -178,7 +178,7 @@ public class InterceptorChain
         }
 
 
-        public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+        public void rename( RenameOperationContext renameContext ) throws LdapException
         {
             nexus.rename( renameContext );
         }
@@ -642,31 +642,6 @@ public class InterceptorChain
     }
 
 
-    public void rename( RenameOperationContext renameContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-        eagerlyPopulateFields( renameContext );
-        Entry originalEntry = getOriginalEntry( renameContext );
-        renameContext.setOriginalEntry( originalEntry );
-        renameContext.setModifiedEntry( originalEntry.clone() );
-
-        try
-        {
-            head.rename( next, renameContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-        }
-    }
-
-
     public void move( MoveOperationContext moveContext ) throws LdapException
     {
         Element entry = getStartingEntry();
@@ -850,28 +825,6 @@ public class InterceptorChain
                 }
 
 
-                public void rename( RenameOperationContext renameContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", renameRequest" );
-                        interceptor.rename( next.nextInterceptor, renameContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", renameRequest" );
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                    }
-                }
-
-
                 public void move( MoveOperationContext moveContext ) throws LdapException
                 {
                     Element next = getNextEntry();

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -25,7 +25,6 @@ import org.apache.directory.server.core.
 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.MoveOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 
@@ -64,12 +63,6 @@ public interface NextInterceptor
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#rename( NextInterceptor, RenameOperationContext )}.
-     */
-    void rename( RenameOperationContext renameContext ) 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/RenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/RenameOperationContext.java?rev=1200434&r1=1200433&r2=1200434&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/RenameOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/RenameOperationContext.java Thu Nov 10 17:14:45 2011
@@ -6,21 +6,22 @@
  *  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 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.message.controls.ManageDsaIT;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
@@ -54,6 +55,7 @@ public class RenameOperationContext exte
     public RenameOperationContext( CoreSession session )
     {
         super( session );
+        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
     }
 
 
@@ -69,6 +71,7 @@ public class RenameOperationContext exte
         super( session, oldDn );
         this.newRdn = newRdn;
         this.deleteOldRdn = deleteOldRdn;
+        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
     }
 
 
@@ -76,15 +79,16 @@ public class RenameOperationContext exte
     {
         super( session, modifyDnRequest.getName() );
         this.newRdn = modifyDnRequest.getNewRdn();
-        
+        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
+
         if ( newRdn == null )
         {
             throw new IllegalStateException( I18n.err( I18n.ERR_328, modifyDnRequest ) );
         }
-        
+
         this.deleteOldRdn = modifyDnRequest.getDeleteOldRdn();
         this.requestControls = modifyDnRequest.getControls();
-        
+
         if ( requestControls.containsKey( ManageDsaIT.OID ) )
         {
             ignoreReferral();
@@ -99,7 +103,7 @@ public class RenameOperationContext exte
     /**
      * @return The delete old Rdn flag
      */
-    public boolean getDeleteOldRdn() 
+    public boolean getDeleteOldRdn()
     {
         return deleteOldRdn;
     }
@@ -109,7 +113,7 @@ public class RenameOperationContext exte
      * Set the flag to delete the old Rdn
      * @param deleteOldRdn the flag to set
      */
-    public void setDelOldDn( boolean deleteOldRdn ) 
+    public void setDelOldDn( boolean deleteOldRdn )
     {
         this.deleteOldRdn = deleteOldRdn;
     }
@@ -160,15 +164,15 @@ public class RenameOperationContext exte
     {
         return MessageTypeEnum.MODIFYDN_REQUEST.name();
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */
     public String toString()
     {
         return "RenameContext for old Dn '" + getDn().getName() + "'" +
-        ", new Rdn '" + newRdn + "'" +
-        ( deleteOldRdn ? ", delete old Rdn" : "" ) ; 
+            ", new Rdn '" + newRdn + "'" +
+            ( deleteOldRdn ? ", delete old Rdn" : "" ) ;
     }
 }

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -193,10 +193,10 @@ public class MockInterceptor extends Bas
     /**
      * {@inheritDoc}
      */
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         interceptors.add( this );
-        next.rename( renameContext );
+        next( renameContext );
     }
 
 
@@ -206,6 +206,7 @@ public class MockInterceptor extends Bas
     public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException
     {
         interceptors.add( this );
+
         return next.search( searchContext );
     }
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -1005,9 +1005,17 @@ public class DefaultOperationManager imp
             // Unlock the ReferralManager
             directoryService.getReferralManager().unlock();
 
-            // Call the Add method
-            InterceptorChain interceptorChain = directoryService.getInterceptorChain();
-            interceptorChain.rename( renameContext );
+            // Call the rename method
+            // populate the context with the old entry
+            eagerlyPopulateFields( renameContext );
+            Entry originalEntry = getOriginalEntry( renameContext );
+            renameContext.setOriginalEntry( originalEntry );
+            renameContext.setModifiedEntry( originalEntry.clone() );
+
+            // Call the Delete method
+            Interceptor head = directoryService.getInterceptor( renameContext.getNextInterceptor() );
+
+            head.rename( renameContext );
         }
         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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -247,7 +247,7 @@ public class AdministrativePointIntercep
             SubschemaAdministrativePoint ssAap = new SubschemaAAP( dn, uuid );
             directoryService.getSubschemaAPCache().add( dn, ssAap );
 
-            // TODO : Here, we have to update the children, removing any 
+            // TODO : Here, we have to update the children, removing any
             // reference to any other underlying AP
 
             // If it's an AAP, we can get out immediately
@@ -264,8 +264,8 @@ public class AdministrativePointIntercep
                 AccessControlAdministrativePoint sap = new AccessControlSAP( dn, uuid );
                 directoryService.getAccessControlAPCache().add( dn, sap );
 
-                // TODO : Here, we have to update the children, removing any 
-                // reference to any other underlying AccessControl IAP or SAP 
+                // TODO : Here, we have to update the children, removing any
+                // reference to any other underlying AccessControl IAP or SAP
 
                 continue;
             }
@@ -284,9 +284,9 @@ public class AdministrativePointIntercep
                 CollectiveAttributeAdministrativePoint sap = new CollectiveAttributeSAP( dn, uuid );
                 directoryService.getCollectiveAttributeAPCache().add( dn, sap );
 
-                // TODO : Here, we have to update the children, removing any 
-                // reference to any other underlying CollectiveAttribute IAP or SAP 
-                
+                // TODO : Here, we have to update the children, removing any
+                // reference to any other underlying CollectiveAttribute IAP or SAP
+
                 continue;
             }
 
@@ -304,8 +304,8 @@ public class AdministrativePointIntercep
                 SubschemaAdministrativePoint sap = new SubschemaSAP( dn, uuid );
                 directoryService.getSubschemaAPCache().add( dn, sap );
 
-                // TODO : Here, we have to update the children, removing any 
-                // reference to any other underlying Subschema IAP or SAP 
+                // TODO : Here, we have to update the children, removing any
+                // reference to any other underlying Subschema IAP or SAP
 
                 continue;
             }
@@ -316,9 +316,9 @@ public class AdministrativePointIntercep
                 TriggerExecutionAdministrativePoint sap = new TriggerExecutionSAP( dn, uuid );
                 directoryService.getTriggerExecutionAPCache().add( dn, sap );
 
-                // TODO : Here, we have to update the children, removing any 
+                // TODO : Here, we have to update the children, removing any
                 // reference to any other underlying TriggerExecution IAP or SAP
-                
+
                 continue;
             }
 
@@ -341,7 +341,7 @@ public class AdministrativePointIntercep
     private void addRole( String role, Dn dn, String uuid, DnNode<AccessControlAdministrativePoint> acapCache,
         DnNode<CollectiveAttributeAdministrativePoint> caapCache, DnNode<TriggerExecutionAdministrativePoint> teapCache,
         DnNode<SubschemaAdministrativePoint> ssapCache ) throws LdapException
-    {
+        {
         // Deal with Autonomous AP : create the 4 associated SAP/AAP
         if ( isAutonomousAreaRole( role ) )
         {
@@ -360,7 +360,7 @@ public class AdministrativePointIntercep
             // The SS AAP
             SubschemaAdministrativePoint ssAap = new SubschemaAAP( dn, uuid );
             ssapCache.add( dn, ssAap );
-            
+
             // If it's an AAP, we can get out immediately
             return;
         }
@@ -424,7 +424,7 @@ public class AdministrativePointIntercep
 
             return;
         }
-    }
+        }
 
 
 
@@ -435,7 +435,7 @@ public class AdministrativePointIntercep
     private void delRole( String role, Dn dn, String uuid, DnNode<AccessControlAdministrativePoint> acapCache,
         DnNode<CollectiveAttributeAdministrativePoint> caapCache, DnNode<TriggerExecutionAdministrativePoint> teapCache,
         DnNode<SubschemaAdministrativePoint> ssapCache ) throws LdapException
-    {
+        {
         // Deal with Autonomous AP : remove the 4 associated SAP/AAP
         if ( isAutonomousAreaRole( role ) )
         {
@@ -450,7 +450,7 @@ public class AdministrativePointIntercep
 
             // The SS AAP
             ssapCache.remove( dn );
-            
+
             return;
         }
 
@@ -485,9 +485,9 @@ public class AdministrativePointIntercep
 
             return;
         }
-    }
+        }
+
 
-    
     private AdministrativePoint getParent( AdministrativePoint ap, List<AdministrativePoint> aps,
         AdministrativeRole role, DnNode<List<AdministrativePoint>> currentNode )
     {
@@ -525,7 +525,7 @@ public class AdministrativePointIntercep
 
     /**
      * Find the parent for the given administrative point. If the AP is an AAP, the parent will be the closest
-     * AAP or the closest SAP. If we have a SAP between the added AAP and a AAP, then 
+     * AAP or the closest SAP. If we have a SAP between the added AAP and a AAP, then
      */
     private AdministrativePoint findParent( AdministrativePoint ap, DnNode<List<AdministrativePoint>> currentNode )
     {
@@ -612,7 +612,7 @@ public class AdministrativePointIntercep
             throw new LdapUnwillingToPerformException( message );
         }
 
-        // If we are trying to add an AAP, we have to check that 
+        // If we are trying to add an AAP, we have to check that
         // it's the only role in the AdminPoint AT
         if ( isAutonomousAreaRole( roleStr ) )
         {
@@ -629,7 +629,7 @@ public class AdministrativePointIntercep
                 return;
             }
         }
-        
+
         // Check that we don't have already an AAP in the AdminPoint AT when we try to
         // add a role
         if ( adminPoint.contains( SchemaConstants.AUTONOMOUS_AREA ) )
@@ -667,24 +667,24 @@ public class AdministrativePointIntercep
             throw new LdapUnwillingToPerformException( message );
         }
 
-        // Now we are trying to delete an Administrative point. We have to check that 
+        // Now we are trying to delete an Administrative point. We have to check that
         // we only have one role if the deleted role is an AAP
         if ( isAutonomousAreaRole( roleStr ) )
         {
-            // We know have to check that removing the AAP, we will not 
+            // We know have to check that removing the AAP, we will not
             // left any pending IAP. We should check for the 3 potential IAPs :
             // AccessControl, CollectiveAttribute and TriggerExecution.
             // If the removed AP has a parent, no need to go any further :
             // the children IAPs will depend on this parent.
-            
+
             // Process the ACs
             DnNode<AccessControlAdministrativePoint> acAps = directoryService.getAccessControlAPCache();
-            
+
             if ( !acAps.hasParent( dn ) )
             {
                 // No parent, check for any IAP
                 List<AccessControlAdministrativePoint> children = acAps.getDescendantElements( dn );
-                
+
                 for ( AccessControlAdministrativePoint child : children )
                 {
                     if ( child.isInner() )
@@ -696,15 +696,15 @@ public class AdministrativePointIntercep
                     }
                 }
             }
-            
+
             // Process the CAs
             DnNode<CollectiveAttributeAdministrativePoint> caAps = directoryService.getCollectiveAttributeAPCache();
-            
+
             if ( !acAps.hasParent( dn ) )
             {
                 // No parent, check for any IAP
                 List<CollectiveAttributeAdministrativePoint> children = caAps.getDescendantElements( dn );
-                
+
                 for ( CollectiveAttributeAdministrativePoint child : children )
                 {
                     if ( child.isInner() )
@@ -716,15 +716,15 @@ public class AdministrativePointIntercep
                     }
                 }
             }
-            
+
             // Process the TEs
             DnNode<TriggerExecutionAdministrativePoint> teAps = directoryService.getTriggerExecutionAPCache();
-            
+
             if ( !acAps.hasParent( dn ) )
             {
                 // No parent, check for any IAP
                 List<TriggerExecutionAdministrativePoint> children = teAps.getDescendantElements( dn );
-                
+
                 for ( TriggerExecutionAdministrativePoint child : children )
                 {
                     if ( child.isInner() )
@@ -783,7 +783,7 @@ public class AdministrativePointIntercep
 
                 entries.add( entry );
             }
-            
+
             results.close();
         }
         catch ( Exception e )
@@ -828,9 +828,9 @@ public class AdministrativePointIntercep
      */
     private void deleteAdminPointCache( Attribute adminPoint, DeleteOperationContext deleteContext )
         throws LdapException
-    {
+        {
         Dn dn = deleteContext.getDn();
-        
+
         // Remove the APs in the AP cache
         for ( Value<?> value : adminPoint )
         {
@@ -888,7 +888,7 @@ public class AdministrativePointIntercep
                 continue;
             }
         }
-    }
+        }
 
 
     /**
@@ -897,7 +897,7 @@ public class AdministrativePointIntercep
     private boolean isAccessControlInnerRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.ACCESS_CONTROL_INNER_AREA ) ||
-               role.equals( SchemaConstants.ACCESS_CONTROL_INNER_AREA_OID );
+            role.equals( SchemaConstants.ACCESS_CONTROL_INNER_AREA_OID );
     }
 
 
@@ -907,7 +907,7 @@ public class AdministrativePointIntercep
     private boolean isAccessControlSpecificRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.ACCESS_CONTROL_SPECIFIC_AREA ) ||
-               role.equals( SchemaConstants.ACCESS_CONTROL_SPECIFIC_AREA_OID );
+            role.equals( SchemaConstants.ACCESS_CONTROL_SPECIFIC_AREA_OID );
     }
 
 
@@ -917,7 +917,7 @@ public class AdministrativePointIntercep
     private boolean isCollectiveAttributeInnerRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.COLLECTIVE_ATTRIBUTE_INNER_AREA ) ||
-               role.equals( SchemaConstants.COLLECTIVE_ATTRIBUTE_INNER_AREA_OID );
+            role.equals( SchemaConstants.COLLECTIVE_ATTRIBUTE_INNER_AREA_OID );
     }
 
 
@@ -927,7 +927,7 @@ public class AdministrativePointIntercep
     private boolean isCollectiveAttributeSpecificRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.COLLECTIVE_ATTRIBUTE_SPECIFIC_AREA ) ||
-               role.equals( SchemaConstants.COLLECTIVE_ATTRIBUTE_SPECIFIC_AREA_OID );
+            role.equals( SchemaConstants.COLLECTIVE_ATTRIBUTE_SPECIFIC_AREA_OID );
     }
 
 
@@ -937,7 +937,7 @@ public class AdministrativePointIntercep
     private boolean isTriggerExecutionInnerRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.TRIGGER_EXECUTION_INNER_AREA ) ||
-               role.equals( SchemaConstants.TRIGGER_EXECUTION_INNER_AREA_OID );
+            role.equals( SchemaConstants.TRIGGER_EXECUTION_INNER_AREA_OID );
     }
 
 
@@ -947,7 +947,7 @@ public class AdministrativePointIntercep
     private boolean isTriggerExecutionSpecificRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA ) ||
-               role.equals( SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA_OID );
+            role.equals( SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA_OID );
     }
 
 
@@ -957,7 +957,7 @@ public class AdministrativePointIntercep
     private boolean isSubschemaSpecficRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.SUB_SCHEMA_ADMIN_SPECIFIC_AREA ) ||
-               role.equals( SchemaConstants.SUB_SCHEMA_ADMIN_SPECIFIC_AREA_OID );
+            role.equals( SchemaConstants.SUB_SCHEMA_ADMIN_SPECIFIC_AREA_OID );
     }
 
 
@@ -967,7 +967,7 @@ public class AdministrativePointIntercep
     private boolean isAutonomousAreaRole( String role )
     {
         return role.equalsIgnoreCase( SchemaConstants.AUTONOMOUS_AREA ) ||
-               role.equals( SchemaConstants.AUTONOMOUS_AREA_OID );
+            role.equals( SchemaConstants.AUTONOMOUS_AREA_OID );
     }
 
 
@@ -984,7 +984,7 @@ public class AdministrativePointIntercep
     private boolean hasAccessControlSpecificRole( Attribute adminPoint )
     {
         return adminPoint.contains( SchemaConstants.ACCESS_CONTROL_SPECIFIC_AREA ) ||
-               adminPoint.contains( SchemaConstants.ACCESS_CONTROL_SPECIFIC_AREA_OID );
+            adminPoint.contains( SchemaConstants.ACCESS_CONTROL_SPECIFIC_AREA_OID );
     }
 
 
@@ -997,14 +997,14 @@ public class AdministrativePointIntercep
     private boolean hasCollectiveAttributeSpecificRole( Attribute adminPoint )
     {
         return adminPoint.contains( SchemaConstants.COLLECTIVE_ATTRIBUTE_SPECIFIC_AREA ) ||
-               adminPoint.contains( SchemaConstants.COLLECTIVE_ATTRIBUTE_SPECIFIC_AREA_OID );
+            adminPoint.contains( SchemaConstants.COLLECTIVE_ATTRIBUTE_SPECIFIC_AREA_OID );
     }
 
 
     private boolean hasTriggerExecutionSpecificRole( Attribute adminPoint )
     {
         return adminPoint.contains( SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA ) ||
-               adminPoint.contains( SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA_OID );
+            adminPoint.contains( SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA_OID );
     }
 
 
@@ -1069,14 +1069,14 @@ public class AdministrativePointIntercep
      */
     private void checkIAPHasParent( String role, Attribute adminPoint, Dn dn )
         throws LdapUnwillingToPerformException
-    {
+        {
         // Check for the AC role
         if ( isAccessControlInnerRole( role ) )
         {
             DnNode<AccessControlAdministrativePoint> acCache = directoryService.getAccessControlAPCache();
-            
+
             DnNode<AccessControlAdministrativePoint> parent =  acCache.getNode( dn );
-            
+
             if ( parent == null )
             {
                 // We don't have any AC administrativePoint in the tree, this is an error
@@ -1088,9 +1088,9 @@ public class AdministrativePointIntercep
         else if ( isCollectiveAttributeInnerRole( role ) )
         {
             DnNode<CollectiveAttributeAdministrativePoint> caCache = directoryService.getCollectiveAttributeAPCache();
-            
+
             boolean hasAP = caCache.hasParentElement( dn );
-            
+
             if ( !hasAP )
             {
                 // We don't have any AC administrativePoint in the tree, this is an error
@@ -1102,9 +1102,9 @@ public class AdministrativePointIntercep
         else if ( isTriggerExecutionInnerRole( role ) )
         {
             DnNode<TriggerExecutionAdministrativePoint> caCache = directoryService.getTriggerExecutionAPCache();
-            
+
             DnNode<TriggerExecutionAdministrativePoint> parent =  caCache.getNode( dn );
-            
+
             if ( parent == null )
             {
                 // We don't have any AC administrativePoint in the tree, this is an error
@@ -1120,7 +1120,7 @@ public class AdministrativePointIntercep
             LOG.error( message );
             throw new LdapUnwillingToPerformException( message );
         }
-    }
+        }
 
 
     //-------------------------------------------------------------------------------------------
@@ -1148,7 +1148,7 @@ public class AdministrativePointIntercep
 
         // get the list of all the AAPs
         List<Entry> administrativePoints = getAdministrativePoints();
-        
+
         lockWrite();
         addAdminPointCache( administrativePoints );
         unlock();
@@ -1209,7 +1209,7 @@ public class AdministrativePointIntercep
 
         // Protect the AP caches against concurrent access
         lockWrite();
-        
+
         // Loop on all the added roles to check if they are valid
         for ( Value<?> role : adminPoint )
         {
@@ -1226,7 +1226,7 @@ public class AdministrativePointIntercep
 
         // Release the APCaches lock
         unlock();
-        
+
         LOG.debug( "Added an Administrative Point at {}", dn );
 
         return;
@@ -1234,11 +1234,11 @@ public class AdministrativePointIntercep
 
 
     /**
-     * We have to check that we can remove the associated AdministrativePoint : <br/> 
+     * We have to check that we can remove the associated AdministrativePoint : <br/>
      * <ul>
      * <li> if we remove an AAP, no descendant IAP should remain orphan</li>
      * <li> If we remove a SAP, no descendant IAP should remain orphan</li>
-     * </ul> 
+     * </ul>
      * {@inheritDoc}
      */
     public void delete( DeleteOperationContext deleteContext ) throws LdapException
@@ -1261,10 +1261,10 @@ public class AdministrativePointIntercep
         }
 
         LOG.debug( "Deletion of an administrative point at {} for the role {}", dn, adminPoint );
-        
+
         // Protect the AP caches against concurrent access
         lockWrite();
-        
+
         // Check that the removed AdministrativeRoles are valid. We don't have to do
         // any other check, as the deleted entry has no children.
         for ( Value<?> role : adminPoint )
@@ -1285,7 +1285,7 @@ public class AdministrativePointIntercep
 
         // Release the APCaches lock
         unlock();
-        
+
         LOG.debug( "Deleted an Administrative Point at {}", dn );
 
         return;
@@ -1329,7 +1329,7 @@ public class AdministrativePointIntercep
         DnNode<CollectiveAttributeAdministrativePoint> caapCacheCopy = directoryService.getCollectiveAttributeAPCache().clone();
         DnNode<TriggerExecutionAdministrativePoint> teapCacheCopy = directoryService.getTriggerExecutionAPCache().clone();
         DnNode<SubschemaAdministrativePoint> ssapCacheCopy = directoryService.getSubschemaAPCache().clone();
-        
+
         // Loop on the modification to select the AdministrativeRole and process it :
         // we will create a new AT containing all the roles after having applied the modifications
         // on it
@@ -1462,7 +1462,7 @@ public class AdministrativePointIntercep
      */
     public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
         throws LdapException
-    {
+        {
         LOG.debug( ">>> Entering into the Administrative Interceptor, moveAndRenameRequest" );
         Entry entry = moveAndRenameContext.getOriginalEntry();
 
@@ -1483,13 +1483,13 @@ public class AdministrativePointIntercep
         String message = "Cannot move and rename an Administrative Point in the current version";
         LOG.error( message );
         throw new LdapUnwillingToPerformException( message );
-    }
+        }
 
 
     /**
      * {@inheritDoc}
      */
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         LOG.debug( ">>> Entering into the Administrative Interceptor, renameRequest" );
         Entry entry = renameContext.getEntry();
@@ -1500,7 +1500,7 @@ public class AdministrativePointIntercep
         if ( adminPoint == null )
         {
             // Nope, go on.
-            next.rename( renameContext );
+            next( renameContext );
 
             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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -718,7 +718,7 @@ public class AuthenticationInterceptor e
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         if ( IS_DEBUG )
         {
@@ -727,7 +727,7 @@ public class AuthenticationInterceptor e
 
         checkAuthenticated( renameContext );
         checkPwdReset( renameContext );
-        next.rename( renameContext );
+        next( renameContext );
         invalidateAuthenticatorCaches( renameContext.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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -968,7 +968,7 @@ public class AciAuthorizationInterceptor
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Dn oldName = renameContext.getDn();
         Entry originalEntry = null;
@@ -985,7 +985,7 @@ public class AciAuthorizationInterceptor
         // bypass authz code if we are disabled
         if ( !directoryService.isAccessControlEnabled() )
         {
-            next.rename( renameContext );
+            next( renameContext );
             return;
         }
 
@@ -994,7 +994,7 @@ public class AciAuthorizationInterceptor
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
         {
-            next.rename( renameContext );
+            next( renameContext );
             tupleCache.subentryRenamed( oldName, newName );
 
             // TODO : this method returns a boolean : what should we do with the result ?
@@ -1020,7 +1020,7 @@ public class AciAuthorizationInterceptor
 
         engine.checkPermission( aciContext );
 
-        next.rename( renameContext );
+        next( renameContext );
         tupleCache.subentryRenamed( oldName, newName );
         groupCache.groupRenamed( oldName, newName );
     }

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -305,14 +305,14 @@ public class DefaultAuthorizationInterce
     //  o The administrator entry cannot be moved or renamed by anyone
     // ------------------------------------------------------------------------
 
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         if ( !renameContext.getSession().getDirectoryService().isAccessControlEnabled() )
         {
             protectDnAlterations( renameContext, renameContext.getDn() );
         }
 
-        nextInterceptor.rename( renameContext );
+        next( renameContext );
     }
 
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -65,23 +65,23 @@ public class ChangeLogInterceptor extend
 {
     /** for debugging */
     private static final Logger LOG = LoggerFactory.getLogger( ChangeLogInterceptor.class );
-    
+
     /** used to ignore modify operations to tombstone entries */
     private AttributeType entryDeleted;
-    
+
     /** the changelog service to log changes to */
     private ChangeLog changeLog;
-    
+
     /** OID of the 'rev' attribute used in changeLogEvent and tag objectclasses */
     private static final String REV_AT_OID = "1.3.6.1.4.1.18060.0.4.1.2.47";
-    
+
     // -----------------------------------------------------------------------
     // Overridden init() and destroy() methods
     // -----------------------------------------------------------------------
 
 
     /**
-     * The init method will initialize the local variables and load the 
+     * The init method will initialize the local variables and load the
      * entryDeleted AttributeType.
      */
     public void init( DirectoryService directoryService ) throws LdapException
@@ -90,7 +90,7 @@ public class ChangeLogInterceptor extend
 
         changeLog = directoryService.getChangeLog();
         entryDeleted = directoryService.getSchemaManager()
-                .getAttributeType( ApacheSchemaConstants.ENTRY_DELETED_AT_OID );
+            .getAttributeType( ApacheSchemaConstants.ENTRY_DELETED_AT_OID );
     }
 
 
@@ -111,9 +111,9 @@ public class ChangeLogInterceptor extend
         // we don't want to record addition of a tag as a change
         if( addEntry.get( REV_AT_OID ) != null )
         {
-           return; 
+            return;
         }
-        
+
         LdifEntry forward = new LdifEntry();
         forward.setChangeType( ChangeType.Add );
         forward.setDn( addContext.getDn() );
@@ -123,7 +123,7 @@ public class ChangeLogInterceptor extend
             AttributeType attributeType = attribute.getAttributeType();
             forward.addAttribute( addEntry.get( attributeType).clone() );
         }
-        
+
         LdifEntry reverse = LdifRevertor.reverseAdd( addContext.getDn() );
         addContext.setChangeLogEvent( changeLog.log( getPrincipal( addContext ), forward, reverse ) );
     }
@@ -154,22 +154,22 @@ public class ChangeLogInterceptor extend
         // we don't want to record deleting a tag as a change
         if( serverEntry.get( REV_AT_OID ) != null )
         {
-           return; 
+            return;
         }
 
         LdifEntry forward = new LdifEntry();
         forward.setChangeType( ChangeType.Delete );
         forward.setDn( deleteContext.getDn() );
-        
+
         Entry reverseEntry = new DefaultEntry( serverEntry.getDn() );
-        
+
         boolean isCollectiveSubentry = serverEntry.hasObjectClass( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRY_OC );
 
         for ( Attribute attribute : serverEntry )
         {
             // filter collective attributes, they can't be added by the revert operation
             AttributeType at = schemaManager.lookupAttributeTypeRegistry( attribute.getId() );
-            
+
             if ( !at.isCollective() || isCollectiveSubentry )
             {
                 reverseEntry.add( attribute.clone() );
@@ -224,9 +224,9 @@ public class ChangeLogInterceptor extend
             // @todo make sure we're not putting in operational attributes that cannot be user modified
             serverEntry = getAttributes( modifyContext );
         }
-        
+
         // Duplicate modifications so that the reverse does not contain the operational attributes
-        List<Modification> clonedMods = new ArrayList<Modification>(); 
+        List<Modification> clonedMods = new ArrayList<Modification>();
 
         for ( Modification mod : modifyContext.getModItems() )
         {
@@ -238,50 +238,50 @@ public class ChangeLogInterceptor extend
 
         // @TODO: needs big consideration!!!
         // NOTE: perhaps we need to log this as a system operation that cannot and should not be reapplied?
-        if ( 
-            isDelete ||   
-            ! changeLog.isEnabled() || 
-            
-         // if there are no modifications due to stripping out bogus non-
-         // existing attributes then we will have no modification items and
-         // should ignore not this without registering it with the changelog
-         
-            modifyContext.getModItems().size() == 0 )  
+        if (
+            isDelete ||
+            ! changeLog.isEnabled() ||
+
+            // if there are no modifications due to stripping out bogus non-
+            // existing attributes then we will have no modification items and
+            // should ignore not this without registering it with the changelog
+
+            modifyContext.getModItems().size() == 0 )
         {
             if ( isDelete )
             {
                 LOG.debug( "Bypassing changelog on modify of entryDeleted attribute." );
             }
-            
+
             return;
         }
 
         LdifEntry forward = new LdifEntry();
         forward.setChangeType( ChangeType.Modify );
         forward.setDn( modifyContext.getDn() );
-        
+
         List<Modification> mods = new ArrayList<Modification>( clonedMods.size() );
-        
+
         for ( Modification modItem : clonedMods )
         {
             // TODO: handle correctly http://issues.apache.org/jira/browse/DIRSERVER-1198
             mods.add( modItem );
-            
+
             forward.addModification( modItem );
         }
-        
+
         Entry clientEntry = new DefaultEntry( serverEntry.getDn() );
-        
+
         for ( Attribute attribute:serverEntry )
         {
             clientEntry.add( attribute.clone() );
         }
 
-        LdifEntry reverse = LdifRevertor.reverseModify( 
-            modifyContext.getDn(), 
-            mods, 
+        LdifEntry reverse = LdifRevertor.reverseModify(
+            modifyContext.getDn(),
+            mods,
             clientEntry );
-        
+
         modifyContext.setChangeLogEvent( changeLog.log( getPrincipal( modifyContext ), forward, reverse ) );
     }
 
@@ -291,17 +291,17 @@ public class ChangeLogInterceptor extend
     // -----------------------------------------------------------------------
 
 
-    public void rename ( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename ( RenameOperationContext renameContext ) throws LdapException
     {
         Entry serverEntry = null;
-        
+
         if ( renameContext.getEntry() != null )
         {
             serverEntry = ((ClonedServerEntry)renameContext.getEntry()).getOriginalEntry();
         }
-        
-        next.rename( renameContext );
-        
+
+        next( renameContext );
+
         // After this point, the entry has been modified. The cloned entry contains
         // the modified entry, the originalEntry has changed
 
@@ -316,18 +316,18 @@ public class ChangeLogInterceptor extend
         forward.setNewRdn( renameContext.getNewRdn().getName() );
         forward.setDeleteOldRdn( renameContext.getDeleteOldRdn() );
 
-        List<LdifEntry> reverses = LdifRevertor.reverseRename( 
+        List<LdifEntry> reverses = LdifRevertor.reverseRename(
             serverEntry, renameContext.getNewRdn(), renameContext.getDeleteOldRdn() );
-        
+
         renameContext.setChangeLogEvent( changeLog.log( getPrincipal( renameContext ), forward, reverses ) );
     }
 
 
     public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
         throws LdapException
-    {
+        {
         Entry serverEntry = null;
-        
+
         if ( changeLog.isEnabled() )
         {
             // @todo make sure we're not putting in operational attributes that cannot be user modified
@@ -347,19 +347,19 @@ public class ChangeLogInterceptor extend
         forward.setDeleteOldRdn( moveAndRenameContext.getDeleteOldRdn() );
         forward.setNewRdn( moveAndRenameContext.getNewRdn().getName() );
         forward.setNewSuperior( moveAndRenameContext.getNewSuperiorDn().getName() );
-        
-        List<LdifEntry> reverses = LdifRevertor.reverseMoveAndRename(  
+
+        List<LdifEntry> reverses = LdifRevertor.reverseMoveAndRename(
             serverEntry, moveAndRenameContext.getNewSuperiorDn(), moveAndRenameContext.getNewRdn(), false );
-        
+
         if ( moveAndRenameContext.isReferralIgnored() )
         {
             forward.addControl( new ManageDsaITImpl() );
             LdifEntry reversedEntry = reverses.get( 0 );
             reversedEntry.addControl( new ManageDsaITImpl() );
         }
-        
+
         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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -67,7 +67,7 @@ public class EventInterceptor extends Ba
 {
     /** A logger for this class */
     private final static Logger LOG = LoggerFactory.getLogger( EventInterceptor.class );
-    
+
     private Evaluator evaluator;
     private ExecutorService executor;
 
@@ -105,9 +105,9 @@ public class EventInterceptor extends Ba
                         listener.entryAdded( ( AddOperationContext ) opContext );
                     }
                 } );
-                
+
                 break;
-                
+
             case DELETE:
                 executor.execute( new Runnable()
                 {
@@ -116,9 +116,9 @@ public class EventInterceptor extends Ba
                         listener.entryDeleted( ( DeleteOperationContext ) opContext );
                     }
                 } );
-                
+
                 break;
-                
+
             case MODIFY:
                 executor.execute( new Runnable()
                 {
@@ -127,9 +127,9 @@ public class EventInterceptor extends Ba
                         listener.entryModified( ( ModifyOperationContext ) opContext );
                     }
                 } );
-                
+
                 break;
-                
+
             case MOVE:
                 executor.execute( new Runnable()
                 {
@@ -138,7 +138,7 @@ public class EventInterceptor extends Ba
                         listener.entryMoved( ( MoveOperationContext ) opContext );
                     }
                 } );
-                
+
                 break;
 
             case RENAME:
@@ -149,7 +149,7 @@ public class EventInterceptor extends Ba
                         listener.entryRenamed( ( RenameOperationContext ) opContext );
                     }
                 } );
-                
+
                 break;
         }
     }
@@ -161,7 +161,7 @@ public class EventInterceptor extends Ba
     public void add( NextInterceptor next, final AddOperationContext addContext ) throws LdapException
     {
         next.add( addContext );
-        
+
         List<RegistrationEntry> selecting = getSelectingRegistrations( addContext.getDn(), addContext.getEntry() );
 
         if ( selecting.isEmpty() )
@@ -222,7 +222,7 @@ public class EventInterceptor extends Ba
         CoreSession session = modifyContext.getSession();
         LookupOperationContext lookupContext = new LookupOperationContext( session, modifyContext.getDn() );
         lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
-        
+
         Entry alteredEntry = directoryService.getPartitionNexus().lookup( lookupContext );
         modifyContext.setAlteredEntry( alteredEntry );
 
@@ -239,12 +239,12 @@ public class EventInterceptor extends Ba
     /**
      * {@inheritDoc}
      */
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Entry oriEntry = ((ClonedServerEntry)renameContext.getEntry()).getOriginalEntry();
         List<RegistrationEntry> selecting = getSelectingRegistrations( renameContext.getDn(), oriEntry );
 
-        next.rename( renameContext );
+        next( renameContext );
 
         if ( selecting.isEmpty() )
         {
@@ -255,7 +255,7 @@ public class EventInterceptor extends Ba
         CoreSession session = renameContext.getSession();
         LookupOperationContext lookupContext = new LookupOperationContext( session, renameContext.getNewDn() );
         lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
-        
+
         Entry alteredEntry = directoryService.getPartitionNexus().lookup( lookupContext );
         renameContext.setModifiedEntry( alteredEntry );
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -297,7 +297,7 @@ public class ExceptionInterceptor extend
     /**
      * Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
      */
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Dn dn = renameContext.getDn();
 
@@ -327,7 +327,7 @@ public class ExceptionInterceptor extend
             }
         }
 
-        nextInterceptor.rename( renameContext );
+        next( renameContext );
     }
 
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -53,39 +53,39 @@ public class JournalInterceptor extends 
 {
     /** for debugging */
     private static final Logger LOG = LoggerFactory.getLogger( JournalInterceptor.class );
-    
+
     /** A flag set to true if the journal interceptor is enabled */
     private boolean journalEnabled;
-    
-    /** A shared number stored within each change */ 
+
+    /** A shared number stored within each change */
     private AtomicLong revision;
-    
+
     /** the Journal service to log changes to */
     private Journal journal;
-    
+
 
     // -----------------------------------------------------------------------
     // Overridden init() and destroy() methods
     // -----------------------------------------------------------------------
     /**
-     * The init method will initialize the local variables and load the 
+     * The init method will initialize the local variables and load the
      * entryDeleted AttributeType.
      */
     public void init( DirectoryService directoryService ) throws LdapException
     {
         super.init( directoryService );
-        
+
         if ( directoryService.getJournal().isEnabled() )
         {
-            journalEnabled = true; 
+            journalEnabled = true;
             journal = directoryService.getJournal();
             revision = new AtomicLong( System.currentTimeMillis() );
         }
 
         LOG.debug( "JournalInterceptor has been initialized" );
     }
-    
-    
+
+
     /**
      * Log the operation, manage the logs rotations.
      */
@@ -93,8 +93,8 @@ public class JournalInterceptor extends 
     {
         journal.log( getPrincipal( opCtx ), revision, ldif );
     }
-    
-    
+
+
     // -----------------------------------------------------------------------
     // Overridden (only change inducing) intercepted methods
     // -----------------------------------------------------------------------
@@ -104,11 +104,11 @@ public class JournalInterceptor extends 
     public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
     {
         long opRevision = 0;
-        
+
         if ( journalEnabled )
         {
             opRevision = revision.incrementAndGet();
-            
+
             // Store the added entry
             Entry addEntry = addContext.getEntry();
 
@@ -121,7 +121,7 @@ public class JournalInterceptor extends 
                 AttributeType attributeType = attribute.getAttributeType();
                 ldif.addAttribute( addEntry.get( attributeType).clone() );
             }
-            
+
             log( addContext, opRevision, ldif );
         }
 
@@ -142,7 +142,7 @@ public class JournalInterceptor extends 
                 // log the NACK
                 journal.nack( opRevision );
             }
-            
+
             throw le;
         }
     }
@@ -154,16 +154,16 @@ public class JournalInterceptor extends 
     public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         long opRevision = 0;
-        
+
         if ( journalEnabled )
         {
             opRevision = revision.incrementAndGet();
-            
+
             // Store the deleted entry
             LdifEntry ldif = new LdifEntry();
             ldif.setChangeType( ChangeType.Delete );
             ldif.setDn( deleteContext.getDn() );
-            
+
             journal.log( getPrincipal( deleteContext ), opRevision, ldif );
         }
 
@@ -184,7 +184,7 @@ public class JournalInterceptor extends 
                 // log the NACK
                 journal.nack( opRevision );
             }
-            
+
             throw e;
         }
     }
@@ -196,25 +196,25 @@ public class JournalInterceptor extends 
     public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
     {
         long opRevision = 0;
-        
+
         if ( journalEnabled )
         {
             opRevision = revision.incrementAndGet();
-            
+
             // Store the modified entry
             LdifEntry ldif = new LdifEntry();
             ldif.setChangeType( ChangeType.Modify );
             ldif.setDn( modifyContext.getDn() );
-            
-            // Store the modifications 
+
+            // Store the modifications
             for ( Modification modification:modifyContext.getModItems() )
             {
                 ldif.addModification( modification );
             }
-            
+
             journal.log( getPrincipal( modifyContext ), opRevision, ldif );
         }
-        
+
         try
         {
             next.modify( modifyContext );
@@ -240,28 +240,28 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void rename ( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename ( RenameOperationContext renameContext ) throws LdapException
     {
         long opRevision = 0;
-        
+
         if ( journalEnabled )
         {
             opRevision = revision.incrementAndGet();
-            
+
             // Store the renamed entry
             LdifEntry ldif = new LdifEntry();
             ldif.setChangeType( ChangeType.ModRdn );
             ldif.setDn( renameContext.getDn() );
             ldif.setNewRdn( renameContext.getNewRdn().getNormName() );
             ldif.setDeleteOldRdn( renameContext.getDeleteOldRdn() );
-            
+
             journal.log( getPrincipal( renameContext ), opRevision, ldif );
         }
-        
+
         try
         {
-            next.rename( renameContext );
-    
+            next( renameContext );
+
             if ( journalEnabled )
             {
                 // log the ACK
@@ -275,7 +275,7 @@ public class JournalInterceptor extends 
                 // log the NACK
                 journal.nack( opRevision );
             }
-            
+
             throw e;
         }
     }
@@ -286,13 +286,13 @@ public class JournalInterceptor extends 
      */
     public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
         throws LdapException
-    {
+        {
         long opRevision = 0;
-        
+
         if ( journalEnabled )
         {
             opRevision = revision.incrementAndGet();
-            
+
             // Store the renamed entry
             LdifEntry ldif = new LdifEntry();
             ldif.setChangeType( ChangeType.ModDn );
@@ -300,14 +300,14 @@ public class JournalInterceptor extends 
             ldif.setNewRdn( moveAndRenameContext.getNewRdn().getNormName() );
             ldif.setDeleteOldRdn( moveAndRenameContext.getDeleteOldRdn() );
             ldif.setNewSuperior( moveAndRenameContext.getNewDn().getNormName() );
-            
+
             journal.log( getPrincipal( moveAndRenameContext ), opRevision, ldif );
         }
-        
+
         try
         {
             next.moveAndRename( moveAndRenameContext );
-            
+
             if ( journalEnabled )
             {
                 // log the ACK
@@ -321,10 +321,10 @@ public class JournalInterceptor extends 
                 // log the NACK
                 journal.nack( opRevision );
             }
-            
+
             throw e;
         }
-    }
+        }
 
 
     /**
@@ -333,24 +333,24 @@ public class JournalInterceptor extends 
     public void move( NextInterceptor next, MoveOperationContext moveContext ) throws LdapException
     {
         long opRevision = 0;
-        
+
         if ( journalEnabled )
         {
             opRevision = revision.incrementAndGet();
-            
+
             // Store the moved entry
             LdifEntry ldif = new LdifEntry();
             ldif.setChangeType( ChangeType.ModDn );
             ldif.setDn( moveContext.getDn() );
             ldif.setNewSuperior( moveContext.getNewSuperior().getNormName() );
-            
+
             journal.log( getPrincipal( moveContext ), opRevision, ldif );
         }
-        
+
         try
         {
             next.move( moveContext );
-            
+
             if ( journalEnabled )
             {
                 // log the ACK
@@ -364,8 +364,8 @@ public class JournalInterceptor extends 
                 // log the NACK
                 journal.nack( opRevision );
             }
-            
+
             throw e;
         }
-   }
+    }
 }
\ No newline at end of file

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -486,10 +486,10 @@ public class TimerInterceptor extends Ba
     /**
      * {@inheritDoc}
      */
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         long t0 = System.nanoTime();
-        next.rename( renameContext );
+        next( renameContext );
         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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -158,7 +158,7 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         // Normalize the new Rdn and the Dn if needed
 
@@ -175,7 +175,7 @@ public class NormalizationInterceptor ex
         }
 
         // Push to the next interceptor
-        nextInterceptor.rename( renameContext );
+        next( renameContext );
     }
 
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -344,7 +344,7 @@ public class OperationalAttributeInterce
     }
 
 
-    public void rename( NextInterceptor nextInterceptor, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Entry entry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getClonedEntry();
         entry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( renameContext ).getName() );
@@ -356,7 +356,7 @@ public class OperationalAttributeInterce
         //modifiedEntry.setDn( renameContext.getNewDn() );
         renameContext.setModifiedEntry( modifiedEntry );
 
-        nextInterceptor.rename( renameContext );
+        next( renameContext );
     }
 
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 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.referral;
 
@@ -53,9 +53,9 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * An service which is responsible referral handling behavoirs.  It manages 
+ * An service which is responsible referral handling behavoirs.  It manages
  * referral handling behavoir when the {@link Context#REFERRAL} is implicitly
- * or explicitly set to "ignore", when set to "throw" and when set to "follow". 
+ * or explicitly set to "ignore", when set to "throw" and when set to "follow".
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -140,7 +140,7 @@ public class ReferralInterceptor extends
     static private boolean isReferral( Entry entry ) throws LdapException
     {
         // Check that the entry is not null, otherwise return FALSE.
-        // This is typically to cover the case where the entry has not 
+        // This is typically to cover the case where the entry has not
         // been added into the context because it does not exists.
         if ( entry == null )
         {
@@ -216,14 +216,14 @@ public class ReferralInterceptor extends
      * 
      * Case (1) is easy : we inject the entry into the server and we are done.
      * Case (2) is the same as case (1), but we have to update the referral manager.
-     * Case (3) is handled by the LdapProcotol handler, as we have to return a 
-     * LdapResult containing a list of this entry's parent's referrals URL, if the 
-     * ManageDSAIT control is not present, or the parent's entry if the control 
-     * is present. 
+     * Case (3) is handled by the LdapProcotol handler, as we have to return a
+     * LdapResult containing a list of this entry's parent's referrals URL, if the
+     * ManageDSAIT control is not present, or the parent's entry if the control
+     * is present.
      * 
      * Of course, if the entry already exists, nothing will be done, as we will get an
      * entryAlreadyExists error.
-     *  
+     * 
      */
     public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
     {
@@ -235,7 +235,7 @@ public class ReferralInterceptor extends
         // We add the entry into the server
         next.add( addContext );
 
-        // If the addition is successful, we update the referralManager 
+        // If the addition is successful, we update the referralManager
         if ( isReferral )
         {
             // We have to add it to the referralManager
@@ -255,7 +255,7 @@ public class ReferralInterceptor extends
      * (3) the entry is a referral
      * 
      * Case (1) is handled by removing the entry from the server
-     * In case (2), we return an exception build using the parent referral 
+     * In case (2), we return an exception build using the parent referral
      * For case(3), we remove the entry from the server and remove the referral
      * from the referral manager.
      * 
@@ -335,12 +335,12 @@ public class ReferralInterceptor extends
     /**
      * {@inheritDoc}
      **/
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         // Check if the entry is a referral itself
         boolean isReferral = isReferral( renameContext.getOriginalEntry() );
 
-        next.rename( renameContext );
+        next( renameContext );
 
         if ( isReferral )
         {

Modified: directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=1200434&r1=1200433&r2=1200434&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Thu Nov 10 17:14:45 2011
@@ -925,7 +925,7 @@ public class SchemaInterceptor extends B
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Dn oldDn = renameContext.getDn();
         Rdn newRdn = renameContext.getNewRdn();
@@ -978,7 +978,7 @@ public class SchemaInterceptor extends B
 
         check( renameContext.getNewDn(), entry );
 
-        next.rename( renameContext );
+        next( renameContext );
     }
 
 

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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 2011
@@ -1424,7 +1424,7 @@ public class SubentryInterceptor extends
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Dn oldDn = renameContext.getDn();
 
@@ -1444,7 +1444,7 @@ public class SubentryInterceptor extends
             newName.apply( schemaManager );
 
             directoryService.getSubentryCache().addSubentry( newName, subentry );
-            next.rename( renameContext );
+            next( renameContext );
 
             subentry = directoryService.getSubentryCache().getSubentry( newName );
             ExprNode filter = new PresenceNode( OBJECT_CLASS_AT );
@@ -1499,7 +1499,7 @@ public class SubentryInterceptor extends
                 throw new LdapSchemaViolationException( ResultCodeEnum.NOT_ALLOWED_ON_RDN, msg );
             }
 
-            next.rename( renameContext );
+            next( renameContext );
 
             // 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=1200434&r1=1200433&r2=1200434&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 Thu Nov 10 17:14:45 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.trigger;
@@ -92,7 +92,7 @@ public class TriggerInterceptor extends 
     private TriggerExecutionAuthorizer triggerExecutionAuthorizer = new SimpleTriggerExecutionAuthorizer();
 
     private StoredProcExecutionManager manager;
-    
+
     /** The SubentryUtils instance */
     private static SubentryUtils subentryUtils;
 
@@ -109,11 +109,11 @@ public class TriggerInterceptor extends 
      * @param dn the normalized distinguished name of the entry
      * @param entry the target entry that is considered as the trigger source
      * @throws Exception if there are problems accessing attribute values
-     * @param proxy the partition nexus proxy 
+     * @param proxy the partition nexus proxy
      */
     private void addPrescriptiveTriggerSpecs( OperationContext opContext, List<TriggerSpecification> triggerSpecs,
         Dn dn, Entry entry ) throws LdapException
-    {
+        {
 
         /*
          * If the protected entry is a subentry, then the entry being evaluated
@@ -131,7 +131,7 @@ public class TriggerInterceptor extends 
             CoreSession session = opContext.getSession();
             LookupOperationContext lookupContext = new LookupOperationContext( session, parentDn );
             lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
-            
+
             entry = directoryService.getPartitionNexus().lookup( lookupContext );
         }
 
@@ -147,7 +147,7 @@ public class TriggerInterceptor extends 
             String subentryDn = value.getString();
             triggerSpecs.addAll( triggerSpecCache.getSubentryTriggerSpecs( subentryDn ) );
         }
-    }
+        }
 
 
     /**
@@ -196,11 +196,11 @@ public class TriggerInterceptor extends 
      * 
      * @param triggerSpecs the trigger specifications
      * @param ldapOperation the ldap operation being performed
-     * @return the set of trigger specs for a trigger action 
+     * @return the set of trigger specs for a trigger action
      */
     public Map<ActionTime, List<TriggerSpecification>> getActionTimeMappedTriggerSpecsForOperation(
         List<TriggerSpecification> triggerSpecs, LdapOperation ldapOperation )
-    {
+        {
         List<TriggerSpecification> afterTriggerSpecs = new ArrayList<TriggerSpecification>();
         Map<ActionTime, List<TriggerSpecification>> triggerSpecMap = new HashMap<ActionTime, List<TriggerSpecification>>();
 
@@ -222,7 +222,7 @@ public class TriggerInterceptor extends 
         triggerSpecMap.put( ActionTime.AFTER, afterTriggerSpecs );
 
         return triggerSpecMap;
-    }
+        }
 
 
     ////////////////////////////////////////////////////////////////////////////
@@ -252,7 +252,7 @@ public class TriggerInterceptor extends 
         manager = new StoredProcExecutionManager( spContainer, spEngineConfigs );
 
         this.enabled = true; // TODO: Get this from the configuration if needed.
-        
+
         // Init the SubentryUtils instance
         subentryUtils = new SubentryUtils( directoryService );
     }
@@ -361,7 +361,7 @@ public class TriggerInterceptor extends 
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Dn name = renameContext.getDn();
         Rdn newRdn = renameContext.getNewRdn();
@@ -370,11 +370,11 @@ public class TriggerInterceptor extends 
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.rename( renameContext );
+            next( renameContext );
             return;
         }
 
-        // Gather supplementary data.        
+        // Gather supplementary data.
         Entry renamedEntry = ((ClonedServerEntry)renameContext.getEntry()).getClonedEntry();
 
         // @TODO : To be completely reviewed !!!
@@ -396,7 +396,7 @@ public class TriggerInterceptor extends 
         Map<ActionTime, List<TriggerSpecification>> triggerMap = getActionTimeMappedTriggerSpecsForOperation(
             triggerSpecs, LdapOperation.MODIFYDN_RENAME );
 
-        next.rename( renameContext );
+        next( renameContext );
         triggerSpecCache.subentryRenamed( name, newDn);
 
         // Fire AFTER Triggers.
@@ -419,7 +419,7 @@ public class TriggerInterceptor extends 
             return;
         }
 
-        // Gather supplementary data.        
+        // Gather supplementary data.
         Entry movedEntry = moveAndRenameContext.getOriginalEntry();
 
         Rdn oldRdn = oldDn.getRdn();
@@ -497,7 +497,7 @@ public class TriggerInterceptor extends 
         Dn oldSuperior = moveContext.getOldSuperior();
         Dn newSuperior = moveContext.getNewSuperior();
 
-        // Gather supplementary data.        
+        // Gather supplementary data.
         Entry movedEntry = moveContext.getOriginalEntry();
 
         //Rdn newRDN = dn.getRdn();
@@ -560,7 +560,7 @@ public class TriggerInterceptor extends 
 
     private Object executeTriggers( OperationContext opContext, List<TriggerSpecification> triggerSpecs,
         StoredProcedureParameterInjector injector ) throws LdapException
-    {
+        {
         Object result = null;
 
         for ( TriggerSpecification triggerSpec : triggerSpecs )
@@ -581,15 +581,15 @@ public class TriggerInterceptor extends 
          * can make sense (as in INSTEADOF Search Triggers).
          */
         return result;
-    }
+        }
 
 
     private Object executeTrigger( OperationContext opContext, TriggerSpecification tsec,
         StoredProcedureParameterInjector injector ) throws LdapException
-    {
+        {
         List<Object> returnValues = new ArrayList<Object>();
         List<SPSpec> spSpecs = tsec.getSPSpecs();
-        
+
         for ( SPSpec spSpec : spSpecs )
         {
             List<Object> arguments = new ArrayList<Object>();
@@ -600,7 +600,7 @@ public class TriggerInterceptor extends 
         }
 
         return returnValues;
-    }
+        }
 
 
     private Object executeProcedure( OperationContext opContext, String procedure, Object[] values ) throws LdapException
@@ -609,7 +609,7 @@ public class TriggerInterceptor extends 
         {
             Entry spUnit = manager.findStoredProcUnit( opContext.getSession(), procedure );
             StoredProcEngine engine = manager.getStoredProcEngineInstance( spUnit );
-            
+
             return engine.invokeProcedure( opContext.getSession(), procedure, values );
         }
         catch ( Exception e )



Mime
View raw message