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:26:32 UTC

cvs commit: jakarta-james/src/java/org/apache/mailet Mail.java

danny       2003/01/07 03:26:31

  Modified:    src/java/org/apache/mailet Mail.java
  Log:
  MailetAPI refactorings
  Added methods to allow MailImpl to be replaced with Mail in repository interfaces and standard Mailets
  
  Revision  Changes    Path
  1.4       +27 -12    jakarta-james/src/java/org/apache/mailet/Mail.java
  
  Index: Mail.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/mailet/Mail.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Mail.java	18 Jan 2002 02:48:40 -0000	1.3
  +++ Mail.java	7 Jan 2003 11:26:31 -0000	1.4
  @@ -6,12 +6,11 @@
    * the LICENSE file.
    */
   package org.apache.mailet;
  -
   import javax.mail.MessagingException;
   import javax.mail.internet.MimeMessage;
   import java.io.Serializable;
   import java.util.Collection;
  -
  +import java.util.Date;
   /**
    * Wrap a MimeMessage with routing information (from SMTP) such
    * as SMTP specified recipients, sender, and ip address and hostname
  @@ -28,7 +27,6 @@
       String DEFAULT = "root";
       String ERROR = "error";
       String TRANSPORT = "transport";
  -
       /**
        * Returns the MimeMessage stored in this message
        *
  @@ -36,67 +34,84 @@
        * @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
  +     */
  +    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);
  +    /**
  +     * Method getUID.
  +     * Mainly used to log the progress of mails through processing the string returned need only be unique to this installation of the system.
  +     * @return a String Unique Identifier in this system.
  +     */
  +    String getName();
  +    /**
  +     * Method setName. Set the internal unique identifier of this Mail which need only be unique to this installation of the system.
  +     * @param name the UID
  +     */
  +    void setName(String name);
  +    /**
  +     * Method setLastUpdated. Used to set the internal timestamp of the Mail during processing.
  +     * @param date 
  +     */
  +    void setLastUpdated(Date date);
  +    /**
  +     * Method getLastUpdated.
  +     * @return Date. timestamp of the last action which changed this Mail
  +     */
  +    Date getLastUpdated();
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>