directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r833647 [6/17] - in /directory: apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/par...
Date Sat, 07 Nov 2009 07:57:42 GMT
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Sat Nov  7 07:57:34 2009
@@ -46,12 +46,11 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
-import org.apache.directory.shared.ldap.schema.registries.LdapSyntaxRegistry;
-import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
-import org.apache.directory.shared.ldap.schema.registries.SyntaxCheckerRegistry;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
+import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -73,23 +72,13 @@
 
 
     public static DirectoryService service;
+    public static SchemaManager schemaManager;
 
 
-    private static SyntaxCheckerRegistry getSyntaxCheckerRegistry()
+    @Before
+    public void setup()
     {
-        return service.getRegistries().getSyntaxCheckerRegistry();
-    }
-
-
-    private static LdapSyntaxRegistry getLdapSyntaxRegistry()
-    {
-        return service.getRegistries().getLdapSyntaxRegistry();
-    }
-
-
-    private static OidRegistry getOidRegistry()
-    {
-        return service.getRegistries().getOidRegistry();
+        schemaManager = service.getSchemaManager();
     }
 
 
@@ -124,9 +113,9 @@
         dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( dn, attrs );
         
-        assertTrue( getSyntaxCheckerRegistry().contains( OID ) );
-        assertEquals( getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
-        Class<?> clazz = getSyntaxCheckerRegistry().lookup( OID ).getClass();
+        assertTrue( schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
+        assertEquals( schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
+        Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( OID ).getClass();
         assertEquals( clazz, OctetStringSyntaxChecker.class );
         assertTrue( isOnDisk( dn ) );
     }
@@ -149,7 +138,7 @@
         getSchemaContext( service ).createSubcontext( dn, attrs );
         
         assertFalse( "adding new syntaxChecker to disabled schema should not register it into the registries", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
     }
 
@@ -178,9 +167,9 @@
         dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( dn, attrs );
         
-        assertTrue( getSyntaxCheckerRegistry().contains( OID ) );
-        assertEquals( getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
-        Class<?> clazz = getSyntaxCheckerRegistry().lookup( OID ).getClass();
+        assertTrue( schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
+        assertEquals( schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
+        Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( OID ).getClass();
         assertEquals( clazz.getName(), "org.apache.directory.shared.ldap.schema.syntaxCheckers.DummySyntaxChecker" );
         assertTrue( isOnDisk( dn ) );
     }
@@ -210,7 +199,7 @@
         dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( dn, attrs );
         
-        assertFalse( getSyntaxCheckerRegistry().contains( OID ) );
+        assertFalse( schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
     }
     
@@ -223,17 +212,17 @@
         testAddSyntaxCheckerToEnabledSchema();
         
         assertTrue( "syntaxChecker should be removed from the registry after being deleted", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
         
         getSchemaContext( service ).destroySubcontext( dn );
 
         assertFalse( "syntaxChecker should be removed from the registry after being deleted", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
 
         try
         {
-            getSyntaxCheckerRegistry().lookup( OID );
+            schemaManager.getSyntaxCheckerRegistry().lookup( OID );
             fail( "syntaxChecker lookup should fail after deleting the syntaxChecker" );
         }
         catch( NamingException e )
@@ -252,17 +241,17 @@
         testAddSyntaxCheckerToEnabledSchema();
         
         assertTrue( "syntaxChecker should be removed from the registry after being deleted", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
         getSchemaContext( service ).destroySubcontext( dn );
 
         assertFalse( "syntaxChecker should be removed from the registry after being deleted", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
 
         try
         {
-            getSyntaxCheckerRegistry().lookup( OID );
+            schemaManager.getSyntaxCheckerRegistry().lookup( OID );
             fail( "syntaxChecker lookup should fail after deleting the syntaxChecker" );
         }
         catch( NamingException e )
@@ -285,20 +274,20 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertFalse( "old syntaxChecker OID should be removed from the registry after being renamed", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
 
         //noinspection EmptyCatchBlock
         try
         {
-            getSyntaxCheckerRegistry().lookup( OID );
+            schemaManager.getSyntaxCheckerRegistry().lookup( OID );
             fail( "syntaxChecker lookup should fail after deleting the syntaxChecker" );
         }
         catch( NamingException e )
         {
         }
 
-        assertTrue( getSyntaxCheckerRegistry().contains( NEW_OID ) );
-        Class<?> clazz = getSyntaxCheckerRegistry().lookup( NEW_OID ).getClass();
+        assertTrue( schemaManager.getSyntaxCheckerRegistry().contains( NEW_OID ) );
+        Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( NEW_OID ).getClass();
         assertEquals( clazz, OctetStringSyntaxChecker.class );
     }
 
@@ -318,12 +307,12 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertTrue( "syntaxChecker OID should still be present", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         
         assertEquals( "syntaxChecker schema should be set to apache not apachemeta", 
-            getSyntaxCheckerRegistry().getSchemaName( OID ), "apache" );
+            schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apache" );
 
-        Class<?> clazz = getSyntaxCheckerRegistry().lookup( OID ).getClass();
+        Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( OID ).getClass();
         assertEquals( clazz, OctetStringSyntaxChecker.class );
     }
 
@@ -343,15 +332,15 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertFalse( "old syntaxChecker OID should NOT be present", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         
         assertTrue( "new syntaxChecker OID should be present", 
-            getSyntaxCheckerRegistry().contains( NEW_OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( NEW_OID ) );
         
         assertEquals( "syntaxChecker with new oid should have schema set to apache NOT apachemeta", 
-            getSyntaxCheckerRegistry().getSchemaName( NEW_OID ), "apache" );
+            schemaManager.getSyntaxCheckerRegistry().getSchemaName( NEW_OID ), "apache" );
 
-        Class<?> clazz = getSyntaxCheckerRegistry().lookup( NEW_OID ).getClass();
+        Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( NEW_OID ).getClass();
         assertEquals( clazz, OctetStringSyntaxChecker.class );
     }
 
@@ -370,12 +359,12 @@
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
         assertTrue( "syntaxChecker OID should still be present", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         
         assertEquals( "syntaxChecker schema should be set to apachemeta", 
-            getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
+            schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
 
-        Class<?> clazz = getSyntaxCheckerRegistry().lookup( OID ).getClass();
+        Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( OID ).getClass();
         assertEquals( clazz, BogusSyntaxChecker.class );
     }
 
@@ -393,12 +382,12 @@
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "syntaxChecker OID should still be present", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         
         assertEquals( "syntaxChecker schema should be set to apachemeta", 
-            getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
+            schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
 
-        Class<?> clazz = getSyntaxCheckerRegistry().lookup( OID ).getClass();
+        Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( OID ).getClass();
         assertEquals( clazz, BogusSyntaxChecker.class );
     }
     
@@ -414,7 +403,7 @@
         LdapDN dn = getSyntaxCheckerContainer( "apachemeta" );
         dn.add( "m-oid" + "=" + OID );
         testAddSyntaxCheckerToEnabledSchema();
-        getLdapSyntaxRegistry().register( new DummySyntax() );
+        schemaManager.getLdapSyntaxRegistry().register( new DummySyntax() );
         
         try
         {
@@ -427,9 +416,9 @@
         }
 
         assertTrue( "syntaxChecker should still be in the registry after delete failure", 
-            getSyntaxCheckerRegistry().contains( OID ) );
-        getLdapSyntaxRegistry().unregister( OID );
-        getOidRegistry().unregister( OID );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
+        schemaManager.getLdapSyntaxRegistry().unregister( OID );
+        schemaManager.getOidRegistry().unregister( OID );
     }
     
     
@@ -438,7 +427,7 @@
     public void testMoveSyntaxCheckerWhenInUse() throws Exception
     {
         testAddSyntaxCheckerToEnabledSchema();
-        getLdapSyntaxRegistry().register( new DummySyntax() );
+        schemaManager.getLdapSyntaxRegistry().register( new DummySyntax() );
         
         LdapDN dn = getSyntaxCheckerContainer( "apachemeta" );
         dn.add( "m-oid" + "=" + OID );
@@ -457,9 +446,9 @@
         }
 
         assertTrue( "syntaxChecker should still be in the registry after move failure", 
-            getSyntaxCheckerRegistry().contains( OID ) );
-        getLdapSyntaxRegistry().unregister( OID );
-        getOidRegistry().unregister( OID );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
+        schemaManager.getLdapSyntaxRegistry().unregister( OID );
+        schemaManager.getOidRegistry().unregister( OID );
     }
 
 
@@ -468,7 +457,7 @@
     public void testMoveSyntaxCheckerAndChangeRdnWhenInUse() throws Exception
     {
         testAddSyntaxCheckerToEnabledSchema();
-        getLdapSyntaxRegistry().register( new DummySyntax() );
+        schemaManager.getLdapSyntaxRegistry().register( new DummySyntax() );
         
         LdapDN dn = getSyntaxCheckerContainer( "apachemeta" );
         dn.add( "m-oid" + "=" + OID );
@@ -487,9 +476,9 @@
         }
 
         assertTrue( "syntaxChecker should still be in the registry after move failure", 
-            getSyntaxCheckerRegistry().contains( OID ) );
-        getLdapSyntaxRegistry().unregister( OID );
-        getOidRegistry().unregister( OID );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
+        schemaManager.getLdapSyntaxRegistry().unregister( OID );
+        schemaManager.getOidRegistry().unregister( OID );
     }
 
     
@@ -499,7 +488,7 @@
         LdapDN dn = getSyntaxCheckerContainer( "apachemeta" );
         dn.add( "m-oid" + "=" + OID );
         testAddSyntaxCheckerToEnabledSchema();
-        getLdapSyntaxRegistry().register( new DummySyntax() );
+        schemaManager.getLdapSyntaxRegistry().register( new DummySyntax() );
         
         LdapDN newdn = getSyntaxCheckerContainer( "apachemeta" );
         newdn.add( "m-oid" + "=" + NEW_OID );
@@ -515,9 +504,9 @@
         }
 
         assertTrue( "syntaxChecker should still be in the registry after rename failure", 
-            getSyntaxCheckerRegistry().contains( OID ) );
-        getLdapSyntaxRegistry().unregister( OID );
-        getOidRegistry().unregister( OID );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
+        schemaManager.getLdapSyntaxRegistry().unregister( OID );
+        schemaManager.getOidRegistry().unregister( OID );
     }
 
 
@@ -549,7 +538,7 @@
         }
 
         assertTrue( "syntaxChecker should still be in the registry after move failure", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
     }
 
 
@@ -576,7 +565,7 @@
         }
 
         assertTrue( "syntaxChecker should still be in the registry after move failure", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
     }
     
     
@@ -596,7 +585,7 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertFalse( "syntaxChecker OID should no longer be present", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
     }
 
 
@@ -611,7 +600,7 @@
         dn.add( "m-oid" + "=" + OID );
 
         assertFalse( "syntaxChecker OID should NOT be present when added to disabled nis schema", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
 
         LdapDN newdn = getSyntaxCheckerContainer( "apachemeta" );
         newdn.add( "m-oid" + "=" + OID );
@@ -619,10 +608,10 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertTrue( "syntaxChecker OID should be present when moved to enabled schema", 
-            getSyntaxCheckerRegistry().contains( OID ) );
+            schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         
         assertEquals( "syntaxChecker should be in apachemeta schema after move", 
-            getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
+            schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
     }
 
     

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java Sat Nov  7 07:57:34 2009
@@ -50,10 +50,10 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.schema.registries.LdapSyntaxRegistry;
-import org.apache.directory.shared.ldap.schema.registries.MatchingRuleRegistry;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
+import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -83,20 +83,16 @@
 
 
     public static DirectoryService service;
+    public static SchemaManager schemaManager;
 
 
-    private static LdapSyntaxRegistry getLdapSyntaxRegistry()
+    @Before
+    public void setup()
     {
-        return service.getRegistries().getLdapSyntaxRegistry();
+        schemaManager = service.getSchemaManager();
     }
 
 
-    private static MatchingRuleRegistry getMatchingRuleRegistry()
-    {
-        return service.getRegistries().getMatchingRuleRegistry();
-    }
-
-    
     /**
      * Gets relative DN to ou=schema.
      *
@@ -130,8 +126,8 @@
         createDummySyntaxChecker( OID, "apachemeta" );
         getSchemaContext( service ).createSubcontext( dn, attrs );
         
-        assertTrue( getLdapSyntaxRegistry().contains( OID ) );
-        assertEquals( getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
+        assertTrue( schemaManager.getLdapSyntaxRegistry().contains( OID ) );
+        assertEquals( schemaManager.getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
         assertTrue( isOnDisk( dn ) );
     }
     
@@ -153,7 +149,7 @@
         getSchemaContext( service ).createSubcontext( dn, attrs );
         
         assertFalse( "adding new syntax to disabled schema should not register it into the registries", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
     }
 
@@ -167,16 +163,16 @@
         
         assertTrue( isOnDisk( dn ) );
         assertTrue( "syntax should be removed from the registry after being deleted", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         
         getSchemaContext( service ).destroySubcontext( dn );
 
         assertFalse( "syntax should be removed from the registry after being deleted", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
 
         try
         {
-            getLdapSyntaxRegistry().lookup( OID );
+            schemaManager.getLdapSyntaxRegistry().lookup( OID );
             fail( "syntax lookup should fail after deleting it" );
         }
         catch( NamingException e )
@@ -196,16 +192,16 @@
 
         assertTrue( isOnDisk( dn ) );
         assertFalse( "syntax should be removed from the registry after being deleted", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
 
         getSchemaContext( service ).destroySubcontext( dn );
 
         assertFalse( "syntax should be removed from the registry after being deleted", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
 
         try
         {
-            getLdapSyntaxRegistry().lookup( OID );
+            schemaManager.getLdapSyntaxRegistry().lookup( OID );
             fail( "syntax lookup should fail after deleting it" );
         }
         catch( NamingException e )
@@ -228,19 +224,19 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertFalse( "old syntax OID should be removed from the registry after being renamed", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
 
         //noinspection EmptyCatchBlock
         try
         {
-            getLdapSyntaxRegistry().lookup( OID );
+            schemaManager.getLdapSyntaxRegistry().lookup( OID );
             fail( "syntax lookup should fail after deleting the syntax" );
         }
         catch( NamingException e )
         {
         }
 
-        assertTrue( getLdapSyntaxRegistry().contains( NEW_OID ) );
+        assertTrue( schemaManager.getLdapSyntaxRegistry().contains( NEW_OID ) );
     }
 
 
@@ -259,10 +255,10 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertTrue( "syntax OID should still be present", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         
         assertEquals( "syntax schema should be set to apache not apachemeta", 
-            getLdapSyntaxRegistry().getSchemaName( OID ), "apache" );
+            schemaManager.getLdapSyntaxRegistry().getSchemaName( OID ), "apache" );
     }
 
 
@@ -281,13 +277,13 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertFalse( "old syntax OID should NOT be present", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         
         assertTrue( "new syntax OID should be present", 
-            getLdapSyntaxRegistry().contains( NEW_OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( NEW_OID ) );
         
         assertEquals( "syntax with new oid should have schema set to apache NOT apachemeta", 
-            getLdapSyntaxRegistry().getSchemaName( NEW_OID ), "apache" );
+            schemaManager.getLdapSyntaxRegistry().getSchemaName( NEW_OID ), "apache" );
     }
 
     
@@ -296,7 +292,7 @@
     {
         testAddSyntaxToEnabledSchema();
         
-        LdapSyntax syntax = getLdapSyntaxRegistry().lookup( OID );
+        LdapSyntax syntax = schemaManager.getLdapSyntaxRegistry().lookup( OID );
         assertEquals( syntax.getDescription(), DESCRIPTION0 );
 
         LdapDN dn = getSyntaxContainer( "apachemeta" );
@@ -308,12 +304,12 @@
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
         assertTrue( "syntax OID should still be present", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         
         assertEquals( "syntax schema should be set to apachemeta", 
-            getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
+            schemaManager.getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
         
-        syntax = getLdapSyntaxRegistry().lookup( OID );
+        syntax = schemaManager.getLdapSyntaxRegistry().lookup( OID );
         assertEquals( syntax.getDescription(), DESCRIPTION1 );
     }
 
@@ -323,7 +319,7 @@
     {
         testAddSyntaxToEnabledSchema();
         
-        LdapSyntax syntax = getLdapSyntaxRegistry().lookup( OID );
+        LdapSyntax syntax = schemaManager.getLdapSyntaxRegistry().lookup( OID );
         assertEquals( syntax.getDescription(), DESCRIPTION0 );
 
         LdapDN dn = getSyntaxContainer( "apachemeta" );
@@ -334,12 +330,12 @@
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "syntax OID should still be present", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         
         assertEquals( "syntax schema should be set to apachemeta", 
-            getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
+            schemaManager.getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
 
-        syntax = getLdapSyntaxRegistry().lookup( OID );
+        syntax = schemaManager.getLdapSyntaxRegistry().lookup( OID );
         assertEquals( syntax.getDescription(), DESCRIPTION1 );
     }
     
@@ -368,7 +364,7 @@
         }
 
         assertTrue( "syntax should still be in the registry after delete failure", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
     }
     
     
@@ -396,7 +392,7 @@
         }
 
         assertTrue( "syntax should still be in the registry after move failure", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
     }
 
 
@@ -424,7 +420,7 @@
         }
 
         assertTrue( "syntax should still be in the registry after move failure", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
     }
 
     
@@ -455,8 +451,8 @@
         dn.add( "m-oid" + "=" + MR_OID );
         getSchemaContext( service ).createSubcontext( dn, attrs );
         
-        assertTrue( getMatchingRuleRegistry().contains( MR_OID ) );
-        assertEquals( getMatchingRuleRegistry().getSchemaName( MR_OID ), "apachemeta" );
+        assertTrue( schemaManager.getMatchingRuleRegistry().contains( MR_OID ) );
+        assertEquals( schemaManager.getMatchingRuleRegistry().getSchemaName( MR_OID ), "apachemeta" );
     }
 
     
@@ -482,7 +478,7 @@
         }
 
         assertTrue( "syntax should still be in the registry after rename failure", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
     }
 
 
@@ -514,7 +510,7 @@
         }
 
         assertTrue( "syntax should still be in the registry after move failure", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
     }
 
 
@@ -541,7 +537,7 @@
         }
 
         assertTrue( "syntax should still be in the registry after move failure", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
     }
     
     
@@ -561,7 +557,7 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertFalse( "syntax OID should no longer be present", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
     }
 
 
@@ -576,7 +572,7 @@
         dn.add( "m-oid" + "=" + OID );
 
         assertFalse( "syntax OID should NOT be present when added to disabled nis schema", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
 
         LdapDN newdn = getSyntaxContainer( "apachemeta" );
         newdn.add( "m-oid" + "=" + OID );
@@ -584,10 +580,10 @@
         getSchemaContext( service ).rename( dn, newdn );
 
         assertTrue( "syntax OID should be present when moved to enabled schema", 
-            getLdapSyntaxRegistry().contains( OID ) );
+            schemaManager.getLdapSyntaxRegistry().contains( OID ) );
         
         assertEquals( "syntax should be in apachemeta schema after move", 
-            getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
+            schemaManager.getLdapSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
     }
 
 
@@ -603,7 +599,7 @@
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
         LdapDN dn = new LdapDN( getSubschemaSubentryDN() );
-        dn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        dn.normalize( service.getSchemaManager().getNormalizerMapping() );
         Attribute attr = new BasicAttribute( opAttr );
         
         for ( String description : descriptions )

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java Sat Nov  7 07:57:34 2009
@@ -269,11 +269,11 @@
 
         if ( isPresent )
         {
-            assertTrue( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java Sat Nov  7 07:57:34 2009
@@ -20,9 +20,19 @@
 package org.apache.directory.server.core.schema;
 
 
+import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.StringReader;
 import java.util.HashMap;
 import java.util.Map;
+
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -35,21 +45,11 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.integ.CiRunner;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -180,13 +180,13 @@
         
         // should be fine with unique OID
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), numberOfGunsAttrEntry.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), numberOfGunsAttrEntry.getEntry() ) ); 
 
         // should blow chuncks using same OID
         try
         {
             service.getAdminSession().add( 
-                new DefaultServerEntry( service.getRegistries(), shipOCEntry.getEntry() ) ); 
+                new DefaultServerEntry( service.getSchemaManager(), shipOCEntry.getEntry() ) ); 
             
             fail( "Should not be possible to create two schema entities with the same OID." );
         }

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Sat Nov  7 07:57:34 2009
@@ -66,6 +66,7 @@
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.schema.comparators.BooleanComparator;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimNormalizer;
@@ -229,7 +230,7 @@
     // -----------------------------------------------------------------------
 
     
-    private void checkSyntaxCheckerPresent( String oid, String schemaName, boolean isPresent ) throws Exception
+    private void checkSyntaxCheckerPresent( SchemaManager schemaManager, String oid, String schemaName, boolean isPresent ) throws Exception
     {
         // -------------------------------------------------------------------
         // check first to see if it is present in the subschemaSubentry
@@ -271,9 +272,9 @@
             assertNotNull( attrs );
             SchemaEntityFactory factory = new SchemaEntityFactory();
             
-            ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getRegistries() );
+            ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getSchemaManager() );
 
-            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( serverEntry, service.getRegistries(), schemaName );
+            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( schemaManager, serverEntry, service.getSchemaManager().getRegistries(), schemaName );
             assertEquals( oid, syntaxChecker.getOid() );
         }
         else
@@ -297,11 +298,11 @@
 
         if ( isPresent )
         {
-            assertTrue( service.getRegistries().getSyntaxCheckerRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getSyntaxCheckerRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getSyntaxCheckerRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getSyntaxCheckerRegistry().contains( oid ) );
         }
     }
 
@@ -331,8 +332,8 @@
         
         // 2nd change
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
 
         // -------------------------------------------------------------------
         // remove and check
@@ -340,8 +341,8 @@
 
         // 3rd change
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", false );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", false );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", false );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", false );
         
         // -------------------------------------------------------------------
         // test failure to replace
@@ -367,7 +368,7 @@
 
         // 4th change
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
 
         // -------------------------------------------------------------------
         // check remove
@@ -375,7 +376,7 @@
 
         // 5th change
         modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", false );
 
         // -------------------------------------------------------------------
         // check add no schema info
@@ -386,7 +387,7 @@
 
         // 6th change
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "other", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "other", true );
 
         // after a total of 6 changes 
         if ( service.getChangeLog().getLatest() != null )
@@ -464,11 +465,11 @@
 
         if ( isPresent )
         {
-            assertTrue( service.getRegistries().getComparatorRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getComparatorRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getComparatorRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getComparatorRegistry().contains( oid ) );
         }
     }
     
@@ -617,11 +618,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getNormalizerRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getNormalizerRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getNormalizerRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getNormalizerRegistry().contains( oid ) );
         }
     }
     
@@ -772,11 +773,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getLdapSyntaxRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getLdapSyntaxRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getLdapSyntaxRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getLdapSyntaxRegistry().contains( oid ) );
         }
     }
     
@@ -827,9 +828,9 @@
             + OctetStringSyntaxChecker.class.getName() + " X-SCHEMA 'nis' )" );
 
         modify( DirContext.ADD_ATTRIBUTE, descriptions, "syntaxCheckers" );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
-        checkSyntaxCheckerPresent( "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10000", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10001", "nis", true );
+        checkSyntaxCheckerPresent( service.getSchemaManager(), "1.3.6.1.4.1.18060.0.4.1.0.10002", "nis", true );
 
         // -------------------------------------------------------------------
         // add and check
@@ -943,11 +944,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getMatchingRuleRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getMatchingRuleRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getMatchingRuleRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getMatchingRuleRegistry().contains( oid ) );
         }
     }
     
@@ -1156,11 +1157,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( oid ) );
         }
     }
     
@@ -1426,9 +1427,9 @@
         assertNotNull( attrs );
         SchemaEntityFactory factory = new SchemaEntityFactory();
         
-        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getRegistries() );
+        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getSchemaManager() );
         
-        AttributeType at = factory.getAttributeType( serverEntry, service.getRegistries(), "nis" );
+        AttributeType at = factory.getAttributeType( serverEntry, service.getSchemaManager().getRegistries(), "nis" );
         assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
         assertEquals( "name", at.getSuperior().getName() );
         assertEquals( "bogus description", at.getDescription() );
@@ -1489,9 +1490,9 @@
         assertNotNull( attrs );
         SchemaEntityFactory factory = new SchemaEntityFactory();
         
-        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getRegistries() );
+        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attrs, LdapDN.EMPTY_LDAPDN, service.getSchemaManager() );
 
-        AttributeType at = factory.getAttributeType( serverEntry, service.getRegistries(), "nis" );
+        AttributeType at = factory.getAttributeType( serverEntry, service.getSchemaManager().getRegistries(), "nis" );
         assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
         assertEquals( "name", at.getSuperior().getName() );
         assertEquals( "bogus description", at.getDescription() );
@@ -1573,11 +1574,11 @@
         
         if ( isPresent ) 
         { 
-            assertTrue( service.getRegistries().getObjectClassRegistry().contains( oid ) );
+            assertTrue( service.getSchemaManager().getObjectClassRegistry().contains( oid ) );
         }
         else
         {
-            assertFalse( service.getRegistries().getObjectClassRegistry().contains( oid ) );
+            assertFalse( service.getSchemaManager().getObjectClassRegistry().contains( oid ) );
         }
     }
     
@@ -1874,7 +1875,7 @@
         Attribute modifyTimestampAttr = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttr );
         LdapDN expectedDN = new LdapDN( "uid=admin,ou=system" );
-        expectedDN.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        expectedDN.normalize( service.getSchemaManager().getNormalizerMapping() );
         assertEquals( expectedDN.getNormName(), modifiersNameAttr.get() );
         assertNotNull( modifyTimestampAttr );
 
@@ -1912,7 +1913,7 @@
         Attribute modifiersTimestampAttrAfter = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttrAfter );
         expectedDN = new LdapDN( "uid=admin,ou=system" );
-        expectedDN.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        expectedDN.normalize( service.getSchemaManager().getNormalizerMapping() );
         assertEquals( expectedDN.getNormName(), modifiersNameAttrAfter.get() );
         assertNotNull( modifiersTimestampAttrAfter );
         
@@ -1965,7 +1966,7 @@
         modifiersTimestampAttrAfter = subentry.get( "modifyTimestamp" );
         assertNotNull( modifiersNameAttrAfter );
         expectedDN = new LdapDN( "cn=bogus user,ou=system" );
-        expectedDN.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        expectedDN.normalize( service.getSchemaManager().getNormalizerMapping() );
         assertEquals( expectedDN.getNormName(), modifiersNameAttrAfter.get() );
         assertNotNull( modifiersTimestampAttrAfter );
         

Modified: directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java Sat Nov  7 07:57:34 2009
@@ -20,13 +20,6 @@
 package org.apache.directory.server.core.jndi;
 
 
-import org.apache.directory.server.core.entry.DefaultServerAttribute;
-import org.apache.directory.server.core.entry.ServerAttribute;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -35,6 +28,13 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.core.entry.DefaultServerAttribute;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
+
 
 /**
  * Contains constants and serialization methods used to implement functionality
@@ -164,7 +164,7 @@
      * @param obj the object to serialize
      * @throws NamingException if the object cannot be serialized
      */
-    static void serialize( ServerEntry entry, Object obj, Registries registries ) throws NamingException
+    static void serialize( ServerEntry entry, Object obj, SchemaManager schemaManager ) throws NamingException
     {
         /* Let's add the object classes first:
          * objectClass: top
@@ -184,7 +184,7 @@
 
         // Add all the class names this object can be cast to:
         Class<?>[] classes = obj.getClass().getClasses();
-        AttributeType attributeType = registries.getAttributeTypeRegistry().lookup( JCLASSNAMES_ATTR );
+        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( JCLASSNAMES_ATTR );
         ServerAttribute javaClassNames = new DefaultServerAttribute( attributeType, JCLASSNAMES_ATTR );
 
         for ( int ii = 0; ii < classes.length; ii++ )

Modified: directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Sat Nov  7 07:57:34 2009
@@ -338,7 +338,7 @@
             
             if ( result )
             {
-                ServerEntry emptyEntry = new DefaultServerEntry( service.getRegistries(), LdapDN.EMPTY_LDAPDN ); 
+                ServerEntry emptyEntry = new DefaultServerEntry( service.getSchemaManager(), LdapDN.EMPTY_LDAPDN ); 
                 return new BaseEntryFilteringCursor( new SingletonCursor<ServerEntry>( emptyEntry ), (SearchOperationContext)opContext );
             }
             else
@@ -831,7 +831,7 @@
 
         // let's be sure that the Attributes is case insensitive
         ServerEntry outServerEntry = ServerEntryUtils.toServerEntry( AttributeUtils.toCaseInsensitive( res
-            .getAttributes() ), target, service.getRegistries() );
+            .getAttributes() ), target, service.getSchemaManager() );
 
         if ( outServerEntry != null )
         {
@@ -885,7 +885,7 @@
             injectRdnAttributeValues( target, serverEntry );
 
             // Serialize object into entry attributes and add it.
-            JavaLdapSupport.serialize( serverEntry, obj, service.getRegistries() );
+            JavaLdapSupport.serialize( serverEntry, obj, service.getSchemaManager() );
             try
             {
                 doAddOperation( target, serverEntry );
@@ -899,7 +899,7 @@
         {
             // Grab attributes and merge with outAttrs
             ServerEntry serverEntry = ServerEntryUtils.toServerEntry( ( ( DirContext ) obj ).getAttributes( "" ),
-                target, service.getRegistries() );
+                target, service.getSchemaManager() );
 
             if ( ( outServerEntry != null ) && ( outServerEntry.size() > 0 ) )
             {

Modified: directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Sat Nov  7 07:57:34 2009
@@ -214,7 +214,7 @@
 
         List<Modification> newMods = ServerEntryUtils.convertToServerModification( 
             modItems, 
-            getDirectoryService().getRegistries().getAttributeTypeRegistry() );
+            getDirectoryService().getSchemaManager() );
 
         try
         {
@@ -251,7 +251,7 @@
     public void modifyAttributes( Name name, ModificationItem[] mods ) throws NamingException
     {
         List<Modification> newMods = ServerEntryUtils
-            .toServerModification( mods, getDirectoryService().getRegistries().getAttributeTypeRegistry() );
+            .toServerModification( mods, getDirectoryService().getSchemaManager() );
         try
         {
             doModifyOperation( buildTarget( new LdapDN( name ) ), newMods );
@@ -271,7 +271,7 @@
     {
         List<Modification> newMods = ServerEntryUtils
             .convertToServerModification( mods, 
-                getDirectoryService().getRegistries().getAttributeTypeRegistry() );
+                getDirectoryService().getSchemaManager() );
         try
         {
             doModifyOperation( buildTarget( new LdapDN( name ) ), newMods );
@@ -315,7 +315,7 @@
         LdapDN target = buildTarget( name );
 
         ServerEntry serverEntry = ServerEntryUtils.toServerEntry( AttributeUtils.toCaseInsensitive( attrs ), target,
-            getDirectoryService().getRegistries() );
+            getDirectoryService().getSchemaManager() );
 
         // No object binding so we just add the attributes
         if ( null == obj )
@@ -335,7 +335,7 @@
         // First, use state factories to do a transformation
         DirStateFactory.Result res = DirectoryManager.getStateToBind( obj, name, this, getEnvironment(), attrs );
         ServerEntry outServerEntry = ServerEntryUtils.toServerEntry( 
-            res.getAttributes(), target, getDirectoryService().getRegistries() );
+            res.getAttributes(), target, getDirectoryService().getSchemaManager() );
 
         if ( outServerEntry != serverEntry )
         {
@@ -387,7 +387,7 @@
             }
 
             // Serialize object into entry attributes and add it.
-            JavaLdapSupport.serialize( serverEntry, obj, getDirectoryService().getRegistries() );
+            JavaLdapSupport.serialize( serverEntry, obj, getDirectoryService().getSchemaManager() );
             try
             {
                 // setup the op context
@@ -402,7 +402,7 @@
         {
             // Grab attributes and merge with outAttrs
             ServerEntry entry = ServerEntryUtils.toServerEntry( ( ( DirContext ) obj ).getAttributes( "" ), target,
-                getDirectoryService().getRegistries() );
+                getDirectoryService().getSchemaManager() );
 
             if ( ( outServerEntry != null ) && ( outServerEntry.size() > 0 ) )
             {
@@ -533,7 +533,7 @@
         try
         {
             ServerEntry serverEntry = ServerEntryUtils.toServerEntry( attributes, 
-                target, getDirectoryService().getRegistries() );
+                target, getDirectoryService().getSchemaManager() );
             doAddOperation( target, serverEntry );
         }
         catch ( Exception e )

Modified: directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java Sat Nov  7 07:57:34 2009
@@ -181,7 +181,7 @@
     {
         Value<?> val = null;
         
-        AttributeType attributeType = getService().getRegistries().getAttributeTypeRegistry().lookup( oid );
+        AttributeType attributeType = getService().getSchemaManager().lookupAttributeTypeRegistry( oid );
         
         // make sure we add the request controls to operation
         if ( attributeType.getSyntax().isHumanReadable() )

Modified: directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java Sat Nov  7 07:57:34 2009
@@ -56,8 +56,8 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
-import org.apache.directory.shared.ldap.message.InternalAddRequest;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.message.InternalAddRequest;
 import org.apache.directory.shared.ldap.message.InternalCompareRequest;
 import org.apache.directory.shared.ldap.message.InternalDeleteRequest;
 import org.apache.directory.shared.ldap.message.InternalModifyDnRequest;
@@ -188,7 +188,7 @@
     {
         Value<?> val = null;
         
-        AttributeType attributeType = directoryService.getRegistries().getAttributeTypeRegistry().lookup( oid );
+        AttributeType attributeType = directoryService.getSchemaManager().lookupAttributeTypeRegistry( oid );
         
         // make sure we add the request controls to operation
         if ( attributeType.getSyntax().isHumanReadable() )
@@ -507,7 +507,7 @@
         
         for ( Modification mod:mods )
         {
-            serverModifications.add( new ServerModification( directoryService.getRegistries(), mod ) );
+            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
         }
         
         ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );
@@ -542,7 +542,7 @@
         
         for ( Modification mod:mods )
         {
-            serverModifications.add( new ServerModification( directoryService.getRegistries(), mod ) );
+            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
         }
 
         ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );

Modified: directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCursor.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCursor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockCursor.java Sat Nov  7 07:57:34 2009
@@ -30,13 +30,13 @@
 import org.apache.directory.shared.ldap.cursor.ClosureMonitor;
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.cursor.CursorIterator;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 public class MockCursor implements Cursor<ServerEntry>
 {
     final int count;
     int ii;
-    Registries registries;
+    SchemaManager schemaManager;
 
 
     public MockCursor(int count)
@@ -107,7 +107,7 @@
 
     public ServerEntry get() throws Exception
     {
-        return new DefaultServerEntry( registries );
+        return new DefaultServerEntry( schemaManager );
     }
 
 
@@ -171,8 +171,8 @@
     }
 
 
-    public void setRegistries( Registries registries )
+    public void setSchemaManager( SchemaManager schemaManager )
     {
-        this.registries = registries;
+        this.schemaManager = schemaManager;
     }
 }

Modified: directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java Sat Nov  7 07:57:34 2009
@@ -34,14 +34,14 @@
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.journal.Journal;
-import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.Partition;
+import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.replication.ReplicationConfiguration;
 import org.apache.directory.server.core.schema.SchemaService;
 import org.apache.directory.shared.ldap.csn.Csn;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 
 
 public class MockDirectoryService implements DirectoryService
@@ -99,7 +99,7 @@
     }
 
 
-    public Registries getRegistries()
+    public SchemaManager getSchemaManager()
     {
         return null;
     }
@@ -116,7 +116,7 @@
     }
 
 
-    public void setRegistries( Registries registries )
+    public void setSchemaManager( SchemaManager schemaManager )
     {
     }
 

Modified: directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockOperationManager.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockOperationManager.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-mock/src/main/java/org/apache/directory/server/core/MockOperationManager.java Sat Nov  7 07:57:34 2009
@@ -126,7 +126,7 @@
     public EntryFilteringCursor search( SearchOperationContext opContext ) throws Exception
     {
         MockCursor cursor = new MockCursor( count );
-        cursor.setRegistries( opContext.getSession().getDirectoryService().getRegistries() );
+        cursor.setSchemaManager( opContext.getSession().getDirectoryService().getSchemaManager() );
         return new BaseEntryFilteringCursor( cursor, opContext );
     }
 

Modified: directory/apacheds/branches/apacheds-schema/core-unit/src/main/java/org/apache/directory/server/core/unit/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-unit/src/main/java/org/apache/directory/server/core/unit/IntegrationUtils.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-unit/src/main/java/org/apache/directory/server/core/unit/IntegrationUtils.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-unit/src/main/java/org/apache/directory/server/core/unit/IntegrationUtils.java Sat Nov  7 07:57:34 2009
@@ -19,6 +19,12 @@
 package org.apache.directory.server.core.unit;
 
 
+import java.io.File;
+import java.io.IOException;
+
+import javax.naming.InvalidNameException;
+import javax.naming.NamingException;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
@@ -31,11 +37,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.InvalidNameException;
-import javax.naming.NamingException;
-import java.io.File;
-import java.io.IOException;
-
 
 /**
  * Integration test utility methods.
@@ -90,7 +91,7 @@
             case( ChangeType.ADD_ORDINAL ):
                 root.add( 
                     new DefaultServerEntry( 
-                        root.getDirectoryService().getRegistries(), entry.getEntry() ) ); 
+                        root.getDirectoryService().getSchemaManager(), entry.getEntry() ) ); 
                 break;
                 
             case( ChangeType.DELETE_ORDINAL ):

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java Sat Nov  7 07:57:34 2009
@@ -188,7 +188,7 @@
     {
         Value<?> val = null;
         
-        AttributeType attributeType = directoryService.getRegistries().getAttributeTypeRegistry().lookup( oid );
+        AttributeType attributeType = directoryService.getSchemaManager().lookupAttributeTypeRegistry( oid );
         
         // make sure we add the request controls to operation
         if ( attributeType.getSyntax().isHumanReadable() )
@@ -507,7 +507,7 @@
         
         for ( Modification mod:mods )
         {
-            serverModifications.add( new ServerModification( directoryService.getRegistries(), mod ) );
+            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
         }
         
         ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );
@@ -542,7 +542,7 @@
         
         for ( Modification mod:mods )
         {
-            serverModifications.add( new ServerModification( directoryService.getRegistries(), mod ) );
+            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
         }
 
         ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sat Nov  7 07:57:34 2009
@@ -90,9 +90,9 @@
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.DateUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -113,6 +113,9 @@
     
     private SchemaService schemaService;
     
+    /** A reference on the SchemaManager */
+    private SchemaManager schemaManager;
+    
     /** the root nexus */
     private DefaultPartitionNexus partitionNexus;
 
@@ -581,7 +584,7 @@
 
     public void addPartition( Partition partition ) throws Exception
     {
-        partition.setRegistries( getRegistries() );
+        partition.setSchemaManager( schemaManager );
         partitions.add( partition );
 
         if ( ! started )
@@ -817,7 +820,7 @@
                     {
                         case ChangeType.ADD_ORDINAL :
                             adminSession.add( 
-                                new DefaultServerEntry( getRegistries(), reverse.getEntry() ), true ); 
+                                new DefaultServerEntry( schemaManager, reverse.getEntry() ), true ); 
                             break;
                             
                         case ChangeType.DELETE_ORDINAL :
@@ -1011,11 +1014,22 @@
     
     
     /**
-     * @return the registries
+     * @return the SchemaManager
+     */
+    public SchemaManager getSchemaManager()
+    {
+        return schemaManager;
+    }
+    
+    
+    /**
+     * Set the SchemaManager instance.
+     *
+     * @param schemaManager The schemaManager
      */
-    public Registries getRegistries()
+    public void setSchemaManager( SchemaManager schemaManager )
     {
-        return schemaService.getRegistries();
+        this.schemaManager = schemaManager;
     }
 
 
@@ -1057,7 +1071,7 @@
 
     public ServerEntry newEntry( LdapDN dn ) 
     {
-        return new DefaultServerEntry( getRegistries(), dn );
+        return new DefaultServerEntry( schemaManager, dn );
     }
     
 
@@ -1084,7 +1098,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), adminDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, adminDn );
             
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, 
                                 SchemaConstants.TOP_OC,
@@ -1111,7 +1125,7 @@
         // create system users area
         // -------------------------------------------------------------------
 
-        Map<String,OidNormalizer> oidsMap = getRegistries().getAttributeTypeRegistry().getNormalizerMapping();
+        Map<String,OidNormalizer> oidsMap = schemaManager.getNormalizerMapping();
         LdapDN userDn = new LdapDN( ServerDNConstants.USERS_SYSTEM_DN );
         userDn.normalize( oidsMap );
         
@@ -1119,7 +1133,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), userDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, userDn );
             
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, 
                                 SchemaConstants.TOP_OC,
@@ -1145,7 +1159,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), groupDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, groupDn );
             
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, 
                                 SchemaConstants.TOP_OC,
