directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r692919 [4/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/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java
Sun Sep  7 12:00:21 2008
@@ -56,7 +56,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.apache.directory.shared.ldap.name.LdapDN;
 import org.junit.After;
 import org.junit.Before;
@@ -94,7 +94,7 @@
     private File ksFile;
 
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     boolean oldConfidentialityRequiredValue;
     
     
@@ -118,7 +118,7 @@
     	
     	ksFile = File.createTempFile( "testStore", "ks" );
     	
-    	CoreSession session = ldapServer.getDirectoryService().getAdminSession();
+    	CoreSession session = ldapService.getDirectoryService().getAdminSession();
     	ClonedServerEntry entry = session.lookup( new LdapDN( "uid=admin,ou=system" ), CERT_IDS
);
     	byte[] userCertificate = entry.get( CERT_IDS[0] ).getBytes();
     	assertNotNull( userCertificate );
@@ -132,7 +132,7 @@
     	ks.store( new FileOutputStream( ksFile ), "changeit".toCharArray() );
     	LOG.debug( "Keystore file installed: {}", ksFile.getAbsolutePath() );
     	
-        oldConfidentialityRequiredValue = ldapServer.isConfidentialityRequired();
+        oldConfidentialityRequiredValue = ldapService.isConfidentialityRequired();
     }
     
     
@@ -148,7 +148,7 @@
     	}
     	
     	LOG.debug( "Keystore file deleted: {}", ksFile.getAbsolutePath() );
-    	ldapServer.setConfidentialityRequired( oldConfidentialityRequiredValue );
+    	ldapService.setConfidentialityRequired( oldConfidentialityRequiredValue );
     }
     
 
@@ -164,7 +164,7 @@
         env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
         
         // Must use the name of the server that is found in its certificate?
-        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+        env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort() );
 
         // Create initial context
         LOG.debug( "About to get initial context" );
@@ -192,7 +192,7 @@
     @Test
     public void testConfidentiality() throws Exception
     {
-        ldapServer.setConfidentialityRequired( true );
+        ldapService.setConfidentialityRequired( true );
 
         // -------------------------------------------------------------------
     	// Unsecured bind should fail
@@ -200,7 +200,7 @@
 
     	try
     	{
-    		ServerIntegrationUtils.getWiredContext( ldapServer );
+    		ServerIntegrationUtils.getWiredContext( ldapService );
     		fail( "Should not get here due to violation of confidentiality requirements" );
     	}
     	catch( AuthenticationNotSupportedException e )
@@ -364,7 +364,7 @@
             env.put( "java.naming.security.authentication", "simple" );
             
             // Must use the name of the server that is found in its certificate?
-            env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getIpPort() );
+            env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getIpPort()
);
     
             // Create initial context
             LOG.debug( "About to get initial context" );

Modified: directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
(original)
+++ directory/apacheds/trunk/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
Sun Sep  7 12:00:21 2008
@@ -27,7 +27,7 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
 import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
@@ -70,10 +70,10 @@
     private final List<LdifLoadFilter> ldifFilters = new ArrayList<LdifLoadFilter>();
 
     /** The LDAP server protocol handler */
-    private final LdapServer ldapServer;
+    private final LdapService ldapService;
     
     /** The LDAPS server protocol handler */
-    private final LdapServer ldapsServer;
+    private final LdapService ldapsService;
     
     /** The directory service */
     private final DirectoryService directoryService;
@@ -83,12 +83,12 @@
      * Creates a new instance of the ApacheDS server
      *  
      * @param directoryService 
-     * @param ldapServer
-     * @param ldapsServer
+     * @param ldapService
+     * @param ldapsService
      */
-    public ApacheDS( DirectoryService directoryService, LdapServer ldapServer, LdapServer
ldapsServer )
+    public ApacheDS( DirectoryService directoryService, LdapService ldapService, LdapService
ldapsService )
     {
-        LOG.info(  "Starting the Apache Directory Server" );
+        LOG.info( "Starting the Apache Directory Server" );
 
         if ( directoryService == null )
         {
@@ -99,8 +99,8 @@
             this.directoryService = directoryService;
         }
         
-        this.ldapServer = ldapServer;
-        this.ldapsServer = ldapsServer;
+        this.ldapService = ldapService;
+        this.ldapsService = ldapsService;
         ByteBuffer.setAllocator( new SimpleByteBufferAllocator() );
         ByteBuffer.setUseDirectBuffers( false );
     }
@@ -130,17 +130,17 @@
         loadLdifs();
 
         // Start the LDAP server
