You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2020/11/16 12:09:23 UTC

[james-project] branch master updated (35e4974 -> fb48808)

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

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


    from 35e4974  JAMES-3445 Update Email/set documentation
     new 847d17c  JAMES-1902 Moves activemq mailqueue guice binding
     new b3d4a66  JAMES-1902 Moves rabbitmq mailqueue guice bindings
     new b5277c9  JAMES-1902 Extracts in memory mailqueue guice bindings
     new e32571a  JAMES-1902 Renames activemq mailqueue guice bindings module
     new 8ebf5df  JAMES-1902 renames rabbitmq mailqueue guice bindings module
     new 4dd396e  JAMES-3440 Provide a mailbox listener to populate EmailQueryView
     new 6c5ab40  JAMES-3440 Guice bindings for EmailQueryView
     new fb48808  JAMES-3440 Configuration examples

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../cassandra-ldap/destination/conf/listeners.xml  |   8 +
 .../destination/conf/listeners.xml                 |   8 +
 .../destination/conf/listeners.xml                 |   8 +
 .../guice/cassandra/destination/conf/listeners.xml |   8 +
 .../CassandraRabbitMQAwsS3SmtpTestRuleFactory.java |   2 +-
 pom.xml                                            |  10 +-
 server/container/guice/cassandra-guice/pom.xml     |  16 +-
 .../org/apache/james/CassandraJamesServerMain.java |   2 +-
 .../james/modules/data/CassandraJmapModule.java    |   5 +
 .../james/CassandraRabbitMQJamesServerMain.java    |   2 +-
 .../guice/cassandra-rabbitmq-ldap-guice/pom.xml    |   6 +-
 server/container/guice/jpa-guice/pom.xml           |   8 +-
 .../java/org/apache/james/JPAJamesServerMain.java  |   2 +-
 server/container/guice/jpa-smtp-common/pom.xml     |   8 +-
 .../java/org/apache/james/JPAJamesServerMain.java  |   2 +-
 server/container/guice/jpa-smtp/pom.xml            |   8 +-
 server/container/guice/memory-guice/pom.xml        |   8 +-
 .../org/apache/james/MemoryJamesServerMain.java    |   2 +-
 .../james/modules/data/MemoryDataJmapModule.java   |   5 +
 server/container/guice/pom.xml                     |  31 ++--
 .../container/guice/{ => queue}/activemq/pom.xml   |   4 +-
 .../queue}/activemq/ActiveMQQueueModule.java       |   2 +-
 .../guice/{activemq => queue/memory}/pom.xml       |  10 +-
 .../queue/memory}/MemoryMailQueueModule.java       |   2 +-
 .../container/guice/{ => queue}/rabbitmq/pom.xml   |   4 +-
 .../modules/queue}/rabbitmq/RabbitMQModule.java    |   2 +-
 server/mailet/integration-testing/pom.xml          |  10 +-
 .../james/transport/mailets/AddFooterTest.java     |   2 +-
 .../jmap/event/PopulateEmailQueryViewListener.java | 134 +++++++++++++++++
 .../event/PopulateEmailQueryViewListenerTest.java  | 166 +++++++++++++++++++++
 30 files changed, 417 insertions(+), 68 deletions(-)
 copy server/container/guice/{ => queue}/activemq/pom.xml (94%)
 rename server/container/guice/{activemq/src/main/java/org/apache/james/modules => queue/activemq/src/main/java/org/apache/james/modules/queue}/activemq/ActiveMQQueueModule.java (98%)
 rename server/container/guice/{activemq => queue/memory}/pom.xml (85%)
 rename server/container/guice/{memory-guice/src/main/java/org/apache/james/modules/server => queue/memory/src/main/java/org/apache/james/modules/queue/memory}/MemoryMailQueueModule.java (98%)
 rename server/container/guice/{ => queue}/rabbitmq/pom.xml (96%)
 rename server/container/guice/{rabbitmq/src/main/java/org/apache/james/modules => queue/rabbitmq/src/main/java/org/apache/james/modules/queue}/rabbitmq/RabbitMQModule.java (99%)
 create mode 100644 server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java
 create mode 100644 server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/event/PopulateEmailQueryViewListenerTest.java


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 03/08: JAMES-1902 Extracts in memory mailqueue guice bindings

Posted by bt...@apache.org.
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 b5277c930f905c866fa607292d67c180a7c4f1a7
Author: Jean Helou <jh...@codamens.fr>
AuthorDate: Thu Nov 12 10:09:37 2020 +0100

    JAMES-1902 Extracts in memory mailqueue guice bindings
---
 server/container/guice/memory-guice/pom.xml        |  8 ++--
 .../org/apache/james/MemoryJamesServerMain.java    |  2 +-
 server/container/guice/pom.xml                     |  6 +++
 server/container/guice/queue/memory/pom.xml        | 50 ++++++++++++++++++++++
 .../{ => queue}/memory/MemoryMailQueueModule.java  |  2 +-
 5 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/server/container/guice/memory-guice/pom.xml b/server/container/guice/memory-guice/pom.xml
index 53f6cf0..c105297 100644
--- a/server/container/guice/memory-guice/pom.xml
+++ b/server/container/guice/memory-guice/pom.xml
@@ -186,10 +186,6 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-queue-memory</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
             <artifactId>james-server-testing</artifactId>
             <scope>test</scope>
         </dependency>
@@ -201,6 +197,10 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
+            <artifactId>queue-memory-guice</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
             <artifactId>testing-base</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java b/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
index 3fcbe09..152693e 100644
--- a/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
+++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
@@ -37,6 +37,7 @@ import org.apache.james.modules.protocols.ManageSieveServerModule;
 import org.apache.james.modules.protocols.POP3ServerModule;
 import org.apache.james.modules.protocols.ProtocolHandlerModule;
 import org.apache.james.modules.protocols.SMTPServerModule;
+import org.apache.james.modules.queue.memory.MemoryMailQueueModule;
 import org.apache.james.modules.server.CamelMailetContainerModule;
 import org.apache.james.modules.server.DKIMMailetModule;
 import org.apache.james.modules.server.DLPRoutesModule;
@@ -47,7 +48,6 @@ import org.apache.james.modules.server.MailQueueRoutesModule;
 import org.apache.james.modules.server.MailRepositoriesRoutesModule;
 import org.apache.james.modules.server.MailboxRoutesModule;
 import org.apache.james.modules.server.MailboxesExportRoutesModule;
-import org.apache.james.modules.server.MemoryMailQueueModule;
 import org.apache.james.modules.server.NoJwtModule;
 import org.apache.james.modules.server.RawPostDequeueDecoratorModule;
 import org.apache.james.modules.server.SieveRoutesModule;
diff --git a/server/container/guice/pom.xml b/server/container/guice/pom.xml
index d39672b..6dd2108 100644
--- a/server/container/guice/pom.xml
+++ b/server/container/guice/pom.xml
@@ -77,6 +77,7 @@
         <module>protocols/webadmin-swagger</module>
         <module>protocols/webadmin-mail-over-web</module>
         <module>queue/activemq</module>