@@ -1171,7 +1185,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), name );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, name );
             
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, 
                                 SchemaConstants.TOP_OC,
@@ -1221,7 +1235,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), configurationDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, configurationDn );
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.ORGANIZATIONAL_UNIT_OC );
 
             serverEntry.put( SchemaConstants.OU_AT, "configuration" );
@@ -1244,7 +1258,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), partitionsDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, partitionsDn );
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.ORGANIZATIONAL_UNIT_OC );
             serverEntry.put( SchemaConstants.OU_AT, "partitions" );
             serverEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
@@ -1266,7 +1280,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), servicesDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, servicesDn );
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.ORGANIZATIONAL_UNIT_OC );
 
             serverEntry.put( SchemaConstants.OU_AT, "services" );
@@ -1289,7 +1303,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), interceptorsDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, interceptorsDn );
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, SchemaConstants.ORGANIZATIONAL_UNIT_OC );
 
             serverEntry.put( SchemaConstants.OU_AT, "interceptors" );
@@ -1312,7 +1326,7 @@
         {
             firstStart = true;
 
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), sysPrefRootDn );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, sysPrefRootDn );
             serverEntry.put( SchemaConstants.OBJECT_CLASS_AT, 
                 SchemaConstants.TOP_OC, 
                 SchemaConstants.ORGANIZATIONAL_UNIT_OC,
@@ -1341,7 +1355,7 @@
         boolean needToChangeAdminPassword = false;
 
         LdapDN adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN );
