directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r692919 [2/4] - in /directory/apacheds/trunk: protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/ protocol-ldap/src/main/java/org/apache/directory/server/ld...
Date Sun, 07 Sep 2008 19:00:24 GMT
Modified: directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java Sun Sep  7 12:00:21 2008
@@ -22,7 +22,7 @@
 
 import junit.framework.TestCase;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.AbandonHandler;
 import org.apache.directory.server.ldap.handlers.AddHandler;
 import org.apache.directory.server.ldap.handlers.BindHandler;
@@ -54,24 +54,24 @@
  */
 public class SettingAlternativeHandlersTest extends TestCase
 {
-    LdapServer ldapServer;
+    LdapService ldapService;
 
 
     public void setUp() throws Exception
     {
-        ldapServer = new LdapServer();
+        ldapService = new LdapService();
         
         if ( getName().equals( "testAlternativeConfiguration" ) )
         {
-            ldapServer.setAbandonHandler( new BogusAbandonHandler() );
-            ldapServer.setAddHandler( new BogusAddHandler() );
-            ldapServer.setBindHandler( new BogusBindHandler() );
-            ldapServer.setCompareHandler( new BogusCompareHandler() );
-            ldapServer.setDeleteHandler( new BogusDeleteHandler() );
-            ldapServer.setModifyDnHandler( new BogusModifyDnHandler() );
-            ldapServer.setModifyHandler( new BogusModifyHandler() );
-            ldapServer.setSearchHandler( new BogusSearchHandler() );
-            ldapServer.setUnbindHandler( new BogusUnbindHandler() );
+            ldapService.setAbandonHandler( new BogusAbandonHandler() );
+            ldapService.setAddHandler( new BogusAddHandler() );
+            ldapService.setBindHandler( new BogusBindHandler() );
+            ldapService.setCompareHandler( new BogusCompareHandler() );
+            ldapService.setDeleteHandler( new BogusDeleteHandler() );
+            ldapService.setModifyDnHandler( new BogusModifyDnHandler() );
+            ldapService.setModifyHandler( new BogusModifyHandler() );
+            ldapService.setSearchHandler( new BogusSearchHandler() );
+            ldapService.setUnbindHandler( new BogusUnbindHandler() );
         }
     }
 
@@ -85,7 +85,7 @@
      */
     public void testDefaultOperation() throws LdapNamingException
     {
-        assertEquals( ldapServer.getName(), LdapServer.SERVICE_NAME );
+        assertEquals( ldapService.getName(), LdapService.SERVICE_NAME );
     }
 
 
@@ -98,16 +98,16 @@
      */
     public void testAlternativeConfiguration() throws LdapNamingException
     {
-        assertEquals( ldapServer.getAbandonHandler().getClass(), BogusAbandonHandler.class  );
-        assertEquals( ldapServer.getAddHandler().getClass(), BogusAddHandler.class  );
-        assertEquals( ldapServer.getBindHandler().getClass(), BogusBindHandler.class  );
-        assertEquals( ldapServer.getCompareHandler().getClass(), BogusCompareHandler.class  );
-        assertEquals( ldapServer.getDeleteHandler().getClass(), BogusDeleteHandler.class  );
-        assertEquals( ldapServer.getModifyDnHandler().getClass(), BogusModifyDnHandler.class  );
-        assertEquals( ldapServer.getModifyHandler().getClass(), BogusModifyHandler.class  );
-        assertEquals( ldapServer.getSearchHandler().getClass(), BogusSearchHandler.class  );
-        assertEquals( ldapServer.getUnbindHandler().getClass(), BogusUnbindHandler.class  );
-        assertEquals( ldapServer.getName(), LdapServer.SERVICE_NAME );
+        assertEquals( ldapService.getAbandonHandler().getClass(), BogusAbandonHandler.class  );
+        assertEquals( ldapService.getAddHandler().getClass(), BogusAddHandler.class  );
+        assertEquals( ldapService.getBindHandler().getClass(), BogusBindHandler.class  );
+        assertEquals( ldapService.getCompareHandler().getClass(), BogusCompareHandler.class  );
+        assertEquals( ldapService.getDeleteHandler().getClass(), BogusDeleteHandler.class  );
+        assertEquals( ldapService.getModifyDnHandler().getClass(), BogusModifyDnHandler.class  );
+        assertEquals( ldapService.getModifyHandler().getClass(), BogusModifyHandler.class  );
+        assertEquals( ldapService.getSearchHandler().getClass(), BogusSearchHandler.class  );
+        assertEquals( ldapService.getUnbindHandler().getClass(), BogusUnbindHandler.class  );
+        assertEquals( ldapService.getName(), LdapService.SERVICE_NAME );
     }
 
     

Modified: directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/LdapServerFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/LdapServerFactory.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/LdapServerFactory.java (original)
+++ directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/LdapServerFactory.java Sun Sep  7 12:00:21 2008
@@ -25,7 +25,7 @@
 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.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
@@ -56,7 +56,7 @@
      */
     LdapServerFactory DEFAULT = new LdapServerFactory()
     {
-        public LdapServer newInstance() throws Exception
+        public LdapService newInstance() throws Exception
         {
             DirectoryService service = new DefaultDirectoryService();
             IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -67,12 +67,12 @@
             // 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 );
-            ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-            ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-            ldapServer.addExtendedOperationHandler( new StartTlsHandler() );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+            LdapService ldapService = new LdapService();
+            ldapService.setDirectoryService( service );
+            ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+            ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+            ldapService.addExtendedOperationHandler( new StartTlsHandler() );
+            ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
             // Setup SASL Mechanisms
             
@@ -92,12 +92,12 @@
             mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
             mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+            ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
 
-            return ldapServer;
+            return ldapService;
         }
     };
 
     
-    LdapServer newInstance() throws Exception;
+    LdapService newInstance() throws Exception;
 }

