[ 
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-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to