This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit f94c878dcaa4538ed263283e06c338cdffd117f0
Author: Benoit Tellier <[email protected]>
AuthorDate: Fri Feb 22 11:28:28 2019 +0700

    MAILBOX-381 Add the DeletedMessageVault API
    
    We on purpose keep the search for later and for now return all deleted 
messages
---
 .../apache/james/vault/DeletedMessageVault.java    | 32 ++++++++++++++++
 .../main/java/org/apache/james/vault/Query.java    | 44 ++++++++++++++++++++++
 2 files changed, 76 insertions(+)

diff --git 
a/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/DeletedMessageVault.java
 
b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/DeletedMessageVault.java
new file mode 100644
index 0000000..30efb1b
--- /dev/null
+++ 
b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/DeletedMessageVault.java
@@ -0,0 +1,32 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.vault;
+
+import org.apache.james.core.User;
+import org.apache.james.mailbox.model.MessageId;
+import org.reactivestreams.Publisher;
+
+public interface DeletedMessageVault {
+    Publisher<Void> append(User user, DeletedMessage deletedMessage);
+
+    Publisher<Void> delete(User user, MessageId messageId);
+
+    Publisher<DeletedMessage> search(User user, Query query);
+}
diff --git 
a/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/Query.java
 
b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/Query.java
new file mode 100644
index 0000000..62ed4ce
--- /dev/null
+++ 
b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/Query.java
@@ -0,0 +1,44 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.vault;
+
+import java.util.List;
+
+import com.google.common.collect.ImmutableList;
+
+public class Query {
+    public static Query all() {
+        return new Query(ImmutableList.of());
+    }
+
+    interface Criterion {
+
+    }
+
+    private final List<Criterion> criteria;
+
+    private Query(List<Criterion> criteria) {
+        this.criteria = criteria;
+    }
+
+    public List<Criterion> getCriteria() {
+        return criteria;
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to