directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r954508 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core: ./ authn/ authz/ changelog/ event/ exception/ journal/ logger/ normalization/ operational/ partition/ referral/ subtree/ trigger/
Date Mon, 14 Jun 2010 15:05:59 GMT
Author: elecharny
Date: Mon Jun 14 15:05:58 2010
New Revision: 954508

URL: http://svn.apache.org/viewvc?rev=954508&view=rev
Log:
Renamed the opContext param to moveAndRenameContext for the MoveAndRename operation

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.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/referral/ReferralInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
Mon Jun 14 15:05:58 2010
@@ -749,18 +749,18 @@ public class DefaultOperationManager imp
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( MoveAndRenameOperationContext opContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws
LdapException
     {
-        LOG.debug( ">> MoveAndRenameOperation : {}", opContext );
-        LOG_CHANGES.debug( ">> MoveAndRenameOperation : {}", opContext );
+        LOG.debug( ">> MoveAndRenameOperation : {}", moveAndRenameContext );
+        LOG_CHANGES.debug( ">> MoveAndRenameOperation : {}", moveAndRenameContext );
 
         ensureStarted();
-        push( opContext );
+        push( moveAndRenameContext );
 
         try
         {
             // Normalize the opContext DN
-            DN dn = opContext.getDn();
+            DN dn = moveAndRenameContext.getDn();
             dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
@@ -778,7 +778,7 @@ public class DefaultOperationManager imp
                 {
                     // This is a referral. We can delete it if the ManageDsaIt flag is true
                     // Otherwise, we just throw a LdapReferralException
-                    if ( !opContext.isReferralIgnored() )
+                    if ( !moveAndRenameContext.isReferralIgnored() )
                     {
                         // Throw a Referral Exception
                         // Unlock the referral manager
@@ -794,7 +794,7 @@ public class DefaultOperationManager imp
 
                     // Depending on the Context.REFERRAL property value, we will throw
                     // a different exception.
-                    if ( opContext.isReferralIgnored() )
+                    if ( moveAndRenameContext.isReferralIgnored() )
                     {
                         directoryService.getReferralManager().unlock();
 
@@ -814,7 +814,7 @@ public class DefaultOperationManager imp
 
             // Now, check the destination
             // Normalize the opContext DN
-            DN newSuperiorDn = opContext.getNewSuperior();
+            DN newSuperiorDn = moveAndRenameContext.getNewSuperior();
             newSuperiorDn.normalize( directoryService.getSchemaManager().getNormalizerMapping()
);
 
             // If he parent DN is a referral, or has a referral ancestor, we have to issue
a AffectMultipleDsas result
@@ -838,7 +838,7 @@ public class DefaultOperationManager imp
 
             // Call the Add method
             InterceptorChain interceptorChain = directoryService.getInterceptorChain();
-            interceptorChain.moveAndRename( opContext );
+            interceptorChain.moveAndRename( moveAndRenameContext );
         }
         finally
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -328,17 +328,17 @@ public class AuthenticationInterceptor e
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
)
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext
)
             throws LdapException
     {
         if ( IS_DEBUG )
         {
-            LOG.debug( "Operation Context: {}", opContext );
+            LOG.debug( "Operation Context: {}", moveAndRenameContext );
         }
 
-        checkAuthenticated( opContext );
-        next.moveAndRename( opContext );
-        invalidateAuthenticatorCaches( opContext.getDn() );
+        checkAuthenticated( moveAndRenameContext );
+        next.moveAndRename( moveAndRenameContext );
+        invalidateAuthenticatorCaches( moveAndRenameContext.getDn() );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -333,15 +333,15 @@ public class DefaultAuthorizationInterce
     }
 
 
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
opContext )
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
moveAndRenameContext )
         throws LdapException
     {
-        if ( !opContext.getSession().getDirectoryService().isAccessControlEnabled() )
+        if ( !moveAndRenameContext.getSession().getDirectoryService().isAccessControlEnabled()
)
         {
-            protectDnAlterations( opContext.getDn() );
+            protectDnAlterations( moveAndRenameContext.getDn() );
         }
 
-        nextInterceptor.moveAndRename( opContext );
+        nextInterceptor.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -322,42 +322,42 @@ public class ChangeLogInterceptor extend
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opCtx
)
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext
)
         throws LdapException
     {
         Entry serverEntry = null;
         
-        if ( changeLog.isEnabled() && opCtx.isFirstOperation() )
+        if ( changeLog.isEnabled() && moveAndRenameContext.isFirstOperation() )
         {
             // @todo make sure we're not putting in operational attributes that cannot be
user modified
-            serverEntry = opCtx.lookup( opCtx.getDn(), ByPassConstants.LOOKUP_BYPASS );
+            serverEntry = moveAndRenameContext.lookup( moveAndRenameContext.getDn(), ByPassConstants.LOOKUP_BYPASS
);
         }
 
-        next.moveAndRename( opCtx );
+        next.moveAndRename( moveAndRenameContext );
 
-        if ( ! changeLog.isEnabled() || ! opCtx.isFirstOperation() )
+        if ( ! changeLog.isEnabled() || ! moveAndRenameContext.isFirstOperation() )
         {
             return;
         }
 
         LdifEntry forward = new LdifEntry();
         forward.setChangeType( ChangeType.ModDn );
-        forward.setDn( opCtx.getDn() );
-        forward.setDeleteOldRdn( opCtx.getDelOldDn() );
-        forward.setNewRdn( opCtx.getNewRdn().getName() );
-        forward.setNewSuperior( opCtx.getNewSuperior().getName() );
+        forward.setDn( moveAndRenameContext.getDn() );
+        forward.setDeleteOldRdn( moveAndRenameContext.getDelOldDn() );
+        forward.setNewRdn( moveAndRenameContext.getNewRdn().getName() );
+        forward.setNewSuperior( moveAndRenameContext.getNewSuperior().getName() );
         
         List<LdifEntry> reverses = LdifRevertor.reverseMoveAndRename(  
-            serverEntry, opCtx.getNewSuperior(), new RDN( opCtx.getNewRdn() ), false );
+            serverEntry, moveAndRenameContext.getNewSuperior(), new RDN( moveAndRenameContext.getNewRdn()
), false );
         