Modified: directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java (original)
+++ directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/ServerIntegrationUtils.java Sun Sep  7 12:00:21 2008
@@ -30,7 +30,7 @@
 
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -53,13 +53,13 @@
      * SUN LDAP provider.  The connection is made using the administrative 
      * user as the principalDN.  The context is to the rootDSE.
      *
-     * @param ldapServer the LDAP server to get the connection to
+     * @param ldapService the LDAP server to get the connection to
      * @return an LdapContext as the administrative user to the RootDSE
      * @throws Exception if there are problems creating the context
      */
-    public static LdapContext getWiredContext( LdapServer ldapServer ) throws Exception
+    public static LdapContext getWiredContext( LdapService ldapService ) throws Exception
     {
-        return getWiredContext( ldapServer, null );
+        return getWiredContext( ldapService, null );
     }
 
 
@@ -68,17 +68,17 @@
      * SUN LDAP provider.  The connection is made using the administrative 
      * user as the principalDN.  The context is to the rootDSE.
      *
-     * @param ldapServer the LDAP server to get the connection to
+     * @param ldapService the LDAP server to get the connection to
      * @return an LdapContext as the administrative user to the RootDSE
      * @throws Exception if there are problems creating the context
      */
-    public static LdapContext getWiredContext( LdapServer ldapServer, String principalDn, String password ) 
+    public static LdapContext getWiredContext( LdapService ldapService, String principalDn, String password ) 
         throws Exception
     {
-        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapServer.getIpPort() );
+        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapService.getIpPort() );
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CTX_FACTORY );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_PRINCIPAL, principalDn );
         env.put( Context.SECURITY_CREDENTIALS, password );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -91,16 +91,16 @@
      * SUN LDAP provider.  The connection is made using the administrative 
      * user as the principalDN.  The context is to the rootDSE.
      *
-     * @param ldapServer the LDAP server to get the connection to
+     * @param ldapService the LDAP server to get the connection to
      * @return an LdapContext as the administrative user to the RootDSE
      * @throws Exception if there are problems creating the context
      */
-    public static LdapContext getWiredContext( LdapServer ldapServer, Control[] controls ) throws Exception
+    public static LdapContext getWiredContext( LdapService ldapService, Control[] controls ) throws Exception
     {
-        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapServer.getIpPort() );
+        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapService.getIpPort() );
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CTX_FACTORY );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -113,16 +113,16 @@
      * SUN LDAP provider.  The connection is made using the administrative 
      * user as the principalDN.  The context is to the rootDSE.
      *
-     * @param ldapServer the LDAP server to get the connection to
+     * @param ldapService the LDAP server to get the connection to
      * @return an LdapContext as the administrative user to the RootDSE
      * @throws Exception if there are problems creating the context
      */
-    public static LdapContext getWiredContextThrowOnRefferal( LdapServer ldapServer ) throws Exception
+    public static LdapContext getWiredContextThrowOnRefferal( LdapService ldapService ) throws Exception
     {
-        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapServer.getIpPort() );
+        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapService.getIpPort() );
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CTX_FACTORY );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -136,16 +136,16 @@
      * SUN LDAP provider.  The connection is made using the administrative 
      * user as the principalDN.  The context is to the rootDSE.
      *
-     * @param ldapServer the LDAP server to get the connection to
+     * @param ldapService the LDAP server to get the connection to
      * @return an LdapContext as the administrative user to the RootDSE
      * @throws Exception if there are problems creating the context
      */
-    public static LdapContext getWiredContextRefferalIgnore( LdapServer ldapServer ) throws Exception
+    public static LdapContext getWiredContextRefferalIgnore( LdapService ldapService ) throws Exception
     {
-        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapServer.getIpPort() );
+        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapService.getIpPort() );
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CTX_FACTORY );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -159,16 +159,16 @@
      * SUN LDAP provider.  The connection is made using the administrative 
      * user as the principalDN.  The context is to the rootDSE.
      *
-     * @param ldapServer the LDAP server to get the connection to
+     * @param ldapService the LDAP server to get the connection to
      * @return an LdapContext as the administrative user to the RootDSE
      * @throws Exception if there are problems creating the context
      */
