directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r833647 [4/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-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java Sat Nov  7 07:57:34 2009
@@ -54,8 +54,6 @@
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.schema.DefaultSchemaManager;
@@ -77,8 +75,7 @@
     private static final byte[] BYTES3 = new byte[]{ 'c' };
 
     private static LdifSchemaLoader loader;
-    private static AttributeTypeRegistry atr;
-    private static Registries registries;
+    private static SchemaManager schemaManager;
     
     private static AttributeType atObjectClass;
     private static AttributeType atCN;
@@ -112,26 +109,23 @@
         extractor.extractOrCopy();
         loader = new LdifSchemaLoader( schemaRepository );
 
-        SchemaManager sm = new DefaultSchemaManager( loader );
-        sm.loadAllEnabled();
+        schemaManager = new DefaultSchemaManager( loader );
+        schemaManager.loadAllEnabled();
         
-        List<Throwable> errors = sm.getErrors();
+        List<Throwable> errors = schemaManager.getErrors();
         
         if ( errors.size() != 0 )
         {
             fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
         }
 
-        registries = sm.getRegistries(); 
-        atr = registries.getAttributeTypeRegistry();
-
-        atObjectClass = sm.getRegistries().getAttributeTypeRegistry().lookup( "objectClass" );
-        atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        atC = registries.getAttributeTypeRegistry().lookup( "c" );
-        atL = registries.getAttributeTypeRegistry().lookup( "l" );
-        atOC = registries.getAttributeTypeRegistry().lookup( "objectClass" );
-        atSN = registries.getAttributeTypeRegistry().lookup( "sn" );
-        atPwd = registries.getAttributeTypeRegistry().lookup( "userpassword" );
+        atObjectClass = schemaManager.lookupAttributeTypeRegistry( "objectClass" );
+        atCN = schemaManager.lookupAttributeTypeRegistry( "cn" );
+        atC = schemaManager.lookupAttributeTypeRegistry( "c" );
+        atL = schemaManager.lookupAttributeTypeRegistry( "l" );
+        atOC = schemaManager.lookupAttributeTypeRegistry( "objectClass" );
+        atSN = schemaManager.lookupAttributeTypeRegistry( "sn" );
+        atPwd = schemaManager.lookupAttributeTypeRegistry( "userpassword" );
         
         EXAMPLE_DN = new LdapDN( "dc=example,dc=com" );
     }
@@ -159,7 +153,7 @@
     @Test
     public void testDefaultServerEntryRegistries() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries );
+        Entry entry = new DefaultServerEntry( schemaManager );
         assertNotNull( entry );
         assertEquals( LdapDN.EMPTY_LDAPDN, entry.getDn() );
         assertEquals( 0, entry.size() );
@@ -172,7 +166,7 @@
     @Test
     public void testDefaultServerEntryRegistriesDN() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         assertNotNull( entry );
         assertEquals( EXAMPLE_DN, entry.getDn() );
         assertEquals( 0, entry.size() );
@@ -185,7 +179,7 @@
     @Test
     public void testDefaultServerEntryRegistriesDNAttributeTypeArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN, atOC, atPwd, atCN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, atOC, atPwd, atCN );
         assertNotNull( entry );
         assertEquals( EXAMPLE_DN, entry.getDn() );
         assertEquals( 3, entry.size() );
@@ -201,7 +195,7 @@
     @Test
     public void testDefaultServerEntryRegistriesDNAttributeTypeUpId() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN, atOC, "  OBJECTCLASS  " );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, atOC, "  OBJECTCLASS  " );
         assertNotNull( entry );
         assertEquals( EXAMPLE_DN, entry.getDn() );
         assertEquals( 1, entry.size() );
@@ -217,7 +211,7 @@
     @Test
     public void testDefaultServerEntryRegistriesDNUpIdArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN, "  OBJECTCLASS  ", " Cn " );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, "  OBJECTCLASS  ", " Cn " );
         assertNotNull( entry );
         assertEquals( EXAMPLE_DN, entry.getDn() );
         assertEquals( 2, entry.size() );
@@ -239,7 +233,7 @@
     @Test
     public void testAddEntryAttribute() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute oc = new DefaultServerAttribute( atObjectClass, "top", "person" );
         EntryAttribute cn = new DefaultServerAttribute( atCN, "test1", "test2" );
@@ -278,7 +272,7 @@
     @Test
     public void testAddStringByteArrayArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         entry.add( "userPassword", (byte[])null );
         assertEquals( 1, entry.size() );
@@ -322,7 +316,7 @@
     @Test
     public void testAddStringStringArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         entry.add( "cn", (String)null );
         assertEquals( 1, entry.size() );
@@ -367,7 +361,7 @@
     @Test
     public void testAddStringValueArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         Value<String> value = new ServerStringValue( atCN, (String)null );
         
         entry.add( "cn", value );
@@ -420,7 +414,7 @@
     @Test
     public void testAddAttributeTypeByteArrayArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         entry.add( atPwd, BYTES1, BYTES2 );
         assertEquals( 1, entry.size() );
@@ -443,7 +437,7 @@
     @Test
     public void testAddAttributeTypeStringArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         entry.add( atC, "us", "fr" );
         assertEquals( 1, entry.size() );
@@ -471,7 +465,7 @@
     @Test
     public void testAddAttributeTypeValueArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -517,7 +511,7 @@
     @Test
     public void testAddStringAttributeTypeByteArrayArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         entry.add( "UserPassword", atPwd, BYTES1, BYTES2 );
         assertEquals( 1, entry.size() );
@@ -554,7 +548,7 @@
     @Test
     public void testAddStringAttributeTypeStringArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         entry.add( "CommonName", atCN, "test1", "test2" );
         assertEquals( 1, entry.size() );
@@ -589,7 +583,7 @@
     @Test
     public void testAddStringAttributeTypeValueArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -647,7 +641,7 @@
     @Test public void testAddAtStringElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test a simple addition
         entry.add( atCN, "test1" );
