directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r607763 - in /directory/apacheds/branches/bigbang: core-entry/src/main/java/org/apache/directory/server/core/entry/ core-integ/src/main/java/org/apache/directory/server/core/integ/ core-integ/src/main/java/org/apache/directory/server/core/i...
Date Mon, 31 Dec 2007 18:20:16 GMT
Author: akarasulu
Date: Mon Dec 31 10:20:14 2007
New Revision: 607763

URL: http://svn.apache.org/viewvc?rev=607763&view=rev
Log:
changes to schema handling and entry creation ...

 o adding new interface for creating entries
 o setting default directory service to create bootstrap registries in the
   default constructor or generally at class initialization rather than in 
   the initialize method
 o fixed some issues in code which arose as a result of having to throw a 
   NamingException new in the constructor dude to bootstrap registry init within
   this constructor
 o this is all being done to be able to configure the server and it's partitions
   with server entries that require some minimal schema information to be 
   properly constructed

More to come ...

 o soon a means will be used to make the DirectoryService a factory for new 
   ServerEntry object instances that are schema aware - this is a preparatory
   commit to reach that point


Added:
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
Modified:
    directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java
    directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
    directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/InheritableSettings.java
    directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java
    directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java
    directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
    directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java
    directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java
    directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java

Added: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java?rev=607763&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
(added)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
Mon Dec 31 10:20:14 2007
@@ -0,0 +1,45 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.server.core.entry;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+
+
+/**
+ * A factory which produces ServerEntry objects.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ServerEntryFactory
+{
+    /*
+     * NOTE: 
+     * 
+     * May want to add more newEntry() overrides, some with variable arguments 
+     * to create entries in one method call.
+     */
+    
+    /**
+     * Creates a new ServerEntry which has not yet been added to the 
+     * directory.
+     */
+    ServerEntry newEntry( LdapDN dn );
+}

Modified: directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/AnnotationUtils.java
Mon Dec 31 10:20:14 2007
@@ -19,8 +19,7 @@
 package org.apache.directory.server.core.integ;
 
 
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.core.integ.annotations.Mode;
+import org.apache.directory.server.core.integ.annotations.*;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/DirectoryServiceFactory.java
Mon Dec 31 10:20:14 2007
@@ -19,6 +19,8 @@
 package org.apache.directory.server.core.integ;
 
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 
@@ -40,7 +42,7 @@
      */
     DirectoryServiceFactory DEFAULT = new DirectoryServiceFactory()
     {
-        public DirectoryService newInstance()
+        public DirectoryService newInstance() throws NamingException
         {
             DirectoryService service = new DefaultDirectoryService();
             service.getChangeLog().setEnabled( true );
@@ -53,5 +55,5 @@
         }
     };
 
-    DirectoryService newInstance();
+    DirectoryService newInstance() throws NamingException;
 }

Modified: directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/InheritableSettings.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/InheritableSettings.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/InheritableSettings.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/InheritableSettings.java
Mon Dec 31 10:20:14 2007
@@ -19,11 +19,7 @@
 package org.apache.directory.server.core.integ;
 
 
-import org.apache.directory.server.core.integ.annotations.ApplyLdifFiles;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.core.integ.annotations.Mode;
+import org.apache.directory.server.core.integ.annotations.*;
 import org.junit.runner.Description;
 
 import java.util.ArrayList;

Modified: directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/NonExistentState.java
Mon Dec 31 10:20:14 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.directory.server.core.integ.state;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.integ.DirectoryServiceFactory;
 import org.apache.directory.server.core.integ.InheritableSettings;
 import org.apache.directory.server.core.integ.SetupMode;
@@ -51,7 +53,7 @@
     }
 
 