-        adminDn.normalize( getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        adminDn.normalize( schemaManager.getNormalizerMapping() );
         
         ServerEntry adminEntry = partitionNexus.lookup( new LookupOperationContext( adminSession, adminDn ) );
         Object userPassword = adminEntry.get( SchemaConstants.USER_PASSWORD_AT ).get();
@@ -1382,7 +1396,7 @@
 
                 try
                 {
-                    getAdminSession().add( new DefaultServerEntry( getRegistries(), entry ) ); 
+                    getAdminSession().add( new DefaultServerEntry( schemaManager, entry ) ); 
                 }
                 catch ( Exception e )
                 {
@@ -1413,14 +1427,14 @@
         schemaService.initialize();
         schemaService.getSchemaPartition().initialize();
         partitions.add( schemaService.getSchemaPartition() );
-        systemPartition.getSuffixDn().normalize( getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        systemPartition.getSuffixDn().normalize( schemaManager.getNormalizerMapping() );
 
-        adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN ).normalize( getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
-        adminDn.normalize( getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN ).normalize( schemaManager.getNormalizerMapping() );
+        adminDn.normalize( schemaManager.getNormalizerMapping() );
         adminSession = new DefaultCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), this );
         
         // @TODO - NOTE: Need to find a way to instantiate without dependency on DPN
-        partitionNexus = new DefaultPartitionNexus( new DefaultServerEntry( getRegistries(), LdapDN.EMPTY_LDAPDN ) );
+        partitionNexus = new DefaultPartitionNexus( new DefaultServerEntry( schemaManager, LdapDN.EMPTY_LDAPDN ) );
         partitionNexus.setDirectoryService( this );
         partitionNexus.initialize( );
         //partitionNexus.addContextPartition( new AddContextPartitionOperationContext( adminSession, schemaService.getSchemaPartition() ) );
@@ -1548,7 +1562,7 @@
             entry.setDn( ldapDn );
             
             // TODO Let's get rid of this Attributes crap
-            ServerEntry serverEntry = new DefaultServerEntry( getRegistries(), entry );
+            ServerEntry serverEntry = new DefaultServerEntry( schemaManager, entry );
             return serverEntry;
         }
         catch ( Exception e )

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java Sat Nov  7 07:57:34 2009
@@ -222,7 +222,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
             directoryService.getReferralManager().lockRead();
