directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r528446 [1/2] - in /directory/apacheds/trunk/core/src: main/java/org/apache/directory/server/core/authn/ main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/event/ main/java/org/apache/directory/serv...
Date Fri, 13 Apr 2007 11:58:08 GMT
Author: elecharny
Date: Fri Apr 13 04:58:06 2007
New Revision: 528446

URL: http://svn.apache.org/viewvc?view=rev&rev=528446
Log:
As the ModifyDn operation has been splited into three methods (move, rename and moveAndRename), modified the affected code.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java Fri Apr 13 04:58:06 2007
@@ -44,10 +44,10 @@
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.BindServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.LdapJndiProperties;
@@ -368,49 +368,49 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException
+    public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
     {
         if ( IS_DEBUG )
         {
-            log.debug( "Modifying name = '" + modifyDnContext.getDn().getUpName() + "', new RDN = '" + 
-                ((ModifyDNServiceContext)modifyDnContext).getNewDn() + "', " +
-                "oldRDN = '" + ((ModifyDNServiceContext)modifyDnContext).getDelOldDn() + "'" );
+            log.debug( "Modifying name = '" + renameContext.getDn().getUpName() + "', new RDN = '" + 
+                ((RenameServiceContext)renameContext).getNewRdn() + "', " +
+                "oldRDN = '" + ((RenameServiceContext)renameContext).getDelOldDn() + "'" );
         }
 
         checkAuthenticated( MessageTypeEnum.MOD_DN_REQUEST );
-        next.modifyRn( modifyDnContext );
-        invalidateAuthenticatorCaches( modifyDnContext.getDn() );
+        next.rename( renameContext );
+        invalidateAuthenticatorCaches( renameContext.getDn() );
     }
 
 