-    public void create( DirectoryServiceFactory factory )
+    public void create( DirectoryServiceFactory factory ) throws NamingException
     {
         LOG.debug( "calling create()" );
         context.setService( factory.newInstance() );

Modified: directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceContext.java
Mon Dec 31 10:20:14 2007
@@ -103,7 +103,7 @@
      *
      * @param factory the factory to use for creating a configured service
      */
-    public static void create( DirectoryServiceFactory factory )
+    public static void create( DirectoryServiceFactory factory ) throws NamingException
     {
         get().state.create( factory );
     }

Modified: directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/main/java/org/apache/directory/server/core/integ/state/TestServiceState.java
Mon Dec 31 10:20:14 2007
@@ -45,7 +45,7 @@
      *
      * @param factory the factory to use for creating a configured service
      */
-    void create( DirectoryServiceFactory factory );
+    void create( DirectoryServiceFactory factory ) throws NamingException;
 
 
     /**

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
Mon Dec 31 10:20:14 2007
@@ -27,8 +27,7 @@
 import org.apache.directory.server.core.integ.CiSuite;
 import org.apache.directory.server.core.integ.Level;
 import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
+import org.apache.directory.server.core.integ.annotations.*;
 import org.apache.directory.server.core.jndi.AddIT;
 import org.apache.directory.server.core.jndi.CreateContextIT;
 import org.apache.directory.server.core.jndi.DIRSERVER169IT;

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
Mon Dec 31 10:20:14 2007
@@ -22,8 +22,7 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import static org.apache.directory.server.core.integ.IntegrationUtils.apply;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
+import static org.apache.directory.server.core.integ.IntegrationUtils.*;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java
Mon Dec 31 10:20:14 2007
@@ -26,8 +26,7 @@
 import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
 import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.core.integ.annotations.Mode;
+import org.apache.directory.server.core.integ.annotations.*;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.fail;

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
Mon Dec 31 10:20:14 2007
@@ -24,7 +24,7 @@
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.annotations.Factory;
+import org.apache.directory.server.core.integ.annotations.*;
 import org.apache.directory.server.core.DirectoryService;
 import org.junit.runner.RunWith;
 

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzISuite.java
Mon Dec 31 10:20:14 2007
@@ -18,9 +18,10 @@
  */
 package org.apache.directory.server.core.authz;
 
+
 import org.apache.directory.server.core.integ.CiSuite;
 import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
+import org.apache.directory.server.core.integ.annotations.*;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
Mon Dec 31 10:20:14 2007
@@ -55,7 +55,7 @@
 
     public static class ServiceFactory implements DirectoryServiceFactory
     {
-        public DirectoryService newInstance()
+        public DirectoryService newInstance() throws NamingException
         {
             DefaultDirectoryService service = new DefaultDirectoryService();
             service.setAccessControlEnabled( true );
@@ -68,7 +68,7 @@
 
     public static class DefaultServiceFactory implements DirectoryServiceFactory
     {
-        public DirectoryService newInstance()
+        public DirectoryService newInstance() throws NamingException
         {
             DefaultDirectoryService service = new DefaultDirectoryService();
             service.setAccessControlEnabled( false );

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
Mon Dec 31 10:20:14 2007
@@ -74,7 +74,7 @@
 
     public static class MyFactory implements DirectoryServiceFactory
     {
-        public DirectoryService newInstance()
+        public DirectoryService newInstance() throws NamingException
         {
             DirectoryService service = new DefaultDirectoryService();
             service.getChangeLog().setEnabled( true );

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
Mon Dec 31 10:20:14 2007
@@ -22,7 +22,7 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.*;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNotNull;

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
Mon Dec 31 10:20:14 2007
@@ -115,7 +115,7 @@
     
     public static class MyFactory implements DirectoryServiceFactory
     {
-        public DirectoryService newInstance()
+        public DirectoryService newInstance() throws NamingException
         {
             DirectoryService service = new DefaultDirectoryService();
             service.getChangeLog().setEnabled( true );

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
Mon Dec 31 10:20:14 2007
@@ -23,7 +23,7 @@
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.*;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
Mon Dec 31 10:20:14 2007
@@ -18,9 +18,10 @@
  */
 package org.apache.directory.server.core.schema;
 
+
 import org.apache.directory.server.core.integ.CiSuite;
 import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
+import org.apache.directory.server.core.integ.annotations.*;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 

Modified: directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java
(original)
+++ directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractAdminTestCase.java
Mon Dec 31 10:20:14 2007
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.server.core.unit;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.constants.ServerDNConstants;
 
 
@@ -30,7 +32,7 @@
  */
 public abstract class AbstractAdminTestCase extends AbstractTestCase
 {
-    protected AbstractAdminTestCase()
+    protected AbstractAdminTestCase() throws NamingException
     {
         super( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
     }

Modified: directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
(original)
+++ directory/apacheds/branches/bigbang/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
Mon Dec 31 10:20:14 2007
@@ -109,7 +109,7 @@
     protected DirectoryService service;
 
 
-    protected AbstractTestCase( String username, String password )
+    protected AbstractTestCase( String username, String password ) throws NamingException
     {
         if ( username == null || password == null )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Mon Dec 31 10:20:14 2007
@@ -156,10 +156,38 @@
     /**
      * Creates a new instance.
      */
-    public DefaultDirectoryService()
+    public DefaultDirectoryService() throws NamingException
     {
         setDefaultInterceptorConfigurations();
         changeLog = new DefaultChangeLog();
+        
+        // --------------------------------------------------------------------
+        // Load the bootstrap schemas to start up the schema partition
+        // --------------------------------------------------------------------
+
+        // setup temporary loader and temp registry 
+        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
+        OidRegistry oidRegistry = new DefaultOidRegistry();
+        registries = new DefaultRegistries( "bootstrap", loader, oidRegistry );
+
+        // load essential bootstrap schemas 
+        Set<Schema> bootstrapSchemas = new HashSet<Schema>();
+        bootstrapSchemas.add( new ApachemetaSchema() );
+        bootstrapSchemas.add( new ApacheSchema() );
+        bootstrapSchemas.add( new CoreSchema() );
+        bootstrapSchemas.add( new SystemSchema() );
+        loader.loadWithDependencies( bootstrapSchemas, registries );
+
+        // run referential integrity tests
+        List<Throwable> errors = registries.checkRefInteg();
+        if ( !errors.isEmpty() )
+        {
+            NamingException e = new NamingException();
+            e.setRootCause( errors.get( 0 ) );
+            throw e;
+        }
+        
+        SerializableComparator.setRegistry( registries.getComparatorRegistry() );
     }
 
 
@@ -1254,34 +1282,6 @@
         }
 
         // --------------------------------------------------------------------
-        // Load the bootstrap schemas to start up the schema partition
-        // --------------------------------------------------------------------
-
-        // setup temporary loader and temp registry 
-        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        OidRegistry oidRegistry = new DefaultOidRegistry();
-        registries = new DefaultRegistries( "bootstrap", loader, oidRegistry );
-
-        // load essential bootstrap schemas 
-        Set<Schema> bootstrapSchemas = new HashSet<Schema>();
-        bootstrapSchemas.add( new ApachemetaSchema() );
-        bootstrapSchemas.add( new ApacheSchema() );
-        bootstrapSchemas.add( new CoreSchema() );
-        bootstrapSchemas.add( new SystemSchema() );
-        loader.loadWithDependencies( bootstrapSchemas, registries );
-
-        // run referential integrity tests
-        List<Throwable> errors = registries.checkRefInteg();
-        if ( !errors.isEmpty() )
-        {
-            NamingException e = new NamingException();
-            e.setRootCause( errors.get( 0 ) );
-            throw e;
-        }
-        
-        SerializableComparator.setRegistry( registries.getComparatorRegistry() );
-        
-        // --------------------------------------------------------------------
         // If not present extract schema partition from jar
         // --------------------------------------------------------------------
 
@@ -1381,7 +1381,7 @@
         // --------------------------------------------------------------------
         
         PartitionSchemaLoader schemaLoader = new PartitionSchemaLoader( schemaPartition,
registries );
-        Registries globalRegistries = new DefaultRegistries( "global", schemaLoader, oidRegistry
);
+        Registries globalRegistries = new DefaultRegistries( "global", schemaLoader, registries.getOidRegistry()
);
         schemaLoader.loadEnabled( globalRegistries );
         registries = globalRegistries;
         SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );

Modified: directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java
(original)
+++ directory/apacheds/branches/bigbang/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java
Mon Dec 31 10:20:14 2007
@@ -22,6 +22,8 @@
 
 import java.io.IOException;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.protocol.shared.DatagramAcceptor;
@@ -56,7 +58,7 @@
     /**
      * Start an instance of the DNS server.
      */
-    public void go() throws IOException
+    public void go() throws IOException, NamingException
     {
         LOG.debug( "Starting the DNS server" );
         

Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=607763&r1=607762&r2=607763&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
(original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
Mon Dec 31 10:20:14 2007
@@ -75,8 +75,15 @@
 
 
     public ApacheDS( DirectoryService directoryService, LdapServer ldapServer, LdapServer
ldapsServer )
+        throws NamingException
     {
-        this.directoryService = directoryService == null? new DefaultDirectoryService():
directoryService;
+        this.directoryService = directoryService;
+        
+        if ( this.directoryService == null )
+        {
+            directoryService = new DefaultDirectoryService();
+        }
+        
         this.ldapServer = ldapServer;
         this.ldapsServer = ldapsServer;
         ByteBuffer.setAllocator( new SimpleByteBufferAllocator() );

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=607763&r1=607762&r2=607763&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
Mon Dec 31 10:20:14 2007
@@ -48,7 +48,7 @@
  */
 public class ServerContextFactoryTest extends AbstractAdminTestCase
 {
-    public ServerContextFactoryTest()
+    public ServerContextFactoryTest() throws NamingException
     {
     }
 



Mime
View raw message