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 18:09:17 UTC

svn commit: r191501 - in /directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server: authz/ interceptor/ jndi/ partition/ schema/

Author: trustin
Date: Mon Jun 20 09:09:15 2005
New Revision: 191501

URL: http://svn.apache.org/viewcvs?rev=191501&view=rev
Log:
* Removed SystemPartition
* Moved all SystemPartition constants and static methods to ContextPartitionNexus
* Changed ContextPartitionNexus to an abstract class.

Removed:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/SystemPartition.java
Modified:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.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/jndi/RootNexusProxy.java
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.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/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/java/org/apache/ldap/server/authz/AuthorizationService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java?rev=191501&r1=191500&r2=191501&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/authz/AuthorizationService.java Mon Jun 20 09:09:15 2005
@@ -44,7 +44,7 @@
 import org.apache.ldap.server.invocation.Search;
 import org.apache.ldap.server.jndi.ServerContext;
 import org.apache.ldap.server.partition.ContextPartition;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartitionNexus;
 import org.apache.ldap.server.partition.store.impl.btree.ResultFilteringEnumeration;
 import org.apache.ldap.server.partition.store.impl.btree.SearchResultFilter;
 import org.apache.ldap.server.schema.AttributeTypeRegistry;
@@ -65,17 +65,17 @@
     /**
      * the administrator's distinguished {@link Name}
      */
-    private static final Name ADMIN_DN = SystemPartition.getAdminDn();
+    private static final Name ADMIN_DN = ContextPartitionNexus.getAdminName();
 
     /**
      * the base distinguished {@link Name} for all users
      */
-    private static final Name USER_BASE_DN = SystemPartition.getUsersBaseDn();
+    private static final Name USER_BASE_DN = ContextPartitionNexus.getUsersBaseName();
 
     /**
      * the base distinguished {@link Name} for all groups
      */
-    private static final Name GROUP_BASE_DN = SystemPartition.getGroupsBaseDn();
+    private static final Name GROUP_BASE_DN = ContextPartitionNexus.getGroupsBaseName();
 
     /**
      * the name parser used by this service

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java?rev=191501&r1=191500&r2=191501&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/interceptor/InterceptorContext.java Mon Jun 20 09:09:15 2005
@@ -2,8 +2,8 @@
 
 
 import org.apache.ldap.server.configuration.StartupConfiguration;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.partition.ContextPartitionNexus;
-import org.apache.ldap.server.partition.SystemPartition;
 import org.apache.ldap.server.schema.GlobalRegistries;
 
 
@@ -23,7 +23,7 @@
     /**
      * the system partition used by the context factory
      */
-    private final SystemPartition systemPartition;
+    private final ContextPartition systemPartition;
 
     /**
      * the registries for system schema objects
@@ -37,7 +37,7 @@
 
 
     public InterceptorContext( StartupConfiguration configuration,
-                               SystemPartition systemPartition,
+                               ContextPartition systemPartition,
                                GlobalRegistries globalRegistries,
                                ContextPartitionNexus rootNexus )
     {
@@ -69,7 +69,7 @@
     }
 
 
-    public SystemPartition getSystemPartition()
+    public ContextPartition getSystemPartition()
     {
         return systemPartition;
     }

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -41,7 +41,6 @@
 import org.apache.ldap.server.invocation.Invocation;
 import org.apache.ldap.server.partition.ContextPartitionNexus;
 import org.apache.ldap.server.partition.DefaultContextPartitionNexus;
-import org.apache.ldap.server.partition.SystemPartition;
 import org.apache.ldap.server.schema.AttributeTypeRegistry;
 import org.apache.ldap.server.schema.ConcreteNameComponentNormalizer;
 import org.apache.ldap.server.schema.GlobalRegistries;
@@ -70,7 +69,7 @@
     private GlobalRegistries globalRegistries;
 
     /** the root nexus */
-    private DefaultContextPartitionNexus rootNexus;
+    private DefaultContextPartitionNexus partitionNexus;
 
     /** whether or not server is started for the first time */
     private boolean firstStart;
