Tellier Benoit created JAMES-2808:
-------------------------------------
Summary: 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
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:
```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;
}
```
- 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: [email protected]
For additional commands, e-mail: [email protected]