james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From man...@apache.org
Subject svn commit: r882432 - in /james/hupa/trunk: client/src/main/java/org/apache/hupa/client/validation/ shared/src/main/java/org/apache/hupa/shared/data/ shared/src/main/java/org/apache/hupa/shared/rpc/
Date Fri, 20 Nov 2009 07:48:33 GMT
Author: manolo
Date: Fri Nov 20 07:48:31 2009
New Revision: 882432

URL: http://svn.apache.org/viewvc?rev=882432&view=rev
Log:
Fixed a bug in forwarding & replying messages because the super constructor was not called.
Fixed the regex used in client email-validator.  

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
    james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java
    james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java
    james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ForwardMessage.java

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java?rev=882432&r1=882431&r2=882432&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
Fri Nov 20 07:48:31 2009
@@ -34,7 +34,7 @@
  */
 public class EmailListValidator extends Validator<EmailListValidator>{
     private HasText text;
-    private String emailRegex = "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$";
+    private String emailRegex = "^(.+<)?[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(>)?$";
     public EmailListValidator(HasText text) {
         this.text = text;
     }

Modified: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java?rev=882432&r1=882431&r2=882432&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java
(original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java
Fri Nov 20 07:48:31 2009
@@ -34,6 +34,25 @@
     private ArrayList<String> cc;
     private boolean hasAttachment;
     
+    public String toString() {
+        String toList = "";
+        if (to != null)
+            for (String s: to)
+                toList += s + " ";
+
+        String ccList = "";
+        if (cc != null)
+            for (String s: cc)
+                ccList += s + " ";
+
+        return "From='" + from 
+             + "' To='" + toList
+             + "' CC='" + ccList
+             + "' Subject='" + subject
+             + "' Attachments=" + hasAttachment;
+    }
+
+    
     public boolean hasAttachment() {
         return hasAttachment;
     }

Modified: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java?rev=882432&r1=882431&r2=882432&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java Fri
Nov 20 07:48:31 2009
@@ -27,6 +27,22 @@
     private String text;
     private ArrayList<MessageAttachment> aList;
     
+    public String toString() {
+        String bccList = "";
+        if (bcc !=null) 
+            for (String s: bcc)
+                bccList += s + " ";
+        
+        String attachNames = "";
+        for (MessageAttachment m: aList) 
+            attachNames += m.getName() + " ";
+        
+        return super.toString()
+             + "Bcc='" + bccList
+             + "'\nAttachments=" + attachNames
+             + "'\nMessage:\n" + text;
+    }
+    
     public ArrayList<String> getBcc() {
         return bcc;
     }

Modified: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ForwardMessage.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ForwardMessage.java?rev=882432&r1=882431&r2=882432&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ForwardMessage.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ForwardMessage.java Fri
Nov 20 07:48:31 2009
@@ -30,6 +30,7 @@
     private IMAPFolder folder;
 
     public ForwardMessage(SMTPMessage msg, IMAPFolder folder, long uid) {
+        super(msg);
         this.uid = uid;
         this.folder = folder;
     }



---------------------------------------------------------------------
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