-        if ( ldapServer != null && ! ldapServer.isStarted() )
+        if ( ldapService != null && ! ldapService.isStarted() )
         {
             LOG.debug( "3. Starting the LDAP server" );
-            ldapServer.start();
+            ldapService.start();
         }
 
         // Start the LDAPS  server
-        if ( ldapsServer != null && ! ldapsServer.isStarted() )
+        if ( ldapsService != null && ! ldapsService.isStarted() )
         {
             LOG.debug(  "4. Starting the LDAPS server" );
-            ldapsServer.start();
+            ldapsService.start();
         }
         
         LOG.debug( "Server successfully started" );
@@ -149,10 +149,10 @@
 
     public boolean isStarted()
     {
-        if ( ldapServer != null || ldapsServer != null )
+        if ( ldapService != null || ldapsService != null )
         {
-             return ( ldapServer != null && ldapServer.isStarted() )
-                     || ( ldapsServer != null && ldapsServer.isStarted() );
+             return ( ldapService != null && ldapService.isStarted() )
+                     || ( ldapsService != null && ldapsService.isStarted() );
         }
         
         return directoryService.isStarted();
@@ -161,29 +161,29 @@
 
     public void shutdown() throws Exception
     {
-        if ( ldapServer != null && ldapServer.isStarted() )
+        if ( ldapService != null && ldapService.isStarted() )
         {
-            ldapServer.stop();
+            ldapService.stop();
         }
 
-        if ( ldapsServer != null && ldapsServer.isStarted() )
+        if ( ldapsService != null && ldapsService.isStarted() )
         {
-            ldapsServer.stop();
+            ldapsService.stop();
         }
 
         directoryService.shutdown();
     }
 
 
-    public LdapServer getLdapServer()
+    public LdapService getLdapService()
     {
-        return ldapServer;
+        return ldapService;
     }
 
 
-    public LdapServer getLdapsServer()
+    public LdapService getLdapsService()
     {
-        return ldapsServer;
+        return ldapsService;
     }
 
 
@@ -222,14 +222,14 @@
         
         directoryService.setAllowAnonymousAccess( allowAnonymousAccess );
         
-        if ( ldapServer != null )
+        if ( ldapService != null )
         {
-            ldapServer.setAllowAnonymousAccess( allowAnonymousAccess );
+            ldapService.setAllowAnonymousAccess( allowAnonymousAccess );
         }
         
-        if ( ldapsServer != null )
+        if ( ldapsService != null )
         {
-            ldapsServer.setAllowAnonymousAccess( allowAnonymousAccess );
+            ldapsService.setAllowAnonymousAccess( allowAnonymousAccess );
         }
     }
 

Modified: directory/apacheds/trunk/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java
(original)
+++ directory/apacheds/trunk/server-jndi/src/test/java/org/apache/directory/server/configuration/ApacheDSTest.java
Sun Sep  7 12:00:21 2008
@@ -63,14 +63,14 @@
         directoryService.addPartition( example );
         directoryService.startup();
         
-        LdapServer ldapServer = new LdapServer();
-        ldapServer.setDirectoryService( directoryService );
-        ldapServer.setAllowAnonymousAccess( false );
-        ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-        ldapServer.setEnabled( true );
-        ldapServer.setIpPort( 20389 );
+        LdapService ldapService = new LdapService();
+        ldapService.setDirectoryService( directoryService );
+        ldapService.setAllowAnonymousAccess( false );
+        ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+        ldapService.setEnabled( true );
+        ldapService.setIpPort( 20389 );
 
