You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/06/20 19:12:32 UTC

svn commit: r191512 - in /directory/apacheds/branches/db_refactor/core/src/main: aspects/org/apache/ldap/server/jndi/ java/org/apache/ldap/server/configuration/ java/org/apache/ldap/server/jndi/ java/org/apache/ldap/server/partition/ java/org/apache/ld...

Author: trustin
Date: Mon Jun 20 10:12:29 2005
New Revision: 191512

URL: http://svn.apache.org/viewcvs?rev=191512&view=rev
Log:
* GlobalRegistries and its components look like they don't need SystemPartition in their constructors, so I removed it.
* Fixed NullPointerException while initializing GlobalRegistries.
* AbstractContextFactory never throws LdapConfigurationException instead of configuration.ConfigurationException.

Modified:
    directory/apacheds/branches/db_refactor/core/src/main/aspects/org/apache/ldap/server/jndi/ProviderNexusAspect.aj
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java

Modified: directory/apacheds/branches/db_refactor/core/src/main/aspects/org/apache/ldap/server/jndi/ProviderNexusAspect.aj
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/aspects/org/apache/ldap/server/jndi/ProviderNexusAspect.aj?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/aspects/org/apache/ldap/server/jndi/ProviderNexusAspect.aj (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/aspects/org/apache/ldap/server/jndi/ProviderNexusAspect.aj Mon Jun 20 10:12:29 2005
@@ -15,10 +15,9 @@
 import javax.naming.directory.ModificationItem;
 
 import org.apache.ldap.common.filter.ExprNode;
-import org.apache.ldap.server.PartitionNexus;
-import org.apache.ldap.server.db.Database;
-import org.apache.ldap.server.ContextPartition;
 import org.apache.ldap.server.invocation.Invocation;
+import org.apache.ldap.server.partition.ContextPartitionNexus;
+import org.apache.ldap.server.partition.ContextPartition;
 
 
 /**
@@ -145,8 +144,7 @@
     pointcut jndiNexusCalls( Context caller ):
         this( caller ) &&
         ! this( ContextPartition ) &&
-        target( PartitionNexus ) &&
-        ! target( Database ) &&
+        target( ContextPartitionNexus ) &&
         (
         // these are for the ContextPartition interface methods 
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java Mon Jun 20 10:12:29 2005
@@ -42,6 +42,9 @@
  */
 public class ContextPartitionConfiguration
 {
+    /** The name of reserved system partition */
+    public static final String SYSTEM_PARTITION_NAME = "system";
+
     private String name;
     private String suffix;
     private Set indexedAttributes = new HashSet(); // Set<String>
@@ -63,7 +66,8 @@
     protected void setName( String name )
     {
         // TODO name can be a directory name.
-        this.name = name.trim();
+        name = name.trim();
+        this.name = name;
     }
 
     public Set getIndexedAttributes()

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java Mon Jun 20 10:12:29 2005
@@ -164,10 +164,19 @@
         Set newSet = ConfigurationUtil.getTypeSafeSet(
                 authenticatorConfigurations, AuthenticatorConfiguration.class );
         
+        Set names = new HashSet();
         Iterator i = newSet.iterator();
         while( i.hasNext() )
         {
-            ( ( AuthenticatorConfiguration ) i.next() ).validate();
+            AuthenticatorConfiguration cfg = ( AuthenticatorConfiguration ) i.next();
+            cfg.validate();
+            
+            String name = cfg.getName();
+            if( names.contains( name ) )
+            {
+                throw new ConfigurationException( "Duplicate authenticator name: " + name );
+            }
+            names.add( name );
         }
         
         this.authenticatorConfigurations = newSet;
@@ -206,10 +215,19 @@
         Set newSet = ConfigurationUtil.getTypeSafeSet(
                 contextParitionConfigurations, ContextPartitionConfiguration.class );
         
+        Set names = new HashSet();
         Iterator i = newSet.iterator();
         while( i.hasNext() )
         {
-            ( ( ContextPartitionConfiguration ) i.next() ).validate();
+            ContextPartitionConfiguration cfg = ( ContextPartitionConfiguration ) i.next();
+            cfg.validate();
+
+            String name = cfg.getName();
+            if( names.contains( name ) )
+            {
+                throw new ConfigurationException( "Duplicate partition name: " + name );
+            }
+            names.add( name );
         }
         
         this.contextPartitionConfigurations = newSet;
@@ -247,10 +265,19 @@
         List newList = ConfigurationUtil.getTypeSafeList(
                 interceptorConfigurations, InterceptorConfiguration.class );
         
+        Set names = new HashSet();
         Iterator i = newList.iterator();
         while( i.hasNext() )
         {
-            ( ( InterceptorConfiguration ) i.next() ).validate();
+            InterceptorConfiguration cfg = ( InterceptorConfiguration ) i.next();
+            cfg.validate();
+
+            String name = cfg.getName();
+            if( names.contains( name ) )
+            {
+                throw new ConfigurationException( "Duplicate interceptor name: " + name );
+            }
+            names.add( name );
         }
 
         this.interceptorConfigurations = interceptorConfigurations;

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/AbstractContextFactory.java Mon Jun 20 10:12:29 2005
@@ -19,12 +19,12 @@
 
 import java.util.Hashtable;
 
+import javax.naming.ConfigurationException;
 import javax.naming.Context;
 import javax.naming.NamingException;
 import javax.naming.spi.InitialContextFactory;
 
 import org.apache.ldap.server.configuration.Configuration;
-import org.apache.ldap.server.configuration.ConfigurationException;
 import org.apache.ldap.server.configuration.ShutdownConfiguration;
 import org.apache.ldap.server.configuration.StartupConfiguration;
 import org.apache.ldap.server.configuration.SyncConfiguration;
@@ -122,7 +122,7 @@
         return authentication;
     }
 
-    private byte[] extractCredential( Hashtable env )
+    private byte[] extractCredential( Hashtable env ) throws ConfigurationException
     {
         byte[] credential;
         Object value = env.remove( Context.SECURITY_CREDENTIALS );

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/DefaultContextFactoryConfiguration.java Mon Jun 20 10:12:29 2005
@@ -35,6 +35,7 @@
 import org.apache.ldap.common.name.NameComponentNormalizer;
 import org.apache.ldap.common.util.DateUtils;
 import org.apache.ldap.server.configuration.Configuration;
+import org.apache.ldap.server.configuration.ConfigurationException;
 import org.apache.ldap.server.configuration.StartupConfiguration;
 import org.apache.ldap.server.interceptor.InterceptorChain;
 import org.apache.ldap.server.interceptor.InterceptorContext;
@@ -163,7 +164,17 @@
 
         env.put( Context.PROVIDER_URL, "" );
         
-        cfg.validate();
+        try
+        {
+            cfg.validate();
+        }
+        catch( ConfigurationException e )
+        {
+            NamingException ne = new LdapConfigurationException( "Invalid configuration." );
+            ne.initCause( e );
+            throw ne;
+        }
+
         this.environment = env;
         this.configuration = cfg;
         
@@ -481,8 +492,10 @@
             throw e;
         }
 
+        globalRegistries = new GlobalRegistries( bootstrapRegistries );
+        
         partitionNexus = new DefaultContextPartitionNexus( new LockableAttributesImpl() );
-        globalRegistries = new GlobalRegistries( partitionNexus.getSystemPartition(), bootstrapRegistries );
+        partitionNexus.init( this, null );
         
         interceptorChain = new InterceptorChain( configuration.getInterceptorConfigurations() );
         interceptorChain.init( new InterceptorContext( configuration, partitionNexus.getSystemPartition(), globalRegistries, partitionNexus ) );

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java Mon Jun 20 10:12:29 2005
@@ -26,6 +26,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.naming.ConfigurationException;
 import javax.naming.Name;
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingEnumeration;
@@ -136,7 +137,6 @@
         initializedPartitions.add( system );
         
         Iterator i = factoryCfg.getConfiguration().getContextPartitionConfigurations().iterator();
-        boolean success = false;
         try
         {
             while( i.hasNext() )
@@ -147,11 +147,11 @@
                 initializedPartitions.add( 0, partition );
                 register( partition );
             }
-            success = true;
+            initialized = true;
         }
         finally
         {
-            if( !success )
+            if( !initialized )
             {
                 i = initializedPartitions.iterator();
                 while( i.hasNext() )
@@ -394,12 +394,19 @@
      *
      * @param partition ContextPartition component to register with this
      * BackendNexus.
+     * @throws ConfigurationException 
      */
-    private void register( ContextPartition partition )
+    private void register( ContextPartition partition ) throws ConfigurationException
     {
+        String key = partition.getSuffix( true ).toString();
+        if( partitions.containsKey( key ) )
+        {
+            throw new ConfigurationException( "Duplicate partition suffix: " + key );
+        }
+        partitions.put( key, partition );
+
         Attribute namingContexts = rootDSE.get( NAMINGCTXS_ATTR );
         namingContexts.add( partition.getSuffix( false ).toString() );
-        partitions.put( partition.getSuffix( true ).toString(), partition );
     }
 
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java Mon Jun 20 10:12:29 2005
@@ -117,8 +117,14 @@
         this.upSuffix = new LdapName( cfg.getSuffix() );
         this.normSuffix = cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry() );
 
-        this.workingDirectory = factoryCfg.getConfiguration().getWorkingDirectory();
-
+        File workingDirectory = new File(
+                factoryCfg.getConfiguration().getWorkingDirectory().getPath() +
+                File.separator + cfg.getName() );
+        
+        workingDirectory.mkdirs();
+        
+        this.workingDirectory = workingDirectory;
+            
         try 
         {
             String path = workingDirectory.getPath() + File.separator + "master";
@@ -245,7 +251,7 @@
             NamingException ne = new NamingException( "Failed to close all" );
             ne.setRootCause( rootCause );
             throw ne;
-        }        
+        }
     }
 
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalAttributeTypeRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.AttributeType;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapAttributeTypeRegistry;
 
 
@@ -47,8 +46,6 @@
     private AttributeTypeRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapAttributeTypeRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -64,8 +61,7 @@
      * @param systemPartition the system database partition under ou=system
      * @param bootstrap the bootstrapping registry to delegate to
      */
