directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1563612 - in /directory/sandbox/kayyagari/embedded-sample-trunk: pom.xml src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java
Date Sun, 02 Feb 2014 14:00:51 GMT
Author: kayyagari
Date: Sun Feb  2 14:00:51 2014
New Revision: 1563612

URL: http://svn.apache.org/r1563612
Log:
updated to the latest trunk version

Modified:
    directory/sandbox/kayyagari/embedded-sample-trunk/pom.xml
    directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java

Modified: directory/sandbox/kayyagari/embedded-sample-trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/embedded-sample-trunk/pom.xml?rev=1563612&r1=1563611&r2=1563612&view=diff
==============================================================================
--- directory/sandbox/kayyagari/embedded-sample-trunk/pom.xml (original)
+++ directory/sandbox/kayyagari/embedded-sample-trunk/pom.xml Sun Feb  2 14:00:51 2014
@@ -33,7 +33,7 @@
      <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-all</artifactId>
-      <version>2.0.0-M15</version>
+      <version>2.0.0-M16-SNAPSHOT</version>
     </dependency>
     
     <dependency>

Modified: directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java?rev=1563612&r1=1563611&r2=1563612&view=diff
==============================================================================
--- directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java
(original)
+++ directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java
Sun Feb  2 14:00:51 2014
@@ -38,6 +38,7 @@ import org.apache.directory.server.const
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.api.CacheService;
 import org.apache.directory.server.core.api.DirectoryService;
+import org.apache.directory.server.core.api.DnFactory;
 import org.apache.directory.server.core.api.InstanceLayout;
 import org.apache.directory.server.core.api.partition.Partition;
 import org.apache.directory.server.core.api.schema.SchemaPartition;
@@ -70,13 +71,14 @@ public class EmbeddedADSVerTrunk
      *
      * @param partitionId The partition Id
      * @param partitionDn The partition DN
+     * @param dnFactory the DN factory
      * @return The newly added partition
      * @throws Exception If the partition can't be added
      */
-    private Partition addPartition( String partitionId, String partitionDn ) throws Exception
+    private Partition addPartition( String partitionId, String partitionDn, DnFactory dnFactory
) throws Exception
     {
         // Create a new partition with the given partition id 
-        JdbmPartition partition = new JdbmPartition(service.getSchemaManager());
+        JdbmPartition partition = new JdbmPartition(service.getSchemaManager(), dnFactory);
         partition.setId( partitionId );
         partition.setPartitionPath( new File( service.getInstanceLayout().getPartitionsDirectory(),
partitionId ).toURI() );
         partition.setSuffixDn( new Dn( partitionDn ) );
@@ -99,7 +101,7 @@ public class EmbeddedADSVerTrunk
 
         for ( String attribute : attrs )
         {
-            indexedAttributes.add( new JdbmIndex<String, Entry>( attribute, false )
);
+            indexedAttributes.add( new JdbmIndex( attribute, false ) );
         }
 
         ( ( JdbmPartition ) partition ).setIndexedAttributes( indexedAttributes );
@@ -146,7 +148,7 @@ public class EmbeddedADSVerTrunk
         service.setSchemaManager( schemaManager );
         
         // Init the LdifPartition with schema
-        LdifPartition schemaLdifPartition = new LdifPartition( schemaManager );
+        LdifPartition schemaLdifPartition = new LdifPartition( schemaManager, service.getDnFactory()
);
         schemaLdifPartition.setPartitionPath( schemaPartitionDirectory.toURI() );
 
         // The schema partition
@@ -181,7 +183,7 @@ public class EmbeddedADSVerTrunk
         // this is a MANDATORY partition
         // DO NOT add this via addPartition() method, trunk code complains about duplicate
partition
         // while initializing 
-        JdbmPartition systemPartition = new JdbmPartition(service.getSchemaManager());
+        JdbmPartition systemPartition = new JdbmPartition(service.getSchemaManager(), service.getDnFactory());
         systemPartition.setId( "system" );
         systemPartition.setPartitionPath( new File( service.getInstanceLayout().getPartitionsDirectory(),
systemPartition.getId() ).toURI() );
         systemPartition.setSuffixDn( new Dn( ServerDNConstants.SYSTEM_DN ) );
@@ -197,9 +199,9 @@ public class EmbeddedADSVerTrunk
 
         // Now we can create as many partitions as we need
         // Create some new partitions named 'foo', 'bar' and 'apache'.
-        Partition fooPartition = addPartition( "foo", "dc=department,dc=example,dc=com" );
-        Partition barPartition = addPartition( "bar", "dc=bar,dc=com" );
-        Partition apachePartition = addPartition( "apache", "dc=apache,dc=org" );
+        Partition fooPartition = addPartition( "foo", "dc=department,dc=example,dc=com",
service.getDnFactory() );
+        Partition barPartition = addPartition( "bar", "dc=bar,dc=com", service.getDnFactory()
);
+        Partition apachePartition = addPartition( "apache", "dc=apache,dc=org", service.getDnFactory()
);
 
         // Index some attributes on the apache partition
         addIndex( apachePartition, "objectClass", "ou", "uid" );



Mime
View raw message