+        <module>queue/memory</module>
         <module>queue/rabbitmq</module>
         <module>testing</module>
         <module>sieve-file</module>
@@ -256,6 +257,11 @@
                 <version>${project.version}</version>
             </dependency>
             <dependency>
+                <groupId>${james.groupId}</groupId>
+                <artifactId>queue-memory-guice</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>com.linagora</groupId>
                 <artifactId>logback-elasticsearch-appender</artifactId>
                 <version>1.8.0</version>
diff --git a/server/container/guice/queue/memory/pom.xml b/server/container/guice/queue/memory/pom.xml
new file mode 100644
index 0000000..0dbeb28
--- /dev/null
+++ b/server/container/guice/queue/memory/pom.xml
@@ -0,0 +1,50 @@
+<?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>
+        <groupId>org.apache.james</groupId>
+        <artifactId>james-server-guice</artifactId>
+        <version>3.6.0-SNAPSHOT</version>
+	<relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>queue-memory-guice</artifactId>
+
+    <name>Apache James :: Server :: Guice :: Memory</name>
+    <description>Guice Module for InMemory Mailqueue implementation</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-queue-memory</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>testing-base</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.inject</groupId>
+            <artifactId>guice</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/server/container/guice/queue/memory/src/main/java/org/apache/james/modules/memory/MemoryMailQueueModule.java b/server/container/guice/queue/memory/src/main/java/org/apache/james/modules/queue/memory/MemoryMailQueueModule.java
similarity index 98%
rename from server/container/guice/queue/memory/src/main/java/org/apache/james/modules/memory/MemoryMailQueueModule.java
rename to server/container/guice/queue/memory/src/main/java/org/apache/james/modules/queue/memory/MemoryMailQueueModule.java
index 2421318..614968e 100644
--- a/server/container/guice/queue/memory/src/main/java/org/apache/james/modules/memory/MemoryMailQueueModule.java
+++ b/server/container/guice/queue/memory/src/main/java/org/apache/james/modules/queue/memory/MemoryMailQueueModule.java
@@ -17,7 +17,7 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.modules.server;
+package org.apache.james.modules.queue.memory;
 
 import org.apache.james.queue.api.MailQueue;
 import org.apache.james.queue.api.MailQueueFactory;


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 04/08: JAMES-1902 Renames activemq mailqueue guice bindings module

Posted by bt...@apache.org.
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 e32571a9822661af9614bd4b1e03cac44c9f4a78
Author: Jean Helou <jh...@codamens.fr>
AuthorDate: Thu Nov 12 12:38:13 2020 +0100

    JAMES-1902 Renames activemq mailqueue guice bindings module
---
 pom.xml                                                        | 10 +++++-----
 server/container/guice/cassandra-guice/pom.xml                 |  8 ++++----
 .../main/java/org/apache/james/CassandraJamesServerMain.java   |  2 +-
 server/container/guice/jpa-guice/pom.xml                       |  8 ++++----
 .../src/main/java/org/apache/james/JPAJamesServerMain.java     |  2 +-
 server/container/guice/jpa-smtp-common/pom.xml                 |  8 ++++----
 .../src/main/java/org/apache/james/JPAJamesServerMain.java     |  2 +-
 server/container/guice/jpa-smtp/pom.xml                        |  8 ++++----
 server/container/guice/pom.xml                                 | 10 +++++-----
 server/container/guice/queue/activemq/pom.xml                  |  2 +-
 .../modules/{ => queue}/activemq/ActiveMQQueueModule.java      |  2 +-
 server/mailet/integration-testing/pom.xml                      | 10 +++++-----
 .../java/org/apache/james/transport/mailets/AddFooterTest.java |  2 +-
 13 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/pom.xml b/pom.xml
index 73f03cb..a054465 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1450,11 +1450,6 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
-                <artifactId>james-server-guice-activemq</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${james.groupId}</groupId>
                 <artifactId>james-server-guice-common</artifactId>
                 <version>${project.version}</version>
             </dependency>
@@ -1939,6 +1934,11 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
+                <artifactId>queue-activemq-guice</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${james.groupId}</groupId>
                 <artifactId>quota-mailing-cassandra</artifactId>
                 <version>${project.version}</version>
             </dependency>
diff --git a/server/container/guice/cassandra-guice/pom.xml b/server/container/guice/cassandra-guice/pom.xml
index 97b1455..c3199e8 100644
--- a/server/container/guice/cassandra-guice/pom.xml
+++ b/server/container/guice/cassandra-guice/pom.xml
@@ -150,10 +150,6 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-activemq</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-common</artifactId>
         </dependency>
         <dependency>
@@ -300,6 +296,10 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
+            <artifactId>queue-activemq-guice</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
             <artifactId>quota-mailing-cassandra</artifactId>
         </dependency>
         <dependency>
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
index 412c209..40bfa50 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
@@ -26,7 +26,6 @@ import org.apache.james.json.DTOModule;
 import org.apache.james.modules.BlobExportMechanismModule;
 import org.apache.james.modules.CassandraConsistencyTaskSerializationModule;
 import org.apache.james.modules.MailboxModule;
-import org.apache.james.modules.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.data.CassandraDLPConfigurationStoreModule;
 import org.apache.james.modules.data.CassandraDomainListModule;
 import org.apache.james.modules.data.CassandraJmapModule;
@@ -52,6 +51,7 @@ import org.apache.james.modules.protocols.ManageSieveServerModule;
 import org.apache.james.modules.protocols.POP3ServerModule;
 import org.apache.james.modules.protocols.ProtocolHandlerModule;
 import org.apache.james.modules.protocols.SMTPServerModule;
+import org.apache.james.modules.queue.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.server.DKIMMailetModule;
 import org.apache.james.modules.server.DLPRoutesModule;
 import org.apache.james.modules.server.DataRoutesModules;
diff --git a/server/container/guice/jpa-guice/pom.xml b/server/container/guice/jpa-guice/pom.xml
index 31e1304..81a1f92 100644
--- a/server/container/guice/jpa-guice/pom.xml
+++ b/server/container/guice/jpa-guice/pom.xml
@@ -63,10 +63,6 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-activemq</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-common</artifactId>
         </dependency>
         <dependency>
@@ -164,6 +160,10 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
+            <artifactId>queue-activemq-guice</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
             <artifactId>testing-base</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/server/container/guice/jpa-guice/src/main/java/org/apache/james/JPAJamesServerMain.java b/server/container/guice/jpa-guice/src/main/java/org/apache/james/JPAJamesServerMain.java
index 210ee2f..cf06fe8 100644
--- a/server/container/guice/jpa-guice/src/main/java/org/apache/james/JPAJamesServerMain.java
+++ b/server/container/guice/jpa-guice/src/main/java/org/apache/james/JPAJamesServerMain.java
@@ -20,7 +20,6 @@
 package org.apache.james;
 
 import org.apache.james.modules.MailboxModule;
-import org.apache.james.modules.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.data.JPADataModule;
 import org.apache.james.modules.data.SieveJPARepositoryModules;
 import org.apache.james.modules.mailbox.DefaultEventModule;
