[
https://issues.apache.org/jira/browse/JAMES-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791238#comment-16791238
]
Trần Tiến Đức commented on JAMES-2663:
--------------------------------------
Query model:
In case of the complex query:
{code:java}
{
"combinator": "and"
"criteria": [
{
"fieldName": "deliveryDate"
"operator": "beforeOrEquals"
"value": "2014-10-30T14:12:00Z"
},
{
"fieldName": "recipients"
"operator": "contains"
"value": "[email protected]"
},
{
"fieldName": "hasAttachment"
"operator": "equals"
"value": "false"
},
{
"fieldName": "originMailboxes"
"operator": "contains"
"value": "5436575687"
}
]
}{code}
With a simple query contains only one criterion, it could be simplified as a
single criterion, the complex way still can work
{code:java}
{
"fieldName": "originMailboxes"
"operator": "contains"
"value": "5436575687"
}{code}
> [WebAdmin DMV Route] Restore API
> --------------------------------
>
> Key: JAMES-2663
> URL: https://issues.apache.org/jira/browse/JAMES-2663
> Project: James Server
> Issue Type: New Feature
> Reporter: Trần Tiến Đức
> Priority: Major
>
> ### Define `Query` object
> JSON List of criterion objects, logical AND between criteria.
> A criterion looks like this:
> {code:java}
> {
> "field":
> "value":
> "operator":
> }{code}
> Possible fields:
> - deletionDate date formatted as string (Operation: Before + After)
> - deliveryDate date formatted as string (Operation: Before + After)
> - recipients list of string (Operator: Contains, ContainsIgnoreCase)
> - sender string (Operator: Equals, EqualsIgnoreCase)
> - hasAttachment boolean (Operator: Equals)
> - originMailboxes list string (Operator Contains)
> - subject string (Operator Equals, Contains + Ignore case)
> ## API proposal
> {code:java}
> POST /deletedMessages/users/:userId?action=restore
> [JSON Query body]
> - 201 Success
> {"taskId":"12e3"}
> - 404 if the user does not exist
> - 503 if `DeletedMessagesVault` is not avaiable
> {code}
> - Create `DeletedMessagesVaultRoutes` class in
> `/server/protocols/webadmin-mailbox-deleted-messages-vault`
> - Search the `DeletedMessage` with `Flux<DeletedMessage> search(Query)` is
> define in MAILBOX-381 then move it to `Restored Emails` mailbox.
> - create unit-test to test this API: configuring webAdmin with
> `DeletedMessagesVaultRoutes` on top of a memory mbx manager
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]