directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r896599 [23/30] - in /directory/apacheds/trunk: ./ avl-partition/ avl-partition/src/ avl-partition/src/main/ avl-partition/src/main/java/ avl-partition/src/main/java/org/ avl-partition/src/main/java/org/apache/ avl-partition/src/main/java/o...
Date Wed, 06 Jan 2010 18:27:19 GMT
Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java Wed Jan  6 18:26:43 2010
@@ -26,37 +26,27 @@
 import java.io.IOException;
 import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 
-import org.apache.directory.server.core.DefaultDirectoryService;
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.IntegrationUtils;
-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.Factory;
-import org.apache.directory.server.integ.LdapServerFactory;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
-import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.annotations.SaslMechanism;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.gssapi.GssapiMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
+import org.apache.directory.server.ldap.handlers.bind.plain.PlainMechanismHandler;
 import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
-import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.LdapConnectionConfig;
-import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.messages.BindResponse;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
 import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.mina.util.AvailablePortFinder;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -67,65 +57,31 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.CLASS )
-@Factory ( LdapSSLConnectionTest.Factory.class )
-public class LdapSSLConnectionTest
+@RunWith ( FrameworkRunner.class ) 
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ),
+        @CreateTransport( protocol = "LDAPS" )
+    },
+    saslHost="localhost",
+    saslMechanisms = 
+    {
+        @SaslMechanism( name=SupportedSaslMechanisms.PLAIN, implClass=PlainMechanismHandler.class ),
+        @SaslMechanism( name=SupportedSaslMechanisms.CRAM_MD5, implClass=CramMd5MechanismHandler.class),
+        @SaslMechanism( name=SupportedSaslMechanisms.DIGEST_MD5, implClass=DigestMd5MechanismHandler.class),
+        @SaslMechanism( name=SupportedSaslMechanisms.GSSAPI, implClass=GssapiMechanismHandler.class),
+        @SaslMechanism( name=SupportedSaslMechanisms.NTLM, implClass=NtlmMechanismHandler.class),
+        @SaslMechanism( name=SupportedSaslMechanisms.GSS_SPNEGO, implClass=NtlmMechanismHandler.class)
+    },
+    extendedOpHandlers = 
+    {
+        StoredProcedureExtendedOperationHandler.class
+    })
+public class LdapSSLConnectionTest extends AbstractLdapTestUnit
 {
-    /** The server instance */
-    public static LdapServer ldapServer;
-
     private LdapConnectionConfig config;
     
-    public static class Factory implements LdapServerFactory
-    {
-        public LdapServer newInstance() throws Exception
-        {
-            DirectoryService service = new DefaultDirectoryService();
-            IntegrationUtils.doDelete( service.getWorkingDirectory() );
-            service.getChangeLog().setEnabled( true );
-            service.setShutdownHookEnabled( false );
-
-            // change the working directory to something that is unique
-            // on the system and somewhere either under target directory
-            // or somewhere in a temp area of the machine.
-
-            LdapServer ldapServer = new LdapServer();
-            ldapServer.setDirectoryService( service );
-            int port = AvailablePortFinder.getNextAvailable( 1024 );
-            TcpTransport tcpTransport = new TcpTransport( port );
-            int portSSL = port + 1;
-            TcpTransport tcpTransportSsl = new TcpTransport( portSSL );
-            tcpTransportSsl.enableSSL( true );
-            ldapServer.setTransports( tcpTransport, tcpTransportSsl );
-            ldapServer.setEnabled( true );
-            ldapServer.setConfidentialityRequired( true );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
-
-            // Setup SASL Mechanisms
-            
-            Map<String, MechanismHandler> mechanismHandlerMap = new HashMap<String,MechanismHandler>();
-            mechanismHandlerMap.put( SupportedSaslMechanisms.PLAIN, new SimpleMechanismHandler() );
-
-            CramMd5MechanismHandler cramMd5MechanismHandler = new CramMd5MechanismHandler();
-            mechanismHandlerMap.put( SupportedSaslMechanisms.CRAM_MD5, cramMd5MechanismHandler );
-
-            DigestMd5MechanismHandler digestMd5MechanismHandler = new DigestMd5MechanismHandler();
-            mechanismHandlerMap.put( SupportedSaslMechanisms.DIGEST_MD5, digestMd5MechanismHandler );
-
-            GssapiMechanismHandler gssapiMechanismHandler = new GssapiMechanismHandler();
-            mechanismHandlerMap.put( SupportedSaslMechanisms.GSSAPI, gssapiMechanismHandler );
-
-            NtlmMechanismHandler ntlmMechanismHandler = new NtlmMechanismHandler();
-            mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
-            mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
-
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
-
-            return ldapServer;
-        }
-    }
-
     
     @Before
     public void setup()
@@ -200,7 +156,7 @@
         LdapConnection connection = new LdapConnection( config );
 
         LdapDN dn = new LdapDN( "uid=admin,ou=system" );
-        connection.bind( dn.getUpName(), "secret" );
+        connection.bind( dn.getName(), "secret" );
         
         List<String> controlList = connection.getSupportedConrols();
         assertNotNull( controlList );

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java Wed Jan  6 18:26:43 2010
@@ -27,11 +27,11 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.SearchListener;
@@ -60,12 +60,15 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.CLASS)
-public class ClientAbandonRequestTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
+public class ClientAbandonRequestTest extends AbstractLdapTestUnit
 {
-    /** The server instance */
-    public static LdapServer ldapServer;
 
     private LdapConnection connection;
 
@@ -80,7 +83,7 @@
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
         connection.setTimeOut( 0L );
-        connection.bind( bindDn.getUpName(), "secret" );
+        connection.bind( bindDn.getName(), "secret" );
 
         session = ldapServer.getDirectoryService().getSession();
     }

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java Wed Jan  6 18:26:43 2010
@@ -27,11 +27,11 @@
 
 import java.util.concurrent.Semaphore;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.AddListener;