-    public void move( NextInterceptor next, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException
     {
         if ( IS_DEBUG )
         {
-            log.debug( "Moving name = '" + moveContext.getDn().getUpName() + "' to name = '" + 
-                ((MoveServiceContext)moveContext).getParent() + "', new RDN = '" + 
-                ((MoveServiceContext)moveContext).getNewDn() + "', oldRDN = '" + 
-                ((MoveServiceContext)moveContext).getDelOldDn() + "'" );
+            log.debug( "Moving name = '" + moveAndRenameContext.getDn().getUpName() + "' to name = '" + 
+                ((MoveAndRenameServiceContext)moveAndRenameContext).getParent() + "', new RDN = '" + 
+                ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn() + "', oldRDN = '" + 
+                ((MoveAndRenameServiceContext)moveAndRenameContext).getDelOldDn() + "'" );
         }
 
         checkAuthenticated( MessageTypeEnum.MOD_DN_REQUEST );
-        next.move( moveContext );
-        invalidateAuthenticatorCaches( moveContext.getDn() );
+        next.moveAndRename( moveAndRenameContext );
+        invalidateAuthenticatorCaches( moveAndRenameContext.getDn() );
     }
 
 
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
         if ( IS_DEBUG )
         {
-            log.debug( "Moving name = '" + replaceContext.getDn().getUpName() + " to name = '" + 
-                ((ReplaceServiceContext)replaceContext).getParent().getUpName() + "'" );
+            log.debug( "Moving name = '" + moveContext.getDn().getUpName() + " to name = '" + 
+                ((MoveServiceContext)moveContext).getParent().getUpName() + "'" );
         }
 
         checkAuthenticated( MessageTypeEnum.MOD_DN_REQUEST );
-        next.replace( replaceContext );
-        invalidateAuthenticatorCaches( replaceContext.getDn() );
+        next.move( moveContext );
+        invalidateAuthenticatorCaches( moveContext.getDn() );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Fri Apr 13 04:58:06 2007
@@ -33,10 +33,10 @@
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.CompareServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -730,10 +730,10 @@
         return next.lookup( lookupContext );
     }
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException
+    public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
     {
-        LdapDN name = modifyDnContext.getDn();
-        String newDn = ((ModifyDNServiceContext)modifyDnContext).getNewDn();
+        LdapDN name = renameContext.getDn();
+        String newRdn = ((RenameServiceContext)renameContext).getNewRdn();
         
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -743,19 +743,19 @@
         LdapDN principalDn = principal.getJndiName();
         LdapDN newName = ( LdapDN ) name.clone();
         newName.remove( name.size() - 1 );
-        newName.add( parseNormalized( newDn ).get( 0 ) );
+        newName.add( parseNormalized( newRdn ).get( 0 ) );
 
         // bypass authz code if we are disabled
         if ( !enabled )
         {
-            next.modifyRn( modifyDnContext );
+            next.rename( renameContext );
             return;
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
         {
-            next.modifyRn( modifyDnContext );
+            next.rename( renameContext );
             tupleCache.subentryRenamed( name, newName );
             
             // TODO : this method returns a boolean : what should we do with the result ?
@@ -773,18 +773,18 @@
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
             RENAME_PERMS, tuples, entry );
 
-        next.modifyRn( modifyDnContext );
+        next.rename( renameContext );
         tupleCache.subentryRenamed( name, newName );
         groupCache.groupRenamed( name, newName );
     }
 
 
-    public void move( NextInterceptor next, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        LdapDN oriChildName = moveContext.getDn();
-        LdapDN newParentName = ((MoveServiceContext)moveContext).getParent();
-        String newRn = ((MoveServiceContext)moveContext).getNewDn();
+        LdapDN oriChildName = moveAndRenameContext.getDn();
+        LdapDN newParentName = ((MoveAndRenameServiceContext)moveAndRenameContext).getParent();
+        String newRn = ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn();
         
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -798,14 +798,14 @@
         // bypass authz code if we are disabled
         if ( !enabled )
         {
-            next.move( moveContext );
+            next.moveAndRename( moveAndRenameContext );
             return;
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
         {
-            next.move( moveContext );
+            next.moveAndRename( moveAndRenameContext );
             tupleCache.subentryRenamed( oriChildName, newName );
             groupCache.groupRenamed( oriChildName, newName );
             return;
@@ -850,16 +850,16 @@
             null, IMPORT_PERMS, destTuples, subentryAttrs );
 
 
-        next.move( moveContext );
+        next.moveAndRename( moveAndRenameContext );
         tupleCache.subentryRenamed( oriChildName, newName );
         groupCache.groupRenamed( oriChildName, newName );
     }
 
 
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
-        LdapDN oriChildName = replaceContext.getDn();
-        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        LdapDN oriChildName = moveContext.getDn();
+        LdapDN newParentName = ((MoveServiceContext)moveContext).getParent();
         
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -873,14 +873,14 @@
         // bypass authz code if we are disabled
         if ( !enabled )
         {
-            next.replace( replaceContext );
+            next.move( moveContext );
             return;
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
         {
-            next.replace( replaceContext );
+            next.move( moveContext );
             tupleCache.subentryRenamed( oriChildName, newName );
             groupCache.groupRenamed( oriChildName, newName );
             return;
@@ -924,7 +924,7 @@
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), newName, null,
             null, IMPORT_PERMS, destTuples, subentryAttrs );
 
-        next.replace( replaceContext );
+        next.move( moveContext );
         tupleCache.subentryRenamed( oriChildName, newName );
         groupCache.groupRenamed( oriChildName, newName );
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java Fri Apr 13 04:58:06 2007
@@ -332,37 +332,37 @@
     //  o The administrator entry cannot be moved or renamed by anyone
     // ------------------------------------------------------------------------
 
-    public void modifyRn( NextInterceptor nextInterceptor, ServiceContext modifyDnContext )
+    public void rename( NextInterceptor nextInterceptor, ServiceContext renameContext )
         throws NamingException
     {
         if ( enabled )
         {
-            protectDnAlterations( modifyDnContext.getDn() );
+            protectDnAlterations( renameContext.getDn() );
         }
         
-        nextInterceptor.modifyRn( modifyDnContext );
+        nextInterceptor.rename( renameContext );
     }
 
 
-    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext ) throws NamingException
     {
         if ( enabled )
         {
-            protectDnAlterations( replaceContext.getDn() );
+            protectDnAlterations( moveContext.getDn() );
         }
         
-        nextInterceptor.replace( replaceContext );
+        nextInterceptor.move( moveContext );
     }
 
 
-    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext ) throws NamingException
+    public void moveAndRename( NextInterceptor nextInterceptor, ServiceContext moveAndRenameContext ) throws NamingException
     {
         if ( enabled )
         {
-            protectDnAlterations( moveContext.getDn() );
+            protectDnAlterations( moveAndRenameContext.getDn() );
         }
         
-        nextInterceptor.move( moveContext );
+        nextInterceptor.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventService.java Fri Apr 13 04:58:06 2007
@@ -35,10 +35,10 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -382,33 +382,33 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException
+    public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
     {
-        super.modifyRn( next, modifyDnContext );
-        LdapDN newName = ( LdapDN ) modifyDnContext.getDn().clone();
+        super.rename( next, renameContext );
+        LdapDN newName = ( LdapDN ) renameContext.getDn().clone();
         newName.remove( newName.size() - 1 );
-        newName.add( ((ModifyDNServiceContext)modifyDnContext).getNewDn() );
+        newName.add( ((RenameServiceContext)renameContext).getNewRdn() );
         newName.normalize( attributeRegistry.getNormalizerMapping() );
-        notifyOnNameChange( modifyDnContext.getDn(), newName );
+        notifyOnNameChange( renameContext.getDn(), newName );
     }
 
 
-    public void move( NextInterceptor next, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        super.move( next, moveContext );
-        LdapDN newName = ( LdapDN ) ((MoveServiceContext)moveContext).getParent().clone();
-        newName.add( ((MoveServiceContext)moveContext).getNewDn() );
-        notifyOnNameChange( moveContext.getDn(), newName );
+        super.moveAndRename( next, moveAndRenameContext );
+        LdapDN newName = ( LdapDN ) ((MoveAndRenameServiceContext)moveAndRenameContext).getParent().clone();
+        newName.add( ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn() );
+        notifyOnNameChange( moveAndRenameContext.getDn(), newName );
     }
 
 
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
-        super.replace( next, replaceContext );
-        LdapDN oriChildName = replaceContext.getDn();
+        super.move( next, moveContext );
+        LdapDN oriChildName = moveContext.getDn();
         
-        LdapDN newName = ( LdapDN ) ((ReplaceServiceContext)replaceContext).getParent().clone();
+        LdapDN newName = ( LdapDN ) ((MoveServiceContext)moveContext).getParent().clone();
         newName.add( oriChildName.get( oriChildName.size() - 1 ) );
         notifyOnNameChange( oriChildName, newName );
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Fri Apr 13 04:58:06 2007
@@ -35,10 +35,10 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.EntryServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -335,10 +335,10 @@
     /**
      * Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
      */
-    public void modifyRn( NextInterceptor nextInterceptor, ServiceContext modifyDnContext )
+    public void rename( NextInterceptor nextInterceptor, ServiceContext renameContext )
         throws NamingException
     {
-        LdapDN dn = modifyDnContext.getDn();
+        LdapDN dn = renameContext.getDn();
         
         if ( dn.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
@@ -355,7 +355,7 @@
         // check to see if target entry exists
         LdapDN newDn = ( LdapDN ) dn.clone();
         newDn.remove( dn.size() - 1 );
-        newDn.add( ((ModifyDNServiceContext)modifyDnContext).getNewDn() );
+        newDn.add( ((RenameServiceContext)renameContext).getNewRdn() );
         newDn.normalize( normalizerMap );
         
         if ( nextInterceptor.hasEntry( new EntryServiceContext( newDn ) ) )
@@ -366,7 +366,7 @@
             throw e;
         }
 
-        nextInterceptor.modifyRn( modifyDnContext );
+        nextInterceptor.rename( renameContext );
     }
 
 
@@ -374,10 +374,10 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext ) throws NamingException
     {
-        LdapDN oriChildName = replaceContext.getDn();
-        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        LdapDN oriChildName = moveContext.getDn();
+        LdapDN newParentName = ((MoveServiceContext)moveContext).getParent();
         
         if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
@@ -413,7 +413,7 @@
             throw e;
         }
 
-        nextInterceptor.replace( replaceContext );
+        nextInterceptor.move( moveContext );
     }
 
 
