directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r527573 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core: authn/ authz/ event/ exception/ interceptor/ jndi/ normalization/ operational/ partition/ partition/impl/btree/ partition/impl/btree/jdbm/ referral/...
Date Wed, 11 Apr 2007 16:43:43 GMT
Author: elecharny
Date: Wed Apr 11 09:43:37 2007
New Revision: 527573

URL: http://svn.apache.org/viewvc?view=rev&rev=527573
Log:
Changed the move( old, new) operation to replace( ServiceContext )

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/MetaAttributeTypeHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.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

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -46,6 +46,7 @@
 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.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;
@@ -396,16 +397,17 @@
     }
 
 
-    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
         if ( IS_DEBUG )
         {
-            log.debug( "Moving name = '" + oriChildName.toString() + " to name = '" + newParentName + "'" );
+            log.debug( "Moving name = '" + replaceContext.getDn().getUpName() + " to name = '" + 
+                ((ReplaceServiceContext)replaceContext).getParent().getUpName() + "'" );
         }
 
         checkAuthenticated( MessageTypeEnum.MOD_DN_REQUEST );
-        next.move( oriChildName, newParentName );
-        invalidateAuthenticatorCaches( oriChildName );
+        next.replace( replaceContext );
+        invalidateAuthenticatorCaches( replaceContext.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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -35,6 +35,7 @@
 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.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;
@@ -875,8 +876,11 @@
     }
 
 
-    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
+        LdapDN oriChildName = replaceContext.getDn();
+        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
@@ -889,14 +893,14 @@
         // bypass authz code if we are disabled
         if ( !enabled )
         {
-            next.move( oriChildName, newParentName );
+            next.replace( replaceContext );
             return;
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
         {
-            next.move( oriChildName, newParentName );
+            next.replace( replaceContext );
             tupleCache.subentryRenamed( oriChildName, newName );
             groupCache.groupRenamed( oriChildName, newName );
             return;
@@ -926,6 +930,7 @@
         SubentryService subentryService = ( SubentryService ) chain.get( "subentryService" );
         Attributes subentryAttrs = subentryService.getSubentryAttributes( newName, importedEntry );
         NamingEnumeration attrList = importedEntry.getAll();
+        
         while ( attrList.hasMore() )
         {
             subentryAttrs.put( ( Attribute ) attrList.next() );
@@ -939,7 +944,7 @@
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), newName, null,
             null, IMPORT_PERMS, destTuples, subentryAttrs );
 
-        next.move( oriChildName, newParentName );
+        next.replace( replaceContext );
         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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -344,13 +344,14 @@
     }
 
 
-    public void move( NextInterceptor nextInterceptor, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
     {
         if ( enabled )
         {
-            protectDnAlterations( oriChildName );
+            protectDnAlterations( replaceContext.getDn() );
         }
-        nextInterceptor.move( oriChildName, newParentName );
+        
+        nextInterceptor.replace( replaceContext );
     }
 
 

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -37,6 +37,7 @@
 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.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;
@@ -401,10 +402,12 @@
     }
 
 
-    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
-        super.move( next, oriChildName, newParentName );
-        LdapDN newName = ( LdapDN ) newParentName.clone();
+        super.replace( next, replaceContext );
+        LdapDN oriChildName = replaceContext.getDn();
+        
+        LdapDN newName = ( LdapDN ) ((ReplaceServiceContext)replaceContext).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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -37,6 +37,7 @@
 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.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;