-        if ( opCtx.isReferralIgnored() )
+        if ( moveAndRenameContext.isReferralIgnored() )
         {
             forward.addControl( new ManageDsaITControl() );
             LdifEntry reversedEntry = reverses.get( 0 );
             reversedEntry.addControl( new ManageDsaITControl() );
         }
         
-        opCtx.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverses ) );
+        moveAndRenameContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverses
) );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -236,18 +236,18 @@ public class EventInterceptor extends Ba
     }
 
 
-    public void moveAndRename( NextInterceptor next, final MoveAndRenameOperationContext
opContext ) throws LdapException
+    public void moveAndRename( NextInterceptor next, final MoveAndRenameOperationContext
moveAndRenameContext ) throws LdapException
     {
-        Entry oriEntry = opContext.lookup( opContext.getDn(), ByPassConstants.LOOKUP_BYPASS
);
-        List<RegistrationEntry> selecting = getSelectingRegistrations( opContext.getDn(),
oriEntry );
-        next.moveAndRename( opContext );
+        Entry oriEntry = moveAndRenameContext.lookup( moveAndRenameContext.getDn(), ByPassConstants.LOOKUP_BYPASS
);
+        List<RegistrationEntry> selecting = getSelectingRegistrations( moveAndRenameContext.getDn(),
oriEntry );
+        next.moveAndRename( moveAndRenameContext );
 
         if ( selecting.isEmpty() )
         {
             return;
         }
 
-        opContext.setAlteredEntry( ( ClonedServerEntry ) opContext.lookup( opContext.getNewDn(),
+        moveAndRenameContext.setAlteredEntry( ( ClonedServerEntry ) moveAndRenameContext.lookup(
moveAndRenameContext.getNewDn(),
             ByPassConstants.LOOKUP_BYPASS ) );
 
         for ( final RegistrationEntry registration : selecting )
@@ -258,7 +258,7 @@ public class EventInterceptor extends Ba
                 {
                     public void run()
                     {
-                        registration.getListener().entryMovedAndRenamed( opContext );
+                        registration.getListener().entryMovedAndRenamed( moveAndRenameContext
);
                     }
                 } );
             }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -407,11 +407,11 @@ public class ExceptionInterceptor extend
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws
the appropriate
      * LdapException.
      */
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
opContext )
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
moveAndRenameContext )
         throws LdapException
     {
-        DN oriChildName = opContext.getDn();
-        DN parent = opContext.getNewSuperior();
+        DN oriChildName = moveAndRenameContext.getDn();
+        DN parent = moveAndRenameContext.getNewSuperior();
 
         if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName()
) )
         {
@@ -421,21 +421,21 @@ public class ExceptionInterceptor extend
 
         // check if child to move exists
         String msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( opContext, msg, oriChildName );
+        assertHasEntry( moveAndRenameContext, msg, oriChildName );
 
         // check if parent to move to exists
         msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( opContext, msg, parent );
+        assertHasEntry( moveAndRenameContext, msg, parent );
 
         // check to see if target entry exists
         DN target = ( DN ) parent.clone();
-        target.add( opContext.getNewRdn() );
+        target.add( moveAndRenameContext.getNewRdn() );
 
-        if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(),
target ) ) )
+        if ( nextInterceptor.hasEntry( new EntryOperationContext( moveAndRenameContext.getSession(),
target ) ) )
         {
             // we must calculate the resolved name using the user provided Rdn value
             DN upTarget = ( DN ) parent.clone();
-            upTarget.add( opContext.getNewRdn() );
+            upTarget.add( moveAndRenameContext.getNewRdn() );
 
             LdapEntryAlreadyExistsException e;
             e = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_257, upTarget.getName()
) );
@@ -452,7 +452,7 @@ public class ExceptionInterceptor extend
             }
         }
 