@@ -421,11 +421,11 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext ) throws NamingException
+    public void moveAndRename( NextInterceptor nextInterceptor, ServiceContext moveAndRenameContext ) throws NamingException
     {
-        LdapDN oriChildName = moveContext.getDn();
-        LdapDN parent = ((MoveServiceContext)moveContext).getParent();
-        String newRn = ((MoveServiceContext)moveContext).getNewDn();
+        LdapDN oriChildName = moveAndRenameContext.getDn();
+        LdapDN parent = ((MoveAndRenameServiceContext)moveAndRenameContext).getParent();
+        String newRn = ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn();
         
         if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
@@ -447,6 +447,7 @@
         LdapDN target = ( LdapDN ) parent.clone();
         target.add( newRn );
         target.normalize( normalizerMap );
+        
         if ( nextInterceptor.hasEntry( new EntryServiceContext( target ) ) )
         {
             // we must calculate the resolved name using the user provided Rdn value
@@ -459,7 +460,7 @@
             throw e;
         }
 
-        nextInterceptor.move( moveContext );
+        nextInterceptor.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java Fri Apr 13 04:58:06 2007
@@ -165,22 +165,22 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException
+    public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
     {
-        next.modifyRn( modifyDnContext );
+        next.rename( renameContext );
     }
 
 
-    public void move( NextInterceptor next, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        next.move( moveContext );
+        next.moveAndRename( moveAndRenameContext );
     }
 
 
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
-        next.replace( replaceContext );
+        next.move( moveContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java Fri Apr 13 04:58:06 2007
@@ -210,21 +210,21 @@
 
 
     /**
-     * Filters {@link Partition#modifyRn(ServiceContext)} call.
+     * Filters {@link Partition#rename(ServiceContext)} call.
      */
-    void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException;
+    void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#replace(ServiceContext)} call.
+     * Filters {@link Partition#move(ServiceContext)} call.
      */
-    void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException;
+    void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException;
 
 
     /**
-     * Filters {@link Partition#move(ServiceContext)} call.
+     * Filters {@link Partition#moveAndRename(ServiceContext)} call.
      */
-    void move( NextInterceptor next, ServiceContext moveContext )
+    void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException;
 
     /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java Fri Apr 13 04:58:06 2007
@@ -158,23 +158,23 @@
         }
 
 
-        public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext )
+        public void rename( NextInterceptor next, ServiceContext renameContext )
             throws NamingException
         {
-            nexus.modifyRn( modifyDnContext );
+            nexus.rename( renameContext );
         }
 
 
-        public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+        public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
         {
-            nexus.replace( replaceContext );
+            nexus.move( moveContext );
         }
 
 
-        public void move( NextInterceptor next, ServiceContext moveContext )
+        public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
             throws NamingException
         {
-            nexus.move( moveContext );
+            nexus.moveAndRename( moveAndRenameContext );
         }
 
 
@@ -875,14 +875,14 @@
     }
 
 
-    public void modifyRn( ServiceContext modifyDnContext ) throws NamingException
+    public void rename( ServiceContext renameContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
         NextInterceptor next = entry.nextInterceptor;
         try
         {
-            head.modifyRn( next, modifyDnContext );
+            head.rename( next, renameContext );
         }
         catch ( NamingException ne )
         {
@@ -895,14 +895,14 @@
     }
 
 
-    public void replace( ServiceContext replaceContext ) throws NamingException
+    public void move( ServiceContext moveContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
         NextInterceptor next = entry.nextInterceptor;
         try
         {
-            head.replace( next, replaceContext );
+            head.move( next, moveContext );
         }
         catch ( NamingException ne )
         {
@@ -915,14 +915,14 @@
     }
 
 
-    public void move( ServiceContext moveContext ) throws NamingException
+    public void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
         NextInterceptor next = entry.nextInterceptor;
         try
         {
-            head.move( next, moveContext );
+            head.moveAndRename( next, moveAndRenameContext );
         }
         catch ( NamingException ne )
         {
@@ -1268,14 +1268,14 @@
                 }
 
 
-                public void modifyRn( ServiceContext modifyDnContext ) throws NamingException
+                public void rename( ServiceContext renameContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
 
                     try
                     {
-                        interceptor.modifyRn( next.nextInterceptor, modifyDnContext );
+                        interceptor.rename( next.nextInterceptor, renameContext );
                     }
                     catch ( NamingException ne )
                     {
@@ -1288,14 +1288,14 @@
                 }
 
 
-                public void replace( ServiceContext replaceContext ) throws NamingException
+                public void move( ServiceContext moveContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
 
                     try
                     {
-                        interceptor.replace( next.nextInterceptor, replaceContext );
+                        interceptor.move( next.nextInterceptor, moveContext );
                     }
                     catch ( NamingException ne )
                     {
@@ -1308,7 +1308,7 @@
                 }
 
 
-                public void move( ServiceContext moveContext )
+                public void moveAndRename( ServiceContext moveAndRenameContext )
                     throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1316,7 +1316,7 @@
 
                     try
                     {
-                        interceptor.move( next.nextInterceptor, moveContext );
+                        interceptor.moveAndRename( next.nextInterceptor, moveAndRenameContext );
                     }
                     catch ( NamingException ne )
                     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java Fri Apr 13 04:58:06 2007
@@ -137,21 +137,21 @@
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#modifyRn(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#rename(NextInterceptor,ServiceContext)}.
      */
-    void modifyRn( ServiceContext modifyDnContext ) throws NamingException;
+    void rename( ServiceContext renameContext ) throws NamingException;
 
 
     /**
      * Calls the next interceptor's {@link Interceptor#move(NextInterceptor,ServiceContext)}.
      */
-    void replace( ServiceContext replaceContext ) throws NamingException;
+    void move( ServiceContext moveContext ) throws NamingException;
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor,ServiceContext)}.
+     * Calls the next interceptor's {@link Interceptor#moveAndRename(NextInterceptor,ServiceContext)}.
      */
-    void move( ServiceContext moveContext ) throws NamingException;
+    void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException;
 
 
     /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Fri Apr 13 04:58:06 2007
@@ -54,9 +54,9 @@
 import org.apache.directory.server.core.interceptor.context.DeleteServiceContext;
 import org.apache.directory.server.core.interceptor.context.EntryServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
@@ -506,20 +506,20 @@
          */
         if ( ( oldName.size() == newName.size() ) && oldBase.equals( newBase ) )
         {
-            nexusProxy.modifyRn( new ModifyDNServiceContext( oldDn, newRdn, delOldRdn ) );
+            nexusProxy.rename( new RenameServiceContext( oldDn, newRdn, delOldRdn ) );
         }
         else
         {
-            LdapDN parent = ( LdapDN ) newDn.clone();
-            parent.remove( newDn.size() - 1 );
+            LdapDN target = ( LdapDN ) newDn.clone();
+            target.remove( newDn.size() - 1 );
             
             if ( newRdn.equalsIgnoreCase( oldRdn ) )
             {
-                nexusProxy.replace( new ReplaceServiceContext( oldDn, parent ) );
+                nexusProxy.move( new MoveServiceContext( oldDn, target ) );
             }
             else
             {
-                nexusProxy.move( new MoveServiceContext( oldDn, parent, newRdn, delOldRdn ) );
+                nexusProxy.moveAndRename( new MoveAndRenameServiceContext( oldDn, target, newRdn, delOldRdn ) );
             }
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java Fri Apr 13 04:58:06 2007
@@ -34,8 +34,8 @@
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.ConcreteNameComponentNormalizer;
@@ -140,28 +140,28 @@
     }
 
 
-    public void modifyRn( NextInterceptor nextInterceptor, ServiceContext modifyDnContext )
+    public void rename( NextInterceptor nextInterceptor, ServiceContext renameContext )
         throws NamingException
     {
-        LdapDN.normalize( modifyDnContext.getDn(), attrNormalizers );
-        nextInterceptor.modifyRn( modifyDnContext );
+        LdapDN.normalize( renameContext.getDn(), attrNormalizers );
+        nextInterceptor.rename( renameContext );
     }
 
 
-    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext ) throws NamingException
     {
-        LdapDN.normalize( replaceContext.getDn(), attrNormalizers );
-        ((ReplaceServiceContext)replaceContext).getParent().normalize( attrNormalizers);
-        nextInterceptor.replace( replaceContext );
+        LdapDN.normalize( moveContext.getDn(), attrNormalizers );
+        ((MoveServiceContext)moveContext).getParent().normalize( attrNormalizers);
+        nextInterceptor.move( moveContext );
     }
 
 
-    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor nextInterceptor, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        LdapDN.normalize( moveContext.getDn(), attrNormalizers );
-        LdapDN.normalize( ((MoveServiceContext)moveContext).getParent(), attrNormalizers);
-        nextInterceptor.move( moveContext );
+        LdapDN.normalize( moveAndRenameContext.getDn(), attrNormalizers );
+        LdapDN.normalize( ((MoveAndRenameServiceContext)moveAndRenameContext).getParent(), attrNormalizers);
+        nextInterceptor.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java Fri Apr 13 04:58:06 2007
@@ -44,10 +44,10 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -225,10 +225,10 @@
     }
 
 