@@ -193,7 +192,7 @@
         factory.beforeSync( this );
         try
         {
-            this.rootNexus.sync();
+            this.partitionNexus.sync();
         }
         finally
         {
@@ -212,8 +211,8 @@
         factory.beforeShutdown( this );
         try
         {
-            this.rootNexus.sync();
-            this.rootNexus.destroy();
+            this.partitionNexus.sync();
+            this.partitionNexus.destroy();
             this.interceptorChain.destroy();
             this.started = false;
         }
@@ -244,7 +243,7 @@
 
     public ContextPartitionNexus getPartitionNexus()
     {
-        return rootNexus;
+        return partitionNexus;
     }
     
     public boolean isFirstStart()
@@ -351,7 +350,7 @@
         /*
          * If the admin entry is there, then the database was already created
          */
-        if ( !rootNexus.hasEntry( SystemPartition.ADMIN_PRINCIPAL_NAME ) )
+        if ( !partitionNexus.hasEntry( ContextPartitionNexus.getAdminName() ) )
         {
             firstStart = true;
 
@@ -360,21 +359,21 @@
             attributes.put( "objectClass", "person" );
             attributes.put( "objectClass", "organizationalPerson" );
             attributes.put( "objectClass", "inetOrgPerson" );
-            attributes.put( "uid", SystemPartition.ADMIN_UID );
-            attributes.put( "userPassword", SystemPartition.ADMIN_PW );
+            attributes.put( "uid", ContextPartitionNexus.ADMIN_UID );
+            attributes.put( "userPassword", ContextPartitionNexus.ADMIN_PW );
             attributes.put( "displayName", "Directory Superuser" );
-            attributes.put( "creatorsName", SystemPartition.ADMIN_PRINCIPAL );
+            attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
             attributes.put( "displayName", "Directory Superuser" );
             
-            rootNexus.add( SystemPartition.ADMIN_PRINCIPAL, SystemPartition.ADMIN_PRINCIPAL_NAME, attributes );
+            partitionNexus.add( ContextPartitionNexus.ADMIN_PRINCIPAL, ContextPartitionNexus.getAdminName(), attributes );
         }
 
         // -------------------------------------------------------------------
         // create system users area
         // -------------------------------------------------------------------
 
-        if ( !rootNexus.hasEntry( new LdapName( "ou=users,ou=system" ) ) )
+        if ( !partitionNexus.hasEntry( new LdapName( "ou=users,ou=system" ) ) )
         {
             firstStart = true;
             
@@ -382,17 +381,17 @@
             attributes.put( "objectClass", "top" );
             attributes.put( "objectClass", "organizationalUnit" );
             attributes.put( "ou", "users" );
-            attributes.put( "creatorsName", SystemPartition.ADMIN_PRINCIPAL );
+            attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            rootNexus.add( "ou=users,ou=system", new LdapName( "ou=users,ou=system" ), attributes );
+            partitionNexus.add( "ou=users,ou=system", new LdapName( "ou=users,ou=system" ), attributes );
         }
 
         // -------------------------------------------------------------------
         // create system groups area
         // -------------------------------------------------------------------
 
-        if ( !rootNexus.hasEntry( new LdapName( "ou=groups,ou=system" ) ) )
+        if ( !partitionNexus.hasEntry( new LdapName( "ou=groups,ou=system" ) ) )
         {
             firstStart = true;
 
@@ -400,17 +399,17 @@
             attributes.put( "objectClass", "top" );
             attributes.put( "objectClass", "organizationalUnit" );
             attributes.put( "ou", "groups" );
-            attributes.put( "creatorsName", SystemPartition.ADMIN_PRINCIPAL );
+            attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
-            rootNexus.add( "ou=groups,ou=system", new LdapName( "ou=groups,ou=system" ), attributes );
+            partitionNexus.add( "ou=groups,ou=system", new LdapName( "ou=groups,ou=system" ), attributes );
         }
 
         // -------------------------------------------------------------------
         // create system preferences area
         // -------------------------------------------------------------------
 
-        if ( !rootNexus.hasEntry( new LdapName( "prefNodeName=sysPrefRoot,ou=system" ) ) )
+        if ( !partitionNexus.hasEntry( new LdapName( "prefNodeName=sysPrefRoot,ou=system" ) ) )
         {
             firstStart = true;
 
@@ -419,12 +418,12 @@
             attributes.put( "objectClass", "prefNode" );
             attributes.put( "objectClass", "extensibleObject" );
             attributes.put( "prefNodeName", "sysPrefRoot" );
-            attributes.put( "creatorsName", SystemPartition.ADMIN_PRINCIPAL );
+            attributes.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );
 
             LdapName dn = new LdapName( "prefNodeName=sysPrefRoot,ou=system" );
 
-            rootNexus.add( "prefNodeName=sysPrefRoot,ou=system", dn, attributes );
+            partitionNexus.add( "prefNodeName=sysPrefRoot,ou=system", dn, attributes );
         }
 
         return firstStart;
