directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r894440 - in /directory/apacheds/branches/apacheds-schema: core-annotations/src/main/java/org/apache/directory/server/core/annotations/ test-framework/src/main/java/org/apache/directory/server/core/integ/ test-framework/src/test/java/org/ap...
Date Tue, 29 Dec 2009 17:03:54 GMT
Author: elecharny
Date: Tue Dec 29 17:03:54 2009
New Revision: 894440

URL: http://svn.apache.org/viewvc?rev=894440&view=rev
Log:
Addind the Partitions member in the createDS annotations

Modified:
    directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
    directory/apacheds/branches/apacheds-schema/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
    directory/apacheds/branches/apacheds-schema/test-framework/src/test/java/org/apache/directory/server/core/integ/TestSuiteServer.java

Modified: directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java?rev=894440&r1=894439&r2=894440&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
Tue Dec 29 17:03:54 2009
@@ -46,4 +46,7 @@
     
     /** flag to enable/disable anonymous access, default is false */
     boolean allowAnonAccess() default false;
+    
+    /** The list of partitions to create */
+    CreatePartition[] partitions() default {};
 }

Modified: directory/apacheds/branches/apacheds-schema/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java?rev=894440&r1=894439&r2=894440&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
(original)
+++ directory/apacheds/branches/apacheds-schema/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
Tue Dec 29 17:03:54 2009
@@ -23,6 +23,7 @@
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.CreatePartition;
 import org.apache.directory.server.core.factory.DSBuilderAnnotationProcessor;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
@@ -158,7 +159,18 @@
             ldapServer.addTransports( ldaps );
         }
     }
+
     
+    private void addPartitions( Description description )
+    {
+        CreatePartition createPartition = description.getAnnotation( CreatePartition.class
);
+        
+        if ( createPartition != null )
+        {
+            
+        }
+    }
+
     
     private void startLdapServer( Description description )
     {
@@ -207,6 +219,9 @@
         // Create and initialize the Suite DS
         startDS( getDescription() );
         
+        // Add the partitions to this DS
+        addPartitions( getDescription() );
+        
         // create and initialize the suite LdapServer
         startLdapServer( getDescription() );
         

Modified: directory/apacheds/branches/apacheds-schema/test-framework/src/test/java/org/apache/directory/server/core/integ/TestSuiteServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/test-framework/src/test/java/org/apache/directory/server/core/integ/TestSuiteServer.java?rev=894440&r1=894439&r2=894440&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/test-framework/src/test/java/org/apache/directory/server/core/integ/TestSuiteServer.java
(original)
+++ directory/apacheds/branches/apacheds-schema/test-framework/src/test/java/org/apache/directory/server/core/integ/TestSuiteServer.java
Tue Dec 29 17:03:54 2009
@@ -30,39 +30,39 @@
 
 @RunWith( FrameworkSuite.class )
 @Suite.SuiteClasses( { TestClassA.class, TestClassB.class, TestClassC.class } )
-@CreateDS( name = "SuiteDS" )
-@CreatePartition
-    (
-        name = "example",
-        suffix = "dc=example,dc=com",
-        contextEntry = @ContextEntry
-            ( 
+@CreateDS( 
+    name = "SuiteDS",
+    partitions =
+    {
+        @CreatePartition(
+            name = "example",
+            suffix = "dc=example,dc=com",
+            contextEntry = @ContextEntry( 
                 entryLdif =
                     "dn: dc=example,dc=com\n" +
                     "dc: example\n" +
                     "objectClass: top\n" +
-                    "objectClass: domain\n\n"
-            ),
-        indexes = 
+                    "objectClass: domain\n\n" ),
+            indexes = 
             {
                 @CreateIndex( attribute = "objectClass" ),
                 @CreateIndex( attribute = "dc" ),
                 @CreateIndex( attribute = "ou" ),
-            }
-    )
+            } )
+    } )
 @CreateLdapServer ( 
     transports = 
-        {
-            @CreateTransport( protocol = "LDAP" ), 
-            @CreateTransport( protocol = "LDAPS" ) 
-        })
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
 @ApplyLdifs(
     {
         "dn: cn=testSuite,ou=system\n" + 
         "objectClass: person\n" + 
         "cn: testSuite\n" + 
         "sn: sn_testSuite\n" 
-    })
+    } )
 public class TestSuiteServer
 {
 }



Mime
View raw message