[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-dev
Subject:    svn commit: r165092 -
From:       noel () apache ! org
Date:       2005-04-28 3:59:44
Message-ID: 20050428035945.3397.qmail () minotaur ! apache ! org
[Download RAW message or body]

Author: noel
Date: Wed Apr 27 20:59:42 2005
New Revision: 165092

URL: http://svn.apache.org/viewcvs?rev=165092&view=rev
Log:
merge minor edits from trunk.  includes Mail.setReceipients(Collection)

Modified:
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/Mail.java
    james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/MailAddress.java


Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/Mail.java
                
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/Mail.java?rev=165092&r1=165091&r2=165092&view=diff
 ==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/Mail.java \
                (original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/Mail.java Wed \
Apr 27 20:59:42 2005 @@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 1999-2004 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -16,7 +16,6 @@
  ***********************************************************************/
 
 package org.apache.mailet;
-
 import javax.mail.MessagingException;
 import javax.mail.internet.MimeMessage;
 import java.io.Serializable;
@@ -37,7 +36,6 @@
     String DEFAULT = "root";
     String ERROR = "error";
     String TRANSPORT = "transport";
-
     /**
      * Returns the MimeMessage stored in this message
      *
@@ -45,70 +43,66 @@
      * @throws MessagingException - an error occured while loading this object
      */
     MimeMessage getMessage() throws MessagingException;
-
     /**
      * Returns a Collection of MailAddress objects that are recipients of this \
                message
      *
      * @return a Collection of MailAddress objects that are recipients of this \
                message
      */
     Collection getRecipients();
-
+    /**
+     * Method setRecipients.
+     * @param recipients a Collection of MailAddress Objects representing the \
recipients of this message +     * @since Mailet API v3.0-unstable
+     */
+    void setRecipients(Collection recipients);
     /**
      * The sender of the message, as specified by the MAIL FROM header, or \
                internally defined
      *
      * @return a MailAddress of the sender of this message
      */
     MailAddress getSender();
-
     /**
      * The current state of the message, such as GHOST, ERROR, or DEFAULT
      *
      * @return the state of this message
      */
     String getState();
-
     /**
      * The remote hostname of the server that connected to send this message
      *
      * @return a String of the hostname of the server that connected to send this \
                message
      */
     String getRemoteHost();
-
     /**
      * The remote ip address of the server that connected to send this message
      *
      * @return a String of the ip address of the server that connected to send this \
                message
      */
     String getRemoteAddr();
-
     /**
      * The error message, if any, associated with this message.  Not sure why this \
                is needed.
      *
      * @return a String of a descriptive error message
      */
     String getErrorMessage();
-
     /**
      * Sets the error message associated with this message.  Not sure why this is \
                needed.
      *
      * @param msg - a descriptive error message
      */
     void setErrorMessage(String msg);
-
     /**
      * Sets the MimeMessage associated with this message via the object.
      *
      * @param message - the new MimeMessage that this Mail object will wrap
      */
     void setMessage(MimeMessage message);
-
     /**
      * Sets the state of this message.
      *
      * @param state - the new state of this message
      */
     void setState(String state);
-
     /**
      * Returns the Mail session attribute with the given name, or null
      * if there is no attribute by that name.
@@ -117,8 +111,9 @@
      * A list of currently set attributes can be retrieved using getAttributeNames.
      * <p>
      * The attribute is returned as a java.lang.Object or some subclass. Attribute
-     * names should follow the same convention as package names. The Java Mailet API
-     * specification reserves names matching java.*, javax.*, and sun.*
+     * names should follow the same convention as package names. The Mailet API
+     * specification reserves names matching <I>org.apache.james.*</I>
+     * and <I>org.apache.mailet.*</I>.
      *
      * @param name - a String specifying the name of the attribute
      * @return an Object containing the value of the attribute, or null if no \
attribute @@ -126,7 +121,6 @@
      * @since Mailet API v2.1
      */
     Serializable getAttribute(String name);
-
     /**
      * Returns an Iterator containing the attribute names currently available within
      * this Mail instance.  Use the getAttribute(java.lang.String) method with an
@@ -136,13 +130,11 @@
      * @since Mailet API v2.1
      */
     Iterator getAttributeNames();
-
     /**
      * @return true if this Mail instance has any attributes set.
      * @since Mailet API v2.1
      **/
     boolean hasAttributes();
-    
     /**
      * Removes the attribute with the given name from this Mail instance. After
      * removal, subsequent calls to getAttribute(java.lang.String) to retrieve
@@ -155,13 +147,11 @@
      * @since Mailet API v2.1
      */
     Serializable removeAttribute(String name);
-
     /**
      * Removes all the attributes associated with this Mail instance.  
      * @since Mailet API v2.1
      **/
     void removeAllAttributes();
-    
     /**
      * Binds an object to a given attribute name in this Mail instance. If the name
      * specified is already used for an attribute, this method will remove the old

Modified: james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/MailAddress.java
                
URL: http://svn.apache.org/viewcvs/james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/MailAddress.java?rev=165092&r1=165091&r2=165092&view=diff
 ==============================================================================
--- james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/MailAddress.java \
                (original)
+++ james/server/branches/merge_v2_and_trunk/src/java/org/apache/mailet/MailAddress.java \
Wed Apr 27 20:59:42 2005 @@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2000-2004 The Apache Software Foundation.             *
+ * Copyright (c) 1999-2004 The Apache Software Foundation.             *
  * All rights reserved.                                                *
  * ------------------------------------------------------------------- *
  * Licensed under the Apache License, Version 2.0 (the "License"); you *
@@ -25,7 +25,7 @@
  * A representation of an email address.
  * <p>This class encapsulates functionalities to access to different
  * parts of an email address without dealing with its parsing.</p>
- * 
+ *
  * <p>A MailAddress is an address specified in the MAIL FROM and
  * RCPT TO commands in SMTP sessions.  These are either passed by
  * an external server to the mailet-compliant SMTP server, or they
@@ -33,14 +33,14 @@
  * send to another (external) SMTP server.  Mailets and matchers
  * use the MailAddress for the purpose of evaluating the sender
  * and recipient(s) of a message.</p>
- * 
+ *
  * <p>MailAddress parses an email address as defined in RFC 821
  * (SMTP) p. 30 and 31 where addresses are defined in BNF convention.
  * As the mailet API does not support the aged "SMTP-relayed mail"
  * addressing protocol, this leaves all addresses to be a <mailbox>,
  * as per the spec.  The MailAddress's "user" is the <local-part> of
  * the <mailbox> and "host" is the <domain> of the mailbox.</p>
- * 
+ *
  * <p>This class is a good way to validate email addresses as there are
  * some valid addresses which would fail with a simpler approach
  * to parsing address.  It also removes parsing burden from
@@ -50,7 +50,7 @@
  * lokitech.com is the host).  This means all current parsing to date
  * is incorrect as we just find the first @ and use that to separate
  * user from host.</p>
- * 
+ *
  * <p>This parses an address as per the BNF specification for <mailbox>
  * from RFC 821 on page 30 and 31, section 4.1.2. COMMAND SYNTAX.
  * http://www.freesoft.org/CIE/RFC/821/15.htm</p>
@@ -185,7 +185,7 @@
     }
 
     public String toString() {
-        StringBuffer addressBuffer = 
+        StringBuffer addressBuffer =
             new StringBuffer(128)
                     .append(user)
                     .append("@")
@@ -426,8 +426,8 @@
                 break;
             }
             char ch = address.charAt(pos);
-            if ((ch >= '0' && ch <= '9') || 
-                (ch >= 'a' && ch <= 'z') || 
+            if ((ch >= '0' && ch <= '9') ||
+                (ch >= 'a' && ch <= 'z') ||
                 (ch >= 'A' && ch <= 'Z') ||
                 (ch == '-')) {
                 resultSB.append(ch);



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic