Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-411

update Mailet's Mail to support most of the current james mailets

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.0
    • Labels:
      None

      Description

      I will add subtasks for each change to keep history.

      I would like to add the getName() method to the Mailet's Mail interface.
      This would allow us to make most of James "Mail" compliant.
      Currently if you send a Mail that is not a MailImpl you will get a lot of ClassCast around (so James is not fully Mailet compliant now).

      I would also like to add "@deprecate" to the unused "bounce" (we got 2 bounce method, 1 is not used) method in the MailetContext interface.

      storeMail is marked as deprecate but now alternative has been given: I think we should undeprecate it or provide an hint on how to store a Mail (I don't know how, currently).

        Activity

        Hide
        bago Stefano Bagnara added a comment -

        interface Mail:
        added
        String getName()
        void setName(String name)
        long getMessageSize()
        Date getLastUpdated()
        void setLastUpdated(Date lastUpdated)
        moved 2 methods from MailImpl to the calling object (to handle Mail instances too).
        Refactored all the code to remove (MailImpl) casts and leave only a few optimizations based on "instanceof MailImpl".

        Now James should be able to work on "third-party" Mail implementations.

        Show
        bago Stefano Bagnara added a comment - interface Mail: added String getName() void setName(String name) long getMessageSize() Date getLastUpdated() void setLastUpdated(Date lastUpdated) moved 2 methods from MailImpl to the calling object (to handle Mail instances too). Refactored all the code to remove (MailImpl) casts and leave only a few optimizations based on "instanceof MailImpl". Now James should be able to work on "third-party" Mail implementations.
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            bago Stefano Bagnara
            Reporter:
            bago Stefano Bagnara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development