-    public static LdapContext getWiredContextFollowOnRefferal( LdapServer ldapServer ) throws Exception
+    public static LdapContext getWiredContextFollowOnRefferal( LdapService ldapService ) throws Exception
     {
-        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapServer.getIpPort() );
+        LOG.debug( "Creating a wired context to local LDAP server on port {}", ldapService.getIpPort() );
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CTX_FACTORY );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -177,13 +177,13 @@
     }
 
     
-    public static LDAPConnection getWiredConnection( LdapServer ldapServer ) throws Exception
+    public static LDAPConnection getWiredConnection( LdapService ldapService ) throws Exception
     {
         String testServer = System.getProperty( "ldap.test.server", null );
         
         if ( testServer == null )
         {
-            return getWiredConnection( ldapServer, ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
+            return getWiredConnection( ldapService, ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
         }
         
         LOG.debug( "ldap.test.server = " + testServer );
@@ -206,11 +206,11 @@
     }
 
     
-    public static LDAPConnection getWiredConnection( LdapServer ldapServer, String principalDn, String password ) 
+    public static LDAPConnection getWiredConnection( LdapService ldapService, String principalDn, String password ) 
         throws Exception
     {
         LDAPConnection conn = new LDAPConnection();
-        conn.connect( 3, "localhost", ldapServer.getIpPort(), principalDn, password );
+        conn.connect( 3, "localhost", ldapService.getIpPort(), principalDn, password );
         return conn;
     }
 }

Modified: directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/StartedPristineState.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/StartedPristineState.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/StartedPristineState.java (original)
+++ directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/StartedPristineState.java Sun Sep  7 12:00:21 2008
@@ -22,7 +22,7 @@
 import java.io.IOException;
 
 import org.apache.directory.server.integ.InheritableServerSettings;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 
 import static org.apache.directory.server.core.integ.IntegrationUtils.doDelete;
 import org.junit.internal.runners.TestClass;
@@ -78,7 +78,7 @@
     public void startup() throws Exception
     {
         LOG.debug( "calling start()" );
-        LdapServer server = context.getLdapServer();
+        LdapService server = context.getLdapServer();
         server.getDirectoryService().startup();
         server.start();
     }
@@ -92,7 +92,7 @@
     public void shutdown() throws Exception
     {
         LOG.debug( "calling stop()" );
-        LdapServer server = context.getLdapServer();
+        LdapService server = context.getLdapServer();
         server.stop();
         server.getDirectoryService().shutdown();
     }

Modified: directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerContext.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerContext.java (original)
+++ directory/apacheds/trunk/server-integ/src/main/java/org/apache/directory/server/integ/state/TestServerContext.java Sun Sep  7 12:00:21 2008
@@ -26,7 +26,7 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.server.integ.InheritableServerSettings;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.internal.runners.MethodRoadie;
 import org.junit.internal.runners.TestClass;
 import org.junit.internal.runners.TestMethod;
@@ -66,7 +66,7 @@
     private TestServerState state = nonExistentState;
 
     /** the ldap server managed by this context */
-    private LdapServer ldapServer;
+    private LdapService ldapService;
 
 
     /**
@@ -206,7 +206,7 @@
         try
         {
             Object test = testClass.getConstructor().newInstance();
-            Field field = testClass.getJavaClass().getDeclaredField( "ldapServer" );
+            Field field = testClass.getJavaClass().getDeclaredField( "ldapService" );
             field.set( testClass.getJavaClass(), get().getLdapServer() );
             new MethodRoadie( test, testMethod, notifier, description ).run();
         }
@@ -278,14 +278,14 @@
     }
 
 
-    LdapServer getLdapServer()
+    LdapService getLdapServer()
     {
-        return ldapServer;
+        return ldapService;
     }
 
 
-    void setLdapServer( LdapServer ldapServer )
+    void setLdapServer( LdapService ldapService )
     {
-        this.ldapServer = ldapServer;
+        this.ldapService = ldapService;
     }
 }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java Sun Sep  7 12:00:21 2008
@@ -41,7 +41,7 @@
 import org.apache.directory.server.kerberos.shared.io.decoder.EncryptionKeyDecoder;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler;
@@ -105,12 +105,12 @@
     private static final String RDN = "uid=hnelson,ou=users,dc=example,dc=com";
 
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
      
      public static class Factory implements LdapServerFactory
      {
-         public LdapServer newInstance() throws Exception
+         public LdapService newInstance() throws Exception
          {
              DirectoryService service = new DefaultDirectoryService();
              IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -140,12 +140,12 @@
              // 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 );
-             ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-             ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-             ldapServer.setAllowAnonymousAccess( false );
-             ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+             LdapService ldapService = new LdapService();
+             ldapService.setDirectoryService( service );
+             ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+             ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+             ldapService.setAllowAnonymousAccess( false );
+             ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
              // Setup SASL Mechanisms
              
@@ -165,10 +165,10 @@
              mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
              mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-             ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
-             ldapServer.setSaslHost( "localhost" );
+             ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
+             ldapService.setSaslHost( "localhost" );
              
-             return ldapServer;
+             return ldapService;
          }
      }
      
@@ -180,7 +180,7 @@
      @Before
     public void setUp() throws Exception
     {
-        DirContext schemaRoot = ( DirContext ) getWiredContext( ldapServer ).lookup( "ou=schema" );
+        DirContext schemaRoot = ( DirContext ) getWiredContext( ldapService ).lookup( "ou=schema" );
 
         // -------------------------------------------------------------------
         // Enable the krb5kdc schema
@@ -204,7 +204,7 @@
             schemaRoot.modifyAttributes( "cn=Krb5kdc", mods );
         }
 
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( "dc=example,dc=com" );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( "dc=example,dc=com" );
         Attributes attrs = getOrgUnitAttributes( "users" );
         DirContext users = ctx.createSubcontext( "ou=users", attrs );
 
@@ -224,7 +224,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -295,7 +295,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -433,7 +433,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -563,7 +563,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getIpPort() + "/ou=users,dc=example,dc=com" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapService.getIpPort() + "/ou=users,dc=example,dc=com" );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );
         env.put( "java.naming.security.authentication", "simple" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java Sun Sep  7 12:00:21 2008
@@ -36,7 +36,7 @@
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 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.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler;
@@ -94,12 +94,12 @@
     private DirContext users;
 
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     public static class Factory implements LdapServerFactory
     {
-        public LdapServer newInstance() throws Exception
+        public LdapService newInstance() throws Exception
         {
             DirectoryService service = new DefaultDirectoryService();
             IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -129,12 +129,12 @@
             // 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 );
-            ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-            ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-            ldapServer.setAllowAnonymousAccess( false );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+            LdapService ldapService = new LdapService();
+            ldapService.setDirectoryService( service );
+            ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+            ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+            ldapService.setAllowAnonymousAccess( false );
+            ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
             // Setup SASL Mechanisms
             
@@ -154,10 +154,10 @@
             mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
             mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
-            ldapServer.setSaslHost( "localhost" );
+            ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
+            ldapService.setSaslHost( "localhost" );
             
-            return ldapServer;
+            return ldapService;
         }
     }
     
@@ -172,7 +172,7 @@
         Attributes attrs;
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getIpPort() + "/dc=example,dc=com" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapService.getIpPort() + "/dc=example,dc=com" );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );
         env.put( "java.naming.security.authentication", "simple" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Sun Sep  7 12:00:21 2008
@@ -54,7 +54,7 @@
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
@@ -119,7 +119,7 @@
     private static final String BASE = "ou=system";
 
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
 
     /**
@@ -130,7 +130,7 @@
     @Test
     public void testAddObjectClasses() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // modify object classes, add two more
         Attributes attributes = new BasicAttributes( true );
@@ -164,7 +164,7 @@
     @Test
     public void testModifyDescription() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
 
         String newDescription = "More info on the user ...";
 
@@ -193,7 +193,7 @@
     @Test
     public void testAddWithMissingRequiredAttributes() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // person without sn
         Attributes attrs = new BasicAttributes( true );
@@ -225,7 +225,7 @@
     @Test
     public void testAddEntryWithTwoDescriptions() throws Exception
     {
-        LDAPConnection con = getWiredConnection( ldapServer );
+        LDAPConnection con = getWiredConnection( ldapService );
         LDAPAttributeSet attrs = new LDAPAttributeSet();
         LDAPAttribute ocls = new LDAPAttribute( "objectclass", new String[]
             { "top", "person" } );
@@ -267,7 +267,7 @@
     @Test
     public void testAddEntryWithTwoDescriptionsVariant() throws Exception
     {
-        LDAPConnection con = getWiredConnection( ldapServer );
+        LDAPConnection con = getWiredConnection( ldapService );
         LDAPAttributeSet attrs = new LDAPAttributeSet();
         LDAPAttribute ocls = new LDAPAttribute( "objectclass", new String[]
             { "top", "person" } );
@@ -310,7 +310,7 @@
     @Test
     public void testAddEntryWithTwoDescriptionsSecondVariant() throws Exception
     {
-        LDAPConnection con = getWiredConnection( ldapServer );
+        LDAPConnection con = getWiredConnection( ldapService );
         LDAPAttributeSet attrs = new LDAPAttributeSet();
         LDAPAttribute ocls = new LDAPAttribute( "objectclass", new String[]
             { "top", "person" } );
@@ -352,7 +352,7 @@
     @Test
     public void testAddWithInvalidNumberOfAttributeValues() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // add inetOrgPerson with two displayNames
         Attributes attrs = new BasicAttributes( true );
@@ -386,7 +386,7 @@
     @Test
     public void testAddAlias() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // Create entry
         Attributes entry = new BasicAttributes( true );
@@ -426,7 +426,7 @@
     @Test
     public void testAddAliasInContainer() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // Create container
         Attributes container = new BasicAttributes( true );
@@ -493,7 +493,7 @@
         ne = containerCtx.search( "ou=bestFruit", "(objectClass=*)", controls );
         assertTrue( ne.hasMore() );
         sr = ne.next();
-        assertEquals( "ldap://localhost:"+ ldapServer.getIpPort() +"/ou=favorite,ou=Fruits,ou=system", sr.getName() );
+        assertEquals( "ldap://localhost:"+ ldapService.getIpPort() +"/ou=favorite,ou=Fruits,ou=system", sr.getName() );
         assertFalse( ne.hasMore() );
         
         // Remove alias and entry
@@ -515,7 +515,7 @@
     @Test
     public void testAddDeleteAlias() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // Create entry ou=favorite,dc=example,dc=com
         Attributes entry = new BasicAttributes( true );
@@ -552,7 +552,7 @@
     @Test
     public void testOnReferralWithManageDsaITControl() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPSearchConstraints();
         constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
         constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -582,7 +582,7 @@
     {
         LOG.debug( "" );
 
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         conn.setConstraints( constraints );
 
@@ -615,7 +615,7 @@
     @Test
     public void testOnReferral() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setReferrals( false );
         conn.setConstraints( constraints );
@@ -650,7 +650,7 @@
     @Test
     public void testThrowOnReferralWithJndi() throws Exception
     {
-        LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
         SearchControls controls = new SearchControls();
         controls.setReturningAttributes( new String[0] );
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -682,7 +682,7 @@
     @Test
     public void testDIRSERVER_1183() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
     	Attributes attrs = new BasicAttributes( "objectClass", "inetOrgPerson", true );
     	attrs.get( "objectClass" ).add( "organizationalPerson" );
     	attrs.get( "objectClass" ).add( "person" );
@@ -700,7 +700,7 @@
     @Test
     public void testAddEntryNoRDNInEntry() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person
         Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -738,7 +738,7 @@
     @Test
     public void testAddEntryDifferentRDNInEntry() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person
         Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -783,7 +783,7 @@
     @Test
     public void testAddEntryDifferentRDNSingleValuedInEntry() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person
         Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -824,7 +824,7 @@
     @Test
     public void testAddEntryComposedRDN() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person
         Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java Sun Sep  7 12:00:21 2008
@@ -34,7 +34,7 @@
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.integ.SiRunner;
 import org.apache.directory.server.integ.ServerIntegrationUtils;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -53,7 +53,7 @@
 @CleanupLevel( Level.SUITE )
 public class AddingEntriesWithSpecialCharactersInRDNIT
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
 
     protected Attributes getPersonAttributes( String sn, String cn )
@@ -91,7 +91,7 @@
     @Test
     public void testAddingWithHashRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
 
         Attributes attrs = getPersonAttributes( "Bush", "Kate#Bush" );
         String rdn = "cn=Kate\\#Bush";
@@ -124,7 +124,7 @@
     @Test
     public void testAddingWithCommaInRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
 
         Attributes attrs = getPersonAttributes( "Bush", "Bush, Kate" );
         String rdn = "cn=Bush\\, Kate";
@@ -211,7 +211,7 @@
     @Test
     public void testAddingWithGreaterSignInRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
 
         Attributes attrs = getOrgUnitAttributes( "East -> West" );
         String rdn = "ou=East -\\> West";
@@ -244,7 +244,7 @@
     @Test
     public void testAddingWithLessSignInRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
 
         Attributes attrs = getOrgUnitAttributes( "Scissors 8<" );
         String rdn = "ou=Scissors 8\\<";
@@ -277,7 +277,7 @@
     @Test
     public void testAddingWithSemicolonInRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
 
         Attributes attrs = getOrgUnitAttributes( "semicolon group;" );
         String rdn = "ou=semicolon group\\;";
@@ -310,7 +310,7 @@
     @Test
     public void testAddingWithEqualsInRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
 
         Attributes attrs = getOrgUnitAttributes( "nomen=omen" );
         String rdn = "ou=nomen\\=omen";

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java Sun Sep  7 12:00:21 2008
@@ -32,7 +32,7 @@
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -79,7 +79,7 @@
 )
 public class BindIT
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -93,7 +93,7 @@
     {
         try
         {
-            getWiredContext( ldapServer, "cn=bogus", "blah" );
+            getWiredContext( ldapService, "cn=bogus", "blah" );
             fail( "should never get here due to a " );
         }
         catch ( AuthenticationException e )
@@ -126,7 +126,7 @@
     {
         try
         {
-            getWiredContext( ldapServer, "cn=bogus,ou=system", "blah" );
+            getWiredContext( ldapService, "cn=bogus,ou=system", "blah" );
             fail( "should never get here due to a " );
         }
         catch ( AuthenticationException e )
@@ -143,7 +143,7 @@
         try
         {
             conn = new LDAPConnection();
-            conn.connect( 100, "localhost", ldapServer.getIpPort(), "uid=admin,ou=system", "secret" );
+            conn.connect( 100, "localhost", ldapService.getIpPort(), "uid=admin,ou=system", "secret" );
             fail( "try to connect with illegal version number should fail" );
         }
         catch ( LDAPException e )
@@ -174,7 +174,7 @@
         
         try
         {
-            conn.connect( 3, "localhost", ldapServer.getIpPort(), 
+            conn.connect( 3, "localhost", ldapService.getIpPort(), 
                 "uid=akarasuluref,ou=users,ou=system", "secret", constraints );
             fail( "try to connect with illegal version number should fail" );
         }
@@ -185,7 +185,7 @@
         
         try
         {
-            conn.connect( 3, "localhost", ldapServer.getIpPort(), 
+            conn.connect( 3, "localhost", ldapService.getIpPort(), 
                 "uid=akarasuluref,ou=users,ou=system", "secret" );
             fail( "try to connect with illegal version number should fail" );
         }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java Sun Sep  7 12:00:21 2008
@@ -48,7 +48,7 @@
 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.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
@@ -94,12 +94,12 @@
 )
 public class MiscBindIT
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     public static class Factory implements LdapServerFactory
     {
-        public LdapServer newInstance() throws Exception
+        public LdapService newInstance() throws Exception
         {
             DirectoryService service = new DefaultDirectoryService();
             IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -120,12 +120,12 @@
             // 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 );
-            ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-            ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-            ldapServer.setAllowAnonymousAccess( true );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+            LdapService ldapService = new LdapService();
+            ldapService.setDirectoryService( service );
+            ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+            ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+            ldapService.setAllowAnonymousAccess( true );
+            ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
             // Setup SASL Mechanisms
             
@@ -145,9 +145,9 @@
             mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
             mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+            ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
 
-            return ldapServer;
+            return ldapService;
         }
     }
     
@@ -159,15 +159,15 @@
     @Before
     public void recordAnnonymous() throws NamingException
     {
-        oldAnnonymousAccess = ldapServer.getDirectoryService().isAllowAnonymousAccess();
+        oldAnnonymousAccess = ldapService.getDirectoryService().isAllowAnonymousAccess();
     }
     
     
     @After
     public void revertAnonnymous()
     {
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( oldAnnonymousAccess );
-        ldapServer.setAllowAnonymousAccess( oldAnnonymousAccess );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( oldAnnonymousAccess );
+        ldapService.setAllowAnonymousAccess( oldAnnonymousAccess );
     }
 
     
@@ -180,14 +180,14 @@
     @Test
     public void testDisableAnonymousBinds() throws Exception
     {
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
-        ldapServer.setAllowAnonymousAccess( false );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( false );
+        ldapService.setAllowAnonymousAccess( false );
         
         // Use the SUN JNDI provider to hit server port and bind as anonymous
         InitialDirContext ic = null;
         final Hashtable<String, Object> env = new Hashtable<String, Object>();
 
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() + "/ou=system" );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() + "/ou=system" );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
 
@@ -206,7 +206,7 @@
             }
         }
 
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( false );
         
         try
         {
@@ -242,12 +242,12 @@
     @Test
     public void testEnableAnonymousBindsOnRootDSE() throws Exception
     {
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( true );
 
         // Use the SUN JNDI provider to hit server port and bind as anonymous
         Hashtable<String, Object> env = new Hashtable<String, Object>();
 
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() + "/" );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() + "/" );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
 
@@ -280,12 +280,12 @@
     @Test
     public void testAnonymousBindsEnabledBaseSearch() throws Exception
     {
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( true );
 
         // Use the SUN JNDI provider to hit server port and bind as anonymous
         Hashtable<String, Object> env = new Hashtable<String, Object>();
 
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() + "/" );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() + "/" );
         env.put( Context.SECURITY_AUTHENTICATION, "none" );
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
 
@@ -317,13 +317,13 @@
     @Test
     public void testAdminAccessBug() throws Exception
     {
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( true );
 
         // Use the SUN JNDI provider to hit server port and bind as anonymous
 
         final Hashtable<String, Object> env = new Hashtable<String, Object>();
 
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( "java.naming.ldap.version", "3" );
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
 
@@ -358,11 +358,11 @@
     @Test
     public void testUserAuthOnMixedCaseSuffix() throws Exception
     {
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( true );
 
         Hashtable<String, Object> env = new Hashtable<String, Object>();
 
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() + "/dc=aPache,dc=org" );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() + "/dc=aPache,dc=org" );
         env.put( "java.naming.ldap.version", "3" );
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
         InitialDirContext ctx = new InitialDirContext( env );
@@ -447,11 +447,11 @@
             }
         };
         
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( true );
         
         Hashtable<String, Object> env = new Hashtable<String, Object>();
 
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() + "/ou=system" );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() + "/ou=system" );
         env.put( "java.naming.ldap.version", "3" );
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java Sun Sep  7 12:00:21 2008
@@ -50,7 +50,7 @@
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 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.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler;
@@ -118,13 +118,13 @@
 )
 public class SaslBindIT
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     public BogusNtlmProvider provider = new BogusNtlmProvider();
 
      
      public static class Factory implements LdapServerFactory
      {
-         public LdapServer newInstance() throws Exception
+         public LdapService newInstance() throws Exception
          {
              DirectoryService service = new DefaultDirectoryService();
              IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -150,12 +150,12 @@
              // 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 );
-             ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-             ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-             ldapServer.setAllowAnonymousAccess( false );
-             ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+             LdapService ldapService = new LdapService();
+             ldapService.setDirectoryService( service );
+             ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+             ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+             ldapService.setAllowAnonymousAccess( false );
+             ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
              // Setup SASL Mechanisms
              
@@ -175,10 +175,10 @@
              mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
              mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-             ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
-             ldapServer.setSaslHost( "localhost" );
+             ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
+             ldapService.setSaslHost( "localhost" );
              
-             return ldapServer;
+             return ldapService;
          }
      }
      
@@ -188,7 +188,7 @@
      {
          provider = new BogusNtlmProvider();
          NtlmMechanismHandler handler = ( NtlmMechanismHandler ) 
-             ldapServer.getSaslMechanismHandlers().get( SupportedSaslMechanisms.NTLM );
+             ldapService.getSaslMechanismHandlers().get( SupportedSaslMechanisms.NTLM );
          handler.setNtlmProvider( provider );
      }
      
@@ -203,14 +203,14 @@
          {
              // We have to tell the server that it should accept anonymous
              // auth, because we are reading the rootDSE
-             ldapServer.setAllowAnonymousAccess( true );
-             ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+             ldapService.setAllowAnonymousAccess( true );
+             ldapService.getDirectoryService().setAllowAnonymousAccess( true );
              
              // Point on rootDSE
              DirContext context = new InitialDirContext();
 
              Attributes attrs = context.getAttributes( "ldap://localhost:" 
-                 + ldapServer.getIpPort(), new String[]
+                 + ldapService.getIpPort(), new String[]
                  { "supportedSASLMechanisms" } );
 
              NamingEnumeration<? extends Attribute> answer = attrs.getAll();
@@ -240,7 +240,7 @@
          {
              Hashtable<String, String> env = new Hashtable<String, String>();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
              env.put( Context.SECURITY_AUTHENTICATION, "PLAIN" );
              env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -278,7 +278,7 @@
          {
              Hashtable<String, String> env = new Hashtable<String, String>();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
              env.put( Context.SECURITY_AUTHENTICATION, "" );
              env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -304,13 +304,13 @@
      @Test
      public void testAnonymousBelowRootDSE()
      {
-         ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
+         ldapService.getDirectoryService().setAllowAnonymousAccess( false );
          
          try
          {
              Hashtable<String, String> env = new Hashtable<String, String>();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
              DirContext context = new InitialDirContext( env );
 
@@ -342,7 +342,7 @@
          {
              Hashtable<String, String> env = new Hashtable<String, String>();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
              env.put( Context.SECURITY_AUTHENTICATION, "CRAM-MD5" );
              env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -381,7 +381,7 @@
          {
              Hashtable<String, String> env = new Hashtable<String, String>();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
              env.put( Context.SECURITY_AUTHENTICATION, "CRAM-MD5" );
              env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -411,7 +411,7 @@
      {
          Hashtable<String, String> env = new Hashtable<String, String>();
          env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-         env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+         env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
          env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5" );
          env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -451,7 +451,7 @@
          {
              Hashtable<String, String> env = new Hashtable<String, String>();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
              env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5" );
              env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -489,7 +489,7 @@
          {
              Hashtable<String, String> env = new Hashtable<String, String>();
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+             env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
              env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5" );
              env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -598,8 +598,8 @@
          NtlmSaslBindClient( String mechanism ) throws Exception
          {
              this.mechanism = mechanism;
-             setDefaultPort( ldapServer.getIpPort() );
-             connect( "localhost", ldapServer.getIpPort() );
+             setDefaultPort( ldapService.getIpPort() );
+             connect( "localhost", ldapService.getIpPort() );
              setTcpNoDelay( false );
              
              LOG.debug( "isConnected() = {}", _isConnected_ );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java Sun Sep  7 12:00:21 2008
@@ -38,7 +38,7 @@
 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.ldap.LdapService;
 
 import static org.junit.Assert.fail;
 import static org.junit.Assert.assertTrue;
@@ -74,7 +74,7 @@
     private static final String BASE = "ou=users,ou=system";
 
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     /**
@@ -121,7 +121,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson," + BASE );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -159,7 +159,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson," + BASE );
         env.put( Context.SECURITY_CREDENTIALS, "badsecret" );
@@ -188,7 +188,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -218,7 +218,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=unknown,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -244,13 +244,13 @@
     @Test
     public void testSimpleBindNoUserNoPassword()
     {
-        boolean oldValue = ldapServer.getDirectoryService().isAllowAnonymousAccess();
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
-        ldapServer.setAllowAnonymousAccess( false );
+        boolean oldValue = ldapService.getDirectoryService().isAllowAnonymousAccess();
+        ldapService.getDirectoryService().setAllowAnonymousAccess( false );
+        ldapService.setAllowAnonymousAccess( false );
 
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "" );
         env.put( Context.SECURITY_CREDENTIALS, "" );
@@ -295,8 +295,8 @@
     	{
     	}
     	
-    	ldapServer.getDirectoryService().setAllowAnonymousAccess( oldValue );
-    	ldapServer.setAllowAnonymousAccess( oldValue );
+    	ldapService.getDirectoryService().setAllowAnonymousAccess( oldValue );
+    	ldapService.setAllowAnonymousAccess( oldValue );
     }
     
     
@@ -308,7 +308,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "" );
@@ -338,7 +338,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         env.put( Context.SECURITY_PRINCIPAL, "" );
@@ -366,14 +366,14 @@
     @Test
     public void testAnonymousRootDSE()
     {
-        boolean oldValue = ldapServer.getDirectoryService().isAllowAnonymousAccess();
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
+        boolean oldValue = ldapService.getDirectoryService().isAllowAnonymousAccess();
+        ldapService.getDirectoryService().setAllowAnonymousAccess( false );
 
         try
         {
             Hashtable<String, String> env = new Hashtable<String, String>();
             env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
-            env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+            env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
             DirContext context = new InitialDirContext( env );
 
@@ -398,7 +398,7 @@
         }
         finally
         {
-            ldapServer.getDirectoryService().setAllowAnonymousAccess( oldValue );
+            ldapService.getDirectoryService().setAllowAnonymousAccess( oldValue );
         }
     }
 }

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java Sun Sep  7 12:00:21 2008
@@ -38,7 +38,7 @@
 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.ldap.LdapService;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -92,7 +92,7 @@
 {
     private static final Logger LOG = LoggerFactory.getLogger( CompareIT.class );
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -102,7 +102,7 @@
     @Test
     public void testNormalCompare() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         
         // comparison success
         LDAPAttribute attribute = new LDAPAttribute( "sn", "karasulu" );
@@ -124,7 +124,7 @@
     @Test
     public void testNormalCompareMissingAttribute() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         
         // comparison success
         LDAPAttribute attribute = new LDAPAttribute( "sn", "karasulu" );
@@ -153,7 +153,7 @@
     @Test
     public void testOnReferralWithManageDsaITControl() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
         constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -179,7 +179,7 @@
     @Test
     public void testOnReferral() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setReferrals( false );
         conn.setConstraints( constraints );
@@ -213,7 +213,7 @@
     @Test
     public void testThrowOnReferralWithJndi() throws Exception
     {
-        LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
         SearchControls controls = new SearchControls();
         controls.setReturningAttributes( new String[0] );
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -253,9 +253,9 @@
     @Test
     public void testCompareWithoutAuthentication() throws LDAPException
     {
-        ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
+        ldapService.getDirectoryService().setAllowAnonymousAccess( false );
         LDAPConnection conn = new LDAPConnection();
-        conn.connect( "localhost", ldapServer.getIpPort() );
+        conn.connect( "localhost", ldapService.getIpPort() );
         LDAPAttribute attr = new LDAPAttribute( "uid", "admin" );
         
         try
@@ -278,7 +278,7 @@
     {
         LOG.debug( "" );
 
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         conn.setConstraints( constraints );
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java Sun Sep  7 12:00:21 2008
@@ -31,7 +31,7 @@
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.integ.ServerIntegrationUtils;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -67,7 +67,7 @@
 )
 public class MatchingRuleCompareIT
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     public static final String PERSON_CN = "Tori Amos";
     public static final String PERSON_SN = "Amos";
@@ -87,7 +87,7 @@
     @Test
     public void testCaseIgnoreMatch() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
         
         // Setting up search controls for compare op
         SearchControls ctls = new SearchControls();
@@ -194,7 +194,7 @@
     @Test
     public void testDistinguishedNameMatch() throws Exception
     {
-        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+        DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
         
         // determine member DN of person
         DirContext member = ( DirContext ) ctx.lookup( PERSON_RDN );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java Sun Sep  7 12:00:21 2008
@@ -42,7 +42,7 @@
 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.ldap.LdapService;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -89,7 +89,7 @@
 {
     private static final Logger LOG = LoggerFactory.getLogger( DeleteIT.class );
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -99,7 +99,7 @@
     @Test
     public void testNormalDeleteFailContextNotEmpty() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         
         // delete failure on non-leaf entry
         try
@@ -123,7 +123,7 @@
     @Test
     public void testNormalDelete() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         
         // delete success
         conn.delete( "ou=computers,uid=akarasulu,ou=users,ou=system" );
@@ -150,7 +150,7 @@
     @Test
     public void testDeleteNonExistent() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         
         // delete failure non-existent entry
         try
@@ -173,7 +173,7 @@
     @Test
     public void testOnReferralWithManageDsaITControl() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPSearchConstraints();
         constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
         constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -204,7 +204,7 @@
     @Test
     public void testOnReferral() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setReferrals( false );
         conn.setConstraints( constraints );
@@ -233,7 +233,7 @@
     @Test
     public void testThrowOnReferralWithJndi() throws Exception
     {
-        LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
         
         // delete success
         ctx.destroySubcontext( "ou=computers,uid=akarasulu,ou=users,ou=system" );
@@ -271,7 +271,7 @@
     {
         LOG.debug( "" );
 
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         conn.setConstraints( constraints );
 
@@ -298,7 +298,7 @@
      */
     public void testDeleteWithIllegalName() throws Exception 
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         
         try 
         {

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java Sun Sep  7 12:00:21 2008
@@ -31,7 +31,7 @@
 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.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -48,7 +48,7 @@
 @CleanupLevel ( Level.SUITE )
 public class ExtendedIT 
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -62,7 +62,7 @@
     @Test
     public void testUnknownExtendedOperation() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( "ou=system" );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( "ou=system" );
         try
         {
             ctx.extendedOperation( new UnknownExtendedOperationRequest() );



Mime
View raw message