@@ -52,13 +52,15 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.CLASS)
-public class ClientAddRequestTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
+public class ClientAddRequestTest extends AbstractLdapTestUnit
 {
-    /** The server instance */
-    public static LdapServer ldapServer;
-
     private LdapConnection connection;
     
     private CoreSession session;
@@ -68,7 +70,7 @@
     {
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
-        connection.bind( bindDn.getUpName(), "secret" );
+        connection.bind( bindDn.getName(), "secret" );
         
         session = ldapServer.getDirectoryService().getSession();
     }

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientBindRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientBindRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientBindRequestTest.java Wed Jan  6 18:26:43 2010
@@ -26,10 +26,10 @@
 import java.io.IOException;
 import java.util.concurrent.Semaphore;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.BindListener;
@@ -46,13 +46,15 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.CLASS )
-public class ClientBindRequestTest
+@RunWith ( FrameworkRunner.class ) 
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
+public class ClientBindRequestTest extends AbstractLdapTestUnit
 {
-    /** The server instance */
-    public static LdapServer ldapServer;
-
     private LdapConnection connection;
     
     @Before

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java Wed Jan  6 18:26:43 2010
@@ -25,11 +25,11 @@
 
 import java.util.concurrent.Semaphore;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.CompareListener;
@@ -47,13 +47,15 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.CLASS)
-public class ClientCompareRequestTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
+public class ClientCompareRequestTest extends AbstractLdapTestUnit
 {
-    /** The server instance */
-    public static LdapServer ldapServer;
-
     private LdapConnection connection;
     
     private CoreSession session;
@@ -63,7 +65,7 @@
     {
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
-        connection.bind( bindDn.getUpName(), "secret" );
+        connection.bind( bindDn.getName(), "secret" );
         
         session = ldapServer.getDirectoryService().getSession();
     }
@@ -78,7 +80,7 @@
         assertNotNull( response );
         assertTrue( response.isTrue() );
         
-        response = connection.compare( dn.getUpName(), SchemaConstants.USER_PASSWORD_AT, "secret".getBytes() );
+        response = connection.compare( dn.getName(), SchemaConstants.USER_PASSWORD_AT, "secret".getBytes() );
         assertNotNull( response );
         assertTrue( response.isTrue() );
     }

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java Wed Jan  6 18:26:43 2010
@@ -31,12 +31,12 @@
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.DeleteListener;
@@ -55,46 +55,49 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.METHOD)
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
 @ApplyLdifs( {
-    "dn: cn=parent,ou=system\n" +
-    "objectClass: person\n" +
-    "cn: parent_cn\n" +
-    "sn: parent_sn\n" + 
-    
-    "\n" +
-    
-    "dn: cn=child1,cn=parent,ou=system\n" +
-    "objectClass: person\n" +
-    "cn: child1_cn\n" +
-    "sn: child1_sn\n" + 
-    
-    "\n" +
-    
-    "dn: cn=child2,cn=parent,ou=system\n" +
-    "objectClass: person\n" +
-    "cn: child2_cn\n" +
-    "sn: child2_sn\n" + 
-    
-    "\n" +
-    
-    "dn: cn=grand_child11,cn=child1,cn=parent,ou=system\n" +
-    "objectClass: person\n" +
-    "cn: grand_child11_cn\n" +
-    "sn: grand_child11_sn\n" + 
-    
-    "\n" +
-    
-    "dn: cn=grand_child12,cn=child1,cn=parent,ou=system\n" +
-    "objectClass: person\n" +
-    "cn: grand_child12_cn\n" +
-    "sn: grand_child12_sn\n"
+    "dn: cn=parent,ou=system",
+    "objectClass: person",
+    "cn: parent_cn",
+    "sn: parent_sn", 
+    
+    "",
+    
+    "dn: cn=child1,cn=parent,ou=system",
+    "objectClass: person",
+    "cn: child1_cn",
+    "sn: child1_sn", 
+    
+    "",
+    
+    "dn: cn=child2,cn=parent,ou=system",
+    "objectClass: person",
+    "cn: child2_cn",
+    "sn: child2_sn", 
+    
+    "",
+    
+    "dn: cn=grand_child11,cn=child1,cn=parent,ou=system",
+    "objectClass: person",
+    "cn: grand_child11_cn",
+    "sn: grand_child11_sn", 
+    
+    "",
+    
+    "dn: cn=grand_child12,cn=child1,cn=parent,ou=system",
+    "objectClass: person",
+    "cn: grand_child12_cn",
+    "sn: grand_child12_sn"
 })
-public class ClientDeleteRequestTest
+public class ClientDeleteRequestTest extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-    
     private LdapConnection connection;
     
     private CoreSession session;
@@ -105,7 +108,7 @@
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
 
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
-        connection.bind( bindDn.getUpName(), "secret" );
+        connection.bind( bindDn.getName(), "secret" );
         
         session = ldapServer.getDirectoryService().getAdminSession();
     }
@@ -124,7 +127,7 @@
         
         assertTrue( session.exists( dn ) );
         
-        DeleteResponse response = connection.delete( dn.getUpName() );
+        DeleteResponse response = connection.delete( dn.getName() );
         assertNotNull( response );
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
         
