You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by da...@apache.org on 2003/01/06 13:38:05 UTC
cvs commit: jakarta-james/src/java/org/apache/james/core AvalonMailStore.java
danny 2003/01/06 04:38:05
Modified: src/java/org/apache/james/mailrepository
AvalonMailRepository.java JDBCMailRepository.java
JDBCSpoolRepository.java AvalonSpoolRepository.java
src/java/org/apache/james/transport JamesSpoolManager.java
LinearProcessor.java
src/java/org/apache/james/services MailStore.java
MailServer.java
src/java/org/apache/james/core AvalonMailStore.java
Added: src/java/org/apache/mailet SpoolRepository.java
MailRepository.java
Removed: src/java/org/apache/james/services MailRepository.java
SpoolRepository.java
Log:
removing avalon dependance in mailets.
Step one refactoring interfaces, moving MailRepository and SpoolRepository to org.apache.mailet
Revision Changes Path
1.21 +1 -1 jakarta-james/src/java/org/apache/james/mailrepository/AvalonMailRepository.java
Index: AvalonMailRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/AvalonMailRepository.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- AvalonMailRepository.java 2 Oct 2002 06:12:02 -0000 1.20
+++ AvalonMailRepository.java 6 Jan 2003 12:38:04 -0000 1.21
@@ -22,9 +22,9 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.james.core.MailImpl;
import org.apache.james.core.MimeMessageWrapper;
-import org.apache.james.services.MailRepository;
import org.apache.james.services.MailStore;
import org.apache.james.util.Lock;
+import org.apache.mailet.MailRepository;
import java.io.OutputStream;
import java.util.*;
1.31 +1 -1 jakarta-james/src/java/org/apache/james/mailrepository/JDBCMailRepository.java
Index: JDBCMailRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/JDBCMailRepository.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- JDBCMailRepository.java 28 Oct 2002 17:33:24 -0000 1.30
+++ JDBCMailRepository.java 6 Jan 2003 12:38:04 -0000 1.31
@@ -27,11 +27,11 @@
import org.apache.james.context.AvalonContextUtilities;
import org.apache.james.core.MailImpl;
import org.apache.james.core.MimeMessageWrapper;
-import org.apache.james.services.MailRepository;
import org.apache.james.util.JDBCUtil;
import org.apache.james.util.Lock;
import org.apache.james.util.SqlResources;
import org.apache.mailet.MailAddress;
+import org.apache.mailet.MailRepository;
import javax.mail.internet.MimeMessage;
import java.io.ByteArrayInputStream;
1.16 +1 -1 jakarta-james/src/java/org/apache/james/mailrepository/JDBCSpoolRepository.java
Index: JDBCSpoolRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/JDBCSpoolRepository.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JDBCSpoolRepository.java 12 Aug 2002 07:41:36 -0000 1.15
+++ JDBCSpoolRepository.java 6 Jan 2003 12:38:04 -0000 1.16
@@ -7,9 +7,9 @@
*/
package org.apache.james.mailrepository;
-import org.apache.james.services.SpoolRepository;
import org.apache.james.core.MailImpl;
import org.apache.mailet.Mail;
+import org.apache.mailet.SpoolRepository;
import java.sql.Connection;
import java.sql.PreparedStatement;
1.8 +1 -1 jakarta-james/src/java/org/apache/james/mailrepository/AvalonSpoolRepository.java
Index: AvalonSpoolRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/AvalonSpoolRepository.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AvalonSpoolRepository.java 18 Aug 2002 07:23:55 -0000 1.7
+++ AvalonSpoolRepository.java 6 Jan 2003 12:38:04 -0000 1.8
@@ -8,8 +8,8 @@
package org.apache.james.mailrepository;
import org.apache.james.core.MailImpl;
-import org.apache.james.services.SpoolRepository;
import org.apache.mailet.Mail;
+import org.apache.mailet.SpoolRepository;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
1.21 +1 -2 jakarta-james/src/java/org/apache/james/transport/JamesSpoolManager.java
Index: JamesSpoolManager.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/JamesSpoolManager.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- JamesSpoolManager.java 2 Oct 2002 06:12:03 -0000 1.20
+++ JamesSpoolManager.java 6 Jan 2003 12:38:05 -0000 1.21
@@ -22,7 +22,6 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.james.core.MailImpl;
import org.apache.james.services.MailStore;
-import org.apache.james.services.SpoolRepository;
import org.apache.mailet.*;
import javax.mail.MessagingException;
1.11 +0 -1 jakarta-james/src/java/org/apache/james/transport/LinearProcessor.java
Index: LinearProcessor.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/LinearProcessor.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- LinearProcessor.java 2 Oct 2002 06:12:03 -0000 1.10
+++ LinearProcessor.java 6 Jan 2003 12:38:05 -0000 1.11
@@ -12,7 +12,6 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.Logger;
import org.apache.james.core.MailImpl;
-import org.apache.james.services.SpoolRepository;
import org.apache.mailet.*;
import javax.mail.MessagingException;
1.1 jakarta-james/src/java/org/apache/mailet/SpoolRepository.java
Index: SpoolRepository.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.mailet;
/**
* Interface for a Repository for Spooling Mails.
* A spool repository is a transitory repository which should empty itself
* if inbound deliveries stop.
*
* @version 1.0.0, 24/04/1999
* @author Federico Barbieri <sc...@pop.systemy.it>
*/
public interface SpoolRepository
extends MailRepository {
/**
* Define a STREAM repository. Streams are stored in the specified
* destination.
*/
String SPOOL = "SPOOL";
/**
* Returns the key for an arbitrarily selected mail deposited in this Repository.
* Usage: SpoolManager calls accept() to see if there are any unprocessed
* mails in the spool repository.
*
* @return the key for the mail
*/
String accept();
/**
* Returns the key for an arbitrarily select mail deposited in this Repository that
* is either ready immediately for delivery, or is younger than it's last_updated plus
* the number of failed attempts times the delay time.
* Usage: RemoteDeliverySpool calls accept() with some delay and should block until an
* unprocessed mail is available.
*
* @return the key for the mail
*/
String accept(long delay);
}
1.1 jakarta-james/src/java/org/apache/mailet/MailRepository.java
Index: MailRepository.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.mailet;
import org.apache.james.core.MailImpl;
import java.util.Iterator;
/**
* Interface for a Repository to store Mails.
* @version 1.0.0, 24/04/1999
* @author Federico Barbieri <sc...@pop.systemy.it>
* @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
*/
public interface MailRepository {
/**
* Define a MAIL repository. MAILS are stored in the specified
* destination.
*/
String MAIL = "MAIL";
/**
* Stores a message in this repository. Shouldn't this return the key
* under which it is stored?
*
* @param mc the mail message to store
*/
void store(MailImpl mc);
/**
* List string keys of messages in repository.
*
* @return an <code>Iterator</code> over the list of keys in the repository
*
*/
Iterator list();
/**
* Retrieves a message given a key. At the moment, keys can be obtained
* from list() in superinterface Store.Repository
*
* @param key the key of the message to retrieve
* @return the mail corresponding to this key, null if none exists
*/
MailImpl retrieve(String key);
/**
* Removes a specified message
*
* @param mail the message to be removed from the repository
*/
void remove(MailImpl mail);
/**
* Removes a message identified by key.
*
* @param key the key of the message to be removed from the repository
*/
void remove(String key);
/**
* Obtains a lock on a message identified by key
*
* @param key the key of the message to be locked
*
* @return true if successfully obtained the lock, false otherwise
*/
boolean lock(String key);
/**
* Releases a lock on a message identified the key
*
* @param key the key of the message to be unlocked
*
* @return true if successfully released the lock, false otherwise
*/
boolean unlock(String key);
}
1.6 +2 -1 jakarta-james/src/java/org/apache/james/services/MailStore.java
Index: MailStore.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/services/MailStore.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MailStore.java 14 Sep 2002 09:00:57 -0000 1.5
+++ MailStore.java 6 Jan 2003 12:38:05 -0000 1.6
@@ -8,6 +8,7 @@
package org.apache.james.services;
import org.apache.avalon.cornerstone.services.store.Store;
+import org.apache.mailet.*;
/**
* Interface for an object which provides MailRepositories or SpoolRepositories
1.12 +2 -1 jakarta-james/src/java/org/apache/james/services/MailServer.java
Index: MailServer.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/services/MailServer.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- MailServer.java 24 Sep 2002 14:04:34 -0000 1.11
+++ MailServer.java 6 Jan 2003 12:38:05 -0000 1.12
@@ -7,6 +7,7 @@
*/
package org.apache.james.services;
+import org.apache.mailet.*;
import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;
1.18 +2 -2 jakarta-james/src/java/org/apache/james/core/AvalonMailStore.java
Index: AvalonMailStore.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/core/AvalonMailStore.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- AvalonMailStore.java 2 Oct 2002 06:12:02 -0000 1.17
+++ AvalonMailStore.java 6 Jan 2003 12:38:05 -0000 1.18
@@ -21,9 +21,9 @@
import org.apache.avalon.framework.context.Contextualizable;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.LogEnabled;
-import org.apache.james.services.MailRepository;
import org.apache.james.services.MailStore;
-import org.apache.james.services.SpoolRepository;
+import org.apache.mailet.MailRepository;
+import org.apache.mailet.SpoolRepository;
import java.util.HashMap;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>