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 bt...@apache.org on 2019/03/27 03:01:38 UTC

[james-project] 03/03: JAMES-2699 Add documentation for Mailet API deprecation

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 28360f856fd3b7c14bf3a9cef05a32d957f6b376
Author: Gautier DI FOLCO <gd...@linagora.com>
AuthorDate: Mon Mar 25 13:27:13 2019 +0100

    JAMES-2699 Add documentation for Mailet API deprecation
---
 upgrade-instructions.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/upgrade-instructions.md b/upgrade-instructions.md
index a494d53..9bd33ee 100644
--- a/upgrade-instructions.md
+++ b/upgrade-instructions.md
@@ -19,6 +19,7 @@ Change list:
  - [Changes to the MailboxListener API](#changes-to-the-mailboxlistener-api)
  - [Changes in WebAdmin reIndexing API](#changes-in-webadmin-reindexing-api)
  - [Rename KEY column in JAMES_MAILBOX_ANNOTATION table](#james-mailbox-annotation)
+ - [Mailet API changes](#mailet-api-changes)
 
 ### Changes to the MailboxListener API
 
@@ -87,6 +88,23 @@ ALTER TABLE JAMES_MAILBOX_ANNOTATION CHANGE COLUMN KEY ANNOTATION_KEY varchar(20
 
 _or the syntax corresponding to your database._
 
+### Mailet API changes
+In order to allow safe serialization and strong typing `org.apache.mailet.Mail` have changed.
+
+These methods have been deprecated and replaced:
+
+ * `getSender()` in favor of `getMaybeSender()`
+ * `getAttribute(String)` in favor of `getAttribute(AttributeName)`
+ * `setAttribute(String, Serializable)` in favor of `setAttribute(Attribute)`
+ * `removeAttribute(String)` in favor of `removeAttribute(AttributeName)`
+ * `getAttributeNames()` in favor of `attributeNames()` and `attributesMap()`
+
+Some plain-string `AttributeName` have also been replaced:
+
+  * `SMTP_AUTH_USER_ATTRIBUTE_NAME` in favor of `SMTP_AUTH_USER`
+  * `MAILET_ERROR_ATTRIBUTE_NAME` in favor of `MAILET_ERROR`
+  * `SENT_BY_MAILET` in favor of `SENT_BY_MAILET_ATTRIBUTE`'s name, it is recommended to directly set the `Attribute`.
+
 ## 3.2.0 version
 
 Changes to apply between 3.1.0 and 3.2.0 had been reported here.


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