directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r580816 [2/2] - in /directory/apacheds/branches/bigbang: core-unit/src/main/java/org/apache/directory/server/core/unit/ core-unit/src/test/java/org/apache/directory/server/core/ core-unit/src/test/java/org/apache/directory/server/core/confi...
Date Mon, 01 Oct 2007 00:41:56 GMT
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Sun Sep 30 17:41:53 2007
@@ -21,7 +21,6 @@
 
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.interceptor.context.*;
 import org.apache.directory.server.core.partition.Oid;
 import org.apache.directory.server.core.partition.Partition;
@@ -51,8 +50,10 @@
 public class JdbmPartition extends BTreePartition
 {
     private JdbmStore store;
+    private boolean optimizerEnabled = true;
+    private Set<Index> indexedAttributes;
 
-
+    
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
@@ -64,9 +65,68 @@
     public JdbmPartition()
     {
         store = new JdbmStore();
+        indexedAttributes = new HashSet<Index>();
+    }
+
+
+    // ------------------------------------------------------------------------
+    // C O N F I G U R A T I O N   M E T H O D S
+    // ------------------------------------------------------------------------
+
+
+    public String getSuffix()
+    {
+        return super.suffix;
+    }
+
+
+    public void setSuffix( String suffix )
+    {
+        super.suffix = suffix;
+    }
+
+
+    public void setIndexedAttributes( Set<Index> indexedAttributes )
+    {
+        this.indexedAttributes = indexedAttributes;
+    }
+
+
+    public Set<Index> getIndexedAttributes()
+    {
+        return indexedAttributes;
+    }
+
+
+    public boolean isOptimizerEnabled()
+    {
+        return optimizerEnabled;
+    }
+
+
+    public void setOptimizerEnabled( boolean optimizerEnabled )
+    {
+        this.optimizerEnabled = optimizerEnabled;
+    }
+
+
+    public void setSyncOnWrite( boolean syncOnWrite )
+    {
+        store.setSyncOnWrite( syncOnWrite );
     }
 
 
+    public boolean isSyncOnWrite()
+    {
+        return store.isSyncOnWrite();
+    }
+
+
+    // ------------------------------------------------------------------------
+    // E N D   C O N F I G U R A T I O N   M E T H O D S
+    // ------------------------------------------------------------------------
+
+
     public void setRegistries( Registries registries )
     {
         initRegistries( registries );
@@ -84,102 +144,87 @@
     }
 
 
-    public final void init( DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg )
-        throws NamingException
+    public final void init( DirectoryServiceConfiguration factoryCfg ) throws NamingException
     {
         // setup optimizer and registries for parent
-        if ( cfg instanceof BTreePartitionConfiguration )
+        if ( ! optimizerEnabled )
         {
-            this.cfg = ( BTreePartitionConfiguration ) cfg;
-            if ( ! this.cfg.isOptimizerEnabled() )
-            {
-                optimizer = new NoOpOptimizer();
-            }
-            else
-            {
-                optimizer = new DefaultOptimizer( this );
-            }
+            optimizer = new NoOpOptimizer();
         }
         else
         {
-            this.cfg = BTreePartitionConfiguration.convert( cfg );
             optimizer = new DefaultOptimizer( this );
         }
+
         initRegistries( factoryCfg.getRegistries() );
         
         // initialize the store
-        store.setCacheSize( cfg.getCacheSize() );
-        store.setContextEntry( cfg.getContextEntry() );
-        store.setName( cfg.getName() );
-        store.setSuffixDn( cfg.getSuffix() );
+        store.setCacheSize( cacheSize );
+        store.setContextEntry( contextEntry );
+        store.setName( id );
+        store.setSuffixDn( suffix );
         store.setWorkingDirectory( new File(
-            factoryCfg.getStartupConfiguration().getWorkingDirectory().getPath()
-            + File.separator + cfg.getName() ) );
+            factoryCfg.getStartupConfiguration().getWorkingDirectory().getPath() + File.separator + id ) );
 
         Set<JdbmIndex> userIndices = new HashSet<JdbmIndex>();
