directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r952963 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger: ModifyDNStoredProcedureParameterInjector.java TriggerInterceptor.java
Date Wed, 09 Jun 2010 11:28:17 GMT
Author: elecharny
Date: Wed Jun  9 11:28:17 2010
New Revision: 952963

URL: http://svn.apache.org/viewvc?rev=952963&view=rev
Log:
Small improvements in TriggerInterceptor.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.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/trigger/ModifyDNStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java?rev=952963&r1=952962&r2=952963&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
Wed Jun  9 11:28:17 2010
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
 public class ModifyDNStoredProcedureParameterInjector extends AbstractStoredProcedureParameterInjector
 {
     private boolean deleteOldRn;
-    private DN oldRDN;
+    private RDN oldRDN;
     private RDN newRDN;
     private DN oldSuperiorDN;
     private DN newSuperiorDN;
@@ -41,16 +41,16 @@ public class ModifyDNStoredProcedurePara
 
 
     public ModifyDNStoredProcedureParameterInjector( OperationContext opContext, boolean
deleteOldRn,
-        DN oldRDN, RDN newRDN, DN oldSuperiorDN, DN newSuperiorDN, DN oldDN, DN newDN)
+        RDN oldRDN, RDN newRDN, DN oldSuperiorDN, DN newSuperiorDN, DN oldDN, DN newDN)
     {
         super( opContext );
         this.deleteOldRn = deleteOldRn;
-        this.oldRDN = oldRDN;
-        this.newRDN = newRDN;
-        this.oldSuperiorDN = oldSuperiorDN;
-        this.newSuperiorDN = newSuperiorDN;
-        this.oldDN = oldDN;
-        this.newDN = newDN;
+        this.oldRDN = (RDN)oldRDN.clone();
+        this.newRDN = (RDN)newRDN.clone();
+        this.oldSuperiorDN = (DN)oldSuperiorDN.clone();
+        this.newSuperiorDN = (DN)newSuperiorDN.clone();
+        this.oldDN = (DN)oldDN.clone();
+        this.newDN = (DN)newDN.clone();
         
         Map<Class<?>, MicroInjector> injectors = super.getInjectors();
         injectors.put( StoredProcedureParameter.ModifyDN_ENTRY.class, $entryInjector );

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=952963&r1=952962&r2=952963&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
Wed Jun  9 11:28:17 2010
@@ -376,11 +376,11 @@ public class TriggerInterceptor extends 
         Entry renamedEntry = renameContext.getEntry().getClonedEntry();
 
         // @TODO : To be completely reviewed !!!
-        DN oldRDN = new DN( name.getRdn().getName() );
+        RDN oldRDN = name.getRdn();
         DN oldSuperiorDN = ( DN ) name.clone();
         oldSuperiorDN.remove( oldSuperiorDN.size() - 1 );
-        DN newSuperiorDN = ( DN ) oldSuperiorDN.clone();
-        DN oldDN = ( DN ) name.clone();
+        DN newSuperiorDN = oldSuperiorDN;
+        DN oldDN = name;
         DN newDN = ( DN ) name.clone();
         newDN.add( newRdn );
 
@@ -421,11 +421,11 @@ public class TriggerInterceptor extends 
         // Gather supplementary data.        
         Entry movedEntry = opContext.lookup( oriChildName, ByPassConstants.LOOKUP_BYPASS
);
 
-        DN oldRDN = new DN( oriChildName.getRdn().getName() );
+        RDN oldRDN = oriChildName.getRdn();
         DN oldSuperiorDN = ( DN ) oriChildName.clone();
         oldSuperiorDN.remove( oldSuperiorDN.size() - 1 );
-        DN newSuperiorDN = ( DN ) parent.clone();
-        DN oldDN = ( DN ) oriChildName.clone();
+        DN newSuperiorDN = parent;
+        DN oldDN = oriChildName;
         DN newDN = ( DN ) parent.clone();
         newDN.add( newRdn.getName() );
 
@@ -495,12 +495,12 @@ public class TriggerInterceptor extends 
         // Gather supplementary data.        
         Entry movedEntry = opContext.getEntry();
 
-        DN oldRDN = new DN( oriChildName.getRdn().getName() );
-        RDN newRDN = new RDN( oriChildName.getRdn().getName() );
+        RDN oldRDN = oriChildName.getRdn();
+        RDN newRDN = oriChildName.getRdn();
         DN oldSuperiorDN = ( DN ) oriChildName.clone();
         oldSuperiorDN.remove( oldSuperiorDN.size() - 1 );
-        DN newSuperiorDN = ( DN ) newParentName.clone();
-        DN oldDN = ( DN ) oriChildName.clone();
+        DN newSuperiorDN = newParentName;
+        DN oldDN = oriChildName;
         DN newDN = ( DN ) newParentName.clone();
         newDN.add( newRDN.getName() );
 



Mime
View raw message