directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r528444 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context: ModifyDNServiceContext.java MoveAndRenameServiceContext.java MoveServiceContext.java RenameServiceContext.java
Date Fri, 13 Apr 2007 11:55:55 GMT
Author: elecharny
Date: Fri Apr 13 04:55:54 2007
New Revision: 528444

URL: http://svn.apache.org/viewvc?view=rev&rev=528444
Log:
Changed the ModifyDnService to use 3 different contexts instead : move, rename and moveAndRename

Added:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameServiceContext.java
      - copied, changed from r528057, directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameServiceContext.java
      - copied, changed from r528057, directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyDNServiceContext.java
Removed:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyDNServiceContext.java
Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java

Copied: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameServiceContext.java
(from r528057, directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameServiceContext.java?view=diff&rev=528444&p1=directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java&r1=528057&p2=directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameServiceContext.java&r2=528444
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameServiceContext.java
Fri Apr 13 04:55:54 2007
@@ -22,35 +22,35 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 /**
- * A Move context used for Interceptors. It contains all the informations
+ * A Move And Rename context used for Interceptors. It contains all the informations
  * needed for the modify DN operation, and used by all the interceptors
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class MoveServiceContext extends ModifyDNServiceContext
+public class MoveAndRenameServiceContext extends RenameServiceContext
 {
     /** The parent DN */
     private LdapDN parent;
     
     /**
      * 
-     * Creates a new instance of MoveServiceContext.
+     * Creates a new instance of MoveAndRenameServiceContext.
      *
      */
-    public MoveServiceContext()
+    public MoveAndRenameServiceContext()
     {
     	super();
     }
 
     /**
      * 
-     * Creates a new instance of MoveServiceContext.
+     * Creates a new instance of MoveAndRenameServiceContext.
      *
      */
-    public MoveServiceContext( LdapDN oldDn, LdapDN parent, String newDn, boolean delOldDn
)
+    public MoveAndRenameServiceContext( LdapDN oldDn, LdapDN parent, String newRdn, boolean
delOldDn )
     {
-        super( oldDn, newDn, delOldDn );
+        super( oldDn, newRdn, delOldDn );
         this.parent = parent;
     }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java?view=diff&rev=528444&r1=528443&r2=528444
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/MoveServiceContext.java
Fri Apr 13 04:55:54 2007
@@ -28,7 +28,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class MoveServiceContext extends ModifyDNServiceContext
+public class MoveServiceContext extends AbstractServiceContext
 {
     /** The parent DN */
     private LdapDN parent;
@@ -48,9 +48,9 @@
      * Creates a new instance of MoveServiceContext.
      *
      */
-    public MoveServiceContext( LdapDN oldDn, LdapDN parent, String newDn, boolean delOldDn
)
+    public MoveServiceContext( LdapDN oldDn, LdapDN parent )
     {
-        super( oldDn, newDn, delOldDn );
+        super( oldDn );
         this.parent = parent;
     }
 

Copied: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameServiceContext.java
(from r528057, directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyDNServiceContext.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameServiceContext.java?view=diff&rev=528444&p1=directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyDNServiceContext.java&r1=528057&p2=directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameServiceContext.java&r2=528444
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyDNServiceContext.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/interceptor/context/RenameServiceContext.java
Fri Apr 13 04:55:54 2007
@@ -22,39 +22,41 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 /**
- * A ModifyDN context used for Interceptors. It contains all the informations
+ * A RenameService context used for Interceptors. It contains all the informations
  * needed for the modify DN operation, and used by all the interceptors
+ * 
+ * This is used whne the modifyDN is about changing the RDN, not the base DN.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModifyDNServiceContext extends AbstractServiceContext
+public class RenameServiceContext extends AbstractServiceContext
 {
     /** The new DN */
-    private String newDn;
+    private String newRdn;
 
     /** The flag to remove the old DN Attribute  */
     private boolean delOldDn;
     
     /**
      * 
-     * Creates a new instance of ModifyDNServiceContext.
+     * Creates a new instance of RenameServiceContext.
      *
      */
-    public ModifyDNServiceContext()
+    public RenameServiceContext()
     {
     	super();
     }
 
     /**
      * 
-     * Creates a new instance of ModifyDNServiceContext.
+     * Creates a new instance of RenameServiceContext.
      *
      */
-    public ModifyDNServiceContext( LdapDN oldDn, String newDn, boolean delOldDn )
+    public RenameServiceContext( LdapDN oldDn, String newRdn, boolean delOldDn )
     {
         super( oldDn );
-        this.newDn = newDn;
+        this.newRdn = newRdn;
         this.delOldDn = delOldDn;
     }
 
@@ -76,20 +78,20 @@
 	}
 
 	/**
-	 * @return The new DN
+	 * @return The new RDN
 	 */
-	public String getNewDn() 
+	public String getNewRdn() 
 	{
-		return newDn;
+		return newRdn;
 	}
 
 	/**
-	 * Set the new DN
-	 * @param newDn The new Dn
+	 * Set the new RDN
+	 * @param newDn The new RDN
 	 */
-	public void setNewDn( String newDn ) 
+	public void setNewRdn( String newRdn ) 
 	{
-		this.newDn = newDn;
+		this.newRdn = newRdn;
 	}
 
 	/**
@@ -97,8 +99,8 @@
      */
     public String toString()
     {
-        return "ModifyDNContext for old DN '" + getDn().getUpName() + "'" +
-        ", newDn '" + newDn + "'" +
+        return "RenameContext for old DN '" + getDn().getUpName() + "'" +
+        ", new RDN '" + newRdn + "'" +
         ( delOldDn ? ", delete old Dn" : "" ) ; 
     }
 }



Mime
View raw message