@@ -372,8 +373,11 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    public void move( NextInterceptor nextInterceptor, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
     {
+        LdapDN oriChildName = replaceContext.getDn();
+        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        
         if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
             throw new LdapOperationNotSupportedException( 
@@ -394,6 +398,7 @@
         String rdn = oriChildName.get( oriChildName.size() - 1 );
         LdapDN target = ( LdapDN ) newParentName.clone();
         target.add( rdn );
+        
         if ( nextInterceptor.hasEntry( new EntryServiceContext( target ) ) )
         {
             // we must calculate the resolved name using the user provided Rdn value
@@ -407,7 +412,7 @@
             throw e;
         }
 
-        nextInterceptor.move( oriChildName, newParentName );
+        nextInterceptor.replace( replaceContext );
     }
 
 

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -178,9 +178,9 @@
     }
 
 
-    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
-        next.move( oriChildName, newParentName );
+        next.replace( replaceContext );
     }
 
 

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -216,9 +216,9 @@
 
 
     /**
-     * Filters {@link Partition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)} call.
+     * Filters {@link Partition#replace(ServiceContext)} call.
      */
-    void move( NextInterceptor next, LdapDN oldName, LdapDN newParentName ) throws NamingException;
+    void replace( NextInterceptor next, ServiceContext replaceContext ) 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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -165,9 +165,9 @@
         }
 
 
-        public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+        public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
         {
-            nexus.move( oriChildName, newParentName );
+            nexus.replace( replaceContext );
         }
 
 
@@ -895,14 +895,14 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( ServiceContext replaceContext ) throws NamingException
     {
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
         NextInterceptor next = entry.nextInterceptor;
         try
         {
-            head.move( next, oriChildName, newParentName );
+            head.replace( next, replaceContext );
         }
         catch ( NamingException ne )
         {
@@ -1288,14 +1288,14 @@
                 }
 
 
-                public void move( LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+                public void replace( ServiceContext replaceContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
                     Interceptor interceptor = next.configuration.getInterceptor();
 
                     try
                     {
-                        interceptor.move( next.nextInterceptor, oriChildName, newParentName );
+                        interceptor.replace( next.nextInterceptor, replaceContext );
                     }
                     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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -143,9 +143,9 @@
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor,org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)}.
+     * Calls the next interceptor's {@link Interceptor#move(NextInterceptor,ServiceContext)}.
      */
-    void move( LdapDN oldName, LdapDN newParentName ) throws NamingException;
+    void replace( ServiceContext replaceContext ) 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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -55,6 +55,8 @@
 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.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.SchemaConstants;
@@ -512,8 +514,7 @@
             
             if ( newRdn.equalsIgnoreCase( oldRdn ) )
             {
-                //nexusProxy.move( new MoveServiceContext( oldDn, parent ) );
-                nexusProxy.move( oldDn, parent );
+                nexusProxy.replace( new ReplaceServiceContext( oldDn, parent ) );
             }
             else
             {

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -34,6 +34,7 @@
 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.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;
@@ -146,11 +147,11 @@
     }
 
 
-    public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
     {
-        LdapDN normalized = LdapDN.normalize( name, attrNormalizers );
-        newParentName.normalize( attrNormalizers);
-        nextInterceptor.move( normalized, newParentName );
+        LdapDN.normalize( replaceContext.getDn(), attrNormalizers );
+        ((ReplaceServiceContext)replaceContext).getParent().normalize( attrNormalizers);
+        nextInterceptor.replace( replaceContext );
     }
 
 

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -46,6 +46,7 @@
 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.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;
@@ -251,9 +252,9 @@
     }
 
 