-    public void modifyRn( NextInterceptor nextInterceptor, ServiceContext modifyDnContext )
+    public void rename( NextInterceptor nextInterceptor, ServiceContext renameContext )
         throws NamingException
     {
-        nextInterceptor.modifyRn( modifyDnContext );
+        nextInterceptor.rename( renameContext );
 
         // add operational attributes after call in case the operation fails
         Attributes attributes = new AttributesImpl( true );
@@ -240,22 +240,23 @@
         attribute.add( DateUtils.getGeneralizedTime() );
         attributes.put( attribute );
 
-        LdapDN newDn = ( LdapDN ) modifyDnContext.getDn().clone();
-        newDn.remove( modifyDnContext.getDn().size() - 1 );
-        newDn.add( ((ModifyDNServiceContext)modifyDnContext).getNewDn() );
+        LdapDN newDn = ( LdapDN ) renameContext.getDn().clone();
+        newDn.remove( renameContext.getDn().size() - 1 );
+        newDn.add( ((RenameServiceContext)renameContext).getNewRdn() );
         newDn.normalize( registry.getNormalizerMapping() );
         
         ModifyServiceContext newModify = new ModifyServiceContext( 
         		newDn,
         		DirContext.REPLACE_ATTRIBUTE, 
         		attributes);
+        
         nexus.modify( newModify );
     }
 
 
-    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext ) throws NamingException
     {
-        nextInterceptor.replace( replaceContext );
+        nextInterceptor.move( moveContext );
 
         // add operational attributes after call in case the operation fails
         Attributes attributes = new AttributesImpl( true );
@@ -268,7 +269,7 @@
         attributes.put( attribute );
 
         ModifyServiceContext newModify = new ModifyServiceContext( 
-        		((ReplaceServiceContext)replaceContext).getParent(),
+        		((MoveServiceContext)moveContext).getParent(),
         		DirContext.REPLACE_ATTRIBUTE, 
         		attributes);
         
@@ -276,10 +277,10 @@
     }
 
 
