james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r811789 - in /james/server/trunk/smtpserver-function/src: main/java/org/apache/james/smtpserver/ test/java/org/apache/james/smtpserver/
Date Sun, 06 Sep 2009 09:47:54 GMT
Author: rdonkin
Date: Sun Sep  6 09:47:53 2009
New Revision: 811789

URL: http://svn.apache.org/viewvc?rev=811789&view=rev
Log:
Access to services no longer required by configuration.

Modified:
    james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandler.java
    james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerConfigurationData.java
    james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java
    james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/AbstractSMTPSession.java

Modified: james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandler.java?rev=811789&r1=811788&r2=811789&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandler.java
(original)
+++ james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandler.java
Sun Sep  6 09:47:53 2009
@@ -28,11 +28,9 @@
 import java.util.Map;
 import java.util.Random;
 
-import org.apache.james.api.user.UsersRepository;
+import org.apache.james.socket.CRLFDelimitedByteBuffer;
 import org.apache.james.socket.ProtocolHandler;
 import org.apache.james.socket.ProtocolHandlerHelper;
-import org.apache.james.socket.CRLFDelimitedByteBuffer;
-import org.apache.james.services.MailServer;
 
 /**
  * Provides SMTP functionality by carrying out the server side of the SMTP
@@ -396,10 +394,6 @@
         return getConfigurationData().getHelloName();
     }
 
-    public MailServer getMailServer() {
-        return getConfigurationData().getMailServer();
-    }
-
     public long getMaxMessageSize() {
         return getConfigurationData().getMaxMessageSize();
     }
@@ -408,10 +402,6 @@
         return getConfigurationData().getSMTPGreeting();
     }
 
-    public UsersRepository getUsersRepository() {
-        return getConfigurationData().getUsersRepository();
-    }
-
     public boolean useAddressBracketsEnforcement() {
         return getConfigurationData().useAddressBracketsEnforcement();
     }

Modified: james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerConfigurationData.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerConfigurationData.java?rev=811789&r1=811788&r2=811789&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerConfigurationData.java
(original)
+++ james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPHandlerConfigurationData.java
Sun Sep  6 09:47:53 2009
@@ -21,8 +21,6 @@
 
 package org.apache.james.smtpserver;
 
-import org.apache.james.api.user.UsersRepository;
-import org.apache.james.services.MailServer;
 
 /**
  * Provides a number of server-wide constant values to the
@@ -84,20 +82,6 @@
      * @return the SMTPGreeting
      */
     String getSMTPGreeting();
-
-    /**
-     * Returns the MailServer interface for this service.
-     *
-     * @return the MailServer interface for this service
-     */
-    MailServer getMailServer();
-
-    /**
-     * Returns the UsersRepository for this service.
-     *
-     * @return the local users repository
-     */
-    UsersRepository getUsersRepository();
     
     /**
      * Return wheter the mailserver will accept addresses without brackets enclosed.

Modified: james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java?rev=811789&r1=811788&r2=811789&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java
(original)
+++ james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/SMTPServer.java
Sun Sep  6 09:47:53 2009
@@ -32,7 +32,6 @@
 import org.apache.james.api.dnsservice.DNSService;
 import org.apache.james.api.dnsservice.util.NetMatcher;
 import org.apache.james.api.kernel.LoaderService;
-import org.apache.james.api.user.UsersRepository;
 import org.apache.james.services.MailServer;
 import org.apache.james.socket.AbstractJamesService;
 import org.apache.james.socket.ProtocolHandler;
@@ -65,12 +64,6 @@
     private MailetContext mailetcontext;
 
     /**
-     * The user repository for this server - used to authenticate
-     * users.
-     */
-    private UsersRepository users;
-
-    /**
      * The internal mail server service.
      */
     private MailServer mailServer;
@@ -159,7 +152,6 @@
         serviceManager = manager;
         mailetcontext = (MailetContext) manager.lookup("org.apache.mailet.MailetContext");
         mailServer = (MailServer) manager.lookup(MailServer.ROLE);
-        users = (UsersRepository) manager.lookup(UsersRepository.ROLE);
         dnsServer = (DNSService) manager.lookup(DNSService.ROLE); 
     }
 
@@ -333,21 +325,6 @@
             return relayingAllowed;
         }
 
-
-        /**
-         * @see org.apache.james.smtpserver.SMTPHandlerConfigurationData#getMailServer()
-         */
-        public MailServer getMailServer() {
-            return SMTPServer.this.mailServer;
-        }
-
-        /**
-         * @see org.apache.james.smtpserver.SMTPHandlerConfigurationData#getUsersRepository()
-         */
-        public UsersRepository getUsersRepository() {
-            return SMTPServer.this.users;
-        }
-
         /**
          * @see org.apache.james.smtpserver.SMTPHandlerConfigurationData#useHeloEhloEnforcement()
          */

Modified: james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/AbstractSMTPSession.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/AbstractSMTPSession.java?rev=811789&r1=811788&r2=811789&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/AbstractSMTPSession.java
(original)
+++ james/server/trunk/smtpserver-function/src/test/java/org/apache/james/smtpserver/AbstractSMTPSession.java
Sun Sep  6 09:47:53 2009
@@ -22,8 +22,6 @@
 
 import java.util.Map;
 
-import org.apache.james.services.MailServer;
-
 /**
  * Abstract class to simplify the mocks
  */
@@ -154,10 +152,6 @@
         return getConfigurationData().getHelloName();
     }
 
-    public MailServer getMailServer() {
-        return getConfigurationData().getMailServer();
-    }
-
     public long getMaxMessageSize() {
         return getConfigurationData().getMaxMessageSize();
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message