@@ -138,7 +141,7 @@
         LdapDN dn = new LdapDN( "cn=child1,cn=parent,ou=system" ); // has children
         assertTrue( session.exists( dn ) );
  
-        DeleteResponse response = connection.delete( dn.getUpName() );
+        DeleteResponse response = connection.delete( dn.getName() );
         assertNotNull( response );
         assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_NON_LEAF, response.getLdapResult().getResultCode() );
         

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java Wed Jan  6 18:26:43 2010
@@ -28,10 +28,11 @@
 
 import javax.naming.ldap.StartTlsRequest;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.ExtendedListener;
@@ -49,13 +50,19 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.CLASS)
-public class ClientExtendedRequestTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    },
+    extendedOpHandlers = 
+    {
+        StartTlsHandler.class
+    })
+public class ClientExtendedRequestTest extends AbstractLdapTestUnit
 {
-    /** The server instance */
-    public static LdapServer ldapServer;
-
     private LdapConnection connection;
     
     @Before
@@ -63,7 +70,7 @@
     {
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
-        connection.bind( bindDn.getUpName(), "secret" );
+        connection.bind( bindDn.getName(), "secret" );
     }
     
     

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java Wed Jan  6 18:26:43 2010
@@ -28,12 +28,12 @@
 
 import java.util.concurrent.Semaphore;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.ModifyDnListener;
@@ -53,18 +53,21 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.METHOD)
+@RunWith(FrameworkRunner.class)
 @ApplyLdifs( {
-    "dn: cn=modDn,ou=system\n" +
-    "objectClass: person\n" +
-    "cn: modDn\n" +
-    "sn: snModDn\n" 
+    "dn: cn=modDn,ou=system",
+    "objectClass: person",
+    "cn: modDn",
+    "sn: snModDn" 
 })
-public class ClientModifyDnRequestTest
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
+public class ClientModifyDnRequestTest extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-    
     private LdapConnection connection;
     
     private CoreSession session;
@@ -77,7 +80,7 @@
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
 
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
-        connection.bind( bindDn.getUpName(), "secret" );
+        connection.bind( bindDn.getName(), "secret" );
         
         session = ldapServer.getDirectoryService().getAdminSession();
     }
@@ -106,7 +109,7 @@
         assertNotNull( entry );
         
         Rdn oldRdn = oldDn.getRdn();
-        assertTrue( entry.contains( oldRdn.getUpType(), ( String ) oldRdn.getValue() ) );
+        assertTrue( entry.contains( oldRdn.getUpType(), ( String ) oldRdn.getNormValue() ) );
     }
     
     

Modified: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java (original)
+++ directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java Wed Jan  6 18:26:43 2010
@@ -26,12 +26,12 @@
 
 import java.util.concurrent.Semaphore;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.client.api.LdapConnection;
 import org.apache.directory.shared.ldap.client.api.exception.LdapException;
 import org.apache.directory.shared.ldap.client.api.listeners.ModifyListener;
@@ -54,13 +54,15 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith(SiRunner.class)
-@CleanupLevel(Level.CLASS)
-public class ClientModifyRequestTest
+@RunWith(FrameworkRunner.class)
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
+public class ClientModifyRequestTest extends AbstractLdapTestUnit
 {
-    /** The server instance */
-    public static LdapServer ldapServer;
-
     private LdapConnection connection;
     
     private CoreSession session;
@@ -71,7 +73,7 @@
         connection = new LdapConnection( "localhost", ldapServer.getPort() );
 
         LdapDN bindDn = new LdapDN( "uid=admin,ou=system" );
-        connection.bind( bindDn.getUpName(), "secret" );
+        connection.bind( bindDn.getName(), "secret" );
         
         session = ldapServer.getDirectoryService().getAdminSession();
     }

Propchange: directory/apacheds/trunk/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan  6 18:26:43 2010
@@ -0,0 +1 @@
+/directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java:806623-896441

Propchange: directory/apacheds/trunk/ldif-partition/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan  6 18:26:43 2010
@@ -0,0 +1,16 @@
+target
+.clover
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+nbproject
+schema

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Wed Jan  6 18:26:43 2010
@@ -25,7 +25,7 @@
   <parent>
     <groupId>org.apache.directory.project</groupId>
     <artifactId>project</artifactId>
-    <version>15</version>
+    <version>16</version>
   </parent>
 
   <groupId>org.apache.directory.server</groupId>
@@ -39,7 +39,7 @@
     <distMgmtSiteUrl>scpexe://people.apache.org/www/directory.apache.org/apacheds/gen-docs/${version}/</distMgmtSiteUrl>
 
     <!-- Set versions for depending projects -->
-    <org.apache.directory.shared.version>0.9.17-SNAPSHOT</org.apache.directory.shared.version>
+    <org.apache.directory.shared.version>0.9.18-SNAPSHOT</org.apache.directory.shared.version>
     <skin.version>1.0.0</skin.version>
   </properties>
 