-    public void move( NextInterceptor nextInterceptor, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor nextInterceptor, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        nextInterceptor.move( moveContext );
+        nextInterceptor.moveAndRename( moveAndRenameContext );
 
         // add operational attributes after call in case the operation fails
         Attributes attributes = new AttributesImpl( true );
@@ -292,7 +293,7 @@
         attributes.put( attribute );
 
         ModifyServiceContext newModify = new ModifyServiceContext( 
-        		((MoveServiceContext)moveContext).getParent(),
+        		((MoveAndRenameServiceContext)moveAndRenameContext).getParent(),
         		DirContext.REPLACE_ATTRIBUTE, 
         		attributes);
         nexus.modify( newModify );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java Fri Apr 13 04:58:06 2007
@@ -33,9 +33,9 @@
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -247,17 +247,17 @@
 
 
     /**
-     * This method calls {@link Partition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)} and
-     * {@link Partition#modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean)} subsequently
+     * This method calls {@link Partition#move(ServiceContext)} and
+     * {@link Partition#rename(ServiceContext)} subsequently
      * by default.  Please override this method if there is more effactive
      * way for your implementation.
      */
-    public void move( LdapDN oldName, LdapDN newParentName, String newRn, boolean deleteOldRn ) throws NamingException
+    public void move( LdapDN oldName, LdapDN newParentName, String newRdn, boolean deleteOldRn ) throws NamingException
     {
         LdapDN newName = ( LdapDN ) newParentName.clone();
-        newName.add( newRn );
-        replace( new ReplaceServiceContext( oldName, newParentName ) );
-        modifyRn( new ModifyDNServiceContext( newName, newRn, deleteOldRn ) );
+        newName.add( newRdn );
+        replace( new MoveServiceContext( oldName, newParentName ) );
+        rename( new RenameServiceContext( newName, newRdn, deleteOldRn ) );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Fri Apr 13 04:58:06 2007
@@ -950,32 +950,32 @@
 
 
     /**
-     * @see Partition#modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean)
+     * @see Partition#rename(ServiceContext)
      */
-    public void modifyRn( ServiceContext modifyDnContext ) throws NamingException
+    public void rename( ServiceContext renameContext ) throws NamingException
     {
-        Partition backend = getBackend( modifyDnContext.getDn() );
-        backend.modifyRn( modifyDnContext );
+        Partition backend = getBackend( renameContext.getDn() );
+        backend.rename( renameContext );
     }
 
 
     /**
-     * @see Partition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)
+     * @see Partition#move(ServiceContext)
      */
-    public void replace( ServiceContext replaceContext ) throws NamingException
+    public void move( ServiceContext moveContext ) throws NamingException
     {
-        Partition backend = getBackend( replaceContext.getDn() );
-        backend.replace( replaceContext );
+        Partition backend = getBackend( moveContext.getDn() );
+        backend.move( moveContext );
     }
 
 
     /**
-     * @see Partition#move( ServiceContext )
+     * @see Partition#moveAndRename( ServiceContext )
      */
-    public void move( ServiceContext moveContext ) throws NamingException
+    public void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException
     {
-        Partition backend = getBackend( moveContext.getDn() );
-        backend.move( moveContext );
+        Partition backend = getBackend( moveAndRenameContext.getDn() );
+        backend.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/Partition.java Fri Apr 13 04:58:06 2007
@@ -214,20 +214,20 @@
      * This makes sense only in certain namespaces like LDAP and will be ignored
      * if it is irrelavent.
      *
-     * @param modifyDnContext the modify DN context
+     * @param renameContext the modify DN context
      * @throws NamingException if there are any problems
      */
-    void modifyRn( ServiceContext modifyDnContext ) throws NamingException;
+    void rename( ServiceContext renameContext ) throws NamingException;
 
 
     /**
      * Transplants a child entry, to a position in the namespace under a new
      * parent entry.
      *
-     * @param replaceContext The context containing the DNs to move
+     * @param moveContext The context containing the DNs to move
      * @throws NamingException if there are any problems
      */
-    void replace( ServiceContext replaceContext ) throws NamingException;
+    void move( ServiceContext moveContext ) throws NamingException;
 
 
     /**
@@ -238,11 +238,11 @@
      * namespace this parameters is ignored.  An example of a namespace where
      * this parameter is significant is the LDAP namespace.
      *
-     * @param moveContext The context contain all the information about
+     * @param moveAndRenameContext The context contain all the information about
      * the modifyDN operation
      * @throws NamingException if there are any problems
      */
-    void move( ServiceContext moveContext ) throws NamingException;
+    void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException;
 
 
     /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java Fri Apr 13 04:58:06 2007
@@ -549,22 +549,22 @@
     }
 
 
-    public void modifyRn( ServiceContext modifyDnContext ) throws NamingException
+    public void rename( ServiceContext renameContext ) throws NamingException
     {
-        modifyRn( modifyDnContext, null );
+        rename( renameContext, null );
     }
 
 
-    public void modifyRn( ServiceContext modifyDnContext, Collection bypass ) throws NamingException
+    public void rename( ServiceContext renameContext, Collection bypass ) throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         Object[] args = new Object[]
-            { modifyDnContext };
-        stack.push( new Invocation( this, caller, "modifyRn", args, bypass ) );
+            { renameContext };
+        stack.push( new Invocation( this, caller, "rename", args, bypass ) );
         try
         {
-            this.configuration.getInterceptorChain().modifyRn( modifyDnContext );
+            this.configuration.getInterceptorChain().rename( renameContext );
         }
         finally
         {
@@ -573,21 +573,21 @@
     }
 
 
-    public void replace( ServiceContext replaceContext ) throws NamingException
+    public void move( ServiceContext moveContext ) throws NamingException
     {
-        replace( replaceContext, null );
+        move( moveContext, null );
     }
 
 
-    public void replace( ServiceContext replaceContext, Collection bypass ) throws NamingException
+    public void move( ServiceContext moveContext, Collection bypass ) throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "move", new Object[]
-            { replaceContext }, bypass ) );
+            { moveContext }, bypass ) );
         try
         {
-            this.configuration.getInterceptorChain().replace( replaceContext );
+            this.configuration.getInterceptorChain().move( moveContext );
         }
         finally
         {
@@ -596,23 +596,23 @@
     }
 
 
-    public void move( ServiceContext moveContext ) throws NamingException
+    public void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException
     {
-        move( moveContext, null );
+        moveAndRename( moveAndRenameContext, null );
     }
 
 
-    public void move( ServiceContext moveContext, Collection bypass )
+    public void moveAndRename( ServiceContext moveAndRenameContext, Collection bypass )
         throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         Object[] args = new Object[]
-            { moveContext };
-        stack.push( new Invocation( this, caller, "move", args, bypass ) );
+            { moveAndRenameContext };
+        stack.push( new Invocation( this, caller, "moveAndRename", args, bypass ) );
         try
         {
-            this.configuration.getInterceptorChain().move( moveContext );
+            this.configuration.getInterceptorChain().moveAndRename( moveAndRenameContext );
         }
         finally
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Fri Apr 13 04:58:06 2007
@@ -470,13 +470,13 @@
     }
 
 