@@ -443,7 +442,7 @@
         while( i.hasNext() )
         {
             Attributes entry = ( Attributes ) i.next();
-            entry.put( "creatorsName", SystemPartition.ADMIN_PRINCIPAL );
+            entry.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL );
             entry.put( "createTimestamp", DateUtils.getGeneralizedTime() );
             
             Attribute dn = entry.remove( "dn" );
@@ -452,7 +451,7 @@
             DnParser parser = new DnParser( ncn );
             Name ndn = parser.parse( ( String ) dn.get() );
             
-            rootNexus.add( ( String ) dn.get(), ndn, entry );
+            partitionNexus.add( ( String ) dn.get(), ndn, entry );
         }
     }
 
@@ -482,10 +481,10 @@
             throw e;
         }
 
-        rootNexus = new DefaultContextPartitionNexus( new LockableAttributesImpl() );
-        globalRegistries = new GlobalRegistries( rootNexus.getSystemPartition(), bootstrapRegistries );
+        partitionNexus = new DefaultContextPartitionNexus( new LockableAttributesImpl() );
+        globalRegistries = new GlobalRegistries( partitionNexus.getSystemPartition(), bootstrapRegistries );
         
         interceptorChain = new InterceptorChain( configuration.getInterceptorConfigurations() );
-        interceptorChain.init( new InterceptorContext( configuration, rootNexus.getSystemPartition(), globalRegistries, rootNexus ) );
+        interceptorChain.init( new InterceptorContext( configuration, partitionNexus.getSystemPartition(), globalRegistries, partitionNexus ) );
     }
 }

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java?rev=191501&r1=191500&r2=191501&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/jndi/RootNexusProxy.java Mon Jun 20 09:09:15 2005
@@ -45,9 +45,10 @@
 import org.apache.ldap.server.invocation.Move;
 import org.apache.ldap.server.invocation.MoveAndModifyRN;
 import org.apache.ldap.server.invocation.Search;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.partition.ContextPartitionNexus;
 
-class RootNexusProxy implements ContextPartitionNexus
+class RootNexusProxy extends ContextPartitionNexus
 {
     private final ContextFactoryConfiguration provider;
 
@@ -154,5 +155,10 @@
     public Attributes getRootDSE()
     {
         return this.provider.getPartitionNexus().getRootDSE();
+    }
+
+    public ContextPartition getSystemPartition()
+    {
+        return this.provider.getPartitionNexus().getSystemPartition();
     }
 }

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java?rev=191501&r1=191500&r2=191501&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/ContextPartitionNexus.java Mon Jun 20 09:09:15 2005
@@ -24,6 +24,8 @@
 import javax.naming.directory.Attributes;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.ldap.common.name.LdapName;