-        if ( cfg instanceof BTreePartitionConfiguration )
+        for ( Index obj : indexedAttributes )
         {
-            BTreePartitionConfiguration btpconf = ( BTreePartitionConfiguration ) cfg;
-            for ( Index obj : btpconf.getIndexedAttributes() )
+            JdbmIndex index;
+
+            if ( obj instanceof JdbmIndex )
             {
-                JdbmIndex index;
+                index = ( JdbmIndex ) obj;
+            }
+            else
+            {
+                index = new JdbmIndex();
+                index.setAttributeId( obj.getAttributeId() );
+                index.setCacheSize( obj.getCacheSize() );
+                index.setWkDirPath( obj.getWkDirPath() );
+            }
 
-                if ( obj instanceof JdbmIndex )
+            String oid = oidRegistry.getOid( index.getAttributeId() );
+            if ( SYS_INDEX_OIDS.contains( oidRegistry.getOid( index.getAttributeId() ) ) )
+            {
+                if ( oid.equals( Oid.ALIAS ) )
                 {
-                    index = ( JdbmIndex ) obj;
+                    store.setAliasIndex( index );
                 }
-                else
+                else if ( oid.equals( Oid.EXISTANCE ) )
                 {
-                    index = new JdbmIndex();
-                    index.setAttributeId( obj.getAttributeId() );
-                    index.setCacheSize( obj.getCacheSize() );
-                    index.setWkDirPath( obj.getWkDirPath() );
+                    store.setExistanceIndex( index );
                 }
-
-                String oid = oidRegistry.getOid( index.getAttributeId() );
-                if ( SYS_INDEX_OIDS.contains( oidRegistry.getOid( index.getAttributeId() ) ) )
+                else if ( oid.equals( Oid.HIERARCHY ) )
+                {
+                    store.setHierarchyIndex( index );
+                }
+                else if ( oid.equals( Oid.NDN ) )
+                {
+                    store.setNdnIndex( index );
+                }
+                else if ( oid.equals( Oid.ONEALIAS ) )
+                {
+                    store.setOneAliasIndex( index );
+                }
+                else if ( oid.equals( Oid.SUBALIAS ) )
+                {
+                    store.setSubAliasIndex( index );
+                }
+                else if ( oid.equals( Oid.UPDN ) )
                 {
-                    if ( oid.equals( Oid.ALIAS ) )
-                    {
-                        store.setAliasIndex( index );
-                    }
-                    else if ( oid.equals( Oid.EXISTANCE ) )
-                    {
-                        store.setExistanceIndex( index );
-                    }
-                    else if ( oid.equals( Oid.HIERARCHY ) )
-                    {
-                        store.setHierarchyIndex( index );
-                    }
-                    else if ( oid.equals( Oid.NDN ) )
-                    {
-                        store.setNdnIndex( index );
-                    }
-                    else if ( oid.equals( Oid.ONEALIAS ) )
-                    {
-                        store.setOneAliasIndex( index );
-                    }
-                    else if ( oid.equals( Oid.SUBALIAS ) )
-                    {
-                        store.setSubAliasIndex( index );
-                    }
-                    else if ( oid.equals( Oid.UPDN ) )
-                    {
-                        store.setUpdnIndex( index );
-                    }
-                    else
-                    {
-                        throw new IllegalStateException( "Unrecognized system index " + oid );
-                    }
+                    store.setUpdnIndex( index );
                 }
                 else
                 {
-                    userIndices.add( index );
+                    throw new IllegalStateException( "Unrecognized system index " + oid );
                 }
             }
+            else
+            {
+                userIndices.add( index );
+            }
             store.setUserIndices( userIndices );
-            store.setSyncOnWrite( ( ( BTreePartitionConfiguration ) cfg ).isSynchOnWrite() );
-            store.setEnableOptimizer( ( ( BTreePartitionConfiguration ) cfg ).isOptimizerEnabled() );
+            store.setEnableOptimizer( isOptimizerEnabled() );
         }
 
         store.init( oidRegistry, attributeTypeRegistry );
@@ -437,12 +482,12 @@
     }
 
 
-    public final LdapDN getSuffix()
+    public final LdapDN getSuffixDn()
     {
         return store.getSuffix();
     }
 