-        ApacheDS ads = new ApacheDS( directoryService, ldapServer, null );
+        ApacheDS ads = new ApacheDS( directoryService, ldapService, null );
         File f = new File( System.getProperty( "ldifFile" ) );
         ads.setLdifDirectory( f );
         

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
Sun Sep  7 12:00:21 2008
@@ -222,7 +222,7 @@
         }
         else if ( getApacheDS() != null )
         {
-            port = getApacheDS().getLdapServer().getIpPort();
+            port = getApacheDS().getLdapService().getIpPort();
 
             if ( isDebugEnabled() )
             {

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java
Sun Sep  7 12:00:21 2008
@@ -130,7 +130,7 @@
         }
         else if ( getApacheDS() != null )
         {
-            port = getApacheDS().getLdapServer().getIpPort();
+            port = getApacheDS().getLdapService().getIpPort();
 
             if ( isDebugEnabled() )
             {

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java
Sun Sep  7 12:00:21 2008
@@ -228,7 +228,7 @@
         }
         else if ( getApacheDS() != null )
         {
-            port = getApacheDS().getLdapServer().getIpPort();
+            port = getApacheDS().getLdapService().getIpPort();
 
             if ( isDebugEnabled() )
             {

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
Sun Sep  7 12:00:21 2008
@@ -222,7 +222,7 @@
         }
         else if ( getApacheDS() != null )
         {
-            port = getApacheDS().getLdapServer().getIpPort();
+            port = getApacheDS().getLdapService().getIpPort();
 
             if ( isDebugEnabled() )
             {

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/ImportCommand.java
Sun Sep  7 12:00:21 2008
@@ -799,7 +799,7 @@
         }
         else if ( getApacheDS() != null )
         {
-            port = getApacheDS().getLdapServer().getIpPort();
+            port = getApacheDS().getLdapService().getIpPort();
 
             if ( isDebugEnabled() )
             {

Modified: directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
(original)
+++ directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
Sun Sep  7 12:00:21 2008
@@ -45,7 +45,7 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
-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;
@@ -101,7 +101,7 @@
     protected static int nbTests = 10000;
     protected DirectoryService directoryService;
     protected SocketAcceptor socketAcceptor;
-    protected LdapServer ldapServer;
+    protected LdapService ldapService;
 
 
     /**
@@ -255,12 +255,12 @@
         directoryService = new DefaultDirectoryService();
         directoryService.setShutdownHookEnabled( false );
         socketAcceptor = new SocketAcceptor( null );
-        ldapServer = new LdapServer();
-        ldapServer.setSocketAcceptor( socketAcceptor );
-        ldapServer.setDirectoryService( directoryService );
-        ldapServer.setIpPort( port = AvailablePortFinder.getNextAvailable( 1024 ) );
+        ldapService = new LdapService();
+        ldapService.setSocketAcceptor( socketAcceptor );
+        ldapService.setDirectoryService( directoryService );
+        ldapService.setIpPort( port = AvailablePortFinder.getNextAvailable( 1024 ) );
 
-        setupSaslMechanisms( ldapServer );
+        setupSaslMechanisms( ldapService );
 
         doDelete( directoryService.getWorkingDirectory() );
         configureDirectoryService();
@@ -269,15 +269,15 @@
         configureLdapServer();
 
         // TODO shouldn't this be before calling configureLdapServer() ???
-        ldapServer.addExtendedOperationHandler( new StartTlsHandler() );
-        ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler()
);
+        ldapService.addExtendedOperationHandler( new StartTlsHandler() );
+        ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler()
);
 
-        ldapServer.start();
+        ldapService.start();
         setContexts( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
     }
 
 
-    private void setupSaslMechanisms( LdapServer server )
+    private void setupSaslMechanisms( LdapService server )
     {
         Map<String, MechanismHandler> mechanismHandlerMap = new HashMap<String,MechanismHandler>();
 
@@ -300,7 +300,7 @@
         mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
         mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler
);
 
-        ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+        ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
     }
 
 
@@ -386,7 +386,7 @@
     protected void tearDown() throws Exception
     {
         super.tearDown();
-        ldapServer.stop();
+        ldapService.stop();
         try
         {
             directoryService.shutdown();

Modified: directory/apacheds/trunk/server-xml/src/main/resources/server.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-xml/src/main/resources/server.xml?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-xml/src/main/resources/server.xml (original)
+++ directory/apacheds/trunk/server-xml/src/main/resources/server.xml Sun Sep  7 12:00:21
2008
@@ -134,16 +134,16 @@
   </dnsServer>
 -->
 
-  <ldapServer id="ldapsServer"
+  <ldapService id="ldapsService"
               enabled="true"
               ipPort="10636"
               enableLdaps="true">
     <directoryService>#directoryService</directoryService>
     <socketAcceptor>#socketAcceptor</socketAcceptor>
-  </ldapServer>
+  </ldapService>
 
 
-  <ldapServer id="ldapServer"
+  <ldapService id="ldapService"
               ipPort="10389"
               allowAnonymousAccess="false"
               saslHost="ldap.example.com"
@@ -186,7 +186,7 @@
       <!-- The Stored Procedure Extended Operation is not stable yet and it may cause
security risks.-->
       <!--storedProcedureExtendedOperationHandler/-->
     </extendedOperationHandlers>
-  </ldapServer>
+  </ldapService>
 
 
   <apacheDS id="apacheDS"
@@ -194,8 +194,8 @@
             allowAnonymousAccess="false">
 
     <directoryService>#directoryService</directoryService>
-    <ldapServer>#ldapServer</ldapServer>
-    <ldapsServer>#ldapsServer</ldapsServer>
+    <ldapService>#ldapService</ldapService>
+    <ldapsService>#ldapsService</ldapsService>
   </apacheDS>
 
   <!-- another bean I didn't convert -->



Mime
View raw message