@@ -696,9 +690,9 @@
     @Test public void testAddAtBytesElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         byte[] test1 = StringTools.getBytesUtf8( "test1" );
         byte[] test2 = StringTools.getBytesUtf8( "test2" );
@@ -753,9 +747,9 @@
     @Test public void testAddAtServerValueElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
         byte[] b2 = StringTools.getBytesUtf8( "test2" );
@@ -858,7 +852,7 @@
     @Test public void testAddUpIdStringElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test a simple addition
         entry.add( "CN", "test1" );
@@ -910,9 +904,9 @@
     @Test public void testAddUpIdBytesElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         byte[] test1 = StringTools.getBytesUtf8( "test1" );
         byte[] test2 = StringTools.getBytesUtf8( "test2" );
@@ -967,9 +961,9 @@
     @Test public void testAddUpIdServerValueElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
         byte[] b2 = StringTools.getBytesUtf8( "test2" );
@@ -1078,7 +1072,7 @@
     @Test public void testAddUpIdAtStringElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test a simple addition
         entry.add( "cn", atCN, "test1" );
@@ -1127,9 +1121,9 @@
     @Test public void testAddUpIdAtBytesElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         byte[] test1 = StringTools.getBytesUtf8( "test1" );
         byte[] test2 = StringTools.getBytesUtf8( "test2" );
@@ -1184,9 +1178,9 @@
     @Test public void testAddUpIdAtServerValueElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
         byte[] b2 = StringTools.getBytesUtf8( "test2" );
@@ -1295,7 +1289,7 @@
     @Test
     public void testClear() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
          
         assertEquals( 0, entry.size() );
         assertNull( entry.get( "ObjectClass" ) );
@@ -1319,7 +1313,7 @@
     @Test
     public void testClone() throws Exception
     {
-        Entry entry1 = new DefaultServerEntry( registries );
+        Entry entry1 = new DefaultServerEntry( schemaManager );
         
         Entry entry2 = entry1.clone();
         
@@ -1356,7 +1350,7 @@
     @Test
     public void testContainsAttributeTypeByteArrayArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.contains( (AttributeType )null, BYTES1 ) );
         assertFalse( entry.contains( atPwd, BYTES1 ) );
@@ -1379,7 +1373,7 @@
     @Test
     public void testContainsAttributeTypeStringArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.contains( (AttributeType )null, "test" ) );
         assertFalse( entry.contains( atCN, "test" ) );
@@ -1402,7 +1396,7 @@
     @Test
     public void testContainsAttributeTypeValuesArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -1437,7 +1431,7 @@
     @Test
     public void testContainsEntryAttributeArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
         EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
@@ -1467,7 +1461,7 @@
     @Test
     public void testContainsStringByteArrayArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.contains( (String)null, BYTES3 ) );
         assertFalse( entry.containsAttribute( "objectClass" ) );
@@ -1491,7 +1485,7 @@
     @Test
     public void testContainsStringStringArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.contains( (String)null, "test" ) );
         assertFalse( entry.containsAttribute( "objectClass" ) );
@@ -1515,7 +1509,7 @@
     @Test
     public void testContainsStringValueArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.contains( (String)null, "test" ) );
         assertFalse( entry.containsAttribute( "objectClass" ) );
@@ -1550,7 +1544,7 @@
     @Test
     public void testContainsAttributeAttributeType() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.containsAttribute( atOC ) );
         
@@ -1581,7 +1575,7 @@
     @Test
     public void testContainsAttributeString() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.containsAttribute( "objectClass" ) );
         
