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 "Rene Cordier (JIRA)" <se...@james.apache.org> on 2019/07/09 04:50:00 UTC

[jira] [Commented] (JAMES-2808) DeletedMessage serialization & deserialization

    [ https://issues.apache.org/jira/browse/JAMES-2808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16880928#comment-16880928 ] 

Rene Cordier commented on JAMES-2808:
-------------------------------------

PR : https://github.com/linagora/james-project/pull/2502

> DeletedMessage serialization & deserialization
> ----------------------------------------------
>
>                 Key: JAMES-2808
>                 URL: https://issues.apache.org/jira/browse/JAMES-2808
>             Project: James Server
>          Issue Type: Sub-task
>          Components: deletedMessageVault
>            Reporter: Tellier Benoit
>            Priority: Major
>
> BlobStore takes/retrieves InputStream/bytes. We need a component to serialize/deserialize DeletedMessage and related storage information into InputStream and vice versa. (See `DeletedMessageWithStorageInformation` in JAMES-2807 )
> Currently, there are two parts of a deleted message:
>  - Metadata represented by the DTO:
> {code:java}
> public class DeletedMessage {
>     private final MessageId messageId;
>     private final List<MailboxId> originMailboxes;
>     private final User owner;
>     private final ZonedDateTime deliveryDate;
>     private final ZonedDateTime deletionDate;
>     private final MaybeSender sender;
>     private final List<MailAddress> recipients;
>     private final Optional<String> subject;
>     private final boolean hasAttachment;
>     private final long size;
>     // storage information
>     private final BucketName bucketName;
>     private final BlobId blobId;
> }
> {code}
>  - Content represtented by InputStream
> We can consider the Serializer will be in charge of serializing/deserializing just DTOs. And the Vault saves each deleted message into two parts, metadata will be stored in DeletedMessageMetadataVault. and It uses this serializer to serialize DeletedMessage into json and save it as a field in cassandra column



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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