+
 
 /**
  * The PartitionNexus is a special type of ContextPartition designed to route
@@ -44,22 +46,104 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface ContextPartitionNexus extends ContextPartition
+public abstract class ContextPartitionNexus implements ContextPartition
 {
+    /** the default user principal or DN */
+    public final static String ADMIN_PRINCIPAL = "uid=admin,ou=system";
+    /** the admin super user uid */
+    public final static String ADMIN_UID = "admin";
+    /** the initial admin passwd set on startup */
+    public static final byte[] ADMIN_PW = "secret".getBytes();
+    /** the base dn under which all users reside */
+    public final static String USERS_BASE_NAME = "ou=users,ou=system";
+    /** the base dn under which all groups reside */
+    public final static String GROUPS_BASE_NAME = "ou=groups,ou=system";
+    /**
+     * System backend suffix constant.  Should be kept down to a single Dn name 
+     * component or the default constructor will have to parse it instead of 
+     * building the name.  Note that what ever the SUFFIX equals it should be 
+     * both the normalized and the user provided form.
+     */
+    public static final String SYSTEM_PARTITION_SUFFIX = "ou=system" ;
+
+    /**
+     * Gets the DN for the admin user.
+     * @return the admin user DN
+     */
+    public static final Name getAdminName()
+    {
+        Name adminDn = null;
+    
+        try
+        {
+            adminDn = new LdapName( ADMIN_PRINCIPAL );
+        }
+        catch ( NamingException e )
+        {
+            throw new InternalError();
+        }
+    
+        return adminDn;
+    }
+
+    /**
+     * Gets the DN for the base entry under which all groups reside.
+     * A new Name instance is created and returned every time.
+     * @return the groups base DN
+     */
+    public static final Name getGroupsBaseName()
+    {
+        Name groupsBaseDn = null;
+    
+        try
+        {
+            groupsBaseDn = new LdapName( GROUPS_BASE_NAME );
+        }
+        catch ( NamingException e )
+        {
+            throw new InternalError();
+        }
+    
+        return groupsBaseDn;
+    }
+
+    /**
+     * Gets the DN for the base entry under which all non-admin users reside.
+     * A new Name instance is created and returned every time.
+     * @return the users base DN
+     */
+    public static final Name getUsersBaseName()
+    {
+        Name usersBaseDn = null;
+    
+        try
+        {
+            usersBaseDn = new LdapName( USERS_BASE_NAME );
+        }
+        catch ( NamingException e )
+        {
+            throw new InternalError();
+        }
+    
+        return usersBaseDn;
+    }
+
     /**
      * Gets the LdapContext associated with the calling thread.
      * 
      * @return The LdapContext associated with the thread of execution or null
      * if no context is associated with the calling thread.
      */
-    LdapContext getLdapContext();
+    public abstract LdapContext getLdapContext();
 
     /**
      * Get's the RootDSE entry for the DSA.
      *
      * @return the attributes of the RootDSE
      */
-    public Attributes getRootDSE(); 
+    public abstract Attributes getRootDSE(); 
+
+    public abstract ContextPartition getSystemPartition();
 
     /**
      * Gets the most significant Dn that exists within the server for any Dn.
@@ -73,7 +157,7 @@
      * the empty string distinguished name if no match was found.
      * @throws NamingException if there are any problems
      */
-    Name getMatchedDn( Name dn, boolean normalized ) throws NamingException;
+    public abstract Name getMatchedDn( Name dn, boolean normalized ) throws NamingException;
 
     /**
      * Gets the distinguished name of the suffix that would hold an entry with
@@ -88,7 +172,7 @@
      * naming context was found for dn.
      * @throws NamingException if there are any problems
      */
-    Name getSuffix( Name dn, boolean normalized ) throws NamingException;
+    public abstract Name getSuffix( Name dn, boolean normalized ) throws NamingException;
 
     /**
      * Gets an iteration over the Name suffixes of the Backends managed by this
@@ -100,5 +184,5 @@
      * @return Iteration over ContextPartition suffix names as Names.
      * @throws NamingException if there are any problems
      */
-    Iterator listSuffixes( boolean normalized ) throws NamingException;
+    public abstract Iterator listSuffixes( boolean normalized ) throws NamingException;
 }

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -53,6 +53,7 @@
 import org.apache.ldap.server.configuration.ContextPartitionConfiguration;
 import org.apache.ldap.server.configuration.MutableContextPartitionConfiguration;
 import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
+import org.apache.ldap.server.partition.store.impl.btree.jdbm.JdbmContextPartition;
 
                                 
 /**
@@ -64,7 +65,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class DefaultContextPartitionNexus implements ContextPartitionNexus
+public class DefaultContextPartitionNexus extends ContextPartitionNexus
 {
     /** the vendorName string proudly set to: Apache Software Foundation*/
     private static final String ASF = "Apache Software Foundation";
@@ -79,7 +80,7 @@
     private boolean initialized;
 
     /** the system backend */