-        nextInterceptor.moveAndRename( opContext );
+        nextInterceptor.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -283,7 +283,7 @@ public class JournalInterceptor extends 
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
)
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext
)
         throws LdapException
     {
         long opRevision = 0;
@@ -295,17 +295,17 @@ public class JournalInterceptor extends 
             // Store the renamed entry
             LdifEntry ldif = new LdifEntry();
             ldif.setChangeType( ChangeType.ModDn );
-            ldif.setDn( opContext.getDn() );
-            ldif.setNewRdn( opContext.getNewRdn().getNormName() );
-            ldif.setDeleteOldRdn( opContext.getDelOldDn() );
-            ldif.setNewSuperior( opContext.getNewDn().getNormName() );
+            ldif.setDn( moveAndRenameContext.getDn() );
+            ldif.setNewRdn( moveAndRenameContext.getNewRdn().getNormName() );
+            ldif.setDeleteOldRdn( moveAndRenameContext.getDelOldDn() );
+            ldif.setNewSuperior( moveAndRenameContext.getNewDn().getNormName() );
             
             journal.log( getPrincipal(), opRevision, ldif );
         }
         
         try
         {
-            next.moveAndRename( opContext );
+            next.moveAndRename( moveAndRenameContext );
             
             if ( journalEnabled )
             {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -459,10 +459,10 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
) throws LdapException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext
) throws LdapException
     {
         long t0 = System.nanoTime();
-        next.moveAndRename( opContext );
+        next.moveAndRename( moveAndRenameContext );
         long delta = System.nanoTime() - t0;
         
         if ( IS_DEBUG_STATS )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -210,25 +210,25 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
opContext )
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
moveAndRenameContext )
         throws LdapException
     {
         DN rdn = new DN();
-        rdn.add( opContext.getNewRdn() );
+        rdn.add( moveAndRenameContext.getNewRdn() );
         rdn.normalize( schemaManager.getNormalizerMapping() );
-        opContext.setNewRdn( rdn.getRdn() );
+        moveAndRenameContext.setNewRdn( rdn.getRdn() );
 
-        if ( !opContext.getDn().isNormalized() )
+        if ( !moveAndRenameContext.getDn().isNormalized() )
         {
-            opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
+            moveAndRenameContext.getDn().normalize( schemaManager.getNormalizerMapping()
);
         }
         
-        if ( !opContext.getNewSuperior().isNormalized() )
+        if ( !moveAndRenameContext.getNewSuperior().isNormalized() )
         {
-            opContext.getNewSuperior().normalize( schemaManager.getNormalizerMapping() );
+            moveAndRenameContext.getNewSuperior().normalize( schemaManager.getNormalizerMapping()
);
         }
         
-        nextInterceptor.moveAndRename( opContext );
+        nextInterceptor.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -342,20 +342,20 @@ public class OperationalAttributeInterce
     }
 
 
