directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r964488 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
Date Thu, 15 Jul 2010 16:45:34 GMT
Author: elecharny
Date: Thu Jul 15 16:45:34 2010
New Revision: 964488

URL: http://svn.apache.org/viewvc?rev=964488&view=rev
Log:
Some more cleanup in the subentry interceptor (mainly using AT instead of Strings for lookups
in entries)

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java

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=964488&r1=964487&r2=964488&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
Thu Jul 15 16:45:34 2010
@@ -809,9 +809,7 @@ public class SubentryInterceptor extends
 
         Entry entry = renameContext.getEntry().getClonedEntry();
 
-        EntryAttribute objectClasses = entry.get( OBJECT_CLASS_AT );
-
-        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
+        if ( entry.contains( OBJECT_CLASS_AT, SchemaConstants.SUBENTRY_OC ) )
         {
             // @Todo To be reviewed !!!
             Subentry subentry = subentryCache.removeSubentry( oldDn );
@@ -894,9 +892,7 @@ public class SubentryInterceptor extends
 
         Entry entry = moveAndRenameContext.getOriginalEntry();
 
-        EntryAttribute objectClasses = entry.get( OBJECT_CLASS_AT );
-
-        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
+        if ( entry.contains( OBJECT_CLASS_AT, SchemaConstants.SUBENTRY_OC ) )
         {
             Subentry subentry = subentryCache.removeSubentry( oldDn );
             SubtreeSpecification ss = subentry.getSubtreeSpecification();
@@ -909,6 +905,7 @@ public class SubentryInterceptor extends
             newName.normalize( schemaManager.getNormalizerMapping() );
 
             subentryCache.addSubentry( newName, subentry );
+            
             next.moveAndRename( moveAndRenameContext );
 
             subentry = subentryCache.getSubentry( newName );
@@ -981,9 +978,7 @@ public class SubentryInterceptor extends
 
         Entry entry = moveContext.getOriginalEntry();
 
-        EntryAttribute objectClasses = entry.get( OBJECT_CLASS_AT );
-
-        if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
+        if ( entry.contains( OBJECT_CLASS_AT, SchemaConstants.SUBENTRY_OC ) )
         {
             Subentry subentry = subentryCache.removeSubentry( oldDn );
             SubtreeSpecification ss = subentry.getSubtreeSpecification();
@@ -995,6 +990,7 @@ public class SubentryInterceptor extends
             newName.normalize( schemaManager.getNormalizerMapping() );
 
             subentryCache.addSubentry( newName, subentry );
+            
             next.move( moveContext );
 
             subentry = subentryCache.getSubentry( newName );
@@ -1013,6 +1009,7 @@ public class SubentryInterceptor extends
 
             try
             {
+                // Modify all the entries under this subentry
                 while ( subentries.next() )
                 {
                     Entry candidate = subentries.get();



Mime
View raw message