-    public abstract void modifyRn( ServiceContext modifyDnContext ) throws NamingException;
+    public abstract void rename( ServiceContext renameContext ) throws NamingException;
 
 
-    public abstract void replace( ServiceContext replaceContext ) throws NamingException;
+    public abstract void move( ServiceContext moveContext ) throws NamingException;
 
 
-    public abstract void move( ServiceContext moveContext )
+    public abstract void moveAndRename( ServiceContext moveAndRenameContext )
         throws NamingException;
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Fri Apr 13 04:58:06 2007
@@ -31,10 +31,10 @@
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
@@ -390,23 +390,23 @@
     }
 
 
-    public final void modifyRn( ServiceContext modifyDnContext ) throws NamingException
+    public final void rename( ServiceContext renameContext ) throws NamingException
     {
-        ModifyDNServiceContext ctx = (ModifyDNServiceContext)modifyDnContext;
-        store.modifyRn( ctx.getDn(), ctx.getNewDn(), ctx.getDelOldDn() );
+        RenameServiceContext ctx = (RenameServiceContext)renameContext;
+        store.rename( ctx.getDn(), ctx.getNewRdn(), ctx.getDelOldDn() );
     }
 
 
-    public final void move( ServiceContext moveContext ) throws NamingException
+    public final void moveAndRename( ServiceContext moveAndRenameContext ) throws NamingException
     {
-        MoveServiceContext ctx = (MoveServiceContext)moveContext;
-        store.move( ctx.getDn(), ctx.getParent(), ctx.getNewDn(), ctx.getDelOldDn() );
+        MoveAndRenameServiceContext ctx = (MoveAndRenameServiceContext)moveAndRenameContext;
+        store.move( ctx.getDn(), ctx.getParent(), ctx.getNewRdn(), ctx.getDelOldDn() );
     }
 
 