@@ -33,6 +32,7 @@ import org.apache.james.modules.protocols.ManageSieveServerModule;
 import org.apache.james.modules.protocols.POP3ServerModule;
 import org.apache.james.modules.protocols.ProtocolHandlerModule;
 import org.apache.james.modules.protocols.SMTPServerModule;
+import org.apache.james.modules.queue.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.server.DataRoutesModules;
 import org.apache.james.modules.server.DefaultProcessorsConfigurationProviderModule;
 import org.apache.james.modules.server.ElasticSearchMetricReporterModule;
diff --git a/server/container/guice/jpa-smtp-common/pom.xml b/server/container/guice/jpa-smtp-common/pom.xml
index db42d5f..0e60340 100644
--- a/server/container/guice/jpa-smtp-common/pom.xml
+++ b/server/container/guice/jpa-smtp-common/pom.xml
@@ -39,10 +39,6 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-activemq</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-common</artifactId>
         </dependency>
         <dependency>
@@ -74,6 +70,10 @@
             <artifactId>james-server-jpa-common-guice</artifactId>
         </dependency>
         <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>queue-activemq-guice</artifactId>
+        </dependency>
+        <dependency>
             <groupId>com.linagora</groupId>
             <artifactId>logback-elasticsearch-appender</artifactId>
         </dependency>
diff --git a/server/container/guice/jpa-smtp-common/src/main/java/org/apache/james/JPAJamesServerMain.java b/server/container/guice/jpa-smtp-common/src/main/java/org/apache/james/JPAJamesServerMain.java
index c65f618..aba49c8 100644
--- a/server/container/guice/jpa-smtp-common/src/main/java/org/apache/james/JPAJamesServerMain.java
+++ b/server/container/guice/jpa-smtp-common/src/main/java/org/apache/james/JPAJamesServerMain.java
@@ -19,11 +19,11 @@
 
 package org.apache.james;
 
-import org.apache.james.modules.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.data.JPADataModule;
 import org.apache.james.modules.data.JPAEntityManagerModule;
 import org.apache.james.modules.protocols.ProtocolHandlerModule;
 import org.apache.james.modules.protocols.SMTPServerModule;
+import org.apache.james.modules.queue.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.server.DKIMMailetModule;
 import org.apache.james.modules.server.DataRoutesModules;
 import org.apache.james.modules.server.DefaultProcessorsConfigurationProviderModule;
diff --git a/server/container/guice/jpa-smtp/pom.xml b/server/container/guice/jpa-smtp/pom.xml
index 6e6a124..fcc1c92 100644
--- a/server/container/guice/jpa-smtp/pom.xml
+++ b/server/container/guice/jpa-smtp/pom.xml
@@ -58,10 +58,6 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-activemq</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-common</artifactId>
             <type>test-jar</type>
             <scope>test</scope>
@@ -76,6 +72,10 @@
             <artifactId>james-server-mailets</artifactId>
         </dependency>
         <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>queue-activemq-guice</artifactId>
+        </dependency>
+        <dependency>
             <groupId>io.rest-assured</groupId>
             <artifactId>rest-assured</artifactId>
             <scope>test</scope>
diff --git a/server/container/guice/pom.xml b/server/container/guice/pom.xml
index 6dd2108..a8230da 100644
--- a/server/container/guice/pom.xml
+++ b/server/container/guice/pom.xml
@@ -100,11 +100,6 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
-                <artifactId>james-server-guice-activemq</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${james.groupId}</groupId>
                 <artifactId>james-server-guice-configuration</artifactId>
                 <version>${project.version}</version>
             </dependency>
@@ -258,6 +253,11 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
+                <artifactId>queue-activemq-guice</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${james.groupId}</groupId>
                 <artifactId>queue-memory-guice</artifactId>
                 <version>${project.version}</version>
             </dependency>
diff --git a/server/container/guice/queue/activemq/pom.xml b/server/container/guice/queue/activemq/pom.xml
index 2268141..60fe58d 100644
--- a/server/container/guice/queue/activemq/pom.xml
+++ b/server/container/guice/queue/activemq/pom.xml
@@ -26,7 +26,7 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <artifactId>james-server-guice-activemq</artifactId>
+    <artifactId>queue-activemq-guice</artifactId>
 
     <name>Apache James :: Server :: Guice :: ActiveMQ</name>
     <description>Guice Module for ActiveMQ</description>
diff --git a/server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/activemq/ActiveMQQueueModule.java b/server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/queue/activemq/ActiveMQQueueModule.java
similarity index 98%
rename from server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/activemq/ActiveMQQueueModule.java
rename to server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/queue/activemq/ActiveMQQueueModule.java
index f6af3e0..58e02d8 100644
--- a/server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/activemq/ActiveMQQueueModule.java
+++ b/server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/queue/activemq/ActiveMQQueueModule.java
@@ -17,7 +17,7 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.modules.activemq;
+package org.apache.james.modules.queue.activemq;
 
 import javax.jms.ConnectionFactory;
 
diff --git a/server/mailet/integration-testing/pom.xml b/server/mailet/integration-testing/pom.xml
index 723e887..da1cfb0 100644
--- a/server/mailet/integration-testing/pom.xml
+++ b/server/mailet/integration-testing/pom.xml
@@ -55,11 +55,6 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-activemq</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-common</artifactId>
             <type>test-jar</type>
             <scope>test</scope>
@@ -100,6 +95,11 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
+            <artifactId>queue-activemq-guice</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
             <artifactId>testing-base</artifactId>
             <scope>test</scope>
         </dependency>
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
index d70c86a..30bd565 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AddFooterTest.java
@@ -32,7 +32,7 @@ import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.ProcessorConfiguration;
-import org.apache.james.modules.activemq.ActiveMQQueueModule;
+import org.apache.james.modules.queue.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
 import org.apache.james.probe.DataProbe;


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 06/08: JAMES-3440 Provide a mailbox listener to populate EmailQueryView

Posted by bt...@apache.org.
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 4dd396e1579236bd79dd07872ea0688a3f8fdede
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Nov 13 11:57:33 2020 +0700

    JAMES-3440 Provide a mailbox listener to populate EmailQueryView
---
 .../jmap/event/PopulateEmailQueryViewListener.java | 128 ++++++++++++++++
 .../event/PopulateEmailQueryViewListenerTest.java  | 166 +++++++++++++++++++++
 2 files changed, 294 insertions(+)

