directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r413437 - in /directory/branches/apacheds/optimization: core-unit/src/test/java/org/apache/directory/server/core/subtree/ core/src/main/java/org/apache/directory/server/core/authz/ core/src/main/java/org/apache/directory/server/core/subtree/
Date Sun, 11 Jun 2006 12:03:28 GMT
Author: akarasulu
Date: Sun Jun 11 05:03:28 2006
New Revision: 413437

URL: http://svn.apache.org/viewvc?rev=413437&view=rev
Log:
checkpointing partial work on authz normalization fixes

Modified:
    directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceTest.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java

Modified: directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceTest.java?rev=413437&r1=413436&r2=413437&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceTest.java (original)
+++ directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceTest.java Sun Jun 11 05:03:28 2006
@@ -123,7 +123,7 @@
         Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
         Attribute autonomousSubentry = marked.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=marked,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -158,25 +158,25 @@
         Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         Attribute autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
         autonomousSubentry = services.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -215,25 +215,25 @@
         Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         Attribute autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
         autonomousSubentry = services.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -274,19 +274,19 @@
         configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -331,25 +331,25 @@
         Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         Attribute autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
         autonomousSubentry = services.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -389,19 +389,19 @@
         configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -504,25 +504,25 @@
         Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         Attribute autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=newname,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=newname,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=newname,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=newname,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=newname,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=newname,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
         autonomousSubentry = services.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=newname,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=newname,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -563,31 +563,31 @@
         Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         Attribute autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
         autonomousSubentry = services.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
         autonomousSubentry = marked.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -638,7 +638,7 @@
         assertNotNull( marked );
         autonomousSubentry = marked.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
     }
 
@@ -658,31 +658,31 @@
         Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         Attribute autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
         autonomousSubentry = services.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
         autonomousSubentry = marked.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -733,7 +733,7 @@
         assertNotNull( marked );
         autonomousSubentry = marked.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
     }
 
@@ -753,31 +753,31 @@
         Attributes configuration = ( Attributes ) results.get( "ou=configuration,ou=system" );
         Attribute autonomousSubentry = configuration.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes interceptors = ( Attributes ) results.get( "ou=interceptors,ou=configuration,ou=system" );
         autonomousSubentry = interceptors.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=interceptors,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes partitions = ( Attributes ) results.get( "ou=partitions,ou=configuration,ou=system" );
         autonomousSubentry = partitions.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=partitions,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes services = ( Attributes ) results.get( "ou=services,ou=configuration,ou=system" );
         autonomousSubentry = services.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "ou=services,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         Attributes marked = ( Attributes ) results.get( "cn=marked,ou=configuration,ou=system" );
         autonomousSubentry = marked.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "cn=marked,ou=configuration,ou=system should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
 
         // --------------------------------------------------------------------
@@ -820,7 +820,7 @@
         assertNotNull( marked );
         autonomousSubentry = marked.get( SubentryService.AUTONOUMOUS_AREA_SUBENTRY );
         assertNotNull( "cn=marked,ou=services,ou=configuration should be marked", autonomousSubentry );
-        assertEquals( "cn=testsubentry,ou=system", autonomousSubentry.get() );
+        assertEquals( "2.5.4.3=testsubentry,2.5.4.11=system", autonomousSubentry.get() );
         assertEquals( 1, autonomousSubentry.size() );
     }
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?rev=413437&r1=413436&r2=413437&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Sun Jun 11 05:03:28 2006
@@ -18,6 +18,7 @@
 
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
+import org.apache.directory.server.core.ServerUtils;
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.authz.support.ACDFEngine;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
@@ -43,6 +44,8 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -141,7 +144,14 @@
     /** the system wide subschemaSubentryDn */
     private String subschemaSubentryDn;
 
+    private AttributeType objectClassType;
+    private AttributeType acSubentryType;
+    
+    private String objectClassOid;
+    private String subentryOid;
+    private String acSubentryOid;
 