-    public void move( NextInterceptor nextInterceptor, LdapDN name, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor nextInterceptor, ServiceContext replaceContext ) throws NamingException
     {
-        nextInterceptor.move( name, newParentName );
+        nextInterceptor.replace( replaceContext );
 
         // add operational attributes after call in case the operation fails
         Attributes attributes = new AttributesImpl( true );
@@ -266,9 +267,10 @@
         attributes.put( attribute );
 
         ModifyServiceContext newModify = new ModifyServiceContext( 
-        		newParentName,
+        		((ReplaceServiceContext)replaceContext).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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -35,6 +35,7 @@
 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.ReplaceServiceContext;
 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;
@@ -255,7 +256,7 @@
     {
         LdapDN newName = ( LdapDN ) newParentName.clone();
         newName.add( newRn );
-        move( oldName, newParentName );
+        replace( new ReplaceServiceContext( oldName, newParentName ) );
         modifyRn( new ModifyDNServiceContext( newName, newRn, deleteOldRn ) );
     }
 
@@ -264,7 +265,7 @@
      * This method throws {@link OperationNotSupportedException} by default.
      * Please override this method to implement move operation.
      */
-    public void move( LdapDN oldName, LdapDN newParentName ) throws NamingException
+    public void replace( ServiceContext replaceContext ) throws NamingException
     {
         throw new OperationNotSupportedException( "Moving an entry to other parent entry is not supported." );
     }

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -962,10 +962,10 @@
     /**
      * @see Partition#move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( ServiceContext replaceContext ) throws NamingException
     {
-        Partition backend = getBackend( oriChildName );
-        backend.move( oriChildName, newParentName );
+        Partition backend = getBackend( replaceContext.getDn() );
+        backend.replace( replaceContext );
     }
 
 

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -225,13 +225,10 @@
      * Transplants a child entry, to a position in the namespace under a new
      * parent entry.
      *
-     * @param oldName the normalized distinguished/absolute name of the
-     * original child name representing the child entry to move
-     * @param newParentName the normalized distinguished/absolute name of the
-     * new parent to move the target entry to
+     * @param replaceContext The context containing the DNs to move
      * @throws NamingException if there are any problems
      */
-    void move( LdapDN oldName, LdapDN newParentName ) throws NamingException;
+    void replace( ServiceContext replaceContext ) 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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -573,21 +573,21 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( ServiceContext replaceContext ) throws NamingException
     {
-        move( oriChildName, newParentName, null );
+        replace( replaceContext, null );
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Collection bypass ) throws NamingException
+    public void replace( ServiceContext replaceContext, Collection bypass ) throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "move", new Object[]
-            { oriChildName, newParentName }, bypass ) );
+            { replaceContext }, bypass ) );
         try
         {
-            this.configuration.getInterceptorChain().move( oriChildName, newParentName );
+            this.configuration.getInterceptorChain().replace( replaceContext );
         }
         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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -473,7 +473,7 @@
     public abstract void modifyRn( ServiceContext modifyDnContext ) throws NamingException;
 
 
-    public abstract void move( LdapDN oldChildDn, LdapDN newParentDn ) throws NamingException;
+    public abstract void replace( ServiceContext replaceContext ) throws NamingException;
 
 
     public abstract void move( LdapDN oldChildDn, LdapDN newParentDn, String newRdn, boolean deleteOldRdn )

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -33,6 +33,7 @@
 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.ModifyServiceContext;
+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;
@@ -401,9 +402,10 @@
     }
 
 
