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/07 12:25:30 UTC
cvs commit: jakarta-james/src/java/org/apache/mailet MailRepository.java
danny 2003/01/07 03:25:28
Modified: src/java/org/apache/james/transport/mailets AddHeader.java
src/java/org/apache/james/mailrepository
AvalonMailRepository.java JDBCMailRepository.java
src/java/org/apache/mailet MailRepository.java
Log:
MailetAPI refactorings
Removed refrences to MailImpl repaced with Mail
Revision Changes Path
1.2 +3 -4 jakarta-james/src/java/org/apache/james/transport/mailets/AddHeader.java
Index: AddHeader.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/AddHeader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AddHeader.java 14 Sep 2002 07:30:22 -0000 1.1
+++ AddHeader.java 7 Jan 2003 11:25:26 -0000 1.2
@@ -7,11 +7,10 @@
*/
package org.apache.james.transport.mailets;
-import javax.mail.internet.MimeMessage ;
+import javax.mail.internet.MimeMessage;
-import org.apache.james.core.MailImpl ;
-import org.apache.mailet.GenericMailet ;
-import org.apache.mailet.Mail ;
+import org.apache.mailet.GenericMailet;
+import org.apache.mailet.Mail;
/**
* Adds a specified header and value to the message.
1.23 +3 -2 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.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- AvalonMailRepository.java 6 Jan 2003 17:08:43 -0000 1.22
+++ AvalonMailRepository.java 7 Jan 2003 11:25:26 -0000 1.23
@@ -31,6 +31,7 @@
import org.apache.james.core.MimeMessageWrapper;
import org.apache.james.services.MailStore;
import org.apache.james.util.Lock;
+import org.apache.mailet.Mail;
import org.apache.mailet.MailRepository;
/**
@@ -232,7 +233,7 @@
*
* @param mc the mail message to store
*/
- public void store(MailImpl mc) {
+ public void store(Mail mc) {
try {
String key = mc.getName();
//Remember whether this key was locked
@@ -277,7 +278,7 @@
OutputStream out = null;
try {
out = sr.put(key);
- mc.writeMessageTo(out);
+ ((MailImpl)mc).writeMessageTo(out);
} finally {
out.close();
}
1.33 +2 -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.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- JDBCMailRepository.java 6 Jan 2003 17:08:44 -0000 1.32
+++ JDBCMailRepository.java 7 Jan 2003 11:25:27 -0000 1.33
@@ -52,6 +52,7 @@
import org.apache.james.util.JDBCUtil;
import org.apache.james.util.Lock;
import org.apache.james.util.SqlResources;
+import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;
import org.apache.mailet.MailRepository;
@@ -440,7 +441,7 @@
* Store this message to the database. Optionally stores the message
* body to the filesystem and only writes the headers to the database.
*/
- public void store(MailImpl mc) {
+ public void store(Mail mc) {
Connection conn = null;
try {
conn = datasource.getConnection();
1.2 +1 -1 jakarta-james/src/java/org/apache/mailet/MailRepository.java
Index: MailRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/mailet/MailRepository.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MailRepository.java 6 Jan 2003 12:38:05 -0000 1.1
+++ MailRepository.java 7 Jan 2003 11:25:28 -0000 1.2
@@ -32,7 +32,7 @@
*
* @param mc the mail message to store
*/
- void store(MailImpl mc);
+ void store(Mail mc);
/**
* List string keys of messages in repository.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>