directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r810035 - in /directory/apacheds/branches/apacheds-schema: core-integ/ core/src/main/java/org/apache/directory/server/core/partition/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ core/src/test/java/org/apac...
Date Tue, 01 Sep 2009 13:41:45 GMT
Author: akarasulu
Date: Tue Sep  1 13:41:44 2009
New Revision: 810035

URL: http://svn.apache.org/viewvc?rev=810035&view=rev
Log:
moved jdbm code over to its own module

Added:
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BigIntegerSerializer.java
      - copied unchanged from r809864, directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BigIntegerSerializer.java
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
      - copied unchanged from r809864, directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/StringSerializer.java
      - copied unchanged from r809864, directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/StringSerializer.java
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/StringSerializerTest.java
      - copied unchanged from r809864, directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/StringSerializerTest.java
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
      - copied unchanged from r809864, directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/
    directory/apacheds/branches/apacheds-schema/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
      - copied unchanged from r809864, directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Removed:
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BigIntegerSerializer.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/StringSerializer.java
    directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/StringSerializerTest.java
    directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
    directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Modified:
    directory/apacheds/branches/apacheds-schema/core-integ/pom.xml
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/apacheds-schema/protocol-kerberos/pom.xml
    directory/apacheds/branches/apacheds-schema/server-integ/pom.xml
    directory/apacheds/branches/apacheds-schema/server-tools/pom.xml
    directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java

Modified: directory/apacheds/branches/apacheds-schema/core-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/pom.xml?rev=810035&r1=810034&r2=810035&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/pom.xml Tue Sep  1 13:41:44 2009
@@ -54,7 +54,7 @@
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-schema-extras</artifactId>
+      <artifactId>apacheds-jdbm-partition</artifactId>
       <version>${pom.version}</version>
       <scope>test</scope>
     </dependency>  

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=810035&r1=810034&r2=810035&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Tue Sep  1 13:41:44 2009
@@ -67,9 +67,6 @@
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
-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.xdbm.Index;
 import org.apache.directory.shared.ldap.MultiException;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
@@ -357,6 +354,7 @@
                         + override.getId() + "'." );
             }
             
+            /*
             // add all attribute oids of index configs to a hashset
             if ( override instanceof JdbmPartition )
             {
@@ -380,20 +378,22 @@
 
                 ( ( JdbmPartition ) override ).setIndexedAttributes( indices );
             }
+            */
 
             system = override;
         }
         else
         {
+        	/*
             system = new JdbmPartition();
             system.setId( "system" );
             system.setCacheSize( 500 );
             system.setSuffix( ServerDNConstants.SYSTEM_DN );
-    
             // Add objectClass attribute for the system partition
             Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
             indexedAttrs.add( new JdbmIndex<Object,ServerEntry>( SchemaConstants.OBJECT_CLASS_AT
) );
             ( ( JdbmPartition ) system ).setIndexedAttributes( indexedAttrs );
+    		*/
         }
 
         system.init( directoryService );

Modified: directory/apacheds/branches/apacheds-schema/protocol-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/protocol-kerberos/pom.xml?rev=810035&r1=810034&r2=810035&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/protocol-kerberos/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/protocol-kerberos/pom.xml Tue Sep  1 13:41:44
2009
@@ -41,12 +41,20 @@
       <artifactId>apacheds-kerberos-shared</artifactId>
       <version>${pom.version}</version>
     </dependency>
+    
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-server-unit</artifactId>
       <version>${pom.version}</version>
       <scope>test</scope>
     </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-jdbm-partition</artifactId>
+      <version>${pom.version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>

Modified: directory/apacheds/branches/apacheds-schema/server-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/pom.xml?rev=810035&r1=810034&r2=810035&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/pom.xml Tue Sep  1 13:41:44 2009
@@ -72,7 +72,7 @@
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-schema-extras</artifactId>
+      <artifactId>apacheds-jdbm-partition</artifactId>
       <version>${pom.version}</version>
       <scope>test</scope>
     </dependency>  

Modified: directory/apacheds/branches/apacheds-schema/server-tools/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-tools/pom.xml?rev=810035&r1=810034&r2=810035&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-tools/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/server-tools/pom.xml Tue Sep  1 13:41:44 2009
@@ -30,7 +30,7 @@
   <name>ApacheDS Server Tools</name>
 
   <description>
-    Contained within this executable jar are various commandline utilities
+    Contained within this executable jar are various command line utilities
     for apacheds.
   </description>
 
@@ -50,6 +50,12 @@
     </dependency>
 
     <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-jdbm-partition</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
       <groupId>org.apache.xbean</groupId>
       <artifactId>xbean-spring</artifactId>
     </dependency>

Modified: directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=810035&r1=810034&r2=810035&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
(original)
+++ directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
Tue Sep  1 13:41:44 2009
@@ -22,7 +22,6 @@
 
 import java.io.File;
 import java.io.FileWriter;
-import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -40,26 +39,18 @@
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.entry.DefaultServerAttributeTest;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmMasterTable;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.core.schema.PartitionSchemaLoader;
 import org.apache.directory.shared.ldap.schema.comparators.SerializableComparator;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
-import org.apache.directory.server.schema.bootstrap.partition.DbFileListing;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.Tuple;
 import org.apache.directory.shared.ldap.MultiException;
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
 import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
@@ -95,14 +86,6 @@
 
         // setup temporary loader and temp registry 
     	String workingDirectory = System.getProperty( "workingDirectory" );
-
-        if ( workingDirectory == null )
-        {
-            String path = DefaultServerAttributeTest.class.getResource( "" ).getPath();
-            int targetPos = path.indexOf( "target" );
-            workingDirectory = path.substring( 0, targetPos + 6 );
-        }
-
         File schemaRepository = new File( workingDirectory, "schema" );
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
@@ -141,42 +124,16 @@
                 + "the installation layout could not be found:\n\t" + schemaDirectory );
         }
 
-        JdbmPartition schemaPartition = new JdbmPartition();
-        schemaPartition.setId( "schema" );
-        schemaPartition.setCacheSize( 1000 );
-
-        DbFileListing listing;
-        
-        try
-        {
-            listing = new DbFileListing();
-        }
-        catch ( IOException e )
-        {
-            throw new LdapNamingException( "Got IOException while trying to read DBFileListing:
" + e.getMessage(),
-                ResultCodeEnum.OTHER );
-        }
-
-        Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
-
-        for ( String attributeId : listing.getIndexedAttributes() )
-        {
-            indexedAttributes.add( new JdbmIndex( attributeId ) );
-        }
-
-        schemaPartition.setIndexedAttributes( indexedAttributes );
-        schemaPartition.setSuffix( ServerDNConstants.OU_SCHEMA_DN );
-
         DirectoryService directoryService = new DefaultDirectoryService();
-        schemaPartition.init( directoryService );
+        //schemaPartition.init( directoryService );
 
         // --------------------------------------------------------------------
         // Initialize schema subsystem and reset registries
         // --------------------------------------------------------------------
-        PartitionSchemaLoader schemaLoader = new PartitionSchemaLoader( schemaPartition,
registries );
+//        PartitionSchemaLoader schemaLoader = new PartitionSchemaLoader( schemaPartition,
registries );
         Registries globalRegistries = new Registries();
-        schemaLoader.loadEnabled( globalRegistries );
-        SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );
+//        schemaLoader.loadEnabled( globalRegistries );
+//        SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );
         return globalRegistries;
     }
 



Mime
View raw message