+    
     /**
      * Initializes this interceptor based service by getting a handle on the nexus, setting up
      * the tupe and group membership caches and the ACIItem parser and the ACDF engine.
@@ -157,6 +167,14 @@
         groupCache = new GroupCache( factoryCfg );
         attrRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
         OidRegistry oidRegistry = factoryCfg.getGlobalRegistries().getOidRegistry();
+        
+        // look up some constant information
+        objectClassOid = oidRegistry.getOid( "objectClass" );
+        subentryOid = oidRegistry.getOid( "subentry" );
+        acSubentryOid = oidRegistry.getOid( AC_SUBENTRY_ATTR );
+        objectClassType = attrRegistry.lookup( objectClassOid );
+        acSubentryType = attrRegistry.lookup( acSubentryOid );
+        
         aciParser = new ACIItemParser( new ConcreteNameComponentNormalizer( attrRegistry, oidRegistry ) );
         engine = new ACDFEngine( factoryCfg.getGlobalRegistries().getOidRegistry(), attrRegistry );
         chain = factoryCfg.getInterceptorChain();
@@ -193,6 +211,8 @@
     private void addPerscriptiveAciTuples( DirectoryPartitionNexusProxy proxy, Collection tuples, LdapDN dn,
         Attributes entry ) throws NamingException
     {
+        Attribute oc = ServerUtils.getAttribute( objectClassType, entry );
+        
         /*
          * If the protected entry is a subentry, then the entry being evaluated
          * for perscriptiveACIs is in fact the administrative entry.  By
@@ -202,14 +222,14 @@
          * to be in the same naming context as their access point so the subentries
          * effecting their parent entry applies to them as well.
          */
-        if ( entry.get( "objectClass" ).contains( "subentry" ) )
+        if ( AttributeUtils.containsValue( oc, "subentry", objectClassType ) || oc.contains( subentryOid ) )
         {
             LdapDN parentDn = ( LdapDN ) dn.clone();
             parentDn.remove( dn.size() - 1 );
             entry = proxy.lookup( parentDn, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
         }
 
-        Attribute subentries = entry.get( AC_SUBENTRY_ATTR );
+        Attribute subentries = ServerUtils.getAttribute( acSubentryType, entry );
         if ( subentries == null )
         {
             return;
@@ -332,7 +352,7 @@
      * -------------------------------------------------------------------------------
      */
 
-    public void add(NextInterceptor next, LdapDN normName, Attributes entry) throws NamingException
+    public void add( NextInterceptor next, LdapDN normName, Attributes entry ) throws NamingException
     {
         // Access the principal requesting the operation, and bypass checks if it is the admin
         Invocation invocation = InvocationStack.getInstance().peek();
@@ -342,16 +362,16 @@
         // bypass authz code if we are disabled
         if ( !enabled )
         {
-            next.add(normName, entry );
+            next.add( normName, entry );
             return;
         }
 
         // bypass authz code but manage caches if operation is performed by the admin
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
+        if ( userName.toNormName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )
         {
-            next.add(normName, entry );
-            tupleCache.subentryAdded( normName.toUpName(), normName, entry );
-            groupCache.groupAdded( normName.toUpName(), normName, entry );
+            next.add( normName, entry );
+            tupleCache.subentryAdded( normName.toNormName(), normName, entry );
+            groupCache.groupAdded( normName.toNormName(), normName, entry );
             return;
         }
 
@@ -365,7 +385,7 @@
         }
 
         // Assemble all the information required to make an access control decision
-        Set userGroups = groupCache.getGroups( userName.toString() );
+        Set userGroups = groupCache.getGroups( userName.toNormName() );
         Collection tuples = new HashSet();
 
         // Build the total collection of tuples to be considered for add rights
@@ -391,12 +411,12 @@
         }
 
         // if we've gotten this far then access has been granted
-        next.add(normName, entry );
+        next.add( normName, entry );
 
         // if the entry added is a subentry or a groupOf[Unique]Names we must
         // update the ACITuple cache and the groups cache to keep them in sync
-        tupleCache.subentryAdded( normName.toUpName(), normName, entry );
-        groupCache.groupAdded( normName.toUpName(), normName, entry );
+        tupleCache.subentryAdded( normName.toNormName(), normName, entry );
+        groupCache.groupAdded( normName.toNormName(), normName, entry );
     }
 
 
@@ -577,13 +597,13 @@
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
         LdapDN userName = parseNormalized( principal.getName() );
 