@@ -62,6 +62,12 @@
 
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
+        <artifactId>shared-ldap-schema-manager</artifactId>
+        <version>${org.apache.directory.shared.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-ldap-constants</artifactId>
         <version>${org.apache.directory.shared.version}</version>
       </dependency>
@@ -69,13 +75,13 @@
       <dependency>
         <groupId>org.apache.directory.daemon</groupId>
         <artifactId>daemon-bootstrappers</artifactId>
-        <version>1.1.6</version>
+        <version>1.1.7-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
-        <version>2.0.0-M6</version>
+        <version>2.0.0-RC1</version>
       </dependency>
 
       <dependency>
@@ -123,7 +129,7 @@
       <dependency>
         <groupId>commons-pool</groupId>
         <artifactId>commons-pool</artifactId>
-        <version>1.4</version>
+        <version>1.5.2</version>
       </dependency>
 
       <dependency>
@@ -332,27 +338,25 @@
 
   <modules>
     <module>all</module>
-    <module>jdbm</module>
-    <module>bootstrap-extract</module>
-    <module>bootstrap-partition</module>
-    <module>bootstrap-plugin</module>
-    <module>schema-extras</module>
-    <module>schema-bootstrap</module>
     <module>utils</module>
-    <module>schema-registries</module>
+    <module>jdbm</module>
     <module>jdbm-store</module>
+    <module>jdbm-partition</module>
     <module>xdbm-base</module>
     <module>xdbm-search</module>
     <module>xdbm-tools</module>
     <module>core</module>
+    <module>core-api</module>
+    <module>core-annotations</module>
+    <module>server-annotations</module>
+    <module>core-mock</module>
     <module>core-jndi</module>
     <module>core-constants</module>
-    <module>core-shared</module>
-    <module>core-plugin</module>
-    <module>core-unit</module>
     <module>core-integ</module>
     <module>core-entry</module>
     <module>core-avl</module>
+    <module>avl-partition</module>
+    <module>ldif-partition</module>
     <module>protocol-shared</module>
     <module>protocol-ntp</module>
     <module>protocol-ldap</module>
@@ -371,16 +375,17 @@
     -->
 
     <module>server-xml</module>
-    <module>server-unit</module>
     <module>server-jndi</module>
     <module>kerberos-shared</module>
     <!--module>kerberos-unit</module-->
     <module>interceptor-kerberos</module>
+    <module>kerberos-test</module>
     <!--module>syncrepl</module-->
     <module>server-replication</module>
     <module>xbean-spring</module>
     <module>ldap-api-test</module>
     <module>http-integration</module>
+    <module>test-framework</module>
   </modules>
 
   <reporting>
@@ -390,6 +395,7 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-report-plugin</artifactId>
         <configuration>
+          <argLine>-Xmx1024m -XX:MaxPermSize=512m</argLine>
           <aggregate>true</aggregate>
         </configuration>
       </plugin>

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java Wed Jan  6 18:26:43 2010
@@ -273,7 +273,7 @@
     {
         PrincipalStore store = new DirectoryPrincipalStore( getDirectoryService(), new LdapDN(this.getSearchBaseDn())  );
         
-        if ( ( transports == null ) || ( transports.length == 0 ) )
+        if ( ( transports == null ) || ( transports.size() == 0 ) )
         {
             // Default to UDP with port 464
             // We have to create a DatagramAcceptor

Modified: directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java Wed Jan  6 18:26:43 2010
@@ -29,7 +29,6 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import junit.framework.TestCase;
 import org.apache.directory.server.changepw.ChangePasswordServer;
 import org.apache.directory.server.changepw.io.ChangePasswordDataEncoder;
 import org.apache.directory.server.changepw.messages.ChangePasswordError;
@@ -60,7 +59,8 @@
 import org.apache.directory.server.kerberos.shared.store.TicketFactory;
 import org.apache.mina.core.future.WriteFuture;
 import org.apache.mina.core.session.DummySession;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests the ChangePasswordProtocolHandler.
@@ -68,7 +68,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ChangepwProtocolHandlerTest extends TestCase
+public class ChangepwProtocolHandlerTest
 {
     /**
      * The Change Password SUCCESS result code.
@@ -100,6 +100,7 @@
     /**
      * Tests the protocol version number, which must be '1'.
      */
+    @Test
     public void testProtocolVersionNumber()
     {
         ChangePasswordRequest message = new ChangePasswordRequest( ( short ) 2, null, null );
@@ -116,6 +117,7 @@
      * Tests when a service ticket is missing that the request is rejected with
      * the correct error message.
      */
+    @Test
     public void testMissingTicket()
     {
         ChangePasswordRequest message = new ChangePasswordRequest( ( short ) 1, null, null );
@@ -134,6 +136,7 @@
      *
      * @throws Exception
      */
+    @Test
     public void testInitialFlagRequired() throws Exception
     {
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
@@ -210,6 +213,7 @@
      */
 
 
+    @Test
     public void testSetPassword() throws Exception
     {
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );

Modified: directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/service/CheckPasswordPolicyTest.java Wed Jan  6 18:26:43 2010
@@ -22,8 +22,9 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 
 /**
  * Tests {@link CheckPasswordPolicy}.
@@ -31,7 +32,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class CheckPasswordPolicyTest extends TestCase
+public class CheckPasswordPolicyTest
 {
     private int passwordLength = 6;
     private int categoryCount = 3;
@@ -43,6 +44,7 @@
     /**
      * Tests that a good password is valid according to all policy checks.
      */
+    @Test
     public void testGoodPassword()
     {
         String username = "Enrique Rodriguez";
@@ -57,6 +59,7 @@
     /**
      * Tests that a bad password fails all validity checks.
      */
+    @Test
     public void testBadPassword()
     {
         String username = "Erin Randall";
@@ -71,6 +74,7 @@
     /**
      * Tests variations of a password where the password includes tokens of the username.
      */
+    @Test
     public void testPrincipalAsUsername()
     {
         String username = new KerberosPrincipal( "erodriguez@EXAMPLE.COM" ).getName();

Modified: directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java (original)
+++ directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/AbstractDhcpTestCase.java Wed Jan  6 18:26:43 2010
@@ -25,8 +25,6 @@
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dhcp.messages.DhcpMessage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -36,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public abstract class AbstractDhcpTestCase extends TestCase
+public abstract class AbstractDhcpTestCase
 {
     protected static final int MINIMUM_DHCP_DATAGRAM_SIZE = 576;
     protected final Logger log;
@@ -48,7 +46,7 @@
     }
 
 
-    public AbstractDhcpTestCase(Class subclass)
+    public AbstractDhcpTestCase(Class<?> subclass)
     {
         log = LoggerFactory.getLogger( subclass );
     }

Modified: directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dhcp/src/test/java/org/apache/directory/server/dhcp/DhcpMessageDecoderTest.java Wed Jan  6 18:26:43 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.server.dhcp.io.DhcpMessageDecoder;
 import org.apache.directory.server.dhcp.messages.DhcpMessage;
+import org.junit.Test;
 
 
 /**
@@ -42,6 +43,7 @@
     }
 
 
+    @Test
     public void testParseDiscover() throws Exception
     {
         requestByteBuffer = getByteBufferFromFile( "DHCPDISCOVER.pdu" );
@@ -53,6 +55,7 @@
     }
 
 
+    @Test
     public void testParseOffer() throws Exception
     {
         requestByteBuffer = getByteBufferFromFile( "DHCPOFFER.pdu" );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java Wed Jan  6 18:26:43 2010
@@ -80,7 +80,7 @@
     {
         RecordStore store = new JndiRecordStoreImpl( getSearchBaseDn(), getSearchBaseDn(), getDirectoryService() );
 
-        if ( ( transports == null ) || ( transports.length == 0 ) )
+        if ( ( transports == null ) || ( transports.size() == 0 ) )
         {
             // Default to UDP with port 53
             // We have to create a DatagramAcceptor

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java Wed Jan  6 18:26:43 2010
@@ -20,10 +20,6 @@
 package org.apache.directory.server.dns;
 
 
-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.transport.TcpTransport;
@@ -58,7 +54,7 @@
     /**
      * Start an instance of the DNS server.
      */
-    public void go() throws IOException, NamingException
+    public void go() throws Exception
     {
         LOG.debug( "Starting the DNS server" );
         

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java Wed Jan  6 18:26:43 2010
@@ -28,8 +28,6 @@
 import java.util.Collections;
 import java.util.List;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.messages.DnsMessage;
 import org.apache.directory.server.dns.messages.DnsMessageModifier;
 import org.apache.directory.server.dns.messages.MessageType;
@@ -48,7 +46,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public abstract class AbstractDnsTestCase extends TestCase
+public abstract class AbstractDnsTestCase
 {
     protected static final int MINIMUM_DNS_DATAGRAM_SIZE = 576;
 

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java Wed Jan  6 18:26:43 2010
@@ -24,11 +24,11 @@
 import java.net.InetAddress;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the A resource record decoder.
@@ -36,7 +36,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class AddressRecordDecoderTest extends TestCase
+public class AddressRecordDecoderTest
 {
     InetAddress address;
     IoBuffer inputBuffer;
@@ -44,6 +44,7 @@
     AddressRecordDecoder decoder;
 
 
+    @Before
     public void setUp() throws Exception
     {
         address = InetAddress.getByName( "127.0.0.1" );
@@ -55,9 +56,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
         assertEquals( address, attributes.get( DnsAttribute.IP_ADDRESS ) );
     }
 }

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java Wed Jan  6 18:26:43 2010
@@ -24,11 +24,12 @@
 import java.net.InetAddress;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
+import org.junit.Before;
+import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the AAAA resource record decoder.
@@ -36,7 +37,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class IPv6RecordDecoderTest extends TestCase
+public class IPv6RecordDecoderTest
 {
     InetAddress address;
     IoBuffer inputBuffer;
@@ -44,6 +45,7 @@
     IPv6RecordDecoder decoder;
 
 
+    @Before
     public void setUp() throws Exception
     {
         address = InetAddress.getByName( "0:0:0:0:0:0:0:1" );
@@ -55,10 +57,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length );
         assertEquals( address, attributes.get( DnsAttribute.IP_ADDRESS ) );
     }
-
 }

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java Wed Jan  6 18:26:43 2010
@@ -23,11 +23,11 @@
 
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the MX resource record decoder.
@@ -35,7 +35,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class MailExchangeRecordDecoderTest extends TestCase
+public class MailExchangeRecordDecoderTest
 {
     IoBuffer inputBuffer;
 
@@ -47,6 +47,7 @@
     MailExchangeRecordDecoder decoder;
 
 
+    @Before
     public void setUp()
     {
         inputBuffer = IoBuffer.allocate( 128 );
@@ -64,9 +65,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
         assertEquals( preference, attributes.get( DnsAttribute.MX_PREFERENCE ) );
         assertEquals( domainName, attributes.get( DnsAttribute.DOMAIN_NAME ) );
     }

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java Wed Jan  6 18:26:43 2010
@@ -23,11 +23,11 @@
 
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the NS resource record decoder.
@@ -35,7 +35,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class NameServerRecordDecoderTest extends TestCase
+public class NameServerRecordDecoderTest
 {
     IoBuffer inputBuffer;
 
@@ -46,6 +46,7 @@
     NameServerRecordDecoder decoder;
 
 
+    @Before
     public void setUp()
     {
         inputBuffer = IoBuffer.allocate( 128 );
@@ -62,9 +63,10 @@
     }
 
 
+    @Test
     public void testDecode() throws Exception
     {
-        Map attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
+        Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() );
         assertEquals( domainName, attributes.get( DnsAttribute.DOMAIN_NAME ) );
     }
 }

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java Wed Jan  6 18:26:43 2010
@@ -24,14 +24,14 @@
 import java.net.UnknownHostException;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.messages.RecordClass;
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResourceRecordImpl;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * A base class for testing different types of ResourceRecordEncoders.  It 
@@ -41,7 +41,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public abstract class AbstractResourceRecordEncoderTest extends TestCase
+public abstract class AbstractResourceRecordEncoderTest
 {
     IoBuffer expectedData;
     String domainName = "herse.apache.org";
@@ -50,6 +50,7 @@
     ResourceRecord record;
 
 
+    @Before
     public void setUp() throws UnknownHostException
     {
         setUpResourceData();
@@ -71,6 +72,7 @@
     }
 
 
+    @Test
     public void testEncode() throws IOException
     {
         IoBuffer outBuffer = IoBuffer.allocate( 128 );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java Wed Jan  6 18:26:43 2010
@@ -21,13 +21,13 @@
 package org.apache.directory.server.dns.io.encoder;
 
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.dns.messages.QuestionRecord;
 import org.apache.directory.server.dns.messages.RecordClass;
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.mina.core.buffer.IoBuffer;
-
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Tests for the Question record encoder.
@@ -35,7 +35,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 501160 $, $Date: 2007-01-29 12:41:33 -0700 (Mon, 29 Jan 2007) $
  */
-public class QuestionRecordEncoderTest extends TestCase
+public class QuestionRecordEncoderTest
 {
     IoBuffer expectedData;
 
@@ -49,6 +49,7 @@
     QuestionRecord record = new QuestionRecord( name, type, rClass );
 
 
+    @Before
     public void setUp()
     {
         encoder = new QuestionRecordEncoder();
@@ -66,6 +67,7 @@
     }
 
 
+    @Test
     public void testEncode()
     {
         IoBuffer out = IoBuffer.allocate( 128 );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/messages/RecordClassTest.java Wed Jan  6 18:26:43 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.dns.messages;
 
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
 
 /**
@@ -29,11 +29,12 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class RecordClassTest extends TestCase
+public class RecordClassTest
 {
     /**
      * Tests conversion of ordinals to RecordClass enums.
      */
+    @Test
     public void testRecordClassConversion()
     {
         assertEquals( RecordClass.IN, RecordClass.convert( ( short ) 1 ) );

Modified: directory/apacheds/trunk/protocol-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/pom.xml?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/pom.xml (original)
+++ directory/apacheds/trunk/protocol-kerberos/pom.xml Wed Jan  6 18:26:43 2010
@@ -26,7 +26,10 @@
     <artifactId>apacheds-parent</artifactId>
     <version>1.5.6-SNAPSHOT</version>
   </parent>
+  
+  <groupId>org.apache.directory.server</groupId>  
   <artifactId>apacheds-protocol-kerberos</artifactId>
+  
   <name>ApacheDS Protocol Kerberos</name>
 
   <description>
@@ -41,15 +44,10 @@
       <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-bootstrap-partition</artifactId>
+      <artifactId>apacheds-jdbm-partition</artifactId>
       <version>${pom.version}</version>
       <scope>test</scope>
     </dependency>

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java Wed Jan  6 18:26:43 2010
@@ -162,8 +162,6 @@
         super.setServiceName( DEFAULT_NAME );
         super.setServiceId( DEFAULT_PID );
         super.setSearchBaseDn( ServerDNConstants.USER_EXAMPLE_COM_DN );
-        setTransports( new TcpTransport( DEFAULT_IP_PORT ), new UdpTransport( DEFAULT_IP_PORT ) );
-        
 
         prepareEncryptionTypes();
     }
@@ -444,7 +442,7 @@
         // TODO - for now ignoring this catalog crap
         store = new DirectoryPrincipalStore( getDirectoryService(), new LdapDN(this.getSearchBaseDn())  );
         
-        if ( ( transports == null ) || ( transports.length == 0 ) )
+        if ( ( transports == null ) || ( transports.size() == 0 ) )
         {
             // Default to UDP with port 88
             // We have to create a DatagramAcceptor

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java Wed Jan  6 18:26:43 2010
@@ -41,7 +41,6 @@
 import org.apache.mina.core.service.IoHandler;
 import org.apache.mina.core.session.IdleStatus;
 import org.apache.mina.core.session.IoSession;
-import org.apache.mina.filter.codec.ProtocolCodecFilter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java Wed Jan  6 18:26:43 2010
@@ -22,18 +22,18 @@
 
 import java.util.Arrays;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class OptionsTest extends TestCase
+public class OptionsTest
 {
     private byte[] fpriOptions =
         { ( byte ) 0x50, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x10 };
@@ -42,6 +42,7 @@
     /**
      * Tests converting the ticket flags to a descriptive String.
      */
+    @Test
     public void testToString()
     {
         TicketFlags flags = new TicketFlags();
@@ -56,6 +57,7 @@
     /**
      * Tests that setting flags is idempotent.
      */
+    @Test
     public void testDuplicateSetting()
     {
         TicketFlags flags = new TicketFlags();
@@ -71,6 +73,7 @@
     /**
      * Tests the basic construction of the {@link KdcOptions}.
      */
+    @Test
     public void testConstruction()
     {
         KdcOptions options = new KdcOptions( fpriOptions );

Modified: directory/apacheds/trunk/protocol-ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/pom.xml?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/pom.xml (original)
+++ directory/apacheds/trunk/protocol-ldap/pom.xml Wed Jan  6 18:26:43 2010
@@ -60,12 +60,6 @@
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-bootstrap-partition</artifactId>
-      <version>${pom.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-protocol-shared</artifactId>
       <version>${pom.version}</version>
     </dependency>

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java Wed Jan  6 18:26:43 2010
@@ -21,13 +21,13 @@
 
 
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.asn1.codec.Asn1CodecDecoder;
 import org.apache.directory.shared.asn1.codec.Asn1CodecEncoder;
 import org.apache.directory.shared.ldap.message.MessageDecoder;
 import org.apache.directory.shared.ldap.message.MessageEncoder;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
@@ -82,10 +82,11 @@
         {
             public boolean isBinary( String id )
             {
-                AttributeTypeRegistry attrRegistry = directoryService.getRegistries().getAttributeTypeRegistry();
+                SchemaManager schemaManager = directoryService.getSchemaManager();
+                
                 try
                 {
-                    AttributeType type = attrRegistry.lookup( id );
+                    AttributeType type = schemaManager.lookupAttributeTypeRegistry( id );
                     return ! type.getSyntax().isHumanReadable();
                 }
                 catch ( Exception e )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Wed Jan  6 18:26:43 2010
@@ -647,7 +647,7 @@
     public void removeExtendedOperationHandler( String oid )
     {
         // need to do something like this to make this work right
-        //            PartitionNexus nexus = getDirectoryService().getPartitionNexus();
+        //            DefaultPartitionNexus nexus = getDirectoryService().getPartitionNexus();
         //            nexus.unregisterSupportedExtensions( eoh.getExtensionOids() );
 
         ExtendedOperationHandler handler = null;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java Wed Jan  6 18:26:43 2010
@@ -27,7 +27,7 @@
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.ldap.handlers.controls.PagedSearchContext;
 import org.apache.directory.shared.ldap.message.InternalAbandonableRequest;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java Wed Jan  6 18:26:43 2010
@@ -29,7 +29,7 @@
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.ldap.LdapProtocolUtils;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ModifyDnHandler.java Wed Jan  6 18:26:43 2010
@@ -26,7 +26,6 @@
 import org.apache.directory.shared.ldap.message.InternalModifyDnRequest;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,11 +76,11 @@
         {
             LdapDN newRdn = new LdapDN( req.getNewRdn().toString() );
             newRdn.normalize( session.getCoreSession().getDirectoryService()
-                .getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+                .getSchemaManager().getNormalizerMapping() );
             
             LdapDN oldRdn = new LdapDN( req.getName().getRdn().toString() );
             oldRdn.normalize( session.getCoreSession().getDirectoryService()
-                .getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+                .getSchemaManager().getNormalizerMapping() );
             
             boolean rdnChanged = req.getNewRdn() != null && 
                 ! newRdn.getNormName().equals( oldRdn.getNormName() );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java Wed Jan  6 18:26:43 2010
@@ -39,7 +39,6 @@
 import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.message.control.EntryChangeControl;
 import org.apache.directory.shared.ldap.message.control.PersistentSearchControl;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -168,7 +167,7 @@
     
         InternalSearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() );
         respEntry.setObjectName( opContext.getDn() );
-        respEntry.setEntry( opContext.getEntry() );
+        respEntry.setEntry( opContext.getAlteredEntry() );
         setECResponseControl( respEntry, opContext, ChangeType.MODIFY );
         session.getIoSession().write( respEntry );
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java Wed Jan  6 18:26:43 2010
@@ -33,15 +33,14 @@
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.InternalReferral;
-import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.InternalResultResponseRequest;
 import org.apache.directory.shared.ldap.message.InternalSearchRequest;
+import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.ManageDsaITControl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.directory.shared.ldap.util.LdapURL;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -221,9 +220,9 @@
                 LOG.error( "Bad URL ({}) for ref in {}.  Reference will be ignored.", ref, referralAncestor );
             }
             
-            LdapDN urlDn = new LdapDN( ldapUrl.getDn().getUpName() );
-            urlDn.normalize( session.getCoreSession().getDirectoryService().getRegistries()
-                .getAttributeTypeRegistry().getNormalizerMapping() ); 
+            LdapDN urlDn = new LdapDN( ldapUrl.getDn().getName() );
+            urlDn.normalize( session.getCoreSession().getDirectoryService().getSchemaManager()
+                .getNormalizerMapping() ); 
             
             if ( urlDn.getNormName().equals( referralAncestor.getDn().getNormName() ) )
             {
@@ -252,7 +251,7 @@
 
             // TODO - fix this by access unormalized RDN values
             // seems we have to do this because get returns normalized rdns
-            LdapDN reqUnnormalizedDn = new LdapDN( reqTargetDn.getUpName() );
+            LdapDN reqUnnormalizedDn = new LdapDN( reqTargetDn.getName() );
             for ( int jj = 0; jj < diff; jj++ )
             {
                 extra.add( reqUnnormalizedDn.get( referralAncestor.getDn().size() + jj ) );
@@ -271,7 +270,7 @@
             }
 
             buf.append( "/" );
-            buf.append( LdapURL.urlEncode( urlDn.getUpName(), false ) );
+            buf.append( LdapURL.urlEncode( urlDn.getName(), false ) );
             referral.addLdapUrl( buf.toString() );
         }
         
@@ -321,9 +320,9 @@
             }
             
             // Normalize the DN to check for same dn
-            LdapDN urlDn = new LdapDN( ldapUrl.getDn().getUpName() );
-            urlDn.normalize( session.getCoreSession().getDirectoryService().getRegistries()
-                .getAttributeTypeRegistry().getNormalizerMapping() ); 
+            LdapDN urlDn = new LdapDN( ldapUrl.getDn().getName() );
+            urlDn.normalize( session.getCoreSession().getDirectoryService().getSchemaManager()
+                .getNormalizerMapping() ); 
             
             if ( urlDn.getNormName().equals( req.getBase().getNormName() ) )
             {
@@ -344,7 +343,7 @@
 
             // TODO - fix this by access unormalized RDN values
             // seems we have to do this because get returns normalized rdns
-            LdapDN reqUnnormalizedDn = new LdapDN( req.getBase().getUpName() );
+            LdapDN reqUnnormalizedDn = new LdapDN( req.getBase().getName() );
             for ( int jj = 0; jj < diff; jj++ )
             {
                 extra.add( reqUnnormalizedDn.get( referralAncestor.getDn().size() + jj ) );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java Wed Jan  6 18:26:43 2010
@@ -20,8 +20,16 @@
 package org.apache.directory.server.ldap.handlers;
 
 
+import static java.lang.Math.min;
+import static org.apache.directory.server.ldap.LdapServer.NO_SIZE_LIMIT;
+import static org.apache.directory.server.ldap.LdapServer.NO_TIME_LIMIT;
+
 import java.util.concurrent.TimeUnit;
 
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+import javax.naming.ldap.PagedResultsControl;
+
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.ReferralManager;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -40,17 +48,17 @@
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
-import org.apache.directory.shared.ldap.message.InternalLdapResult;
-import org.apache.directory.shared.ldap.message.ReferralImpl;
-import org.apache.directory.shared.ldap.message.InternalResponse;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.InternalReferral;
+import org.apache.directory.shared.ldap.message.InternalResponse;
 import org.apache.directory.shared.ldap.message.InternalSearchRequest;
 import org.apache.directory.shared.ldap.message.InternalSearchResponseDone;
 import org.apache.directory.shared.ldap.message.InternalSearchResponseEntry;
-import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.message.InternalSearchResponseReference;
+import org.apache.directory.shared.ldap.message.ReferralImpl;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.message.SearchResponseReferenceImpl;
 import org.apache.directory.shared.ldap.message.control.ManageDsaITControl;
 import org.apache.directory.shared.ldap.message.control.PagedSearchControl;
@@ -62,15 +70,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.apache.directory.server.ldap.LdapServer.NO_SIZE_LIMIT;
-import static org.apache.directory.server.ldap.LdapServer.NO_TIME_LIMIT;
-
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-import javax.naming.ldap.PagedResultsControl;
-
-import static java.lang.Math.min;
-
 
 /**
  * A handler for processing search requests.
@@ -101,8 +100,8 @@
     {
         if ( objectClassAttributeType == null )
         {
-            objectClassAttributeType = session.getCoreSession().getDirectoryService().getRegistries()
-                .getAttributeTypeRegistry().lookup( SchemaConstants.OBJECT_CLASS_AT );
+            objectClassAttributeType = session.getCoreSession().getDirectoryService().
+                getSchemaManager().lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         }
         
         EqualityNode<String> ocIsReferral = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT,
@@ -884,7 +883,7 @@
             PresenceNode presenceNode = ( PresenceNode ) req.getFilter();
             
             AttributeType at = session.getCoreSession().getDirectoryService()
-                .getRegistries().getAttributeTypeRegistry().lookup( presenceNode.getAttribute() );
+                .getSchemaManager().lookupAttributeTypeRegistry( presenceNode.getAttribute() );
             if ( at.getOid().equals( SchemaConstants.OBJECT_CLASS_AT_OID ) )
             {
                 return;
@@ -1015,7 +1014,8 @@
         boolean isparentReferral = false;
         ReferralManager referralManager = session.getCoreSession().getDirectoryService().getReferralManager();
         
-        reqTargetDn.normalize( session.getCoreSession().getDirectoryService().getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        reqTargetDn.normalize( session.getCoreSession().getDirectoryService().
+            getSchemaManager().getNormalizerMapping() );
         
         // Check if the entry itself is a referral
         referralManager.lockRead();
@@ -1251,7 +1251,7 @@
         PartitionNexus nexus = ds.getPartitionNexus();
         Value<?> subschemaSubentry = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
         LdapDN subschemaSubentryDn = new LdapDN( subschemaSubentry.getString() );
-        subschemaSubentryDn.normalize( ds.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
+        subschemaSubentryDn.normalize( ds.getSchemaManager().getNormalizerMapping() );
         String subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();
         
         return subschemaSubentryDnNorm.equals( baseNormForm );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java?rev=896599&r1=896598&r2=896599&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/cramMD5/CramMd5CallbackHandler.java Wed Jan  6 18:26:43 2010
@@ -23,8 +23,11 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import javax.naming.Context;
+import javax.security.sasl.AuthorizeCallback;
+
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.ldap.LdapSession;
@@ -41,13 +44,9 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Context;
-import javax.security.sasl.AuthorizeCallback;
-
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -83,7 +82,7 @@
             ExprNode filter = FilterParser.parse( "(uid=" + username + ")" );
             Set<AttributeTypeOptions> returningAttributes = new HashSet<AttributeTypeOptions>();
             
-            AttributeType passwordAT = adminSession.getDirectoryService().getRegistries().getAttributeTypeRegistry().lookup( SchemaConstants.USER_PASSWORD_AT );
+            AttributeType passwordAT = adminSession.getDirectoryService().getSchemaManager().lookupAttributeTypeRegistry( SchemaConstants.USER_PASSWORD_AT );
             returningAttributes.add( new AttributeTypeOptions( passwordAT) );
             bindDn = (String)ldapSession.getSaslProperty( SaslConstants.SASL_USER_BASE_DN );
             



Mime
View raw message