@@ -307,7 +307,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
             directoryService.getReferralManager().lockRead();
@@ -387,7 +387,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
             directoryService.getReferralManager().lockRead();
@@ -632,7 +632,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
             directoryService.getReferralManager().lockRead();
@@ -715,7 +715,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
             directoryService.getReferralManager().lockRead();
@@ -769,7 +769,7 @@
             // Now, check the destination
             // Normalize the opContext DN
             LdapDN parentDn = opContext.getParent();
-            parentDn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            parentDn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // If he parent DN is a referral, or has a referral ancestor, we have to issue a AffectMultipleDsas result
             // as stated by RFC 3296 Section 5.6.2
@@ -817,7 +817,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
             directoryService.getReferralManager().lockRead();
@@ -871,7 +871,7 @@
             // Now, check the destination
             // Normalize the opContext DN
             LdapDN parentDn = opContext.getParent();
-            parentDn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            parentDn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // If he parent DN is a referral, or has a referral ancestor, we have to issue a AffectMultipleDsas result
             // as stated by RFC 3296 Section 5.6.2
@@ -921,7 +921,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // Inject the newDn into the operation context
             // Inject the new DN into the context
@@ -1013,7 +1013,7 @@
         {
             // Normalize the opContext DN
             LdapDN dn = opContext.getDn();
-            dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            dn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
 
             // We have to deal with the referral first
             directoryService.getReferralManager().lockRead();

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java Sat Nov  7 07:57:34 2009
@@ -155,7 +155,7 @@
         {
             // We will store each entry's DN into the Referral tree
             LdapDN suffixDn = new LdapDN( suffix );
-            suffixDn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+            suffixDn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
             EntryFilteringCursor cursor = nexus.search( new SearchOperationContext( adminSession, suffixDn, AliasDerefMode.DEREF_ALWAYS,
                 referralFilter, searchControl ) );
             



Mime
View raw message