-    public final LdapDN getUpSuffix()
+    public final LdapDN getUpSuffixDn()
     {
         return store.getUpSuffix();
     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/tree/LeafNode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/tree/LeafNode.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/tree/LeafNode.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/tree/LeafNode.java Sun Sep 30 17:41:53 2007
@@ -72,7 +72,7 @@
     {
         try
         {
-            return partition.getSuffix().getUpName();
+            return partition.getSuffixDn().getUpName();
         }
         catch ( NamingException ne )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Sun Sep 30 17:41:53 2007
@@ -897,7 +897,7 @@
 
         // add referrals immediately after adding the new partition
         Partition partition = opContext.getPartition();
-        LdapDN suffix = partition.getSuffix();
+        LdapDN suffix = partition.getSuffixDn();
         Invocation invocation = InvocationStack.getInstance().peek();
         NamingEnumeration list = invocation.getProxy().search( 
             new SearchOperationContext( suffix, env, getReferralFilter(), getControls() ),

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Sun Sep 30 17:41:53 2007
@@ -233,7 +233,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -276,7 +276,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -319,7 +319,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -362,7 +362,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -405,7 +405,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -497,7 +497,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             
             if ( ! ne.hasMore() )
             {
@@ -613,7 +613,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -662,7 +662,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -690,7 +690,7 @@
         filter.addNode( new PresenceNode( M_OID_OID ) );
         filter.addNode( new PresenceNode( M_NAME_OID ) );
         return partition.search( 
-            new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+            new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
     }
 
 
@@ -739,7 +739,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -787,7 +787,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );
@@ -829,7 +829,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 SearchResult sr = ne.next();
@@ -909,7 +909,7 @@
         try
         {
             ne = partition.search( 
-                new SearchOperationContext( partition.getSuffix(), new HashMap(), filter, searchControls ) );
+                new SearchOperationContext( partition.getSuffixDn(), new HashMap(), filter, searchControls ) );
             while( ne.hasMore() )
             {
                 set.add( ne.next() );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Sun Sep 30 17:41:53 2007
@@ -29,7 +29,6 @@
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.schema.SerializableComparator;
@@ -124,11 +123,10 @@
         // --------------------------------------------------------------------
         // Initialize schema partition
         // --------------------------------------------------------------------
-        
-        MutableBTreePartitionConfiguration pc = new MutableBTreePartitionConfiguration();
-        pc.setName( "schema" );
-        pc.setCacheSize( 1000 );
-        pc.setPartitionClassName( JdbmPartition.class.getName() );
+
+        schemaPartition = new JdbmPartition();
+        schemaPartition.setId( "schema" );
+        schemaPartition.setCacheSize( 1000 );
 
         Set<Index> indexedAttributes = new HashSet<Index>();
         for ( String attributeId : extractor.getDbFileListing().getIndexedAttributes() )
@@ -136,16 +134,15 @@
             indexedAttributes.add( new JdbmIndex( attributeId ) );
         }
 
-        pc.setIndexedAttributes( indexedAttributes );
-        pc.setSuffix( "ou=schema" );
+        schemaPartition.setIndexedAttributes( indexedAttributes );
+        schemaPartition.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();
         entry.put( "objectClass", "top" );
         entry.get( "objectClass" ).add( "organizationalUnit" );
         entry.put( "ou", "schema" );
-        pc.setContextEntry( entry );
-        schemaPartition = new JdbmPartition();
-        schemaPartition.init( configuration, pc );
+        schemaPartition.setContextEntry( entry );
+        schemaPartition.init( configuration );
     }
     
     

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/Operation.java Sun Sep 30 17:41:53 2007
@@ -114,6 +114,6 @@
     protected void execute0( PartitionNexus nexus, ReplicationStore store, AttributeTypeRegistry registry ) 
         throws NamingException
     {
-        throw new OperationNotSupportedException( nexus.getSuffix().toString() );
+        throw new OperationNotSupportedException( nexus.getSuffixDn().toString() );
     }
 }

Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java Sun Sep 30 17:41:53 2007
@@ -20,14 +20,10 @@
 package org.apache.directory.server.configuration;
 
 
-import java.io.File;
-import java.util.List;
-import java.util.Set;
-
 import org.apache.directory.server.changepw.ChangePasswordConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
-import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.authn.Authenticator;
+import org.apache.directory.server.core.interceptor.Interceptor;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.dns.DnsConfiguration;
 import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
 import org.apache.directory.server.ldap.LdapConfiguration;
@@ -35,6 +31,10 @@
 import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
 import org.apache.directory.shared.ldap.ldif.Entry;
 
+import java.io.File;
+import java.util.List;
+import java.util.Set;
+
 
 /**
  * A mutable version of {@link ServerStartupConfiguration}.
@@ -69,9 +69,9 @@
     }
 
 
-    public void setSystemPartitionConfiguration( PartitionConfiguration systemPartitionConfiguration )
+    public void setSystemPartition( Partition systemPartition )
     {
-        super.setSystemPartitionConfiguration( systemPartitionConfiguration );
+        super.setSystemPartition( systemPartition );
     }
 
 
@@ -122,9 +122,9 @@
      *
      * @param partitionConfigurations
      */
-    public void setPartitionConfigurations( Set<? extends PartitionConfiguration> partitionConfigurations )
+    public void setPartitions( Set<? extends Partition> partitionConfigurations )
     {
-        super.setPartitionConfigurations( partitionConfigurations );
+        super.setPartitions( partitionConfigurations );
     }
 
     /**

Modified: directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java (original)
+++ directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java Sun Sep 30 17:41:53 2007
@@ -28,12 +28,10 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
 import org.apache.directory.server.core.DirectoryServiceListener;
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.Tuple;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmMasterTable;
@@ -191,9 +189,9 @@
                     "the installation layout could not be found:\n\t" + schemaDirectory );
         }
         
-        MutableBTreePartitionConfiguration schemaPartitionConfig = new MutableBTreePartitionConfiguration();
-        schemaPartitionConfig.setName( "schema" );
-        schemaPartitionConfig.setCacheSize( 1000 );
+        JdbmPartition schemaPartition = new JdbmPartition();
+        schemaPartition.setId( "schema" );
+        schemaPartition.setCacheSize( 1000 );
         
         DbFileListing listing = null;
         try 
@@ -211,16 +209,15 @@
         {
             indexedAttributes.add( new JdbmIndex( attributeId ) );
         }
-        schemaPartitionConfig.setIndexedAttributes( indexedAttributes );
-        schemaPartitionConfig.setSuffix( "ou=schema" );
+        schemaPartition.setIndexedAttributes( indexedAttributes );
+        schemaPartition.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
         entry.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
         entry.put( SchemaConstants.OU_AT, "schema" );
-        schemaPartitionConfig.setContextEntry( entry );
-        JdbmPartition schemaPartition = new JdbmPartition();
-        
+        schemaPartition.setContextEntry( entry );
+
         DirectoryServiceConfiguration dsc = new DirectoryServiceConfiguration()
         {
             public Hashtable<String, Object> getEnvironment()
@@ -274,7 +271,7 @@
             }
         };
         
-        schemaPartition.init( dsc, schemaPartitionConfig );
+        schemaPartition.init( dsc );
 
         // --------------------------------------------------------------------
         // Initialize schema subsystem and reset registries

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java Sun Sep 30 17:41:53 2007
@@ -23,8 +23,8 @@
 import org.apache.directory.server.core.partition.Oid;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -61,8 +61,8 @@
      */
     public void setUp() throws Exception
     {
-        MutableBTreePartitionConfiguration systemCfg = new MutableBTreePartitionConfiguration();
-        systemCfg.setName( "system" );
+        JdbmPartition systemCfg = new JdbmPartition();
+        systemCfg.setId( "system" );
         
         // @TODO need to make this configurable for the system partition
         systemCfg.setCacheSize( 500 );
@@ -96,7 +96,7 @@
         systemEntry.put( "uid", "testUid" );
         systemCfg.setContextEntry( systemEntry );
         
-        configuration.setSystemPartitionConfiguration( systemCfg );
+        configuration.setSystemPartition( systemCfg );
         
         super.setUp();
         super.loadTestLdif( true );

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java Sun Sep 30 17:41:53 2007
@@ -20,13 +20,12 @@
 package org.apache.directory.server;
 
 
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.kerberos.KeyDerivationService;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.io.decoder.EncryptionKeyDecoder;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
@@ -73,20 +72,20 @@
         configuration.setAllowAnonymousAccess( false );
 
         Attributes attrs;
-        Set<PartitionConfiguration> pcfgs = new HashSet<PartitionConfiguration>();
+        Set<Partition> partitions = new HashSet<Partition>();
 
-        MutableBTreePartitionConfiguration pcfg;
+        JdbmPartition partition;
 
         // Add partition 'example'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "example" );
-        pcfg.setSuffix( "dc=example,dc=com" );
+        partition = new JdbmPartition();
+        partition.setId( "example" );
+        partition.setSuffix( "dc=example,dc=com" );
 
         Set<Index> indexedAttrs = new HashSet<Index>();
         indexedAttrs.add( new JdbmIndex( "ou" ) );
         indexedAttrs.add( new JdbmIndex( "dc" ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        pcfg.setIndexedAttributes( indexedAttrs );
+        partition.setIndexedAttributes( indexedAttrs );
 
         attrs = new AttributesImpl( true );
         Attribute attr = new AttributeImpl( "objectClass" );
@@ -96,10 +95,10 @@
         attr = new AttributeImpl( "dc" );
         attr.add( "example" );
         attrs.put( attr );
-        pcfg.setContextEntry( attrs );
+        partition.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
-        configuration.setPartitionConfigurations( pcfgs );
+        partitions.add( partition );
+        configuration.setPartitions( partitions );
 
         List<Interceptor> list = configuration.getInterceptors();
 

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java Sun Sep 30 17:41:53 2007
@@ -23,11 +23,10 @@
 import netscape.ldap.LDAPAttribute;
 import netscape.ldap.LDAPConnection;
 import netscape.ldap.LDAPException;
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
@@ -42,7 +41,6 @@
 import javax.naming.OperationNotSupportedException;
 import javax.naming.directory.*;
 import javax.naming.ldap.InitialLdapContext;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Set;
@@ -82,22 +80,22 @@
         }
         else if ( this.getName().equals( "testUserAuthOnMixedCaseSuffix" ) )
         {
-            Set<PartitionConfiguration> partitions = new HashSet<PartitionConfiguration>();
-            partitions.addAll( configuration.getPartitionConfigurations() );
-            MutableBTreePartitionConfiguration partition = new MutableBTreePartitionConfiguration();
+            Set<Partition> partitions = new HashSet<Partition>();
+            partitions.addAll( configuration.getPartitions() );
+            JdbmPartition partition = new JdbmPartition();
             partition.setSuffix( "dc=aPache,dc=org" );
             Attributes entry = new AttributesImpl( "dc", "aPache", true );
             Attribute oc = new AttributeImpl( "objectClass" );
             entry.put( oc );
             oc.add( "top" );
             oc.add( "domain" );
-            partition.setName( "apache" );
+            partition.setId( "apache" );
             partition.setContextEntry( entry );
             Set<Index> indexedAttributes = new HashSet<Index>();
             indexedAttributes.add( new JdbmIndex( "dc" ) );
             partition.setIndexedAttributes( indexedAttributes );
             partitions.add( partition );
-            configuration.setPartitionConfigurations( partitions );
+            configuration.setPartitions( partitions );
         }
         else if ( this.getName().equals( "testAnonymousBindsEnabledBaseSearch" ) )
         {
@@ -106,21 +104,21 @@
 
             // create a partition to search
             Set partitions = new HashSet();
-            partitions.addAll( configuration.getPartitionConfigurations() );
-            MutableBTreePartitionConfiguration partition = new MutableBTreePartitionConfiguration();
+            partitions.addAll( configuration.getPartitions() );
+            JdbmPartition partition = new JdbmPartition();
             partition.setSuffix( "dc=apache,dc=org" );
             Attributes entry = new AttributesImpl( "dc", "apache", true );
             Attribute oc = new AttributeImpl( "objectClass" );
             entry.put( oc );
             oc.add( "top" );
             oc.add( "domain" );
-            partition.setName( "apache" );
+            partition.setId( "apache" );
             partition.setContextEntry( entry );
             Set<Index> indexedAttributes = new HashSet<Index>();
             indexedAttributes.add( new JdbmIndex( "dc" ) );
             partition.setIndexedAttributes( indexedAttributes );
             partitions.add( partition );
-            configuration.setPartitionConfigurations( partitions );
+            configuration.setPartitions( partitions );
         }
 
         super.setUp();

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NegationOperatorITest.java Sun Sep 30 17:41:53 2007
@@ -20,11 +20,11 @@
 package org.apache.directory.server;
 
 
-import org.apache.directory.server.core.partition.Oid;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.ldif.Entry;
@@ -67,19 +67,19 @@
     {
         if ( this.getName().indexOf( "Indexed" ) != -1 )
         {
-            MutableBTreePartitionConfiguration systemCfg = new MutableBTreePartitionConfiguration();
-            systemCfg.setName( "system" );
+            JdbmPartition system = new JdbmPartition();
+            system.setId( "system" );
             
             // @TODO need to make this configurable for the system partition
-            systemCfg.setCacheSize( 500 );
+            system.setCacheSize( 500 );
             
-            systemCfg.setSuffix( PartitionNexus.SYSTEM_PARTITION_SUFFIX );
+            system.setSuffix( PartitionNexus.SYSTEM_PARTITION_SUFFIX );
     
             // Add indexed attributes for system partition
             Set<Index> indexedAttrs = new HashSet<Index>();
             indexedAttrs.add( new JdbmIndex( SchemaConstants.OBJECT_CLASS_AT ) );
             indexedAttrs.add( new JdbmIndex( SchemaConstants.OU_AT ) );
-            systemCfg.setIndexedAttributes( indexedAttrs );
+            system.setIndexedAttributes( indexedAttrs );
     
             // Add context entry for system partition
             Attributes systemEntry = new AttributesImpl();
@@ -92,9 +92,9 @@
             systemEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
             systemEntry.put( NamespaceTools.getRdnAttribute( PartitionNexus.SYSTEM_PARTITION_SUFFIX ),
                 NamespaceTools.getRdnValue( PartitionNexus.SYSTEM_PARTITION_SUFFIX ) );
-            systemCfg.setContextEntry( systemEntry );
+            system.setContextEntry( systemEntry );
             
-            configuration.setSystemPartitionConfiguration( systemCfg );
+            configuration.setSystemPartition( system );
         }
         
         super.setUp();

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java Sun Sep 30 17:41:53 2007
@@ -22,11 +22,10 @@
 
 import org.apache.commons.net.ntp.NTPUDPClient;
 import org.apache.commons.net.ntp.TimeInfo;
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.ldap.LdapConfiguration;
 import org.apache.directory.server.ntp.NtpConfiguration;
 import org.apache.directory.server.unit.AbstractServerTest;
@@ -73,20 +72,18 @@
         ntpConfig.setIpPort( port );
 
         Attributes attrs;
-        Set<PartitionConfiguration> pcfgs = new HashSet<PartitionConfiguration>();
-
-        MutableBTreePartitionConfiguration pcfg;
+        Set<Partition> partitions = new HashSet<Partition>();
 
         // Add partition 'example'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "example" );
-        pcfg.setSuffix( "dc=example,dc=com" );
+        JdbmPartition partition = new JdbmPartition();
+        partition.setId( "example" );
+        partition.setSuffix( "dc=example,dc=com" );
 
         Set<Index> indexedAttrs = new HashSet<Index>();
         indexedAttrs.add( new JdbmIndex( "ou" ) );
         indexedAttrs.add( new JdbmIndex( "dc" ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        pcfg.setIndexedAttributes( indexedAttrs );
+        partition.setIndexedAttributes( indexedAttrs );
 
         attrs = new AttributesImpl( true );
         Attribute attr = new AttributeImpl( "objectClass" );
@@ -96,10 +93,10 @@
         attr = new AttributeImpl( "dc" );
         attr.add( "example" );
         attrs.put( attr );
-        pcfg.setContextEntry( attrs );
+        partition.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
-        configuration.setPartitionConfigurations( pcfgs );
+        partitions.add( partition );
+        configuration.setPartitions( partitions );
 
         doDelete( configuration.getWorkingDirectory() );
         configuration.setShutdownHookEnabled( false );

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/PasswordPolicyServiceITest.java Sun Sep 30 17:41:53 2007
@@ -20,13 +20,12 @@
 package org.apache.directory.server;
 
 
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.kerberos.PasswordPolicyService;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -63,20 +62,18 @@
         configuration.setAllowAnonymousAccess( false );
 
         Attributes attrs;
-        Set<PartitionConfiguration> pcfgs = new HashSet<PartitionConfiguration>();
-
-        MutableBTreePartitionConfiguration pcfg;
+        Set<Partition> partitions = new HashSet<Partition>();
 
         // Add partition 'example'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "example" );
-        pcfg.setSuffix( "dc=example,dc=com" );
+        JdbmPartition partition = new JdbmPartition();
+        partition.setId( "example" );
+        partition.setSuffix( "dc=example,dc=com" );
 
         Set<Index> indexedAttrs = new HashSet<Index>();
         indexedAttrs.add( new JdbmIndex( "ou" ) );
         indexedAttrs.add( new JdbmIndex( "dc" ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        pcfg.setIndexedAttributes( indexedAttrs );
+        partition.setIndexedAttributes( indexedAttrs );
 
         attrs = new AttributesImpl( true );
         Attribute attr = new AttributeImpl( "objectClass" );
@@ -86,10 +83,10 @@
         attr = new AttributeImpl( "dc" );
         attr.add( "example" );
         attrs.put( attr );
-        pcfg.setContextEntry( attrs );
+        partition.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
-        configuration.setPartitionConfigurations( pcfgs );
+        partitions.add( partition );
+        configuration.setPartitions( partitions );
 
         List<Interceptor> list = configuration.getInterceptors();
 

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslBindITest.java Sun Sep 30 17:41:53 2007
@@ -20,11 +20,10 @@
 package org.apache.directory.server;
 
 
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -63,13 +62,13 @@
         configuration.getLdapConfiguration().setSaslHost( "localhost" );
 
         Attributes attrs;
-        Set<PartitionConfiguration> pcfgs = new HashSet<PartitionConfiguration>();
+        Set<Partition> partitions = new HashSet<Partition>();
 
-        MutableBTreePartitionConfiguration pcfg;
+        JdbmPartition pcfg;
 
         // Add partition 'example'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "example" );
+        pcfg = new JdbmPartition();
+        pcfg.setId( "example" );
         pcfg.setSuffix( "dc=example,dc=com" );
 
         Set<Index> indexedAttrs = new HashSet<Index>();
@@ -88,8 +87,8 @@
         attrs.put( attr );
         pcfg.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
-        configuration.setPartitionConfigurations( pcfgs );
+        partitions.add( pcfg );
+        configuration.setPartitions( partitions );
         super.setUp();
 
         Hashtable<String, String> env = new Hashtable<String, String>();

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/SaslGssapiBindITest.java Sun Sep 30 17:41:53 2007
@@ -20,13 +20,12 @@
 package org.apache.directory.server;
 
 
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
-import org.apache.directory.server.core.configuration.PartitionConfiguration;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.kerberos.KeyDerivationService;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.ldap.LdapConfiguration;
@@ -93,20 +92,18 @@
         kdcConfig.setSecurityPrincipal( "uid=admin,ou=system" );
 
         Attributes attrs;
-        Set<PartitionConfiguration> pcfgs = new HashSet<PartitionConfiguration>();
-
-        MutableBTreePartitionConfiguration pcfg;
+        Set<Partition> partitions = new HashSet<Partition>();
 
         // Add partition 'example'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "example" );
-        pcfg.setSuffix( "dc=example,dc=com" );
+        JdbmPartition partition = new JdbmPartition();
+        partition.setId( "example" );
+        partition.setSuffix( "dc=example,dc=com" );
 
         Set<Index> indexedAttrs = new HashSet<Index>();
         indexedAttrs.add( new JdbmIndex( "ou" ) );
         indexedAttrs.add( new JdbmIndex( "dc" ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        pcfg.setIndexedAttributes( indexedAttrs );
+        partition.setIndexedAttributes( indexedAttrs );
 
         attrs = new AttributesImpl( true );
         Attribute attr = new AttributeImpl( "objectClass" );
@@ -116,10 +113,10 @@
         attr = new AttributeImpl( "dc" );
         attr.add( "example" );
         attrs.put( attr );
-        pcfg.setContextEntry( attrs );
+        partition.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
-        configuration.setPartitionConfigurations( pcfgs );
+        partitions.add( partition );
+        configuration.setPartitions( partitions );
 
         List<Interceptor> list = configuration.getInterceptors();
 

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java?rev=580816&r1=580815&r2=580816&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java Sun Sep 30 17:41:53 2007
@@ -20,12 +20,11 @@
 package org.apache.directory.server.jndi;
 
 
-import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
+import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
-import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 
@@ -57,19 +56,17 @@
     {
         Attributes attrs;
         Set<Index> indexedAttrs;
-        Set pcfgs = new HashSet();
-
-        MutableBTreePartitionConfiguration pcfg;
+        Set<Partition> partitions = new HashSet<Partition>();
 
         // Add partition 'testing'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "testing" );
-        pcfg.setSuffix( "ou=testing" );
+        JdbmPartition partition = new JdbmPartition();
+        partition.setId( "testing" );
+        partition.setSuffix( "ou=testing" );
 
         indexedAttrs = new HashSet<Index>();
         indexedAttrs.add( new JdbmIndex( "ou" ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        pcfg.setIndexedAttributes( indexedAttrs );
+        partition.setIndexedAttributes( indexedAttrs );
 
         attrs = new AttributesImpl( true );
         Attribute attr = new AttributeImpl( "objectClass" );
@@ -80,20 +77,20 @@
         attr = new AttributeImpl( "ou" );
         attr.add( "testing" );
         attrs.put( attr );
-        pcfg.setContextEntry( attrs );
+        partition.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
+        partitions.add( partition );
 
         // Add partition 'example'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "example" );
-        pcfg.setSuffix( "dc=example" );
+        partition = new JdbmPartition();
+        partition.setId( "example" );
+        partition.setSuffix( "dc=example" );
 
         indexedAttrs = new HashSet<Index>();
         indexedAttrs.add( new JdbmIndex( "ou" ) );
         indexedAttrs.add( new JdbmIndex( "dc" ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        pcfg.setIndexedAttributes( indexedAttrs );
+        partition.setIndexedAttributes( indexedAttrs );
 
         attrs = new AttributesImpl( true );
         attr = new AttributeImpl( "objectClass" );
@@ -104,19 +101,19 @@
         attr = new AttributeImpl( "dc" );
         attr.add( "example" );
         attrs.put( attr );
-        pcfg.setContextEntry( attrs );
+        partition.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
+        partitions.add( partition );
 
         // Add partition 'MixedCase'
-        pcfg = new MutableBTreePartitionConfiguration();
-        pcfg.setName( "mixedcase" );
-        pcfg.setSuffix( "dc=MixedCase" );
+        partition = new JdbmPartition();
+        partition.setId( "mixedcase" );
+        partition.setSuffix( "dc=MixedCase" );
 
         indexedAttrs = new HashSet<Index>();
         indexedAttrs.add( new JdbmIndex( "dc" ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        pcfg.setIndexedAttributes( indexedAttrs );
+        partition.setIndexedAttributes( indexedAttrs );
 
         attrs = new AttributesImpl( true );
         attr = new AttributeImpl( "objectClass" );
@@ -127,11 +124,11 @@
         attr = new AttributeImpl( "dc" );
         attr.add( "MixedCase" );
         attrs.put( attr );
-        pcfg.setContextEntry( attrs );
+        partition.setContextEntry( attrs );
 
-        pcfgs.add( pcfg );
+        partitions.add( partition );
 
-        configuration.setPartitionConfigurations( pcfgs );
+        configuration.setPartitions( partitions );
 
         super.setUp();
     }
@@ -280,27 +277,5 @@
         assertTrue( attribute.contains( "top" ) );
 
         assertTrue( attribute.contains( "domain" ) );
-    }
-
-    
-    public void testBadPartition() throws Exception
-    {
-        MutablePartitionConfiguration pcfg;
-
-        // Add partition 'test=testing'
-        pcfg = new MutablePartitionConfiguration();
-        pcfg.setName( "testing" );
-        
-        try
-        {
-            pcfg.setSuffix( "ou=test+testing" );
-        }
-        catch ( LdapConfigurationException ce )
-        {
-            assertTrue( true );
-            return;
-        }
-        
-        fail();
     }
 }



Mime
View raw message