-    public GlobalAttributeTypeRegistry( ContextPartition systemPartition,
-            BootstrapAttributeTypeRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalAttributeTypeRegistry( BootstrapAttributeTypeRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -81,12 +77,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalComparatorRegistry.java Mon Jun 20 10:12:29 2005
@@ -23,7 +23,6 @@
 
 import javax.naming.NamingException;
 
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapComparatorRegistry;
 
 
@@ -43,8 +42,6 @@
     private ComparatorRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapComparatorRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -56,8 +53,7 @@
      * Creates a default ComparatorRegistry by initializing the map and the
      * montior.
      */
-    public GlobalComparatorRegistry( ContextPartition systemPartition,
-            BootstrapComparatorRegistry bootstrap )
+    public GlobalComparatorRegistry( BootstrapComparatorRegistry bootstrap )
     {
         this.oidToSchema = new HashMap();
         this.comparators = new HashMap();
@@ -70,12 +66,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitContentRuleRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.DITContentRule;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapDitContentRuleRegistry;
 
 
@@ -47,8 +46,6 @@
     private DITContentRuleRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapDitContentRuleRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,8 +56,7 @@
     /**
      * Creates an empty BootstrapDitContentRuleRegistry.
      */
-    public GlobalDitContentRuleRegistry( ContextPartition systemPartition,
-            BootstrapDitContentRuleRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalDitContentRuleRegistry( BootstrapDitContentRuleRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -71,12 +67,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalDitStructureRuleRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.DITStructureRule;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapDitStructureRuleRegistry;
 
 
@@ -47,8 +46,6 @@
     private DITStructureRuleRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapDitStructureRuleRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,8 +56,7 @@
     /**
      * Creates an empty BootstrapDitStructureRuleRegistry.
      */
-    public GlobalDitStructureRuleRegistry( ContextPartition systemPartition,
-            BootstrapDitStructureRuleRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalDitStructureRuleRegistry( BootstrapDitStructureRuleRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -71,12 +67,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.MatchingRule;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapMatchingRuleRegistry;
 
 
@@ -47,8 +46,6 @@
     private MatchingRuleRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapMatchingRuleRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,8 +56,7 @@
     /**
      * Creates an empty BootstrapMatchingRuleRegistry.
      */
-    public GlobalMatchingRuleRegistry( ContextPartition systemPartition,
-            BootstrapMatchingRuleRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalMatchingRuleRegistry( BootstrapMatchingRuleRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -71,12 +67,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalMatchingRuleUseRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.MatchingRuleUse;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapMatchingRuleUseRegistry;
 
 
@@ -47,8 +46,6 @@
     private MatchingRuleUseRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapMatchingRuleUseRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,8 +56,7 @@
     /**
      * Creates an empty BootstrapMatchingRuleUseRegistry.
      */
-    public GlobalMatchingRuleUseRegistry( ContextPartition systemPartition,
-            BootstrapMatchingRuleUseRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalMatchingRuleUseRegistry( BootstrapMatchingRuleUseRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -71,12 +67,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNameFormRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.NameForm;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapNameFormRegistry;
 
 
@@ -47,8 +46,6 @@
     private NameFormRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapNameFormRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,8 +56,7 @@
     /**
      * Creates an empty BootstrapNameFormRegistry.
      */
-    public GlobalNameFormRegistry( ContextPartition systemPartition,
-            BootstrapNameFormRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalNameFormRegistry( BootstrapNameFormRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -71,12 +67,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalNormalizerRegistry.java Mon Jun 20 10:12:29 2005
@@ -23,7 +23,6 @@
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.Normalizer;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapNormalizerRegistry;
 
 
@@ -43,8 +42,6 @@
     private NormalizerRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapNormalizerRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -56,8 +53,7 @@
      * Creates a default NormalizerRegistry by initializing the map and the
      * montior.
      */
-    public GlobalNormalizerRegistry( ContextPartition systemPartition,
-            BootstrapNormalizerRegistry bootstrap )
+    public GlobalNormalizerRegistry( BootstrapNormalizerRegistry bootstrap )
     {
         this.oidToSchema = new HashMap();
         this.normalizers = new HashMap();
@@ -67,12 +63,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalObjectClassRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.ObjectClass;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapObjectClassRegistry;
 
 
@@ -47,8 +46,6 @@
     private ObjectClassRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapObjectClassRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,8 +56,7 @@
     /**
      * Creates an empty BootstrapObjectClassRegistry.
      */
-    public GlobalObjectClassRegistry( ContextPartition systemPartition,
-            BootstrapObjectClassRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalObjectClassRegistry( BootstrapObjectClassRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -71,12 +67,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import javax.naming.NamingException;
 
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapOidRegistry;
 
 
@@ -50,9 +49,6 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapOidRegistry bootstrap;
 
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
-
 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
@@ -62,21 +58,13 @@
     /**
      * Creates a default OidRegistry by initializing the map and the montior.
      */
-    public GlobalOidRegistry( ContextPartition systemPartition,
-            BootstrapOidRegistry bootstrap )
+    public GlobalOidRegistry( BootstrapOidRegistry bootstrap )
     {
         this.bootstrap = bootstrap;
 
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalRegistries.java Mon Jun 20 10:12:29 2005
@@ -27,7 +27,6 @@
 import org.apache.ldap.common.schema.MatchingRule;
 import org.apache.ldap.common.schema.ObjectClass;
 import org.apache.ldap.common.schema.Syntax;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapAttributeTypeRegistry;
 import org.apache.ldap.server.schema.bootstrap.BootstrapComparatorRegistry;
 import org.apache.ldap.server.schema.bootstrap.BootstrapDitContentRuleRegistry;
@@ -65,39 +64,38 @@
     private GlobalSyntaxRegistry syntaxRegistry;
 
 
-    public GlobalRegistries( ContextPartition systemPartition,
-                             BootstrapRegistries bootstrapRegistries )
+    public GlobalRegistries( BootstrapRegistries bootstrapRegistries )
     {
-        oidRegistry = new GlobalOidRegistry( systemPartition,
+        oidRegistry = new GlobalOidRegistry(
                 ( BootstrapOidRegistry ) bootstrapRegistries.getOidRegistry() );
-        normalizerRegistry = new GlobalNormalizerRegistry( systemPartition,
+        normalizerRegistry = new GlobalNormalizerRegistry(
                 ( BootstrapNormalizerRegistry ) bootstrapRegistries.getNormalizerRegistry());
-        comparatorRegistry = new GlobalComparatorRegistry( systemPartition,
+        comparatorRegistry = new GlobalComparatorRegistry(
                 ( BootstrapComparatorRegistry ) bootstrapRegistries.getComparatorRegistry());
-        syntaxCheckerRegistry = new GlobalSyntaxCheckerRegistry( systemPartition,
+        syntaxCheckerRegistry = new GlobalSyntaxCheckerRegistry(
                 ( BootstrapSyntaxCheckerRegistry ) bootstrapRegistries.getSyntaxCheckerRegistry());
-        syntaxRegistry = new GlobalSyntaxRegistry( systemPartition,
+        syntaxRegistry = new GlobalSyntaxRegistry(
                 ( BootstrapSyntaxRegistry ) bootstrapRegistries.getSyntaxRegistry(),
                 oidRegistry );
-        matchingRuleRegistry = new GlobalMatchingRuleRegistry( systemPartition,
+        matchingRuleRegistry = new GlobalMatchingRuleRegistry(
                 ( BootstrapMatchingRuleRegistry ) bootstrapRegistries.getMatchingRuleRegistry(),
                 oidRegistry );
-        attributeTypeRegistry = new GlobalAttributeTypeRegistry( systemPartition,
+        attributeTypeRegistry = new GlobalAttributeTypeRegistry(
                 ( BootstrapAttributeTypeRegistry ) bootstrapRegistries.getAttributeTypeRegistry(),
                 oidRegistry );
-        objectClassRegistry = new GlobalObjectClassRegistry( systemPartition,
+        objectClassRegistry = new GlobalObjectClassRegistry(
                 ( BootstrapObjectClassRegistry ) bootstrapRegistries.getObjectClassRegistry(),
                 oidRegistry );
-        ditContentRuleRegistry = new GlobalDitContentRuleRegistry( systemPartition,
+        ditContentRuleRegistry = new GlobalDitContentRuleRegistry(
                 ( BootstrapDitContentRuleRegistry ) bootstrapRegistries.getDitContentRuleRegistry(),
                 oidRegistry );
-        ditStructureRuleRegistry = new GlobalDitStructureRuleRegistry( systemPartition,
+        ditStructureRuleRegistry = new GlobalDitStructureRuleRegistry(
                 ( BootstrapDitStructureRuleRegistry ) bootstrapRegistries.getDitStructureRuleRegistry(),
                 oidRegistry );
-        matchingRuleUseRegistry = new GlobalMatchingRuleUseRegistry( systemPartition,
+        matchingRuleUseRegistry = new GlobalMatchingRuleUseRegistry(
                 ( BootstrapMatchingRuleUseRegistry ) bootstrapRegistries.getMatchingRuleUseRegistry(),
                 oidRegistry );
-        nameFormRegistry = new GlobalNameFormRegistry( systemPartition,
+        nameFormRegistry = new GlobalNameFormRegistry(
                 ( BootstrapNameFormRegistry ) bootstrapRegistries.getNameFormRegistry(),
                 oidRegistry );
     }

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxCheckerRegistry.java Mon Jun 20 10:12:29 2005
@@ -23,7 +23,6 @@
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.SyntaxChecker;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapSyntaxCheckerRegistry;
 
 
@@ -43,8 +42,6 @@
     private SyntaxCheckerRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapSyntaxCheckerRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -56,8 +53,7 @@
      * Creates a default SyntaxCheckerRegistry by initializing the map and the
      * montior.
      */
-    public GlobalSyntaxCheckerRegistry( ContextPartition systemPartition,
-            BootstrapSyntaxCheckerRegistry bootstrap )
+    public GlobalSyntaxCheckerRegistry( BootstrapSyntaxCheckerRegistry bootstrap )
     {
         this.oidToSchema = new HashMap();
         this.syntaxCheckers = new HashMap();
@@ -67,12 +63,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }
 

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java?rev=191512&r1=191511&r2=191512&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/schema/GlobalSyntaxRegistry.java Mon Jun 20 10:12:29 2005
@@ -25,7 +25,6 @@
 
 import org.apache.ldap.common.schema.Syntax;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapSyntaxRegistry;
 
 
@@ -47,8 +46,6 @@
     private SyntaxRegistryMonitor monitor;
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapSyntaxRegistry bootstrap;
-    /** the system partition where we keep attributeType updates */
-    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,8 +56,7 @@
     /**
      * Creates an empty BootstrapSyntaxRegistry.
      */
-    public GlobalSyntaxRegistry( ContextPartition systemPartition,
-            BootstrapSyntaxRegistry bootstrap, OidRegistry oidRegistry )
+    public GlobalSyntaxRegistry( BootstrapSyntaxRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();
         this.oidToSchema = new HashMap();
@@ -71,12 +67,6 @@
         if ( this.bootstrap == null )
         {
             throw new NullPointerException( "the bootstrap registry cannot be null" ) ;
-        }
-
-        this.systemPartition = systemPartition;
-        if ( this.systemPartition == null )
-        {
-            throw new NullPointerException( "the system partition cannot be null" ) ;
         }
     }