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

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

commit c7177df2f5be728270516db4580cba6e4acefa13
Author: Benoit Tellier <btell...@linagora.com>
AuthorDate: Tue Jun 25 11:31:16 2019 +0700

    JAMES-2807 DeletedMessageMetadataVault API and memory skeleton
---
 .../pom.xml                                        | 40 +++++++++++++++
 .../vault/MemoryDeletedMessageMetadataVault.java   | 58 ++++++++++++++++++++++
 .../james/vault/DeletedMessageMetadataVault.java   | 39 +++++++++++++++
 mailbox/pom.xml                                    |  1 +
 pom.xml                                            | 11 ++++
 5 files changed, 149 insertions(+)

diff --git a/mailbox/plugin/deleted-messages-vault-blobstore-memory/pom.xml 
b/mailbox/plugin/deleted-messages-vault-blobstore-memory/pom.xml
new file mode 100644
index 0000000..d5ae54e
--- /dev/null
+++ b/mailbox/plugin/deleted-messages-vault-blobstore-memory/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>apache-james-mailbox</artifactId>
+        <groupId>org.apache.james</groupId>
+        <version>3.4.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    
<artifactId>apache-james-mailbox-deleted-messages-vault-blobstore-memory</artifactId>
+    <name>Apache James :: Mailbox :: Plugin :: Deleted Messages Vault :: 
BlobStore :: Memory</name>
+    <description>Memory implementation of the metadata storage API required by 
the Deleted Messages Vault implementation on top of BlobStore</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            
<artifactId>apache-james-mailbox-deleted-messages-vault-blobstore</artifactId>
+        </dependency>
+    </dependencies>
+
+
+</project>
\ No newline at end of file
diff --git 
a/mailbox/plugin/deleted-messages-vault-blobstore-memory/src/main/java/org/apache/james/vault/MemoryDeletedMessageMetadataVault.java
 
b/mailbox/plugin/deleted-messages-vault-blobstore-memory/src/main/java/org/apache/james/vault/MemoryDeletedMessageMetadataVault.java
new file mode 100644
index 0000000..33f11f6
--- /dev/null
+++ 
b/mailbox/plugin/deleted-messages-vault-blobstore-memory/src/main/java/org/apache/james/vault/MemoryDeletedMessageMetadataVault.java
@@ -0,0 +1,58 @@
+/****************************************************************
+ * 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.commons.lang3.NotImplementedException;
+import org.apache.james.blob.api.BucketName;
+import org.apache.james.core.User;
+import org.apache.james.mailbox.model.MessageId;
+import org.reactivestreams.Publisher;
+
+public class MemoryDeletedMessageMetadataVault implements 
DeletedMessageMetadataVault {
+    @Override
+    public Publisher<Void> store(DeletedMessageWithStorageInformation 
deletedMessage) {
+        throw new NotImplementedException("Not yet implemented");
+    }
+
+    @Override
+    public Publisher<Void> removeBucket(BucketName bucketName) {
+        throw new NotImplementedException("Not yet implemented");
+    }
+
+    @Override
+    public Publisher<Void> remove(BucketName bucketName, User user, MessageId 
messageId) {
+        throw new NotImplementedException("Not yet implemented");
+    }
+
+    @Override
+    public Publisher<StorageInformation> retrieveStorageInformation(User user, 
MessageId messageId) {
+        throw new NotImplementedException("Not yet implemented");
+    }
+
+    @Override
+    public Publisher<DeletedMessageWithStorageInformation> 
listMessages(BucketName bucketName, User user) {
+        throw new NotImplementedException("Not yet implemented");
+    }
+
+    @Override
+    public Publisher<BucketName> listBuckets() {
+        throw new NotImplementedException("Not yet implemented");
+    }
+}
diff --git 
a/mailbox/plugin/deleted-messages-vault-blobstore/src/main/java/org/apache/james/vault/DeletedMessageMetadataVault.java
 
b/mailbox/plugin/deleted-messages-vault-blobstore/src/main/java/org/apache/james/vault/DeletedMessageMetadataVault.java
new file mode 100644
index 0000000..809a34b
--- /dev/null
+++ 
b/mailbox/plugin/deleted-messages-vault-blobstore/src/main/java/org/apache/james/vault/DeletedMessageMetadataVault.java
@@ -0,0 +1,39 @@
+/****************************************************************
+ * 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.blob.api.BucketName;
+import org.apache.james.core.User;
+import org.apache.james.mailbox.model.MessageId;
+import org.reactivestreams.Publisher;
+
+public interface DeletedMessageMetadataVault {
+    Publisher<Void> store(DeletedMessageWithStorageInformation deletedMessage);
+
+    Publisher<Void> removeBucket(BucketName bucketName);
+
+    Publisher<Void> remove(BucketName bucketName, User user, MessageId 
messageId);
+
+    Publisher<StorageInformation> retrieveStorageInformation(User user, 
MessageId messageId);
+
+    Publisher<DeletedMessageWithStorageInformation> listMessages(BucketName 
bucketName, User user);
+
+    Publisher<BucketName> listBuckets();
+}
diff --git a/mailbox/pom.xml b/mailbox/pom.xml
index b191407..ef22a91 100644
--- a/mailbox/pom.xml
+++ b/mailbox/pom.xml
@@ -53,6 +53,7 @@
 
         <module>plugin/deleted-messages-vault</module>
         <module>plugin/deleted-messages-vault-blobstore</module>
+        <module>plugin/deleted-messages-vault-blobstore-memory</module>
 
         <module>plugin/quota-mailing</module>
         <module>plugin/quota-mailing-cassandra</module>
diff --git a/pom.xml b/pom.xml
index 52b56ab..de07d51 100644
--- a/pom.xml
+++ b/pom.xml
@@ -775,6 +775,17 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
+                
<artifactId>apache-james-mailbox-deleted-messages-vault-blobstore</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${james.groupId}</groupId>
+                
<artifactId>apache-james-mailbox-deleted-messages-vault-blobstore</artifactId>
+                <type>test-jar</type>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${james.groupId}</groupId>
                 <artifactId>apache-james-mailbox-elasticsearch</artifactId>
                 <version>${project.version}</version>
             </dependency>


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