-    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
opContext )
+    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext
moveAndRenameContext )
         throws LdapException
     {
-        nextInterceptor.moveAndRename( opContext );
+        nextInterceptor.moveAndRename( moveAndRenameContext );
 
         // add operational attributes after call in case the operation fails
-        Entry serverEntry = new DefaultEntry( schemaManager, opContext.getDn() );
+        Entry serverEntry = new DefaultEntry( schemaManager, moveAndRenameContext.getDn()
);
         serverEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal().getName() );
         serverEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime()
);
 
         List<Modification> items = ModifyOperationContext.createModItems( serverEntry,
             ModificationOperation.REPLACE_ATTRIBUTE );
 
-        ModifyOperationContext newModify = new ModifyOperationContext( opContext.getSession(),
opContext.getNewSuperior(),
+        ModifyOperationContext newModify = new ModifyOperationContext( moveAndRenameContext.getSession(),
moveAndRenameContext.getNewSuperior(),
             items );
 
         service.getPartitionNexus().modify( newModify );

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?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- 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
Mon Jun 14 15:05:58 2010
@@ -700,10 +700,10 @@ public class DefaultPartitionNexus exten
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.partition.PartitionNexus#moveAndRename(org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext)
      */
-    public void moveAndRename( MoveAndRenameOperationContext opContext ) throws LdapException
+    public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws
LdapException
     {
-        Partition backend = getPartition( opContext.getDn() );
-        backend.moveAndRename( opContext );
+        Partition backend = getPartition( moveAndRenameContext.getDn() );
+        backend.moveAndRename( moveAndRenameContext );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -314,27 +314,27 @@ public class ReferralInterceptor extends
     /**
      * {@inheritDoc}
      **/
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
) throws LdapException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext
) throws LdapException
     {
-        DN newName = ( DN ) opContext.getNewSuperior().clone();
-        newName.add( opContext.getNewRdn() );
+        DN newName = ( DN ) moveAndRenameContext.getNewSuperior().clone();
+        newName.add( moveAndRenameContext.getNewRdn() );
 
         // Check if the entry is a referral itself
-        boolean isReferral = isReferral( opContext.getEntry() );
+        boolean isReferral = isReferral( moveAndRenameContext.getEntry() );
 
-        next.moveAndRename( opContext );
+        next.moveAndRename( moveAndRenameContext );
 
         if ( isReferral )
         {
             // Update the referralManager
-            LookupOperationContext lookupContext = new LookupOperationContext( opContext.getSession(),
newName );
+            LookupOperationContext lookupContext = new LookupOperationContext( moveAndRenameContext.getSession(),
newName );
 
             Entry newEntry = nexus.lookup( lookupContext );
 
             referralManager.lockWrite();
 
             referralManager.addReferral( newEntry );
-            referralManager.removeReferral( opContext.getEntry() );
+            referralManager.removeReferral( moveAndRenameContext.getEntry() );
 
             referralManager.unlock();
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -872,12 +872,12 @@ public class SubentryInterceptor extends
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
) throws LdapException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext
) throws LdapException
     {
-        DN oriChildName = opContext.getDn();
-        DN parent = opContext.getNewSuperior();
+        DN oriChildName = moveAndRenameContext.getDn();
+        DN parent = moveAndRenameContext.getNewSuperior();
 
-        Entry entry = opContext.lookup( oriChildName, ByPassConstants.LOOKUP_BYPASS );
+        Entry entry = moveAndRenameContext.lookup( oriChildName, ByPassConstants.LOOKUP_BYPASS
);
 
         EntryAttribute objectClasses = entry.get( objectClassType );
 
@@ -892,11 +892,11 @@ public class SubentryInterceptor extends
             DN newName = ( DN ) parent.clone();
             newName.remove( newName.size() - 1 );
 
-            newName.add( opContext.getNewRdn() );
+            newName.add( moveAndRenameContext.getNewRdn() );
 
             String newNormName = newName.getNormName();
             subentryCache.setSubentry( newNormName, ss, subentry.getTypes() );
-            next.moveAndRename( opContext );
+            next.moveAndRename( moveAndRenameContext );
 
             subentry = subentryCache.getSubentry( newNormName );
 
@@ -907,7 +907,7 @@ public class SubentryInterceptor extends
             controls.setReturningAttributes( new String[]
                 { SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES, SchemaConstants.ALL_USER_ATTRIBUTES
} );
 
-            SearchOperationContext searchOperationContext = new SearchOperationContext( opContext.getSession(),
baseDn,
+            SearchOperationContext searchOperationContext = new SearchOperationContext( moveAndRenameContext.getSession(),
baseDn,
                 filter, controls );
             searchOperationContext.setAliasDerefMode( AliasDerefMode.NEVER_DEREF_ALIASES
);
 
@@ -923,7 +923,7 @@ public class SubentryInterceptor extends
     
                     if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                     {
-                        nexus.modify( new ModifyOperationContext( opContext.getSession(),
dn, getOperationalModsForReplace(
+                        nexus.modify( new ModifyOperationContext( moveAndRenameContext.getSession(),
dn, getOperationalModsForReplace(
                             oriChildName, newName, subentry, candidate ) ) );
                     }
                 }
@@ -937,25 +937,25 @@ public class SubentryInterceptor extends
         }
         else
         {
-            if ( hasAdministrativeDescendant( opContext, oriChildName ) )
+            if ( hasAdministrativeDescendant( moveAndRenameContext, oriChildName ) )
             {
                 String msg = I18n.err( I18n.ERR_308 );
                 LOG.warn( msg );
                 throw new LdapSchemaViolationException( ResultCodeEnum.NOT_ALLOWED_ON_RDN,
msg );
             }
 
-            next.moveAndRename( opContext );
+            next.moveAndRename( moveAndRenameContext );
 
             // calculate the new DN now for use below to modify subentry operational
             // attributes contained within this regular entry with name changes
             DN newName = ( DN ) parent.clone();
-            newName.add( opContext.getNewRdn() );
+            newName.add( moveAndRenameContext.getNewRdn() );
             newName.normalize( schemaManager.getNormalizerMapping() );
             List<Modification> mods = getModsOnEntryRdnChange( oriChildName, newName,
entry );
 
             if ( mods.size() > 0 )
             {
-                nexus.modify( new ModifyOperationContext( opContext.getSession(), newName,
mods ) );
+                nexus.modify( new ModifyOperationContext( moveAndRenameContext.getSession(),
newName, mods ) );
             }
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java?rev=954508&r1=954507&r2=954508&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
Mon Jun 14 15:05:58 2010
@@ -404,22 +404,22 @@ public class TriggerInterceptor extends 
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
) throws LdapException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext
) throws LdapException
     {
-        DN oriChildName = opContext.getDn();
-        DN parent = opContext.getNewSuperior();
-        RDN newRdn = opContext.getNewRdn();
-        boolean deleteOldRn = opContext.getDelOldDn();
+        DN oriChildName = moveAndRenameContext.getDn();
+        DN parent = moveAndRenameContext.getNewSuperior();
+        RDN newRdn = moveAndRenameContext.getNewRdn();
+        boolean deleteOldRn = moveAndRenameContext.getDelOldDn();
 
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.moveAndRename( opContext );
+            next.moveAndRename( moveAndRenameContext );
             return;
         }
 
         // Gather supplementary data.        
-        Entry movedEntry = opContext.lookup( oriChildName, ByPassConstants.LOOKUP_BYPASS
);
+        Entry movedEntry = moveAndRenameContext.lookup( oriChildName, ByPassConstants.LOOKUP_BYPASS
);
 
         RDN oldRDN = oriChildName.getRdn();
         DN oldSuperiorDN = ( DN ) oriChildName.clone();
@@ -429,12 +429,12 @@ public class TriggerInterceptor extends 
         DN newDN = ( DN ) parent.clone();
         newDN.add( newRdn.getName() );
 
-        StoredProcedureParameterInjector injector = new ModifyDNStoredProcedureParameterInjector(
opContext,
+        StoredProcedureParameterInjector injector = new ModifyDNStoredProcedureParameterInjector(
moveAndRenameContext,
             deleteOldRn, oldRDN, newRdn, oldSuperiorDN, newSuperiorDN, oldDN, newDN );
 
         // Gather Trigger Specifications which apply to the entry being exported.
         List<TriggerSpecification> exportTriggerSpecs = new ArrayList<TriggerSpecification>();
-        addPrescriptiveTriggerSpecs( opContext, exportTriggerSpecs, oriChildName, movedEntry
);
+        addPrescriptiveTriggerSpecs( moveAndRenameContext, exportTriggerSpecs, oriChildName,
movedEntry );
         addEntryTriggerSpecs( exportTriggerSpecs, movedEntry );
 
         // Get the entry again without operational attributes
@@ -442,7 +442,7 @@ public class TriggerInterceptor extends 
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        Entry importedEntry = opContext.lookup( oriChildName, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS
);
+        Entry importedEntry = moveAndRenameContext.lookup( oriChildName, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS
);
 
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,
@@ -461,7 +461,7 @@ public class TriggerInterceptor extends 
         // Gather Trigger Specifications which apply to the entry being imported.
         // Note: Entry Trigger Specifications are not valid for Import.
         List<TriggerSpecification> importTriggerSpecs = new ArrayList<TriggerSpecification>();
-        addPrescriptiveTriggerSpecs( opContext, importTriggerSpecs, newDN, fakeImportedEntry
);
+        addPrescriptiveTriggerSpecs( moveAndRenameContext, importTriggerSpecs, newDN, fakeImportedEntry
);
 
         Map<ActionTime, List<TriggerSpecification>> exportTriggerMap = getActionTimeMappedTriggerSpecsForOperation(
             exportTriggerSpecs, LdapOperation.MODIFYDN_EXPORT );
@@ -469,14 +469,14 @@ public class TriggerInterceptor extends 
         Map<ActionTime, List<TriggerSpecification>> importTriggerMap = getActionTimeMappedTriggerSpecsForOperation(
             importTriggerSpecs, LdapOperation.MODIFYDN_IMPORT );
 
-        next.moveAndRename( opContext );
+        next.moveAndRename( moveAndRenameContext );
         triggerSpecCache.subentryRenamed( oldDN, newDN );
 
         // Fire AFTER Triggers.
         List<TriggerSpecification> afterExportTriggerSpecs = exportTriggerMap.get(
ActionTime.AFTER );
         List<TriggerSpecification> afterImportTriggerSpecs = importTriggerMap.get(
ActionTime.AFTER );
-        executeTriggers( opContext, afterExportTriggerSpecs, injector );
-        executeTriggers( opContext, afterImportTriggerSpecs, injector );
+        executeTriggers( moveAndRenameContext, afterExportTriggerSpecs, injector );
+        executeTriggers( moveAndRenameContext, afterImportTriggerSpecs, injector );
     }
 
 



Mime
View raw message