-    public final void move( LdapDN oldChildDn, LdapDN newParentDn ) throws NamingException
+    public final void replace( ServiceContext replaceContext ) throws NamingException
     {
-        store.move( oldChildDn, newParentDn );
+        ReplaceServiceContext ctx = (ReplaceServiceContext)replaceContext;
+        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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -50,6 +50,7 @@
 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.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;
@@ -424,22 +425,26 @@
      * -----------------------------------------------------------------------
      */
 
-    public void move( NextInterceptor next, LdapDN oldName, LdapDN newParent ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
+        LdapDN oldName = replaceContext.getDn();
+        
         Invocation invocation = InvocationStack.getInstance().peek();
         ServerLdapContext caller = ( ServerLdapContext ) invocation.getCaller();
         String refval = ( String ) caller.getEnvironment().get( Context.REFERRAL );
-        LdapDN newName = ( LdapDN ) newParent.clone();
+        LdapDN newName = ( LdapDN ) ((ReplaceServiceContext)replaceContext).getParent().clone();
         newName.add( oldName.get( oldName.size() - 1 ) );
 
         // handle a normal modify without following referrals
         if ( refval == null || refval.equals( IGNORE ) )
         {
-            next.move( oldName, newParent );
+            next.replace( replaceContext );
+            
             if ( lut.isReferral( oldName ) )
             {
                 lut.referralChanged( oldName, newName );
             }
+            
             return;
         }
 
@@ -449,11 +454,13 @@
             LdapDN farthestDst = lut.getFarthestReferralAncestor( newName ); // note will not return newName so safe
             if ( farthestSrc == null && farthestDst == null && !lut.isReferral( newName ) )
             {
-                next.move( oldName, newParent );
+                next.replace( replaceContext );
+                
                 if ( lut.isReferral( oldName ) )
                 {
                     lut.referralChanged( oldName, newName );
                 }
+                
                 return;
             }
             else if ( farthestSrc != null )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandler.java Wed Apr 11 09:43:37 2007
@@ -207,7 +207,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaComparatorHandler.java Wed Apr 11 09:43:37 2007
@@ -276,7 +276,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitContentRuleHandler.java Wed Apr 11 09:43:37 2007
@@ -89,7 +89,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaDitStructureRuleHandler.java Wed Apr 11 09:43:37 2007
@@ -89,7 +89,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandler.java Wed Apr 11 09:43:37 2007
@@ -191,7 +191,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaMatchingRuleUseHandler.java Wed Apr 11 09:43:37 2007
@@ -85,7 +85,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
     {
         // TODO Auto-generated method stub
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNameFormHandler.java Wed Apr 11 09:43:37 2007
@@ -89,7 +89,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaChangeHandler#move(org.apache.directory.shared.ldap.name.LdapDN, org.apache.directory.shared.ldap.name.LdapDN, javax.naming.directory.Attributes)
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
     {
         // TODO Auto-generated method stub
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaNormalizerHandler.java Wed Apr 11 09:43:37 2007
@@ -275,7 +275,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaObjectClassHandler.java Wed Apr 11 09:43:37 2007
@@ -193,7 +193,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSchemaHandler.java Wed Apr 11 09:43:37 2007
@@ -348,7 +348,7 @@
      * Moves are not allowed for metaSchema objects so this always throws an
      * UNWILLING_TO_PERFORM LdapException.
      */
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
     {
         throw new LdapOperationNotSupportedException( "Moving around schemas is not allowed.",
             ResultCodeEnum.UNWILLING_TO_PERFORM );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandler.java Wed Apr 11 09:43:37 2007
@@ -281,7 +281,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java Wed Apr 11 09:43:37 2007
@@ -202,7 +202,7 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) 
         throws NamingException
     {
         checkNewParent( newParentName );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChangeHandler.java Wed Apr 11 09:43:37 2007
@@ -42,5 +42,5 @@
     void modify( LdapDN name, int modOp, Attributes mods, Attributes entry, Attributes targetEntry ) throws NamingException;
     void modify( LdapDN name, ModificationItemImpl[] mods, Attributes entry, Attributes targetEntry ) throws NamingException;
     void move( LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn, Attributes entry ) throws NamingException;
-    void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException;
+    void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException;
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java?view=diff&rev=527573&r1=527572&r2=527573
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java Wed Apr 11 09:43:37 2007
@@ -453,17 +453,18 @@
     }
 
 
-    public void move( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
+    public void replace( LdapDN oriChildName, LdapDN newParentName, Attributes entry ) throws NamingException
     {
         Attribute oc = AttributeUtils.getAttribute( entry, objectClassAT );
         
         for ( int ii = 0; ii < oc.size(); ii++ )
         {
             String oid = globalRegistries.getOidRegistry().getOid( ( String ) oc.get( ii ) );
+            
             if ( objectClass2handlerMap.containsKey( oid ) )
             {
                 SchemaChangeHandler handler = objectClass2handlerMap.get( oid );
-                handler.move( oriChildName, newParentName, entry );
+                handler.replace( oriChildName, newParentName, entry );
                 updateSchemaModificationAttributes();
                 return;
             }
@@ -471,7 +472,7 @@
 
         if ( AttributeUtils.containsValue( oc, MetaSchemaConstants.META_SCHEMA_OC, objectClassAT ) )
         {
-            metaSchemaHandler.move( oriChildName, newParentName, entry );
+            metaSchemaHandler.replace( oriChildName, newParentName, entry );
             updateSchemaModificationAttributes();
             return;
         }

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -51,6 +51,7 @@
 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.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;
@@ -1340,16 +1341,18 @@
     }
 
 
-    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
+        LdapDN oriChildName = replaceContext.getDn();
+        
         Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
 
         if ( oriChildName.startsWith( schemaBaseDN ) )
         {
-            schemaManager.move( oriChildName, newParentName, entry );
+            schemaManager.replace( oriChildName, ((ReplaceServiceContext)replaceContext).getParent(), entry );
         }
         
-        next.move( oriChildName, newParentName );
+        next.replace( replaceContext );
     }
     
 

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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -35,6 +35,7 @@
 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.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;
@@ -842,8 +843,11 @@
     }
 
 
-    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
+        LdapDN oriChildName = replaceContext.getDn();
+        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        
         Attributes entry = nexus.lookup( new LookupServiceContext( oriChildName ) );
         Attribute objectClasses = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
@@ -861,7 +865,7 @@
 
             String newNormName = newName.toNormName();
             subentryCache.setSubentry( newNormName, ss, subentry.getTypes() );
-            next.move( oriChildName, newParentName );
+            next.replace( replaceContext );
 
             subentry = subentryCache.getSubentry( newNormName );
 
@@ -871,6 +875,7 @@
             controls.setReturningAttributes( new String[]
                 { "+", "*" } );
             NamingEnumeration subentries = nexus.search( baseDn, factoryCfg.getEnvironment(), filter, controls );
+            
             while ( subentries.hasMore() )
             {
                 SearchResult result = ( SearchResult ) subentries.next();
@@ -893,7 +898,8 @@
                 log.warn( msg );
                 throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN );
             }
-            next.move( oriChildName, newParentName );
+            
+            next.replace( replaceContext );
 
             // 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=527573&r1=527572&r2=527573
==============================================================================
--- 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 Wed Apr 11 09:43:37 2007
@@ -43,6 +43,7 @@
 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.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;
@@ -492,15 +493,18 @@
     }
     
     
-    public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
+    public void replace( NextInterceptor next, ServiceContext replaceContext ) throws NamingException
     {
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.move( oriChildName, newParentName );
+            next.replace( replaceContext );
             return;
         }
         
+        LdapDN oriChildName = replaceContext.getDn();
+        LdapDN newParentName = ((ReplaceServiceContext)replaceContext).getParent();
+        
         // Gather supplementary data.        
         Invocation invocation = InvocationStack.getInstance().peek();
         PartitionNexusProxy proxy = invocation.getProxy();
@@ -538,6 +542,7 @@
         SubentryService subentryService = ( SubentryService ) chain.get( "subentryService" );
         Attributes fakeImportedEntry = subentryService.getSubentryAttributes( newDN, importedEntry );
         NamingEnumeration attrList = importedEntry.getAll();
+        
         while ( attrList.hasMore() )
         {
             fakeImportedEntry.put( ( Attribute ) attrList.next() );
@@ -554,7 +559,7 @@
         // Gather a Map<ActionTime,TriggerSpecification> where TriggerSpecification.ldapOperation = LdapOperation.MODIFYDN_IMPORT.
         Map importTriggerMap = getActionTimeMappedTriggerSpecsForOperation( importTriggerSpecs, LdapOperation.MODIFYDN_IMPORT );
         
-        next.move( oriChildName, newParentName );
+        next.replace( replaceContext );
         triggerSpecCache.subentryRenamed( oldDN, newDN );
         
         // Fire AFTER Triggers.



Mime
View raw message