-        if ( userName.toString().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled
+        if ( userName.toNormName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled
             || name.toString().trim().equals( "" ) ) // no checks on the rootdse
         {
             return next.hasEntry( name );
         }
 
-        Set userGroups = groupCache.getGroups( userName.toString() );
+        Set userGroups = groupCache.getGroups( userName.toNormName() );
         Collection tuples = new HashSet();
         addPerscriptiveAciTuples( proxy, tuples, name, entry );
         addEntryAciTuples( tuples, entry );
@@ -622,7 +642,7 @@
 
         DirectoryPartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
         LdapDN userName = parseNormalized( principal.getName() );
-        Set userGroups = groupCache.getGroups( userName.toString() );
+        Set userGroups = groupCache.getGroups( userName.toNormName() );
         Collection tuples = new HashSet();
         addPerscriptiveAciTuples( proxy, tuples, dn, entry );
         addEntryAciTuples( tuples, entry );
@@ -652,8 +672,10 @@
         DirectoryPartitionNexusProxy proxy = invocation.getProxy();
         Attributes entry = proxy.lookup( dn, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );
         LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();
-
-        if ( principal.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled )
+        LdapDN principalDn = new LdapDN( principal.getName() );
+        principalDn.normalize();
+        
+        if ( principalDn.toNormName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled )
         {
             return next.lookup( dn, attrIds );
         }

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=413437&r1=413436&r2=413437&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Sun Jun 11 05:03:28 2006
@@ -110,7 +110,7 @@
         while ( suffixes.hasNext() )
         {
             String suffix = ( String ) suffixes.next();
-            LdapDN baseDn = new LdapDN( suffix );
+            LdapDN baseDn = parseNormalized( suffix );
             ExprNode filter = new SimpleNode( OC_ATTR, ACSUBENTRY_OC, SimpleNode.EQUALITY );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -126,7 +126,7 @@
                     continue;
                 }
 
-                Name normName = parseNormalized( subentryDn );
+                LdapDN normName = parseNormalized( subentryDn );
                 subentryAdded( subentryDn, normName, result.getAttributes() );
             }
             results.close();
@@ -153,7 +153,7 @@
     }
 
 
-    public void subentryAdded( String upName, Name normName, Attributes entry ) throws NamingException
+    public void subentryAdded( String upName, LdapDN normName, Attributes entry ) throws NamingException
     {
         // only do something if the entry contains prescriptiveACI
         Attribute aci = entry.get( ACI_ATTR );
@@ -179,7 +179,7 @@
 
             entryTuples.addAll( item.toTuples() );
         }
-        tuples.put( normName.toString(), entryTuples );
+        tuples.put( normName.toNormName(), entryTuples );
     }
 
 
@@ -194,7 +194,7 @@
     }
 
 