-    public final void replace( ServiceContext replaceContext ) throws NamingException
+    public final void move( ServiceContext moveContext ) throws NamingException
     {
-        ReplaceServiceContext ctx = (ReplaceServiceContext)replaceContext;
+        MoveServiceContext ctx = (MoveServiceContext)moveContext;
         store.move( ctx.getDn(), ctx.getParent() );
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Fri Apr 13 04:58:06 2007
@@ -48,10 +48,10 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -426,20 +426,20 @@
      * -----------------------------------------------------------------------
      */
 
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
-        LdapDN oldName = replaceContext.getDn();
+        LdapDN oldName = moveContext.getDn();
         
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
-        LdapDN newName = ( LdapDN ) ((ReplaceServiceContext)replaceContext).getParent().clone();
+        LdapDN newName = ( LdapDN ) ((MoveServiceContext)moveContext).getParent().clone();
         newName.add( oldName.get( oldName.size() - 1 ) );
 
         // handle a normal modify without following referrals
         if ( refval == null || refval.equals( IGNORE ) )
         {
-            next.replace( replaceContext );
+            next.move( moveContext );
             
             if ( lut.isReferral( oldName ) )
             {
@@ -455,7 +455,7 @@
             LdapDN farthestDst = lut.getFarthestReferralAncestor( newName ); // note will not return newName so safe
             if ( farthestSrc == null && farthestDst == null && !lut.isReferral( newName ) )
             {
-                next.replace( replaceContext );
+                next.move( moveContext );
                 
                 if ( lut.isReferral( oldName ) )
                 {
@@ -498,21 +498,21 @@
     }
 
 
-    public void move( NextInterceptor next, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        LdapDN oldName = moveContext.getDn();
+        LdapDN oldName = moveAndRenameContext.getDn();
         
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
-        LdapDN newName = ( LdapDN ) ((MoveServiceContext)moveContext).getParent().clone();
-        newName.add( ((MoveServiceContext)moveContext).getNewDn() );
+        LdapDN newName = ( LdapDN ) ((MoveAndRenameServiceContext)moveAndRenameContext).getParent().clone();
+        newName.add( ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn() );
 
         // handle a normal modify without following referrals
         if ( refval == null || refval.equals( IGNORE ) )
         {
-            next.move( moveContext );
+            next.moveAndRename( moveAndRenameContext );
             if ( lut.isReferral( oldName ) )
             {
                 lut.referralChanged( oldName, newName );
@@ -526,7 +526,7 @@
             LdapDN farthestDst = lut.getFarthestReferralAncestor( newName ); // safe to use - does not return newName
             if ( farthestSrc == null && farthestDst == null && !lut.isReferral( newName ) )
             {
-                next.move( moveContext );
+                next.moveAndRename( moveAndRenameContext );
                 if ( lut.isReferral( oldName ) )
                 {
                     lut.referralChanged( oldName, newName );
@@ -567,10 +567,10 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext )
+    public void rename( NextInterceptor next, ServiceContext renameContext )
         throws NamingException
     {
-        LdapDN oldName = modifyDnContext.getDn();
+        LdapDN oldName = renameContext.getDn();
         
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
@@ -578,14 +578,14 @@
         LdapDN newName = ( LdapDN ) oldName.clone();
         newName.remove( oldName.size() - 1 );
 
-        LdapDN newRdnName = new LdapDN( ((ModifyDNServiceContext)modifyDnContext).getNewDn() );
+        LdapDN newRdnName = new LdapDN( ((RenameServiceContext)renameContext).getNewRdn() );
         newRdnName.normalize( attrRegistry.getNormalizerMapping() );
         newName.add( newRdnName.toNormName() );
 
         // handle a normal modify without following referrals
         if ( refval == null || refval.equals( IGNORE ) )
         {
-            next.modifyRn( modifyDnContext );
+            next.rename( renameContext );
             
             if ( lut.isReferral( oldName ) )
             {
@@ -602,7 +602,7 @@
             
             if ( farthestSrc == null && farthestDst == null && !lut.isReferral( newName ) )
             {
-                next.modifyRn( modifyDnContext );
+                next.rename( renameContext );
                 
                 if ( lut.isReferral( oldName ) )
                 {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Fri Apr 13 04:58:06 2007
@@ -49,10 +49,10 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -1331,54 +1331,54 @@
     }
     
     
-    public void move( NextInterceptor next, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        LdapDN oriChildName = moveContext.getDn();
+        LdapDN oriChildName = moveAndRenameContext.getDn();
 
         Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
 
         if ( oriChildName.startsWith( schemaBaseDN ) )
         {
             schemaManager.move( oriChildName, 
-                ((MoveServiceContext)moveContext).getParent(), 
-                ((MoveServiceContext)moveContext).getNewDn(), 
-                ((MoveServiceContext)moveContext).getDelOldDn(), entry );
+                ((MoveAndRenameServiceContext)moveAndRenameContext).getParent(), 
+                ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn(), 
+                ((MoveAndRenameServiceContext)moveAndRenameContext).getDelOldDn(), entry );
         }
         
-        next.move( moveContext );
+        next.moveAndRename( moveAndRenameContext );
     }
 
 
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
-        LdapDN oriChildName = replaceContext.getDn();
+        LdapDN oriChildName = moveContext.getDn();
         
         Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
 
         if ( oriChildName.startsWith( schemaBaseDN ) )
         {
-            schemaManager.replace( oriChildName, ((ReplaceServiceContext)replaceContext).getParent(), entry );
+            schemaManager.replace( oriChildName, ((MoveServiceContext)moveContext).getParent(), entry );
         }
         
-        next.replace( replaceContext );
+        next.move( moveContext );
     }
     
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException
+    public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
     {
-        LdapDN name = modifyDnContext.getDn();
-        String newRn = ((ModifyDNServiceContext)modifyDnContext).getNewDn();
-        boolean deleteOldRn = ((ModifyDNServiceContext)modifyDnContext).getDelOldDn();
+        LdapDN name = renameContext.getDn();
+        String newRdn = ((RenameServiceContext)renameContext).getNewRdn();
+        boolean deleteOldRn = ((RenameServiceContext)renameContext).getDelOldDn();
         
         Attributes entry = nexus.lookup( new LookupServiceContext( name ) );
 
         if ( name.startsWith( schemaBaseDN ) )
         {
-            schemaManager.modifyRn( name, newRn, deleteOldRn, entry );
+            schemaManager.modifyRn( name, newRdn, deleteOldRn, entry );
         }
         
-        next.modifyRn( modifyDnContext );
+        next.rename( renameContext );
     }
 
     private final static String[] schemaSubentryReturnAttributes = new String[] { "+", "*" };

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Fri Apr 13 04:58:06 2007
@@ -33,10 +33,10 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.ModifyServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -699,10 +699,10 @@
     }
 
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException
+    public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
     {
-        LdapDN name = modifyDnContext.getDn();
-        String newRn = ((ModifyDNServiceContext)modifyDnContext).getNewDn();
+        LdapDN name = renameContext.getDn();
+        String newRdn = ((RenameServiceContext)renameContext).getNewRdn();
         
         Attributes entry = nexus.lookup( new LookupServiceContext( name ) );
         Attribute objectClasses = AttributeUtils.getAttribute( entry, objectClassType );
@@ -718,14 +718,14 @@
             LdapDN newName = ( LdapDN ) name.clone();
             newName.remove( newName.size() - 1 );
 
-            LdapDN rdn = new LdapDN( newRn );
+            LdapDN rdn = new LdapDN( newRdn );
             newName.addAll( rdn );
             rdn.normalize( attrRegistry.getNormalizerMapping() );
             newName.normalize( attrRegistry.getNormalizerMapping() );
 
             String newNormName = newName.toNormName();
             subentryCache.setSubentry( newNormName, ss, subentry.getTypes() );
-            next.modifyRn( modifyDnContext );
+            next.rename( renameContext );
 
             subentry = subentryCache.getSubentry( newNormName );
             ExprNode filter = new PresenceNode( oidRegistry.getOid( SchemaConstants.OBJECT_CLASS_AT ) );
@@ -733,6 +733,7 @@
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { "+", "*" } );
             NamingEnumeration subentries = nexus.search( baseDn, factoryCfg.getEnvironment(), filter, controls );
+            
             while ( subentries.hasMore() )
             {
                 SearchResult result = ( SearchResult ) subentries.next();
@@ -754,13 +755,14 @@
                 log.warn( msg );
                 throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN );
             }
-            next.modifyRn( modifyDnContext );
+            
+            next.rename( renameContext );
 
             // calculate the new DN now for use below to modify subentry operational
             // attributes contained within this regular entry with name changes
             LdapDN newName = ( LdapDN ) name.clone();
             newName.remove( newName.size() - 1 );
-            newName.add( newRn );
+            newName.add( newRdn );
             newName.normalize( attrRegistry.getNormalizerMapping() );
             ModificationItemImpl[] mods = getModsOnEntryRdnChange( name, newName, entry );
 
@@ -772,12 +774,12 @@
     }
 
 
-    public void move( NextInterceptor next, ServiceContext moveContext )
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext )
         throws NamingException
     {
-        LdapDN oriChildName = moveContext.getDn();
-        LdapDN parent = ((MoveServiceContext)moveContext).getParent();
-        String newRn = ((MoveServiceContext)moveContext).getNewDn();
+        LdapDN oriChildName = moveAndRenameContext.getDn();
+        LdapDN parent = ((MoveAndRenameServiceContext)moveAndRenameContext).getParent();
+        String newRn = ((RenameServiceContext)moveAndRenameContext).getNewRdn();
         
         
         Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
@@ -801,7 +803,7 @@
             
             String newNormName = newName.toNormName();
             subentryCache.setSubentry( newNormName, ss, subentry.getTypes() );
-            next.move( moveContext );
+            next.moveAndRename( moveAndRenameContext );
 
             subentry = subentryCache.getSubentry( newNormName );
 
@@ -810,6 +812,7 @@
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[] { "+", "*" } );
             NamingEnumeration subentries = nexus.search( baseDn, factoryCfg.getEnvironment(), filter, controls );
+            
             while ( subentries.hasMore() )
             {
                 SearchResult result = ( SearchResult ) subentries.next();
@@ -832,7 +835,8 @@
                 log.warn( msg );
                 throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN );
             }
-            next.move( moveContext );
+            
+            next.moveAndRename( moveAndRenameContext );
 
             // calculate the new DN now for use below to modify subentry operational
             // attributes contained within this regular entry with name changes
@@ -849,10 +853,10 @@
     }
 
 
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
-        LdapDN oriChildName = replaceContext.getDn();
-        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        LdapDN oriChildName = moveContext.getDn();
+        LdapDN newParentName = ((MoveServiceContext)moveContext).getParent();
         
         Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
         Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
@@ -871,7 +875,7 @@
 
             String newNormName = newName.toNormName();
             subentryCache.setSubentry( newNormName, ss, subentry.getTypes() );
-            next.replace( replaceContext );
+            next.move( moveContext );
 
             subentry = subentryCache.getSubentry( newNormName );
 
@@ -905,7 +909,7 @@
                 throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN );
             }
             
-            next.replace( replaceContext );
+            next.move( moveContext );
 
             // 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/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java?view=diff&rev=528446&r1=528445&r2=528446
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java Fri Apr 13 04:58:06 2007
@@ -42,9 +42,9 @@
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddServiceContext;
 import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
-import org.apache.directory.server.core.interceptor.context.ModifyDNServiceContext;
+import org.apache.directory.server.core.interceptor.context.RenameServiceContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameServiceContext;
 import org.apache.directory.server.core.interceptor.context.MoveServiceContext;
-import org.apache.directory.server.core.interceptor.context.ReplaceServiceContext;
 import org.apache.directory.server.core.interceptor.context.ServiceContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
@@ -374,16 +374,16 @@
     }
     
 
-    public void modifyRn( NextInterceptor next, ServiceContext modifyDnContext ) throws NamingException
+    public void rename( NextInterceptor next, ServiceContext renameContext ) throws NamingException
     {
-        LdapDN name = modifyDnContext.getDn();
-        String newRn = ((ModifyDNServiceContext)modifyDnContext).getNewDn();
-        boolean deleteOldRn = ((ModifyDNServiceContext)modifyDnContext).getDelOldDn();
+        LdapDN name = renameContext.getDn();
+        String newRdn = ((RenameServiceContext)renameContext).getNewRdn();
+        boolean deleteOldRn = ((RenameServiceContext)renameContext).getDelOldDn();
         
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.modifyRn( modifyDnContext );
+            next.rename( renameContext );
             return;
         }
         
@@ -394,13 +394,13 @@
         ServerLdapContext callerRootCtx = ( ServerLdapContext ) ( ( ServerLdapContext ) invocation.getCaller() ).getRootContext();
         
         LdapDN oldRDN = new LdapDN( name.getRdn().getUpName() );
-        LdapDN newRDN = new LdapDN( newRn );
+        LdapDN newRDN = new LdapDN( newRdn );
         LdapDN oldSuperiorDN = ( LdapDN ) name.clone();
         oldSuperiorDN.remove( oldSuperiorDN.size() - 1 );
         LdapDN newSuperiorDN = ( LdapDN ) oldSuperiorDN.clone();
         LdapDN oldDN = ( LdapDN ) name.clone();
         LdapDN newDN = ( LdapDN ) name.clone();
-        newDN.add( newRn );
+        newDN.add( newRdn );
         
         StoredProcedureParameterInjector injector = new ModifyDNStoredProcedureParameterInjector(
             invocation, deleteOldRn, oldRDN, newRDN, oldSuperiorDN, newSuperiorDN, oldDN, newDN );
@@ -413,7 +413,7 @@
         // Gather a Map<ActionTime,TriggerSpecification> where TriggerSpecification.ldapOperation = LdapOperation.MODIFYDN_RENAME.
         Map triggerMap = getActionTimeMappedTriggerSpecsForOperation( triggerSpecs, LdapOperation.MODIFYDN_RENAME );
         
-        next.modifyRn( modifyDnContext );
+        next.rename( renameContext );
         triggerSpecCache.subentryRenamed( name, newDN );
         
         // Fire AFTER Triggers.
@@ -421,17 +421,17 @@
         executeTriggers( afterTriggerSpecs, injector, callerRootCtx );
     }
     