@@ -1610,8 +1604,8 @@
     @Test
     public void testEqualsObject() throws Exception
     {
-        Entry entry1 = new DefaultServerEntry( registries );
-        Entry entry2 = new DefaultServerEntry( registries );
+        Entry entry1 = new DefaultServerEntry( schemaManager );
+        Entry entry2 = new DefaultServerEntry( schemaManager );
         
         assertEquals( entry1, entry2 );
         
@@ -1658,7 +1652,7 @@
     @Test
     public void testGetAttributeTypes() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertEquals( 0, entry.getAttributeTypes().size() );
 
@@ -1686,7 +1680,7 @@
     @Test
     public void testGetAttributeType() throws Exception 
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
 
         assertNull( entry.get( atCN ) );
         assertNull( entry.get( (AttributeType)null ) );
@@ -1713,7 +1707,7 @@
     @Test
     public void testGetString() throws Exception 
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
 
         assertNull( entry.get( "cn" ) );
         assertNull( entry.get( "badId" ) );
@@ -1742,7 +1736,7 @@
     @Test
     public void testGetDn() throws InvalidNameException 
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
          
         assertEquals( EXAMPLE_DN, entry.getDn() );
          
@@ -1759,8 +1753,8 @@
     @Test
     public void testHashCode() throws InvalidNameException, Exception
     {
-        Entry entry1 = new DefaultServerEntry( registries, EXAMPLE_DN );
-        Entry entry2 = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry1 = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
+        Entry entry2 = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertEquals( entry1.hashCode(), entry2.hashCode() );
         
@@ -1781,7 +1775,7 @@
 
         assertEquals( entry1.hashCode(), entry2.hashCode() );
         
-        Entry entry3 = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry3 = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         entry3.add( attrOC, attrSN, attrCN, attrPWD );
 
         assertEquals( entry1.hashCode(), entry3.hashCode() );
@@ -1794,7 +1788,7 @@
     @Test
     public void testHasObjectClassEntryAttribute() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
         
@@ -1823,7 +1817,7 @@
     @Test
     public void testHasObjectClassString() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertFalse( entry.containsAttribute( "objectClass" ) );
         assertFalse( entry.hasObjectClass( "top" ) );
@@ -1877,7 +1871,7 @@
     @Test
     public void testIterator() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
         EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
@@ -1918,7 +1912,7 @@
     @Test
     public void testPutAttributeTypeByteArrayArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         try
         {
@@ -1959,7 +1953,7 @@
     @Test
     public void testPutAttributeTypeStringArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         try
         {
@@ -2000,7 +1994,7 @@
     @Test
     public void testPutAttributeTypeValueArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -2048,7 +2042,7 @@
     @Test
     public void testPutEntryAttribute() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute oc = new DefaultServerAttribute( atObjectClass, "top", "person" );
         EntryAttribute cn = new DefaultServerAttribute( atCN, "test1", "test2" );
@@ -2098,7 +2092,7 @@
     @Test
     public void testPutStringAttributeTypeByteArrayArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         try
         {
@@ -2173,7 +2167,7 @@
     @Test
     public void testPutStringAttributeTypeStringArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         try
         {
@@ -2247,7 +2241,7 @@
     @Test
     public void testPutStringAttributeTypeValueArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -2328,7 +2322,7 @@
     @Test
     public void testPutStringByteArrayArray()
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         try
         {
@@ -2396,7 +2390,7 @@
     @Test
     public void testPutStringStringArray()
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         try
         {
@@ -2466,7 +2460,7 @@
     @Test
     public void testPutStringValueArray()
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -2547,7 +2541,7 @@
     @Test public void tesPutServerAttributeElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
 
         // first test a null SA addition. It should be allowed.
         try
@@ -2561,9 +2555,9 @@
         }
         
         // Adding some serverAttributes
-        //AttributeType atCo = registries.getAttributeTypeRegistry().lookup( "countryName" );
-        AttributeType atGN = registries.getAttributeTypeRegistry().lookup( "givenname" );
-        AttributeType atStreet = registries.getAttributeTypeRegistry().lookup( "2.5.4.9" );
+        //AttributeType atCo = registries.lookupAttributeTypeRegistry( "countryName" );
+        AttributeType atGN = schemaManager.lookupAttributeTypeRegistry( "givenname" );
+        AttributeType atStreet = schemaManager.lookupAttributeTypeRegistry( "2.5.4.9" );
 
         ServerAttribute sa = new DefaultServerAttribute( atL, "france" );
         entry.put( sa );
@@ -2602,7 +2596,7 @@
         assertEquals( "testStreet", entry.get( atStreet ).get().getString() );
         
         // test an ObjectClass replacement
-        AttributeType OBJECT_CLASS_AT = registries.getAttributeTypeRegistry().lookup( SchemaConstants.OBJECT_CLASS_AT );
+        AttributeType OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         ServerAttribute oc = new DefaultServerAttribute( "OBJECTCLASS", OBJECT_CLASS_AT, "person", "inetorgperson" );
         List<EntryAttribute> oldOc = entry.put( oc );
         
@@ -2627,7 +2621,7 @@
     @Test public void tesPutAtStringElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test an empty AT
         entry.put( atCN, (String)null );
@@ -2647,7 +2641,7 @@
         }
         
         // Add a single value
-        atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
+        atCN = schemaManager.lookupAttributeTypeRegistry( "cn" );
         entry.put( atCN, "test" );
         
         assertEquals( 1, entry.size() );
@@ -2684,7 +2678,7 @@
     @Test public void tesPutAtByteElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test an empty AT
         entry.put( atPwd, (byte[])null );
@@ -2709,7 +2703,7 @@
         byte[] test3 = StringTools.getBytesUtf8( "test3" );
         
         // Add a single value
-        atPwd = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        atPwd = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         entry.put( atPwd, password );
         
         assertEquals( 1, entry.size() );
@@ -2746,7 +2740,7 @@
     @Test public void tesPutAtSVs() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Adding a null value to an attribute
         entry.put( atCN, (Value<?>)null );
@@ -2766,7 +2760,7 @@
         }
         
         // Add a single value
-        atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
+        atCN = schemaManager.lookupAttributeTypeRegistry( "cn" );
         Value<?> ssv = new ServerStringValue( atCN, "test" );
         entry.put( atCN, ssv );
         
@@ -2808,7 +2802,7 @@
     @Test public void tesPutUpIdStringElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Adding a null value should be possible
         entry.put( "cn", (String)null );
@@ -2829,7 +2823,7 @@
         }
         
         // Add a single value
-        atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
+        atCN = schemaManager.lookupAttributeTypeRegistry( "cn" );
         entry.put( "cn", "test" );
         
         assertEquals( 1, entry.size() );
@@ -2870,9 +2864,9 @@
     @Test public void tesPutUpIdBytesElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         // Adding a null value should be possible
         entry.put( "userPassword", (byte[])null );
@@ -2933,7 +2927,7 @@
     @Test public void tesPutUpIDAtStringElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test that we get an error when the ID or AT are null
         try
@@ -2996,9 +2990,9 @@
     @Test public void tesPutUpIDAtBytesElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         // Test that we get an error when the ID or AT are null
         try
@@ -3079,7 +3073,7 @@
     @Test public void tesPutUpIDAtSVElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test that we get an error when the ID or AT are null
         try
@@ -3157,7 +3151,7 @@
     @Test public void tesPutUpIDSVElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // Test that we get an error when the ID or AT are null
         try
@@ -3203,7 +3197,7 @@
     @Test
     public void testRemoveAttributeTypeByteArrayArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, (byte[])null, BYTES2 );
 
@@ -3232,7 +3226,7 @@
     @Test
     public void testRemoveAttributeTypeStringArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", (String)null, "test2" );
 
@@ -3261,7 +3255,7 @@
     @Test
     public void testRemoveAttributeTypeValueArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -3297,7 +3291,7 @@
     @Test
     public void testRemoveEntryAttribute() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
         EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
@@ -3329,7 +3323,7 @@
     @Test
     public void testRemoveAttributesAttributeTypeArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
 
         EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
         EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
@@ -3357,7 +3351,7 @@
     @Test
     public void testRemoveAttributesStringArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
 
         EntryAttribute attrOC = new DefaultServerAttribute( atOC, "top", "person" );
         EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", "test2" );
@@ -3388,7 +3382,7 @@
     @Test
     public void testRemoveStringByteArrayArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, (byte[])null, BYTES2 );
 
@@ -3421,7 +3415,7 @@
     @Test
     public void testRemoveStringStringArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", (String)null, "test2" );
 
@@ -3454,7 +3448,7 @@
     @Test
     public void testRemoveStringValueArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         Value<String> strValue1 = new ServerStringValue( atCN, "test1" );
         Value<String> strValue2 = new ServerStringValue( atCN, "test2" );
@@ -3490,9 +3484,9 @@
     @Test public void testRemoveUpIdElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType atPassword = registries.getAttributeTypeRegistry().lookup( "userPassword" );
+        AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         
         byte[] b1 = StringTools.getBytesUtf8( "test1" );
         byte[] b2 = StringTools.getBytesUtf8( "test2" );
@@ -3522,7 +3516,7 @@
         assertNotNull( entry.get( atCN ) );
         assertNotNull( entry.get( atPassword ) );
         
-        AttributeType OBJECT_CLASS_AT = registries.getAttributeTypeRegistry().lookup( SchemaConstants.OBJECT_CLASS_AT );
+        AttributeType OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         
         entry.removeAttributes( "cN", "UsErPaSsWoRd" );
         assertEquals( 0, entry.size() );
@@ -3549,7 +3543,7 @@
     @Test public void testSetATElipsis() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         List<EntryAttribute> result = null;
         
@@ -3567,8 +3561,8 @@
         assertEquals( "sn", ((ServerAttribute)sa).getAttributeType().getName() );
         
         // Add two AT now
-        AttributeType atGN = registries.getAttributeTypeRegistry().lookup( "givenname" );
-        AttributeType atStreet = registries.getAttributeTypeRegistry().lookup( "2.5.4.9" );
+        AttributeType atGN = schemaManager.lookupAttributeTypeRegistry( "givenname" );
+        AttributeType atStreet = schemaManager.lookupAttributeTypeRegistry( "2.5.4.9" );
         result = entry.set( atL, atC, atGN, atStreet );
         
         assertNull( result );
@@ -3602,14 +3596,14 @@
         assertEquals( "test", entry.get( "sn" ).get().getString() ); 
         
         // Now add a new SN empty AT : it should replace the existing one.
-        AttributeType atSNEmpty = registries.getAttributeTypeRegistry().lookup( "sn" );
+        AttributeType atSNEmpty = schemaManager.lookupAttributeTypeRegistry( "sn" );
         sa = entry.set( atSNEmpty ).get( 0 );
         assertEquals( "test", sa.get().getString() ); 
         assertNotNull( entry.get(  "sn" ) );
         assertNull( entry.get(  "sn" ).get() );
         
         // Last, not least, put an ObjectClass AT
-        AttributeType OBJECT_CLASS_AT = registries.getAttributeTypeRegistry().lookup( SchemaConstants.OBJECT_CLASS_AT );
+        AttributeType OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         
         entry.set( OBJECT_CLASS_AT );
         
@@ -3628,7 +3622,7 @@
     @Test public void testSetUpID() throws Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
         // First check that this method fails if we pass a null or empty ID
         List<EntryAttribute> result = entry.set( (String)null );
@@ -3651,8 +3645,8 @@
         assertEquals( "sn", sa.getId() );
         
         // Add different upIds now
-        AttributeType atGN = registries.getAttributeTypeRegistry().lookup( "givenname" );
-        AttributeType atStreet = registries.getAttributeTypeRegistry().lookup( "2.5.4.9" );
+        AttributeType atGN = schemaManager.lookupAttributeTypeRegistry( "givenname" );
+        AttributeType atStreet = schemaManager.lookupAttributeTypeRegistry( "2.5.4.9" );
         
         entry.set( "L" );
         entry.set( "CountryName" );
@@ -3693,7 +3687,7 @@
         assertEquals( "test", entry.get( "sn" ).get().getString() ); 
         
         // Now add a new SN empty AT : it should replace the existing one.
-        AttributeType atSNEmpty = registries.getAttributeTypeRegistry().lookup( "sn" );
+        AttributeType atSNEmpty = schemaManager.lookupAttributeTypeRegistry( "sn" );
         sa = entry.set( atSNEmpty ).get( 0 );
         assertEquals( "test", sa.get().getString() ); 
         assertNotNull( entry.get(  "sn" ) );
@@ -3707,7 +3701,7 @@
     @Test
     public void testSetAttributeTypeArray() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
 
         entry.add( "ObjectClass", "top", "person" );
         entry.add( "cn", "test1", "test2" );
@@ -3737,7 +3731,7 @@
     @Test
     public void testSetStringArray() throws Exception
     {
-        Entry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        Entry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
 
         entry.add( "ObjectClass", "top", "person" );
         entry.add( "cn", "test1", "test2" );
@@ -3767,7 +3761,7 @@
     @Test
     public void testSetDn()
     {
-        Entry entry = new DefaultServerEntry( registries );
+        Entry entry = new DefaultServerEntry( schemaManager );
          
         assertEquals( LdapDN.EMPTY_LDAPDN, entry.getDn() );
          
@@ -3782,12 +3776,12 @@
      @Test
      public void testSize() throws Exception
      {
-         ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+         ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
           
          assertEquals( 0, entry.size() );
-         entry.add( "ObjectClass", atr.lookup( "ObjectClass" ), "top", "person" );
-         entry.add( "CN", atr.lookup( "Cn" ), "test" );
-         entry.add( "SN", atr.lookup( "Sn" ), "Test" );
+         entry.add( "ObjectClass", schemaManager.lookupAttributeTypeRegistry( "ObjectClass" ), "top", "person" );
+         entry.add( "CN", schemaManager.lookupAttributeTypeRegistry( "Cn" ), "test" );
+         entry.add( "SN", schemaManager.lookupAttributeTypeRegistry( "Sn" ), "Test" );
           
          assertEquals( 3, entry.size() );
          
@@ -3802,12 +3796,12 @@
     @Test public void testToBasicAttributes() throws InvalidNameException, Exception
     {
         LdapDN dn = new LdapDN( "cn=test" );
-        DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         
-        AttributeType OBJECT_CLASS_AT = registries.getAttributeTypeRegistry().lookup( SchemaConstants.OBJECT_CLASS_AT );
+        AttributeType OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         
         entry.put( "objectClass", OBJECT_CLASS_AT, "top", "person", "inetOrgPerson", "organizationalPerson" );
-        entry.put( "cn", registries.getAttributeTypeRegistry().lookup( "cn" ), "test" );
+        entry.put( "cn", schemaManager.lookupAttributeTypeRegistry( "cn" ), "test" );
         
         Attributes attributes = ServerEntryUtils.toBasicAttributes( entry );
         
@@ -3838,7 +3832,7 @@
     @Test
     public void testToString() throws Exception
     {
-        ServerEntry entry = new DefaultServerEntry( registries, EXAMPLE_DN );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN );
         
         assertEquals( "ServerEntry\n    dn[]: dc=example,dc=com\n", entry.toString() );
         
@@ -3874,11 +3868,11 @@
     @Test 
     public void testCopyConstructorServerEntry() throws NamingException
     {
-        Entry serverEntry = new DefaultServerEntry( registries );
+        Entry serverEntry = new DefaultServerEntry( schemaManager );
         serverEntry.add( "cn", "test1", "test2" );
         serverEntry.add( "objectClass", "top", "person" );
         
-        Entry copyEntry = new DefaultServerEntry( registries, serverEntry );
+        Entry copyEntry = new DefaultServerEntry( schemaManager, serverEntry );
         
         assertEquals( copyEntry, serverEntry );
         assertTrue( copyEntry.contains( "objectClass", "top", "person" ) );
@@ -3903,7 +3897,7 @@
         clientEntry.add( "cn", "test1", "test2" );
         clientEntry.add( "objectClass", "top", "person" );
         
-        Entry copyEntry = new DefaultServerEntry( registries, clientEntry );
+        Entry copyEntry = new DefaultServerEntry( schemaManager, clientEntry );
         
         assertTrue( copyEntry instanceof ServerEntry );
         assertTrue( copyEntry.contains( "objectClass", "top", "person" ) );
@@ -3923,7 +3917,7 @@
     public void testToClientEntry() throws NamingException
     {
         LdapDN dn = new LdapDN( "ou=system" );
-        ServerEntry serverEntry = new DefaultServerEntry( registries );
+        ServerEntry serverEntry = new DefaultServerEntry( schemaManager );
         serverEntry.setDn( dn );
         serverEntry.add( "cn", "test1", "test2" );
         serverEntry.add( "objectClass", "top", "person" );

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java Sat Nov  7 07:57:34 2009
@@ -35,7 +35,6 @@
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 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.ExceptionUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.schema.DefaultSchemaManager;
@@ -53,7 +52,7 @@
 public class ServerEntrySerializerTest
 {
     private static LdifSchemaLoader loader;
-    private static Registries registries;
+    private static SchemaManager schemaManager;
     private static Map<String, OidNormalizer> oids;
     private static Map<String, OidNormalizer> oidOids;
 
@@ -76,20 +75,17 @@
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory ) );
         extractor.extractOrCopy();
         loader = new LdifSchemaLoader( schemaRepository );
-        registries = new Registries();
         
-        SchemaManager sm = new DefaultSchemaManager( loader );
-        sm.loadAllEnabled();
+        schemaManager = new DefaultSchemaManager( loader );
+        schemaManager.loadAllEnabled();
         
-        List<Throwable> errors = sm.getErrors();
+        List<Throwable> errors = schemaManager.getErrors();
         
         if ( errors.size() != 0 )
         {
             fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
         }
         
-        registries = sm.getRegistries();
-        
         oids = new HashMap<String, OidNormalizer>();
 
         // DC normalizer
@@ -124,9 +120,9 @@
     @Test public void testSerializeEmtpyServerEntry() throws Exception
     {
         LdapDN dn = LdapDN.EMPTY_LDAPDN;
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
         
         byte[] data = ses.serialize( entry );
         
@@ -141,9 +137,9 @@
         LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
         
         byte[] data = ses.serialize( entry );
         
@@ -158,10 +154,10 @@
         LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "inetOrgPerson", "organizationalPerson" );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
 
         byte[] data = ses.serialize( entry );
         
@@ -176,13 +172,13 @@
         LdapDN dn = new LdapDN( "cn=text, dc=example, dc=com" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "inetOrgPerson", "organizationalPerson" );
         entry.add( "cn", "text", "test" );
         entry.add( "SN", (String)null );
         entry.add( "userPassword", StringTools.getBytesUtf8( "password" ) );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
         
         byte[] data = ses.serialize( entry );
         
@@ -197,13 +193,13 @@
         LdapDN dn = new LdapDN( "" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "inetOrgPerson", "organizationalPerson" );
         entry.add( "cn", "text", "test" );
         entry.add( "SN", (String)null );
         entry.add( "userPassword", StringTools.getBytesUtf8( "password" ) );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
         
         byte[] data = ses.serialize( entry );
         
@@ -218,9 +214,9 @@
         LdapDN dn = new LdapDN( "" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
         
         byte[] data = ses.serialize( entry );
         
@@ -235,10 +231,10 @@
         LdapDN dn = new LdapDN( "" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
-        EntryAttribute oc = new DefaultServerAttribute( "ObjectClass", registries.getAttributeTypeRegistry().lookup( "objectclass" ) );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
+        EntryAttribute oc = new DefaultServerAttribute( "ObjectClass", schemaManager.lookupAttributeTypeRegistry( "objectclass" ) );
         entry.add( oc );
         
         byte[] data = ses.serialize( entry );
@@ -254,9 +250,9 @@
         LdapDN dn = new LdapDN( "" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
         entry.add( "ObjectClass", "top", "person" );
         
         byte[] data = ses.serialize( entry );
@@ -272,9 +268,9 @@
         LdapDN dn = new LdapDN( "" );
         dn.normalize( oids );
         
-        ServerEntry entry = new DefaultServerEntry( registries, dn );
+        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
 
-        ServerEntrySerializer ses = new ServerEntrySerializer( registries );
+        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
         entry.add( "userPassword", StringTools.getBytesUtf8( "secret" ) );
         
         byte[] data = ses.serialize( entry );

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java Sat Nov  7 07:57:34 2009
@@ -45,7 +45,6 @@
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.directory.shared.schema.DefaultSchemaManager;
 import org.apache.directory.shared.schema.loader.ldif.LdifSchemaLoader;
@@ -62,7 +61,7 @@
 public class ServerModificationTest
 {
     private static LdifSchemaLoader loader;
-    private static Registries registries;
+    private static SchemaManager schemaManager;
     private static AttributeType atCN;
     
     // A SINGLE-VALUE attribute
@@ -120,7 +119,7 @@
             oIn = new ObjectInputStream( in );
 
             ServerModification value = new ServerModification();
-            value.deserialize( oIn, registries.getAttributeTypeRegistry() );
+            value.deserialize( oIn, schemaManager );
 
             return value;
         }
@@ -164,21 +163,19 @@
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory ) );
         extractor.extractOrCopy();
         loader = new LdifSchemaLoader( schemaRepository );
-        registries = new Registries();
         
-        SchemaManager sm = new DefaultSchemaManager( loader );
-        sm.loadAllEnabled();
+        schemaManager = new DefaultSchemaManager( loader );
+        schemaManager.loadAllEnabled();
         
-        List<Throwable> errors = sm.getErrors();
+        List<Throwable> errors = schemaManager.getErrors();
         
         if ( errors.size() != 0 )
         {
             fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
         }
 
-        registries = sm.getRegistries();
-        atCN = registries.getAttributeTypeRegistry().lookup( "cn" );
-        atC = registries.getAttributeTypeRegistry().lookup( "c" );
+        atCN = schemaManager.lookupAttributeTypeRegistry( "cn" );
+        atC = schemaManager.lookupAttributeTypeRegistry( "c" );
     }
 
 
@@ -214,7 +211,7 @@
         attribute.add( "test1", "test2" );
         Modification serverModification = new ServerModification( ModificationOperation.ADD_ATTRIBUTE, attribute );
         
-        Modification copy = new ServerModification( registries, serverModification );
+        Modification copy = new ServerModification( schemaManager, serverModification );
         
         assertTrue( copy instanceof ServerModification );
         assertEquals( copy, serverModification );
@@ -239,7 +236,7 @@
         attribute.add( "test1", "test2" );
         Modification clientModification = new ClientModification( ModificationOperation.ADD_ATTRIBUTE, attribute );
         
-        Modification copy = new ServerModification( registries, clientModification );
+        Modification copy = new ServerModification( schemaManager, clientModification );
         
         assertTrue( copy instanceof ServerModification );
         assertFalse( copy instanceof ClientModification );

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/resources/log4j.properties?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/resources/log4j.properties (original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/resources/log4j.properties Sat Nov  7 07:57:34 2009
@@ -14,7 +14,7 @@
 #    See the License for the specific language governing permissions and
 #    limitations under the License.
 #############################################################################
-log4j.rootCategory=DEBUG, stdout
+log4j.rootCategory=ERROR, stdout
 
 log4j.appender.stdout=org.apache.log4j.RollingFileAppender
 log4j.appender.stdout.File=apacheds-rolling.log
@@ -26,4 +26,4 @@
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
 
-log4j.logger.org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor=ERROR
\ No newline at end of file
+log4j.logger.org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor=ERROR

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java Sat Nov  7 07:57:34 2009
@@ -88,13 +88,14 @@
             schemaPartition.setWrappedPartition( ldifPartition );
             
             JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
-            SchemaManager sm = new DefaultSchemaManager( loader );
-
-            boolean loaded = sm.loadAllEnabled();
-            schemaPartition.setRegistries( sm.getRegistries() );
-            schemaPartition.setSchemaManager( sm );
+            SchemaManager schemaManager = new DefaultSchemaManager( loader );
+            service.setSchemaManager( schemaManager );
+            
+            boolean loaded = schemaManager.loadAllEnabled();
+            schemaPartition.setRegistries( schemaManager.getRegistries() );
+            schemaPartition.setSchemaManager( schemaManager );
             
-            List<Throwable> errors = sm.getErrors();
+            List<Throwable> errors = schemaManager.getErrors();
             
             if ( errors.size() != 0 )
             {
@@ -114,7 +115,7 @@
             systemPartition.setId( "system" );
             ((JdbmPartition)systemPartition).setCacheSize( 500 );
             systemPartition.setSuffix( ServerDNConstants.SYSTEM_DN );
-            systemPartition.setRegistries( sm.getRegistries() );
+            systemPartition.setSchemaManager( schemaManager );
             ((JdbmPartition)systemPartition).setPartitionDir( new File( workingDirectory, "system" ) );
     
             // Add objectClass attribute for the system partition

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Sat Nov  7 07:57:34 2009
@@ -108,7 +108,7 @@
             if ( entry.isChangeAdd() )
             {
                 service.getAdminSession().add( 
-                    new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) );
+                    new DefaultServerEntry( service.getSchemaManager(), entry.getEntry() ) );
             }
             else if ( entry.isChangeModify() )
             {
@@ -141,7 +141,7 @@
         }
 
         LdapDN userDn = new LdapDN( principalDn );
-        userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        userDn.normalize( service.getSchemaManager().getNormalizerMapping() );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
 
         if ( dn == null )
@@ -164,7 +164,7 @@
         }
         
         LdapDN userDn = new LdapDN( principalDn );
-        userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        userDn.normalize( service.getSchemaManager().getNormalizerMapping() );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
         
         if ( dn == null )
@@ -204,7 +204,7 @@
         {
             case( ChangeType.ADD_ORDINAL ):
                 session.add( 
-                    new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) ); 
+                    new DefaultServerEntry( service.getSchemaManager(), entry.getEntry() ) ); 
                 break;
                 
             case( ChangeType.DELETE_ORDINAL ):
@@ -321,7 +321,7 @@
      */
     public static boolean isDisabled( DirectoryService service, String schemaName )
     {
-        Schema schema = service.getRegistries().getLoadedSchema( schemaName );
+        Schema schema = service.getSchemaManager().getLoadedSchema( schemaName );
         
         return ( schema == null ) || schema.isDisabled();
     }
@@ -333,7 +333,7 @@
      */
     public static boolean isEnabled( DirectoryService service, String schemaName )
     {
-        Schema schema = service.getRegistries().getLoadedSchema( schemaName );
+        Schema schema = service.getSchemaManager().getLoadedSchema( schemaName );
         
         return ( schema != null ) && schema.isEnabled();
     }

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/state/AbstractState.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/state/AbstractState.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/state/AbstractState.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/main/java/org/apache/directory/server/core/integ/state/AbstractState.java Sat Nov  7 07:57:34 2009
@@ -204,7 +204,7 @@
                     for ( LdifEntry entry : ldifReader )
                     {
                         service.getAdminSession().add( 
-                            new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) ); 
+                            new DefaultServerEntry( service.getSchemaManager(), entry.getEntry() ) ); 
                         LOG.debug( "Successfully injected LDIF enry for test {}: {}", settings.getDescription(), entry );
                     }
                 }
@@ -230,7 +230,7 @@
                         try
                         {
                             service.getAdminSession().add( 
-                                new DefaultServerEntry( service.getRegistries(), entry.getEntry() ) ); 
+                                new DefaultServerEntry( service.getSchemaManager(), entry.getEntry() ) ); 
                             LOG.debug( "Successfully injected LDIF enry for test {}: {}", settings.getDescription(), entry );
                         }
                         catch ( Exception e )

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java Sat Nov  7 07:57:34 2009
@@ -20,16 +20,22 @@
 package org.apache.directory.server.core.authz;
 
 
+import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
 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.getUserAddLdif;
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.Entry;
@@ -46,15 +52,9 @@
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertTrue;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import javax.naming.NamingException;
-
 
 /**
  * Tests the Authorization service to make sure it is enforcing policies
@@ -81,7 +81,7 @@
         LdifEntry akarasulu = getUserAddLdif();
 
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
 
         try
         {
@@ -106,7 +106,7 @@
         LdifEntry akarasulu = getUserAddLdif();
 
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
 
         try
         {
@@ -134,7 +134,7 @@
         LdifEntry akarasulu = getUserAddLdif();
         
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
         
         // Read the entry we just created using the akarasuluSession
         Entry readEntry = service.getAdminSession().lookup( akarasulu.getDn(), new String[]{ "userPassword"} );
@@ -149,7 +149,7 @@
         mods.add( mod );
       
         LdapDN userDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
-        userDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        userDn.normalize( service.getSchemaManager().getAttributeTypeRegistry().getNormalizerMapping() );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
         CoreSession akarasuluSession = service.getSession( principal );
 
@@ -176,7 +176,7 @@
         LdifEntry akarasulu = getUserAddLdif();
         
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
 
         try
         {

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java Sat Nov  7 07:57:34 2009
@@ -102,19 +102,19 @@
             
             JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
             
-            SchemaManager sm = new DefaultSchemaManager( loader );
+            SchemaManager schemaManager = new DefaultSchemaManager( loader );
+            service.setSchemaManager( schemaManager );
 
-            sm.loadAllEnabled();
+            schemaManager.loadAllEnabled();
             
-            List<Throwable> errors = sm.getErrors();
+            List<Throwable> errors = schemaManager.getErrors();
             
             if ( errors.size() != 0 )
             {
                 fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
             }
 
-            schemaPartition.setRegistries( sm.getRegistries() );
-            schemaPartition.setSchemaManager( sm );
+            schemaPartition.setSchemaManager( schemaManager );
 
             extractor.extractOrCopy();
 
@@ -129,7 +129,7 @@
             systemPartition.setId( "system" );
             ((JdbmPartition)systemPartition).setCacheSize( 500 );
             systemPartition.setSuffix( ServerDNConstants.SYSTEM_DN );
-            systemPartition.setRegistries( sm.getRegistries() );
+            systemPartition.setSchemaManager( schemaManager );
             ((JdbmPartition)systemPartition).setPartitionDir( new File( workingDirectory, "system" ) );
     
             // Add objectClass attribute for the system partition
@@ -175,18 +175,19 @@
             schemaPartition.setWrappedPartition( ldifPartition );
             
             JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
-            SchemaManager sm = new DefaultSchemaManager( loader );
+            SchemaManager schemaManager = new DefaultSchemaManager( loader );
+            service.setSchemaManager( schemaManager );
 
-            sm.loadAllEnabled();
+            schemaManager.loadAllEnabled();
             
-            List<Throwable> errors = sm.getErrors();
+            List<Throwable> errors = schemaManager.getErrors();
             
             if ( errors.size() != 0 )
             {
                 fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
             }
             
-            schemaPartition.setRegistries( sm.getRegistries() );
+            schemaPartition.setSchemaManager( schemaManager );
 
             extractor.extractOrCopy();
 
@@ -201,7 +202,7 @@
             systemPartition.setId( "system" );
             ((JdbmPartition)systemPartition).setCacheSize( 500 );
             systemPartition.setSuffix( ServerDNConstants.SYSTEM_DN );
-            systemPartition.setRegistries( sm.getRegistries() );
+            systemPartition.setSchemaManager( schemaManager );
             ((JdbmPartition)systemPartition).setPartitionDir( new File( workingDirectory, "system" ) );
     
             // Add objectClass attribute for the system partition

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java Sat Nov  7 07:57:34 2009
@@ -67,8 +67,8 @@
         service.addPartition( partition );
         
         LdapDN suffixDn = new LdapDN( "ou=removable" );
-        suffixDn.normalize( service.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
-        ServerEntry ctxEntry = new DefaultServerEntry( service.getRegistries(), suffixDn );
+        suffixDn.normalize( service.getSchemaManager().getNormalizerMapping() );
+        ServerEntry ctxEntry = new DefaultServerEntry( service.getSchemaManager(), suffixDn );
         ctxEntry.put( "objectClass", "top" );
         ctxEntry.get( "objectClass" ).add( "organizationalUnit" );
         ctxEntry.put( "ou", "removable" );

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java Sat Nov  7 07:57:34 2009
@@ -20,23 +20,24 @@
 package org.apache.directory.server.core.jndi;
 
 
-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.getUserAddLdif;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.ldif.LdifEntry;
-
-import static org.junit.Assert.assertTrue;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
 import static org.junit.Assert.assertFalse;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashSet;
 
 import javax.naming.NameClassPair;
 import javax.naming.NamingEnumeration;
 import javax.naming.ldap.LdapContext;
-import java.util.HashSet;
+
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.shared.ldap.ldif.LdifEntry;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -58,7 +59,7 @@
     {
         LdifEntry akarasulu = getUserAddLdif();
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
 
         LdapContext sysRoot = getContext( akarasulu.getDn().getUpName(), service, "ou=system" );
         HashSet<String> set = new HashSet<String>();
@@ -81,7 +82,7 @@
     {
         LdifEntry akarasulu = getUserAddLdif();
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
 
         LdapContext sysRoot = getContext( akarasulu.getDn().getUpName(), service, "ou=system" );
         HashSet<String> set = new HashSet<String>();
@@ -124,7 +125,7 @@
         HashSet<String> set = new HashSet<String>();
         LdifEntry akarasulu = getUserAddLdif();
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
                 
 
         NamingEnumeration<NameClassPair> list = sysRoot.list( "ou=users" );

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java Sat Nov  7 07:57:34 2009
@@ -116,19 +116,19 @@
             
             JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
 
-            SchemaManager sm = new DefaultSchemaManager( loader );
+            SchemaManager schemaManager = new DefaultSchemaManager( loader );
+            service.setSchemaManager( schemaManager );
             
-            sm.loadAllEnabled();
+            schemaManager.loadAllEnabled();
             
-            List<Throwable> errors = sm.getErrors();
+            List<Throwable> errors = schemaManager.getErrors();
             
             if ( errors.size() != 0 )
             {
                 fail( "Schema load failed : " + ExceptionUtils.printErrors( errors ) );
             }
             
-            schemaPartition.setRegistries( sm.getRegistries() );
-            schemaPartition.setSchemaManager( sm );
+            schemaPartition.setSchemaManager( schemaManager );
             
             extractor.extractOrCopy();
 
@@ -143,7 +143,7 @@
             systemPartition.setId( "system" );
             ((JdbmPartition)systemPartition).setCacheSize( 500 );
             systemPartition.setSuffix( ServerDNConstants.SYSTEM_DN );
-            systemPartition.setRegistries( sm.getRegistries() );
+            systemPartition.setSchemaManager( schemaManager );
             ((JdbmPartition)systemPartition).setPartitionDir( new File( workingDirectory, "system" ) );
     
             // Add objectClass attribute for the system partition

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java Sat Nov  7 07:57:34 2009
@@ -71,7 +71,7 @@
     {
         LdifEntry akarasulu = getUserAddLdif();
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
 
         LdapContext sysRoot = getSystemContext( service );
 

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java Sat Nov  7 07:57:34 2009
@@ -20,19 +20,13 @@
 package org.apache.directory.server.core.jndi;
 
 
-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.getSystemContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
-import org.apache.directory.shared.ldap.util.ArrayUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
-import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNull;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Hashtable;
 
 import javax.naming.Context;
 import javax.naming.Name;
@@ -45,7 +39,15 @@
 import javax.naming.ldap.LdapContext;
 import javax.naming.spi.DirObjectFactory;
 import javax.naming.spi.DirStateFactory;
-import java.util.Hashtable;
+
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.shared.ldap.ldif.LdifEntry;
+import org.apache.directory.shared.ldap.util.ArrayUtils;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -65,7 +67,7 @@
     {
         LdifEntry akarasulu = getUserAddLdif();
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ) ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ) ); 
 
 
         LdapContext sysRoot = getSystemContext( service );

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java Sat Nov  7 07:57:34 2009
@@ -20,26 +20,17 @@
 package org.apache.directory.server.core.jndi;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.entry.DefaultServerEntry;
-import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
-import org.apache.directory.shared.ldap.exception.LdapReferralException;
-import org.apache.directory.shared.ldap.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.LdapDN;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
 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;
+
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.naming.Context;
 import javax.naming.Name;
@@ -58,8 +49,19 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
-import java.util.HashMap;
-import java.util.Map;
+
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.directory.shared.ldap.exception.LdapReferralException;
+import org.apache.directory.shared.ldap.ldif.LdifEntry;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -104,7 +106,7 @@
 
         LdifEntry akarasulu = getUserAddLdif();
         service.getAdminSession().add( 
-            new DefaultServerEntry( service.getRegistries(), akarasulu.getEntry() ), true ); 
+            new DefaultServerEntry( service.getSchemaManager(), akarasulu.getEntry() ), true ); 
 
         // -------------------------------------------------------------------
         // Adds a referral entry regardless of referral handling settings
@@ -329,7 +331,7 @@
         // encounter referral errors with referral setting set to throw.
         // -------------------------------------------------------------------
         LdapDN userDN = new LdapDN( "cn=alex karasulu,ou=apache,ou=users,ou=system" );
-        ServerEntry userEntry = new DefaultServerEntry( service.getRegistries(), userDN );
+        ServerEntry userEntry = new DefaultServerEntry( service.getSchemaManager(), userDN );
         
         userEntry.add(  "ObjectClass", "top", "person" );
         userEntry.add( "sn", "karasulu" );

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java?rev=833647&r1=833646&r2=833647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java Sat Nov  7 07:57:34 2009
@@ -128,7 +128,7 @@
         
         // Core API entry
         LdapDN dn = new LdapDN( "cn=Emmanuel Lecharny, ou=apache, ou=people, o=MNN, c=WW, ou=system" );
-        serverEntry = new DefaultServerEntry( service.getRegistries(), dn );
+        serverEntry = new DefaultServerEntry( service.getSchemaManager(), dn );
 
         serverEntry.put( "ObjectClass", "top", "person" );
         serverEntry.put( "sn", "elecharny" );



Mime
View raw message