-    private SystemPartition system;
+    private ContextPartition system;
 
     /** the backends keyed by normalized suffix strings */
     private HashMap partitions = new HashMap();
@@ -179,9 +180,9 @@
     {
         // initialize system partition first
         MutableContextPartitionConfiguration systemCfg = new MutableContextPartitionConfiguration();
-        system = new SystemPartition();
+        system = new JdbmContextPartition(); // using default implementation.
         systemCfg.setName( "system" );
-        systemCfg.setSuffix( SystemPartition.SUFFIX );
+        systemCfg.setSuffix( ContextPartitionNexus.SYSTEM_PARTITION_SUFFIX );
         systemCfg.setContextPartition( system );
         
         // Add indexed attributes for system partition
@@ -199,11 +200,11 @@
         Attributes systemEntry = new BasicAttributes();
         systemEntry.put( "objectClass", "top" ) ;
         systemEntry.put( "objectClass", "organizationalUnit" ) ;
-        systemEntry.put( "creatorsName", SystemPartition.ADMIN_PRINCIPAL ) ;
+        systemEntry.put( "creatorsName", ContextPartitionNexus.ADMIN_PRINCIPAL ) ;
         systemEntry.put( "createTimestamp", DateUtils.getGeneralizedTime() ) ;
         systemEntry.put(
-                NamespaceTools.getRdnAttribute( SystemPartition.SUFFIX ),
-                NamespaceTools.getRdnValue( SystemPartition.SUFFIX ) ) ;
+                NamespaceTools.getRdnAttribute( ContextPartitionNexus.SYSTEM_PARTITION_SUFFIX ),
+                NamespaceTools.getRdnValue( ContextPartitionNexus.SYSTEM_PARTITION_SUFFIX ) ) ;
         systemCfg.setContextEntry( systemEntry );
 
         system.init( factoryCfg, systemCfg );
@@ -315,7 +316,7 @@
     // ------------------------------------------------------------------------
     
     
-    public SystemPartition getSystemPartition()
+    public ContextPartition getSystemPartition()
     {
         return system;
     }

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.AttributeType;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapAttributeTypeRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapAttributeTypeRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -64,7 +64,7 @@
      * @param systemPartition the system database partition under ou=system
      * @param bootstrap the bootstrapping registry to delegate to
      */