-    public void subentryModified( Name normName, ModificationItem[] mods, Attributes entry ) throws NamingException
+    public void subentryModified( LdapDN normName, ModificationItem[] mods, Attributes entry ) throws NamingException
     {
         if ( !hasPrescriptiveACI( entry ) )
         {
@@ -209,12 +209,12 @@
         if ( isAciModified )
         {
             subentryDeleted( normName, entry );
-            subentryAdded( normName.toString(), normName, entry );
+            subentryAdded( normName.toUpName(), normName, entry );
         }
     }
 
 
-    public void subentryModified( Name normName, int modOp, Attributes mods, Attributes entry ) throws NamingException
+    public void subentryModified( LdapDN normName, int modOp, Attributes mods, Attributes entry ) throws NamingException
     {
         if ( !hasPrescriptiveACI( entry ) )
         {
@@ -224,7 +224,7 @@
         if ( mods.get( ACI_ATTR ) != null )
         {
             subentryDeleted( normName, entry );
-            subentryAdded( normName.toString(), normName, entry );
+            subentryAdded( normName.toUpName(), normName, entry );
         }
     }
 

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?rev=413437&r1=413436&r2=413437&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java Sun Jun 11 05:03:28 2006
@@ -18,6 +18,7 @@
 
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
+import org.apache.directory.server.core.ServerUtils;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
@@ -27,6 +28,7 @@
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
 import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.core.schema.OidRegistry;
 
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
@@ -40,6 +42,7 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.SubentriesControl;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.NormalizerMappingResolver;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
@@ -98,7 +101,12 @@
     private SubtreeSpecificationParser ssParser;
     private SubtreeEvaluator evaluator;
     private DirectoryPartitionNexus nexus;
-    private AttributeTypeRegistry registry;
+    private AttributeTypeRegistry attrRegistry;
+    private OidRegistry oidRegistry;
+    
+    
+    private AttributeType objectClassType;
+    private AttributeType administrativeRoleType;
 
 
     public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException
@@ -106,12 +114,18 @@
         super.init( factoryCfg, cfg );
         this.nexus = factoryCfg.getPartitionNexus();
         this.factoryCfg = factoryCfg;
-        this.registry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
+        this.attrRegistry = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
+        this.oidRegistry = factoryCfg.getGlobalRegistries().getOidRegistry();
+        
+        // setup various attribute type values
+        objectClassType = attrRegistry.lookup( oidRegistry.getOid( "objectClass" ) );
+        administrativeRoleType = attrRegistry.lookup( oidRegistry.getOid( "administrativeRole" ) );
+        
         ssParser = new SubtreeSpecificationParser( new NormalizerMappingResolver()
         {
             public Map getNormalizerMapping() throws NamingException
             {
-                return registry.getNormalizerMapping();
+                return attrRegistry.getNormalizerMapping();
             }
         });
         evaluator = new SubtreeEvaluator( factoryCfg.getGlobalRegistries().getOidRegistry() );
@@ -417,7 +431,7 @@
                 LdapDN subentryDn = new LdapDN( subentryDnStr );
                 LdapDN apDn = ( LdapDN ) subentryDn.clone();
                 apDn.remove( apDn.size() - 1 );
-                SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( subentryDn );
+                SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( subentryDn.toNormName() );
 
                 if ( evaluator.evaluate( ss, apDn, normName, objectClasses ) )
                 {
@@ -495,12 +509,11 @@
     public void delete( NextInterceptor next, LdapDN name ) throws NamingException
     {
         Attributes entry = nexus.lookup( name );
-        Attribute objectClasses = entry.get( "objectClass" );
+        Attribute objectClasses = ServerUtils.getAttribute( objectClassType, entry );
 
         if ( objectClasses.contains( "subentry" ) )
         {
-            SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( name.toString() );
-            subtrees.remove( ss );
+            SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.remove( name.toNormName() );
             next.delete( name );
 
             /* ----------------------------------------------------------------
@@ -516,7 +529,7 @@
             LdapDN baseDn = ( LdapDN ) apName.clone();
             baseDn.addAll( ss.getBase() );
 
-            ExprNode filter = new PresenceNode( "objectclass" );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectclass" ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -530,7 +543,7 @@
                 LdapDN dn = new LdapDN( result.getName() );
                 dn.normalize();
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate.get( "objectClass" ) ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerUtils.getAttribute( objectClassType, candidate ) ) )
                 {
                     nexus.modify( dn, getOperationalModsForRemove( name, candidate ) );
                 }
@@ -649,11 +662,11 @@
     public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
     {
         Attributes entry = nexus.lookup( name );
-        Attribute objectClasses = entry.get( "objectClass" );
+        Attribute objectClasses = ServerUtils.getAttribute( objectClassType, entry );
 
         if ( objectClasses.contains( "subentry" ) )
         {
-            SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( name.toString() );
+            SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( name.toNormName() );
             LdapDN apName = ( LdapDN ) name.clone();
             apName.remove( apName.size() - 1 );
             LdapDN baseDn = ( LdapDN ) apName.clone();
@@ -662,19 +675,19 @@
             newName.remove( newName.size() - 1 );
 
             LdapDN rdn = new LdapDN( newRn );
-            rdn.normalize();
             newName.addAll( rdn );
+            rdn.normalize();
+            newName.normalize();
 
-            subtrees.put( newName.toString(), ss );
+            subtrees.put( newName.toNormName(), ss );
             next.modifyRn( name, newRn, deleteOldRn );
 
             Attributes apAttrs = nexus.lookup( apName );
-            Attribute administrativeRole = apAttrs.get( "administrativeRole" );
-            ExprNode filter = new PresenceNode( "objectclass" );
+            Attribute administrativeRole = ServerUtils.getAttribute( administrativeRoleType, apAttrs );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectclass" ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            controls.setReturningAttributes( new String[]
-                { "+", "*" } );
+            controls.setReturningAttributes( new String[] { "+", "*" } );
             NamingEnumeration subentries = nexus.search( baseDn, factoryCfg.getEnvironment(), filter, controls );
             while ( subentries.hasMore() )
             {
@@ -683,7 +696,7 @@
                 LdapDN dn = new LdapDN( result.getName() );
                 dn.normalize();
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate.get( "objectClass" ) ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerUtils.getAttribute( objectClassType, candidate ) ) )
                 {
                     nexus.modify( dn, getOperationalModsForReplace( name, newName, administrativeRole, candidate ) );
                 }
@@ -704,6 +717,7 @@
             LdapDN newName = ( LdapDN ) name.clone();
             newName.remove( newName.size() - 1 );
             newName.add( newRn );
+            newName.normalize();
             ModificationItem[] mods = getModsOnEntryRdnChange( name, newName, entry );
 
             if ( mods.length > 0 )
@@ -718,11 +732,11 @@
         throws NamingException
     {
         Attributes entry = nexus.lookup( oriChildName );
-        Attribute objectClasses = entry.get( "objectClass" );
+        Attribute objectClasses = ServerUtils.getAttribute( objectClassType, entry );
 
         if ( objectClasses.contains( "subentry" ) )
         {
-            SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( oriChildName.toString() );
+            SubtreeSpecification ss = ( SubtreeSpecification ) subtrees.get( oriChildName.toNormName() );
             LdapDN apName = ( LdapDN ) oriChildName.clone();
             apName.remove( apName.size() - 1 );
             LdapDN baseDn = ( LdapDN ) apName.clone();
@@ -731,20 +745,20 @@
             newName.remove( newName.size() - 1 );
 
             LdapDN rdn = new LdapDN( newRn );
-            rdn.normalize();
             newName.addAll( rdn );
-
-            subtrees.put( newName.toString(), ss );
+            rdn.normalize();
+            newName.normalize();
+            
+            subtrees.put( newName.toNormName(), ss );
             next.move( oriChildName, newParentName, newRn, deleteOldRn );
 
             Attributes apAttrs = nexus.lookup( apName );
-            Attribute administrativeRole = apAttrs.get( "administrativeRole" );
+            Attribute administrativeRole = ServerUtils.getAttribute( administrativeRoleType, apAttrs );
 
-            ExprNode filter = new PresenceNode( "objectclass" );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectclass" ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            controls.setReturningAttributes( new String[]
-                { "+", "*" } );
+            controls.setReturningAttributes( new String[] { "+", "*" } );
             NamingEnumeration subentries = nexus.search( baseDn, factoryCfg.getEnvironment(), filter, controls );
             while ( subentries.hasMore() )
             {
@@ -753,7 +767,7 @@
                 LdapDN dn = new LdapDN( result.getName() );
                 dn.normalize();
 
-                if ( evaluator.evaluate( ss, apName, dn, candidate.get( "objectClass" ) ) )
+                if ( evaluator.evaluate( ss, apName, dn, ServerUtils.getAttribute( objectClassType, candidate ) ) )
                 {
                     nexus.modify( dn, getOperationalModsForReplace( oriChildName, newName, administrativeRole,
                         candidate ) );
@@ -774,6 +788,7 @@
             // attributes contained within this regular entry with name changes
             LdapDN newName = ( LdapDN ) newParentName.clone();
             newName.add( newRn );
+            newName.normalize();
             ModificationItem[] mods = getModsOnEntryRdnChange( oriChildName, newName, entry );
 
             if ( mods.length > 0 )
@@ -857,11 +872,11 @@
     public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
         Attributes entry = nexus.lookup( name );
-        Attribute objectClasses = entry.get( "objectClass" );
+        Attribute objectClasses = ServerUtils.getAttribute( objectClassType, entry );
 
         if ( objectClasses.contains( "subentry" ) && mods.get( "subtreeSpecification" ) != null )
         {
-            SubtreeSpecification ssOld = ( SubtreeSpecification ) subtrees.remove( name.toString() );
+            SubtreeSpecification ssOld = ( SubtreeSpecification ) subtrees.remove( name.toNormName() );
             SubtreeSpecification ssNew;
 
             try
@@ -875,7 +890,7 @@
                 throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALIDATTRIBUTESYNTAX );
             }
 
-            subtrees.put( name.toString(), ssNew );
+            subtrees.put( name.toNormName(), ssNew );
             next.modify( name, modOp, mods );
 
             // search for all entries selected by the old SS and remove references to subentry
@@ -883,7 +898,7 @@
             apName.remove( apName.size() - 1 );
             LdapDN oldBaseDn = ( LdapDN ) apName.clone();
             oldBaseDn.addAll( ssOld.getBase() );
-            ExprNode filter = new PresenceNode( "objectClass" );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectClass" ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -896,7 +911,7 @@
                 LdapDN dn = new LdapDN( result.getName() );
                 dn.normalize();
 
-                if ( evaluator.evaluate( ssOld, apName, dn, candidate.get( "objectClass" ) ) )
+                if ( evaluator.evaluate( ssOld, apName, dn, ServerUtils.getAttribute( objectClassType, candidate ) ) )
                 {
                     nexus.modify( dn, getOperationalModsForRemove( name, candidate ) );
                 }
@@ -904,7 +919,7 @@
 
             // search for all selected entries by the new SS and add references to subentry
             Attributes apAttrs = nexus.lookup( apName );
-            Attribute administrativeRole = apAttrs.get( "administrativeRole" );
+            Attribute administrativeRole = ServerUtils.getAttribute( administrativeRoleType, apAttrs );
             Attributes operational = getSubentryOperatationalAttributes( name, administrativeRole );
             LdapDN newBaseDn = ( LdapDN ) apName.clone();
             newBaseDn.addAll( ssNew.getBase() );
@@ -916,7 +931,7 @@
                 LdapDN dn = new LdapDN( result.getName() );
                 dn.normalize();
 
-                if ( evaluator.evaluate( ssNew, apName, dn, candidate.get( "objectClass" ) ) )
+                if ( evaluator.evaluate( ssNew, apName, dn, ServerUtils.getAttribute( objectClassType, candidate ) ) )
                 {
                     nexus.modify( dn, getOperationalModsForAdd( candidate, operational ) );
                 }
@@ -932,7 +947,7 @@
     public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
     {
         Attributes entry = nexus.lookup( name );
-        Attribute objectClasses = entry.get( "objectClass" );
+        Attribute objectClasses = ServerUtils.getAttribute( objectClassType, entry );
         boolean isSubtreeSpecificationModification = false;
         ModificationItem subtreeMod = null;
 
@@ -961,7 +976,7 @@
                 throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALIDATTRIBUTESYNTAX );
             }
 
-            subtrees.put( name.toString(), ssNew );
+            subtrees.put( name.toNormName(), ssNew );
             next.modify( name, mods );
 
             // search for all entries selected by the old SS and remove references to subentry
@@ -969,7 +984,7 @@
             apName.remove( apName.size() - 1 );
             LdapDN oldBaseDn = ( LdapDN ) apName.clone();
             oldBaseDn.addAll( ssOld.getBase() );
-            ExprNode filter = new PresenceNode( "objectClass" );
+            ExprNode filter = new PresenceNode( oidRegistry.getOid( "objectClass" ) );
             SearchControls controls = new SearchControls();
             controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
             controls.setReturningAttributes( new String[]
@@ -1191,10 +1206,10 @@
      * @return the set of modifications required to remove an entry's reference to
      * a subentry
      */
-    private ModificationItem[] getOperationalModsForRemove( Name subentryDn, Attributes candidate )
+    private ModificationItem[] getOperationalModsForRemove( LdapDN subentryDn, Attributes candidate )
     {
         List modList = new ArrayList();
-        String dn = subentryDn.toString();
+        String dn = subentryDn.toNormName();
 
         for ( int ii = 0; ii < SUBENTRY_OPATTRS.length; ii++ )
         {



Mime
View raw message