diff --git a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java
new file mode 100644
index 0000000..0251576
--- /dev/null
+++ b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java
@@ -0,0 +1,128 @@
+/****************************************************************
+ * 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.jmap.event;
+
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.util.Optional;
+
+import javax.inject.Inject;
+
+import org.apache.james.jmap.api.projections.EmailQueryView;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.MessageIdManager;
+import org.apache.james.mailbox.SessionProvider;
+import org.apache.james.mailbox.events.Event;
+import org.apache.james.mailbox.events.Group;
+import org.apache.james.mailbox.events.MailboxListener.ReactiveGroupMailboxListener;
+import org.apache.james.mailbox.model.FetchGroup;
+import org.apache.james.mailbox.model.MessageId;
+import org.apache.james.mailbox.model.MessageMetaData;
+import org.apache.james.mime4j.dom.Message;
+import org.apache.james.mime4j.stream.MimeConfig;
+import org.reactivestreams.Publisher;
+
+import com.github.fge.lambdas.Throwing;
+import com.google.common.collect.ImmutableList;
+
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+public class PopulateEmailQueryViewListener implements ReactiveGroupMailboxListener {
+    public static class PopulateEmailQueryViewListenerGroup extends Group {
+
+    }
+
+    static final Group GROUP = new PopulateEmailQueryViewListenerGroup();
+    private static final int CONCURRENCY = 5;
+
+    private final MessageIdManager messageIdManager;
+    private final EmailQueryView view;
+    private final SessionProvider sessionProvider;
+
+    @Inject
+    public PopulateEmailQueryViewListener(MessageIdManager messageIdManager, EmailQueryView view, SessionProvider sessionProvider) {
+        this.messageIdManager = messageIdManager;
+        this.view = view;
+        this.sessionProvider = sessionProvider;
+    }
+
+    @Override
+    public Group getDefaultGroup() {
+        return GROUP;
+    }
+
+    @Override
+    public boolean isHandling(Event event) {
+        return event instanceof Added
+            || event instanceof Expunged
+            || event instanceof MailboxDeletion;
+    }
+
+    @Override
+    public Publisher<Void> reactiveEvent(Event event) {
+        if (event instanceof Added) {
+            return handleAdded((Added) event);
+        }
+        if (event instanceof Expunged) {
+            return handleExpunged((Expunged) event);
+        }
+        if (event instanceof MailboxDeletion) {
+            return handleMailboxDeletion((MailboxDeletion) event);
+        }
+        return Mono.empty();
+    }
+
+    public Publisher<Void> handleMailboxDeletion(MailboxDeletion mailboxDeletion) {
+        return view.delete(mailboxDeletion.getMailboxId());
+    }
+
+    public Publisher<Void> handleExpunged(Expunged expunged) {
+        return Flux.fromStream(expunged.getUids().stream()
+            .map(uid -> expunged.getMetaData(uid).getMessageId()))
+            .concatMap(messageId -> view.delete(expunged.getMailboxId(), messageId))
+            .then();
+    }
+
+    public Mono<Void> handleAdded(Added added) {
+        MailboxSession session = sessionProvider.createSystemSession(added.getUsername());
+        return Flux.fromStream(added.getUids().stream()
+            .map(added::getMetaData))
+            .flatMap(messageMetaData -> handleAdded(added, messageMetaData, session), CONCURRENCY)
+            .then();
+    }
+
+    public Mono<Void> handleAdded(Added added, MessageMetaData messageMetaData, MailboxSession session) {
+        MessageId messageId = messageMetaData.getMessageId();
+        ZonedDateTime receivedAt = ZonedDateTime.ofInstant(messageMetaData.getInternalDate().toInstant(), ZoneOffset.UTC);
+
+        Mono<ZonedDateTime> sentAtMono = Flux.from(messageIdManager.getMessagesReactive(ImmutableList.of(messageId), FetchGroup.HEADERS, session))
+            .next()
+            .map(Throwing.function(messageResult -> Message.Builder
+                .of()
+                .use(MimeConfig.PERMISSIVE)
+                .parse(messageResult.getFullContent().getInputStream())
+                .build()))
+            .map(message -> Optional.ofNullable(message.getDate()).orElse(messageMetaData.getInternalDate()))
+            .map(date -> ZonedDateTime.ofInstant(date.toInstant(), ZoneOffset.UTC));
+
+        return sentAtMono.flatMap(sentAt -> view.save(added.getMailboxId(), sentAt, receivedAt, messageId));
+    }
+}
diff --git a/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/event/PopulateEmailQueryViewListenerTest.java b/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/event/PopulateEmailQueryViewListenerTest.java
new file mode 100644
index 0000000..a8a9293
--- /dev/null
+++ b/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/event/PopulateEmailQueryViewListenerTest.java
@@ -0,0 +1,166 @@
+/****************************************************************
+ * 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.jmap.event;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.time.ZonedDateTime;
+import java.util.Date;
+
+import org.apache.james.core.Username;
+import org.apache.james.jmap.memory.projections.MemoryEmailQueryView;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.MailboxSessionUtil;
+import org.apache.james.mailbox.MessageIdManager;
+import org.apache.james.mailbox.MessageManager;
+import org.apache.james.mailbox.events.Group;
+import org.apache.james.mailbox.events.InVMEventBus;
+import org.apache.james.mailbox.events.MemoryEventDeadLetters;
+import org.apache.james.mailbox.events.RetryBackoffConfiguration;
+import org.apache.james.mailbox.events.delivery.InVmEventDelivery;
+import org.apache.james.mailbox.inmemory.manager.InMemoryIntegrationResources;
+import org.apache.james.mailbox.model.ComposedMessageId;
+import org.apache.james.mailbox.model.MailboxId;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mailbox.store.FakeAuthenticator;
+import org.apache.james.mailbox.store.FakeAuthorizator;
+import org.apache.james.mailbox.store.SessionProviderImpl;
+import org.apache.james.mailbox.store.StoreMailboxManager;
+import org.apache.james.metrics.tests.RecordingMetricFactory;
+import org.apache.james.mime4j.dom.Message;
+import org.apache.james.util.streams.Limit;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import com.google.common.collect.ImmutableList;
+
+public class PopulateEmailQueryViewListenerTest {
+    private static final Username BOB = Username.of("bob");
+    private static final MailboxPath BOB_INBOX_PATH = MailboxPath.inbox(BOB);
+    private static final MailboxPath BOB_OTHER_BOX_PATH = MailboxPath.forUser(BOB, "otherBox");
+
+    MailboxSession mailboxSession;
+    StoreMailboxManager mailboxManager;
+
+    MessageManager inboxMessageManager;
+    MessageManager otherBoxMessageManager;
+    PopulateEmailQueryViewListener listener;
+    MessageIdManager messageIdManager;
+    private MemoryEmailQueryView view;
+    private MailboxId inboxId;
+
+    @BeforeEach
+    void setup() throws Exception {
+        // Default RetryBackoffConfiguration leads each events to be re-executed for 30s which is too long
+        // Reducing the wait time for the event bus allow a faster test suite execution without harming test correctness
+        RetryBackoffConfiguration backoffConfiguration = RetryBackoffConfiguration.builder()
+            .maxRetries(2)
+            .firstBackoff(Duration.ofMillis(1))
+            .jitterFactor(0.5)
+            .build();
+        InMemoryIntegrationResources resources = InMemoryIntegrationResources.builder()
+            .preProvisionnedFakeAuthenticator()
+            .fakeAuthorizator()
+            .eventBus(new InVMEventBus(new InVmEventDelivery(new RecordingMetricFactory()), backoffConfiguration, new MemoryEventDeadLetters()))
+            .defaultAnnotationLimits()
+            .defaultMessageParser()
+            .scanningSearchIndex()
+            .noPreDeletionHooks()
+            .storeQuotaManager()
+            .build();
+
+        mailboxManager = resources.getMailboxManager();
+        messageIdManager = resources.getMessageIdManager();
+
+        FakeAuthenticator authenticator = new FakeAuthenticator();
+        authenticator.addUser(BOB, "12345");
+        SessionProviderImpl sessionProvider = new SessionProviderImpl(authenticator, FakeAuthorizator.defaultReject());
+
+        view = new MemoryEmailQueryView();
+        listener = new PopulateEmailQueryViewListener(messageIdManager, view, sessionProvider);
+
+        resources.getEventBus().register(listener);
+
+        mailboxSession = MailboxSessionUtil.create(BOB);
+
+        inboxId = mailboxManager.createMailbox(BOB_INBOX_PATH, mailboxSession).get();
+        inboxMessageManager = mailboxManager.getMailbox(inboxId, mailboxSession);
+
+        MailboxId otherBoxId = mailboxManager.createMailbox(BOB_OTHER_BOX_PATH, mailboxSession).get();
+        otherBoxMessageManager = mailboxManager.getMailbox(otherBoxId, mailboxSession);
+    }
+
+
+    @Test
+    void deserializeMailboxAnnotationListenerGroup() throws Exception {
+        assertThat(Group.deserialize("org.apache.james.jmap.event.PopulateEmailQueryViewListener$PopulateEmailQueryViewListenerGroup"))
+            .isEqualTo(new PopulateEmailQueryViewListener.PopulateEmailQueryViewListenerGroup());
+    }
+
+    @Test
+    void appendingAMessageShouldAddItToTheView() throws Exception {
+        ComposedMessageId composedId = inboxMessageManager.appendMessage(
+            MessageManager.AppendCommand.builder()
+                .withInternalDate(Date.from(ZonedDateTime.parse("2014-10-30T15:12:00Z").toInstant()))
+                .build(emptyMessage(Date.from(ZonedDateTime.parse("2014-10-30T14:12:00Z").toInstant()))),
+            mailboxSession).getId();
+
+        assertThat(view.listMailboxContent(inboxId, Limit.limit(12)).collectList().block())
+            .containsOnly(composedId.getMessageId());
+    }
+
+    @Test
+    void deletingMailboxShouldClearTheView() throws Exception {
+        inboxMessageManager.appendMessage(
+            MessageManager.AppendCommand.builder()
+                .withInternalDate(Date.from(ZonedDateTime.parse("2014-10-30T15:12:00Z").toInstant()))
+                .build(emptyMessage(Date.from(ZonedDateTime.parse("2014-10-30T14:12:00Z").toInstant()))),
+            mailboxSession).getId();
+
+        mailboxManager.deleteMailbox(inboxId, mailboxSession);
+
+        assertThat(view.listMailboxContent(inboxId, Limit.limit(12)).collectList().block())
+            .isEmpty();
+    }
+
+    @Test
+    void deletingEmailShouldClearTheView() throws Exception {
+        ComposedMessageId composedMessageId = inboxMessageManager.appendMessage(
+            MessageManager.AppendCommand.builder()
+                .withInternalDate(Date.from(ZonedDateTime.parse("2014-10-30T15:12:00Z").toInstant()))
+                .build(emptyMessage(Date.from(ZonedDateTime.parse("2014-10-30T14:12:00Z").toInstant()))),
+            mailboxSession).getId();
+
+        inboxMessageManager.delete(ImmutableList.of(composedMessageId.getUid()), mailboxSession);
+
+        assertThat(view.listMailboxContent(inboxId, Limit.limit(12)).collectList().block())
+            .isEmpty();
+    }
+
+    private Message emptyMessage(Date sentAt) throws Exception {
+        return Message.Builder.of()
+            .setSubject("Empty message")
+            .setDate(sentAt)
+            .setBody("", StandardCharsets.UTF_8)
+            .build();
+    }
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 05/08: JAMES-1902 renames rabbitmq mailqueue guice bindings module

Posted by bt...@apache.org.
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 8ebf5df272c8e123686ce21b3f4d04a797222f0b
Author: Jean Helou <jh...@codamens.fr>
AuthorDate: Thu Nov 12 12:43:58 2020 +0100

    JAMES-1902 renames rabbitmq mailqueue guice bindings module
---
 .../mpt/smtp/CassandraRabbitMQAwsS3SmtpTestRuleFactory.java   |  2 +-
 server/container/guice/cassandra-guice/pom.xml                |  8 ++++----
 .../org/apache/james/CassandraRabbitMQJamesServerMain.java    |  2 +-
 server/container/guice/cassandra-rabbitmq-ldap-guice/pom.xml  |  6 +++---
 server/container/guice/pom.xml                                | 11 +++++------
 server/container/guice/queue/rabbitmq/pom.xml                 |  2 +-
 .../james/modules/{ => queue}/rabbitmq/RabbitMQModule.java    |  2 +-
 7 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/CassandraRabbitMQAwsS3SmtpTestRuleFactory.java b/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/CassandraRabbitMQAwsS3SmtpTestRuleFactory.java
index ae2271e..bb0bf7c 100644
--- a/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/CassandraRabbitMQAwsS3SmtpTestRuleFactory.java
+++ b/mpt/impl/smtp/cassandra-rabbitmq-object-storage/src/test/java/org/apache/james/mpt/smtp/CassandraRabbitMQAwsS3SmtpTestRuleFactory.java
@@ -35,7 +35,7 @@ import org.apache.james.modules.mailbox.KeyspacesConfiguration;
 import org.apache.james.modules.objectstorage.DefaultBucketModule;
 import org.apache.james.modules.objectstorage.aws.s3.DockerAwsS3TestRule;
 import org.apache.james.modules.protocols.SmtpGuiceProbe.SmtpServerConnectedType;
-import org.apache.james.modules.rabbitmq.RabbitMQModule;
+import org.apache.james.modules.queue.rabbitmq.RabbitMQModule;
 import org.apache.james.modules.server.CamelMailetContainerModule;
 import org.apache.james.queue.api.MailQueueItemDecoratorFactory;
 import org.apache.james.queue.api.RawMailQueueItemDecoratorFactory;
diff --git a/server/container/guice/cassandra-guice/pom.xml b/server/container/guice/cassandra-guice/pom.xml
index c3199e8..b358fd6 100644
--- a/server/container/guice/cassandra-guice/pom.xml
+++ b/server/container/guice/cassandra-guice/pom.xml
@@ -206,10 +206,6 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-rabbitmq</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${james.groupId}</groupId>
             <artifactId>james-server-guice-smtp</artifactId>
         </dependency>
         <dependency>
@@ -300,6 +296,10 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
+            <artifactId>queue-rabbitmq-guice</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
             <artifactId>quota-mailing-cassandra</artifactId>
         </dependency>
         <dependency>
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/main/java/org/apache/james/CassandraRabbitMQJamesServerMain.java b/server/container/guice/cassandra-rabbitmq-guice/src/main/java/org/apache/james/CassandraRabbitMQJamesServerMain.java
index 2e1dde8..c0c23d9 100644
--- a/server/container/guice/cassandra-rabbitmq-guice/src/main/java/org/apache/james/CassandraRabbitMQJamesServerMain.java
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/main/java/org/apache/james/CassandraRabbitMQJamesServerMain.java
@@ -27,7 +27,7 @@ import org.apache.james.modules.blobstore.BlobStoreCacheModulesChooser;
 import org.apache.james.modules.blobstore.BlobStoreConfiguration;
 import org.apache.james.modules.blobstore.BlobStoreModulesChooser;
 import org.apache.james.modules.event.RabbitMQEventBusModule;
-import org.apache.james.modules.rabbitmq.RabbitMQModule;
+import org.apache.james.modules.queue.rabbitmq.RabbitMQModule;
 import org.apache.james.modules.server.JMXServerModule;
 import org.apache.james.modules.server.RabbitMailQueueRoutesModule;
 
diff --git a/server/container/guice/cassandra-rabbitmq-ldap-guice/pom.xml b/server/container/guice/cassandra-rabbitmq-ldap-guice/pom.xml
index 588ae50..579bc8b 100644
--- a/server/container/guice/cassandra-rabbitmq-ldap-guice/pom.xml
+++ b/server/container/guice/cassandra-rabbitmq-ldap-guice/pom.xml
@@ -108,12 +108,12 @@
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-guice-rabbitmq</artifactId>
+            <artifactId>james-server-testing</artifactId>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
-            <artifactId>james-server-testing</artifactId>
-            <scope>test</scope>
+            <artifactId>queue-rabbitmq-guice</artifactId>
         </dependency>
         <dependency>
             <groupId>${james.groupId}</groupId>
diff --git a/server/container/guice/pom.xml b/server/container/guice/pom.xml
index a8230da..dc34571 100644
--- a/server/container/guice/pom.xml
+++ b/server/container/guice/pom.xml
@@ -159,12 +159,6 @@
                 <artifactId>james-server-guice-pop</artifactId>
                 <version>${project.version}</version>
             </dependency>
-
-            <dependency>
-                <groupId>${james.groupId}</groupId>
-                <artifactId>james-server-guice-rabbitmq</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
                 <artifactId>james-server-guice-sieve-file</artifactId>
@@ -258,6 +252,11 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
+                <artifactId>queue-rabbitmq-guice</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${james.groupId}</groupId>
                 <artifactId>queue-memory-guice</artifactId>
                 <version>${project.version}</version>
             </dependency>
diff --git a/server/container/guice/queue/rabbitmq/pom.xml b/server/container/guice/queue/rabbitmq/pom.xml
index 6f3747d..2981294 100644
--- a/server/container/guice/queue/rabbitmq/pom.xml
+++ b/server/container/guice/queue/rabbitmq/pom.xml
@@ -26,7 +26,7 @@
 	<relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <artifactId>james-server-guice-rabbitmq</artifactId>
+    <artifactId>queue-rabbitmq-guice</artifactId>
 
     <name>Apache James :: Server :: Guice :: RabbitMQ</name>
     <description>Guice Module for RabbitMQ</description>
diff --git a/server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java b/server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/queue/rabbitmq/RabbitMQModule.java
similarity index 99%
rename from server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java
rename to server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/queue/rabbitmq/RabbitMQModule.java
index 36cfa20..8f42fb6 100644
--- a/server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java
+++ b/server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/queue/rabbitmq/RabbitMQModule.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.modules.rabbitmq;
+package org.apache.james.modules.queue.rabbitmq;
 
 import java.io.FileNotFoundException;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 02/08: JAMES-1902 Moves rabbitmq mailqueue guice bindings

Posted by bt...@apache.org.
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 b3d4a666206db6fc87f2bc8a6ecf179ecd99eb8f
Author: Jean Helou <jh...@codamens.fr>
AuthorDate: Thu Nov 12 09:30:44 2020 +0100

    JAMES-1902 Moves rabbitmq mailqueue guice bindings
---
 server/container/guice/pom.xml                                          | 2 +-
 .../java/org/apache/james/modules/memory}/MemoryMailQueueModule.java    | 0
 server/container/guice/{ => queue}/rabbitmq/pom.xml                     | 2 +-
 .../src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java | 0
 4 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/container/guice/pom.xml b/server/container/guice/pom.xml
index aeb364f..d39672b 100644
--- a/server/container/guice/pom.xml
+++ b/server/container/guice/pom.xml
@@ -77,7 +77,7 @@
         <module>protocols/webadmin-swagger</module>
         <module>protocols/webadmin-mail-over-web</module>
         <module>queue/activemq</module>
-        <module>rabbitmq</module>
+        <module>queue/rabbitmq</module>
         <module>testing</module>
         <module>sieve-file</module>
         <module>sieve-jpa</module>
diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueModule.java b/server/container/guice/queue/memory/src/main/java/org/apache/james/modules/memory/MemoryMailQueueModule.java
similarity index 100%
rename from server/container/guice/memory-guice/src/main/java/org/apache/james/modules/server/MemoryMailQueueModule.java
rename to server/container/guice/queue/memory/src/main/java/org/apache/james/modules/memory/MemoryMailQueueModule.java
diff --git a/server/container/guice/rabbitmq/pom.xml b/server/container/guice/queue/rabbitmq/pom.xml
similarity index 98%
rename from server/container/guice/rabbitmq/pom.xml
rename to server/container/guice/queue/rabbitmq/pom.xml
index 5c4b0cc..6f3747d 100644
--- a/server/container/guice/rabbitmq/pom.xml
+++ b/server/container/guice/queue/rabbitmq/pom.xml
@@ -23,7 +23,7 @@
         <groupId>org.apache.james</groupId>
         <artifactId>james-server-guice</artifactId>
         <version>3.6.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
+	<relativePath>../../pom.xml</relativePath>
     </parent>
 
     <artifactId>james-server-guice-rabbitmq</artifactId>
diff --git a/server/container/guice/rabbitmq/src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java b/server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java
similarity index 100%
rename from server/container/guice/rabbitmq/src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java
rename to server/container/guice/queue/rabbitmq/src/main/java/org/apache/james/modules/rabbitmq/RabbitMQModule.java


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 01/08: JAMES-1902 Moves activemq mailqueue guice binding

Posted by bt...@apache.org.
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 847d17c5a743c0304f8901c8ac99c3dd65ab4ced
Author: Jean Helou <jh...@codamens.fr>
AuthorDate: Thu Nov 5 10:42:31 2020 +0100

    JAMES-1902 Moves activemq mailqueue guice binding
---
 server/container/guice/pom.xml                             | 14 ++++++++------
 server/container/guice/{ => queue}/activemq/pom.xml        |  2 +-
 .../apache/james/modules/activemq/ActiveMQQueueModule.java |  0
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/server/container/guice/pom.xml b/server/container/guice/pom.xml
index 392a3fe..aeb364f 100644
--- a/server/container/guice/pom.xml
+++ b/server/container/guice/pom.xml
@@ -33,7 +33,7 @@
     <name>Apache James :: Server :: Guice</name>
 
     <modules>
-        <module>activemq</module>
+
         <module>blob-api-guice</module>
         <module>blob-export-guice</module>
         <module>blob-memory-guice</module>
@@ -76,6 +76,7 @@
         <module>protocols/webadmin-rabbitmq-mailqueue</module>
         <module>protocols/webadmin-swagger</module>
         <module>protocols/webadmin-mail-over-web</module>
+        <module>queue/activemq</module>
         <module>rabbitmq</module>
         <module>testing</module>
         <module>sieve-file</module>
@@ -98,6 +99,11 @@
             </dependency>
             <dependency>
                 <groupId>${james.groupId}</groupId>
+                <artifactId>james-server-guice-activemq</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>${james.groupId}</groupId>
                 <artifactId>james-server-guice-configuration</artifactId>
                 <version>${project.version}</version>
             </dependency>
@@ -157,11 +163,7 @@
                 <artifactId>james-server-guice-pop</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>${james.groupId}</groupId>
-                <artifactId>james-server-guice-activemq</artifactId>
-                <version>${project.version}</version>
-            </dependency>
+
             <dependency>
                 <groupId>${james.groupId}</groupId>
                 <artifactId>james-server-guice-rabbitmq</artifactId>
diff --git a/server/container/guice/activemq/pom.xml b/server/container/guice/queue/activemq/pom.xml
similarity index 97%
rename from server/container/guice/activemq/pom.xml
rename to server/container/guice/queue/activemq/pom.xml
index efabaaa..2268141 100644
--- a/server/container/guice/activemq/pom.xml
+++ b/server/container/guice/queue/activemq/pom.xml
@@ -23,7 +23,7 @@
         <groupId>org.apache.james</groupId>
         <artifactId>james-server-guice</artifactId>
         <version>3.6.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
+        <relativePath>../../pom.xml</relativePath>
     </parent>
 
     <artifactId>james-server-guice-activemq</artifactId>
diff --git a/server/container/guice/activemq/src/main/java/org/apache/james/modules/activemq/ActiveMQQueueModule.java b/server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/activemq/ActiveMQQueueModule.java
similarity index 100%
rename from server/container/guice/activemq/src/main/java/org/apache/james/modules/activemq/ActiveMQQueueModule.java
rename to server/container/guice/queue/activemq/src/main/java/org/apache/james/modules/activemq/ActiveMQQueueModule.java


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 08/08: JAMES-3440 Configuration examples

Posted by bt...@apache.org.
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 fb48808e697c4e148d998df36e8efed2bbecb2ab
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Nov 13 12:37:26 2020 +0700

    JAMES-3440 Configuration examples
---
 .../cassandra-ldap/destination/conf/listeners.xml  |  8 ++++++
 .../destination/conf/listeners.xml                 |  8 ++++++
 .../destination/conf/listeners.xml                 |  8 ++++++
 .../guice/cassandra/destination/conf/listeners.xml |  8 ++++++
 .../jmap/event/PopulateEmailQueryViewListener.java | 30 +++++++++++++---------
 5 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/dockerfiles/run/guice/cassandra-ldap/destination/conf/listeners.xml b/dockerfiles/run/guice/cassandra-ldap/destination/conf/listeners.xml
index 8b217db..948cb92 100644
--- a/dockerfiles/run/guice/cassandra-ldap/destination/conf/listeners.xml
+++ b/dockerfiles/run/guice/cassandra-ldap/destination/conf/listeners.xml
@@ -31,4 +31,12 @@
   <preDeletionHook>
     <class>org.apache.james.vault.DeletedMessageVaultHook</class>
   </preDeletionHook>
+
+  <!-- Enable to populate JMAP EmailQueryView -->
+  <!--
+  <listener>
+    <class>org.apache.james.jmap.event.PopulateEmailQueryViewListener</class>
+    <async>true</async>
+  </listener>
+  -->
 </listeners>
\ No newline at end of file
diff --git a/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/listeners.xml b/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/listeners.xml
index 8b217db..948cb92 100644
--- a/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/listeners.xml
+++ b/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/listeners.xml
@@ -31,4 +31,12 @@
   <preDeletionHook>
     <class>org.apache.james.vault.DeletedMessageVaultHook</class>
   </preDeletionHook>
+
+  <!-- Enable to populate JMAP EmailQueryView -->
+  <!--
+  <listener>
+    <class>org.apache.james.jmap.event.PopulateEmailQueryViewListener</class>
+    <async>true</async>
+  </listener>
+  -->
 </listeners>
\ No newline at end of file
diff --git a/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/listeners.xml b/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/listeners.xml
index 8b217db..948cb92 100644
--- a/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/listeners.xml
+++ b/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/listeners.xml
@@ -31,4 +31,12 @@
   <preDeletionHook>
     <class>org.apache.james.vault.DeletedMessageVaultHook</class>
   </preDeletionHook>
+
+  <!-- Enable to populate JMAP EmailQueryView -->
+  <!--
+  <listener>
+    <class>org.apache.james.jmap.event.PopulateEmailQueryViewListener</class>
+    <async>true</async>
+  </listener>
+  -->
 </listeners>
\ No newline at end of file
diff --git a/dockerfiles/run/guice/cassandra/destination/conf/listeners.xml b/dockerfiles/run/guice/cassandra/destination/conf/listeners.xml
index 8b217db..948cb92 100644
--- a/dockerfiles/run/guice/cassandra/destination/conf/listeners.xml
+++ b/dockerfiles/run/guice/cassandra/destination/conf/listeners.xml
@@ -31,4 +31,12 @@
   <preDeletionHook>
     <class>org.apache.james.vault.DeletedMessageVaultHook</class>
   </preDeletionHook>
+
+  <!-- Enable to populate JMAP EmailQueryView -->
+  <!--
+  <listener>
+    <class>org.apache.james.jmap.event.PopulateEmailQueryViewListener</class>
+    <async>true</async>
+  </listener>
+  -->
 </listeners>
\ No newline at end of file
diff --git a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java
index 0251576..36a59ec 100644
--- a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java
+++ b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/event/PopulateEmailQueryViewListener.java
@@ -19,6 +19,7 @@
 
 package org.apache.james.jmap.event;
 
+import java.io.IOException;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.util.Optional;
@@ -32,9 +33,11 @@ import org.apache.james.mailbox.SessionProvider;
 import org.apache.james.mailbox.events.Event;
 import org.apache.james.mailbox.events.Group;
 import org.apache.james.mailbox.events.MailboxListener.ReactiveGroupMailboxListener;
+import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.FetchGroup;
 import org.apache.james.mailbox.model.MessageId;
 import org.apache.james.mailbox.model.MessageMetaData;
+import org.apache.james.mailbox.model.MessageResult;
 import org.apache.james.mime4j.dom.Message;
 import org.apache.james.mime4j.stream.MimeConfig;
 import org.reactivestreams.Publisher;
@@ -90,18 +93,18 @@ public class PopulateEmailQueryViewListener implements ReactiveGroupMailboxListe
         return Mono.empty();
     }
 
-    public Publisher<Void> handleMailboxDeletion(MailboxDeletion mailboxDeletion) {
+    private Publisher<Void> handleMailboxDeletion(MailboxDeletion mailboxDeletion) {
         return view.delete(mailboxDeletion.getMailboxId());
     }
 
-    public Publisher<Void> handleExpunged(Expunged expunged) {
+    private Publisher<Void> handleExpunged(Expunged expunged) {
         return Flux.fromStream(expunged.getUids().stream()
             .map(uid -> expunged.getMetaData(uid).getMessageId()))
             .concatMap(messageId -> view.delete(expunged.getMailboxId(), messageId))
             .then();
     }
 
-    public Mono<Void> handleAdded(Added added) {
+    private Mono<Void> handleAdded(Added added) {
         MailboxSession session = sessionProvider.createSystemSession(added.getUsername());
         return Flux.fromStream(added.getUids().stream()
             .map(added::getMetaData))
@@ -109,20 +112,23 @@ public class PopulateEmailQueryViewListener implements ReactiveGroupMailboxListe
             .then();
     }
 
-    public Mono<Void> handleAdded(Added added, MessageMetaData messageMetaData, MailboxSession session) {
+    private Mono<Void> handleAdded(Added added, MessageMetaData messageMetaData, MailboxSession session) {
         MessageId messageId = messageMetaData.getMessageId();
         ZonedDateTime receivedAt = ZonedDateTime.ofInstant(messageMetaData.getInternalDate().toInstant(), ZoneOffset.UTC);
 
-        Mono<ZonedDateTime> sentAtMono = Flux.from(messageIdManager.getMessagesReactive(ImmutableList.of(messageId), FetchGroup.HEADERS, session))
+        return Flux.from(messageIdManager.getMessagesReactive(ImmutableList.of(messageId), FetchGroup.HEADERS, session))
             .next()
-            .map(Throwing.function(messageResult -> Message.Builder
-                .of()
-                .use(MimeConfig.PERMISSIVE)
-                .parse(messageResult.getFullContent().getInputStream())
-                .build()))
+            .map(Throwing.function(this::parseMessage))
             .map(message -> Optional.ofNullable(message.getDate()).orElse(messageMetaData.getInternalDate()))
-            .map(date -> ZonedDateTime.ofInstant(date.toInstant(), ZoneOffset.UTC));
+            .map(date -> ZonedDateTime.ofInstant(date.toInstant(), ZoneOffset.UTC))
+            .flatMap(sentAt -> view.save(added.getMailboxId(), sentAt, receivedAt, messageId));
+    }
 
-        return sentAtMono.flatMap(sentAt -> view.save(added.getMailboxId(), sentAt, receivedAt, messageId));
+    private Message parseMessage(MessageResult messageResult) throws IOException, MailboxException {
+        return Message.Builder
+            .of()
+            .use(MimeConfig.PERMISSIVE)
+            .parse(messageResult.getFullContent().getInputStream())
+            .build();
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 07/08: JAMES-3440 Guice bindings for EmailQueryView

Posted by bt...@apache.org.
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 6c5ab40913e61ae529e73628cdb1da9e5c727d06
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Nov 13 12:35:09 2020 +0700

    JAMES-3440 Guice bindings for EmailQueryView
---
 .../main/java/org/apache/james/modules/data/CassandraJmapModule.java | 5 +++++
 .../java/org/apache/james/modules/data/MemoryDataJmapModule.java     | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraJmapModule.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraJmapModule.java
index fa055af..e970220 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraJmapModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraJmapModule.java
@@ -27,6 +27,7 @@ import org.apache.james.eventsourcing.eventstore.cassandra.dto.EventDTOModule;
 import org.apache.james.jmap.api.access.AccessTokenRepository;
 import org.apache.james.jmap.api.filtering.FilteringManagement;
 import org.apache.james.jmap.api.filtering.impl.EventSourcingFilteringManagement;
+import org.apache.james.jmap.api.projections.EmailQueryView;
 import org.apache.james.jmap.api.projections.MessageFastViewProjection;
 import org.apache.james.jmap.api.projections.MessageFastViewProjectionHealthCheck;
 import org.apache.james.jmap.api.vacation.NotificationRegistry;
@@ -34,6 +35,7 @@ import org.apache.james.jmap.api.vacation.VacationRepository;
 import org.apache.james.jmap.cassandra.access.CassandraAccessModule;
 import org.apache.james.jmap.cassandra.access.CassandraAccessTokenRepository;
 import org.apache.james.jmap.cassandra.filtering.FilteringRuleSetDefineDTOModules;
+import org.apache.james.jmap.cassandra.projections.CassandraEmailQueryView;
 import org.apache.james.jmap.cassandra.projections.CassandraMessageFastViewProjection;
 import org.apache.james.jmap.cassandra.projections.CassandraMessageFastViewProjectionModule;
 import org.apache.james.jmap.cassandra.vacation.CassandraNotificationRegistry;
@@ -69,6 +71,9 @@ public class CassandraJmapModule extends AbstractModule {
             .addBinding()
             .to(MessageFastViewProjectionHealthCheck.class);
 
+        bind(CassandraEmailQueryView.class).in(Scopes.SINGLETON);
+        bind(EmailQueryView.class).to(CassandraEmailQueryView.class);
+
         Multibinder<CassandraModule> cassandraDataDefinitions = Multibinder.newSetBinder(binder(), CassandraModule.class);
         cassandraDataDefinitions.addBinding().toInstance(CassandraAccessModule.MODULE);
         cassandraDataDefinitions.addBinding().toInstance(CassandraVacationModule.MODULE);
diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataJmapModule.java b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataJmapModule.java
index c8fa545..fde7004 100644
--- a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataJmapModule.java
+++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataJmapModule.java
@@ -23,11 +23,13 @@ import org.apache.james.core.healthcheck.HealthCheck;
 import org.apache.james.jmap.api.access.AccessTokenRepository;
 import org.apache.james.jmap.api.filtering.FilteringManagement;
 import org.apache.james.jmap.api.filtering.impl.EventSourcingFilteringManagement;
+import org.apache.james.jmap.api.projections.EmailQueryView;
 import org.apache.james.jmap.api.projections.MessageFastViewProjection;
 import org.apache.james.jmap.api.projections.MessageFastViewProjectionHealthCheck;
 import org.apache.james.jmap.api.vacation.NotificationRegistry;
 import org.apache.james.jmap.api.vacation.VacationRepository;
 import org.apache.james.jmap.memory.access.MemoryAccessTokenRepository;
+import org.apache.james.jmap.memory.projections.MemoryEmailQueryView;
 import org.apache.james.jmap.memory.projections.MemoryMessageFastViewProjection;
 import org.apache.james.jmap.memory.vacation.MemoryNotificationRegistry;
 import org.apache.james.jmap.memory.vacation.MemoryVacationRepository;
@@ -61,6 +63,9 @@ public class MemoryDataJmapModule extends AbstractModule {
         bind(MemoryMessageFastViewProjection.class).in(Scopes.SINGLETON);
         bind(MessageFastViewProjection.class).to(MemoryMessageFastViewProjection.class);
 
+        bind(MemoryEmailQueryView.class).in(Scopes.SINGLETON);
+        bind(EmailQueryView.class).to(MemoryEmailQueryView.class);
+
         bind(MessageFastViewProjectionHealthCheck.class).in(Scopes.SINGLETON);
         Multibinder.newSetBinder(binder(), HealthCheck.class)
             .addBinding()


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org