-    public GlobalAttributeTypeRegistry( SystemPartition systemPartition,
+    public GlobalAttributeTypeRegistry( ContextPartition systemPartition,
             BootstrapAttributeTypeRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -23,7 +23,7 @@
 
 import javax.naming.NamingException;
 
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapComparatorRegistry;
 
 
@@ -44,7 +44,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapComparatorRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -56,7 +56,7 @@
      * Creates a default ComparatorRegistry by initializing the map and the
      * montior.
      */
-    public GlobalComparatorRegistry( SystemPartition systemPartition,
+    public GlobalComparatorRegistry( ContextPartition systemPartition,
             BootstrapComparatorRegistry bootstrap )
     {
         this.oidToSchema = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.DITContentRule;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapDitContentRuleRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapDitContentRuleRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,7 +59,7 @@
     /**
      * Creates an empty BootstrapDitContentRuleRegistry.
      */
-    public GlobalDitContentRuleRegistry( SystemPartition systemPartition,
+    public GlobalDitContentRuleRegistry( ContextPartition systemPartition,
             BootstrapDitContentRuleRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.DITStructureRule;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapDitStructureRuleRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapDitStructureRuleRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,7 +59,7 @@
     /**
      * Creates an empty BootstrapDitStructureRuleRegistry.
      */
-    public GlobalDitStructureRuleRegistry( SystemPartition systemPartition,
+    public GlobalDitStructureRuleRegistry( ContextPartition systemPartition,
             BootstrapDitStructureRuleRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.MatchingRule;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapMatchingRuleRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapMatchingRuleRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,7 +59,7 @@
     /**
      * Creates an empty BootstrapMatchingRuleRegistry.
      */
-    public GlobalMatchingRuleRegistry( SystemPartition systemPartition,
+    public GlobalMatchingRuleRegistry( ContextPartition systemPartition,
             BootstrapMatchingRuleRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.MatchingRuleUse;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapMatchingRuleUseRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapMatchingRuleUseRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,7 +59,7 @@
     /**
      * Creates an empty BootstrapMatchingRuleUseRegistry.
      */
-    public GlobalMatchingRuleUseRegistry( SystemPartition systemPartition,
+    public GlobalMatchingRuleUseRegistry( ContextPartition systemPartition,
             BootstrapMatchingRuleUseRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.NameForm;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapNameFormRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapNameFormRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,7 +59,7 @@
     /**
      * Creates an empty BootstrapNameFormRegistry.
      */
-    public GlobalNameFormRegistry( SystemPartition systemPartition,
+    public GlobalNameFormRegistry( ContextPartition systemPartition,
             BootstrapNameFormRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -23,7 +23,7 @@
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.Normalizer;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapNormalizerRegistry;
 
 
@@ -44,7 +44,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapNormalizerRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -56,7 +56,7 @@
      * Creates a default NormalizerRegistry by initializing the map and the
      * montior.
      */
-    public GlobalNormalizerRegistry( SystemPartition systemPartition,
+    public GlobalNormalizerRegistry( ContextPartition systemPartition,
             BootstrapNormalizerRegistry bootstrap )
     {
         this.oidToSchema = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.ObjectClass;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapObjectClassRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapObjectClassRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,7 +59,7 @@
     /**
      * Creates an empty BootstrapObjectClassRegistry.
      */
-    public GlobalObjectClassRegistry( SystemPartition systemPartition,
+    public GlobalObjectClassRegistry( ContextPartition systemPartition,
             BootstrapObjectClassRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import javax.naming.NamingException;
 
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapOidRegistry;
 
 
@@ -51,7 +51,7 @@
     private BootstrapOidRegistry bootstrap;
 
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -62,7 +62,7 @@
     /**
      * Creates a default OidRegistry by initializing the map and the montior.
      */
-    public GlobalOidRegistry( SystemPartition systemPartition,
+    public GlobalOidRegistry( ContextPartition systemPartition,
             BootstrapOidRegistry bootstrap )
     {
         this.bootstrap = bootstrap;

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -27,7 +27,7 @@
 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.SystemPartition;
+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,7 +65,7 @@
     private GlobalSyntaxRegistry syntaxRegistry;
 
 
-    public GlobalRegistries( SystemPartition systemPartition,
+    public GlobalRegistries( ContextPartition systemPartition,
                              BootstrapRegistries bootstrapRegistries )
     {
         oidRegistry = new GlobalOidRegistry( systemPartition,

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -23,7 +23,7 @@
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.SyntaxChecker;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapSyntaxCheckerRegistry;
 
 
@@ -44,7 +44,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapSyntaxCheckerRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -56,7 +56,7 @@
      * Creates a default SyntaxCheckerRegistry by initializing the map and the
      * montior.
      */
-    public GlobalSyntaxCheckerRegistry( SystemPartition systemPartition,
+    public GlobalSyntaxCheckerRegistry( ContextPartition systemPartition,
             BootstrapSyntaxCheckerRegistry bootstrap )
     {
         this.oidToSchema = new HashMap();

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=191501&r1=191500&r2=191501&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 09:09:15 2005
@@ -25,7 +25,7 @@
 
 import org.apache.ldap.common.schema.Syntax;
 import org.apache.ldap.common.util.JoinIterator;
-import org.apache.ldap.server.partition.SystemPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 import org.apache.ldap.server.schema.bootstrap.BootstrapSyntaxRegistry;
 
 
@@ -48,7 +48,7 @@
     /** the underlying bootstrap registry to delegate on misses to */
     private BootstrapSyntaxRegistry bootstrap;
     /** the system partition where we keep attributeType updates */
-    private SystemPartition systemPartition;
+    private ContextPartition systemPartition;
 
 
     // ------------------------------------------------------------------------
@@ -59,7 +59,7 @@
     /**
      * Creates an empty BootstrapSyntaxRegistry.
      */
-    public GlobalSyntaxRegistry( SystemPartition systemPartition,
+    public GlobalSyntaxRegistry( ContextPartition systemPartition,
             BootstrapSyntaxRegistry bootstrap, OidRegistry oidRegistry )
     {
         this.byOid = new HashMap();