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

Tellier Benoit commented on MAILBOX-381:
----------------------------------------

https://github.com/linagora/james-project/pull/2193 contributed the search

> [DeletedMessagesVault] API (not retention) + Contract + impl on top of 
> MailRepository
> -------------------------------------------------------------------------------------
>
>                 Key: MAILBOX-381
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-381
>             Project: James Mailbox
>          Issue Type: New Feature
>            Reporter: Trần Tiến Đức
>            Priority: Major
>
> DeletedMessagesVault is where you store mails after being deleted in `Trash`. 
> It allows to:
>  - Store a `DeletedMessage` of an user
>  - Delete a `DeletedMessage` stored before by the `MessageId`
>  - Search a list of `DeletedMessage` by a `Query`
> The proposal API:
> {code:java}
> interface DeletedMessagesVault {
>      Mono<Void> append(User user, DeletedMessage deletedMessage);
>      Mono<Void> delete(MessageId messageId);
>      Flux<DeletedMessage> search(Query query);
>  }{code}
>  API will be placed in a new maven module 
> `mailbox/plugin/deleted-messages-vault`
> You will also need to define those POJOs
>  - DeletedMessage: it wraps a MailboxMessage contents and deleted message 
> metadata:
>  - deletion date
>  - delivery date
>  - recipients
>  - sender
>  - has attachment
>  - origin mailboxes
>  - subject (contains, equals / ignore case)
>  - Query: this POJO define various search criteria base on list of 
> DeletedMessage metadata.
> About DeletedMessagesVault impl
> By leverage `MailRepository` component you will create your impl ontop of 
> `MailRepository`. At the moment `MailRepository` only supports `store` and 
> `remove`, so you have to:
>  - Apply search feature in `MailRepository`
>  - `DeletedMessagesVault` impl is intend to use `CassandraMailRepository`, 
> `DeletedMessagesVault` is per-user, and each one points to a specify 
> `MailRepositoryUrl` belong to a specific User.
>  - Adapt DeletedMessagesVault impl with `MailRepository` APIs.



--
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