-    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
+    public void moveAndRename( NextInterceptor next, ServiceContext moveAndRenameContext ) throws NamingException
     {
-        LdapDN oriChildName = moveContext.getDn();
-        LdapDN parent = ((MoveServiceContext)moveContext).getParent();
-        String newRn = ((MoveServiceContext)moveContext).getNewDn();
-        boolean deleteOldRn = ((MoveServiceContext)moveContext).getDelOldDn();
+        LdapDN oriChildName = moveAndRenameContext.getDn();
+        LdapDN parent = ((MoveAndRenameServiceContext)moveAndRenameContext).getParent();
+        String newRn = ((MoveAndRenameServiceContext)moveAndRenameContext).getNewRdn();
+        boolean deleteOldRn = ((MoveAndRenameServiceContext)moveAndRenameContext).getDelOldDn();
 
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.move( moveContext );
+            next.moveAndRename( moveAndRenameContext );
             return;
         }
         
@@ -488,7 +488,7 @@
         // Gather a Map<ActionTime,TriggerSpecification> where TriggerSpecification.ldapOperation = LdapOperation.MODIFYDN_IMPORT.
         Map importTriggerMap = getActionTimeMappedTriggerSpecsForOperation( importTriggerSpecs, LdapOperation.MODIFYDN_IMPORT );
         
-        next.move( moveContext );
+        next.moveAndRename( moveAndRenameContext );
         triggerSpecCache.subentryRenamed( oldDN, newDN );
         
         // Fire AFTER Triggers.
@@ -499,17 +499,17 @@
     }
     
     
-    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
+    public void move( NextInterceptor next, ServiceContext moveContext ) throws NamingException
     {
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.replace( replaceContext );
+            next.move( moveContext );
             return;
         }
         
-        LdapDN oriChildName = replaceContext.getDn();
-        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        LdapDN oriChildName = moveContext.getDn();
+        LdapDN newParentName = ((MoveServiceContext)moveContext).getParent();
         
         // Gather supplementary data.        
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -565,7 +565,7 @@
         // Gather a Map<ActionTime,TriggerSpecification> where TriggerSpecification.ldapOperation = LdapOperation.MODIFYDN_IMPORT.
         Map importTriggerMap = getActionTimeMappedTriggerSpecsForOperation( importTriggerSpecs, LdapOperation.MODIFYDN_IMPORT );
         
-        next.replace( replaceContext );
+        next.move( moveContext );
         triggerSpecCache.subentryRenamed( oldDN, newDN );
         
         // Fire AFTER Triggers.



Mime
View raw message