james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [04/20] james-project git commit: JAMES-2151 Bound SieveQuotaRoutes with guice
Date Tue, 26 Jun 2018 09:13:00 GMT
JAMES-2151 Bound SieveQuotaRoutes with guice


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/27c84365
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/27c84365
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/27c84365

Branch: refs/heads/master
Commit: 27c8436550ba7d1a63aac751ab661ca7cf624e76
Parents: e8d5319
Author: benwa <btellier@linagora.com>
Authored: Wed Jun 20 16:18:50 2018 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Jun 26 16:06:31 2018 +0700

----------------------------------------------------------------------
 .../apache/james/CassandraJamesServerMain.java  |  4 ++-
 .../data/CassandraSieveRepositoryModule.java    |  2 ++
 .../modules/data/SieveFileRepositoryModule.java |  2 ++
 .../org/apache/james/JPAJamesServerMain.java    |  4 ++-
 .../org/apache/james/MemoryJamesServerMain.java |  4 ++-
 .../modules/server/SieveQuotaRoutesModule.java  | 35 ++++++++++++++++++++
 6 files changed, 48 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/27c84365/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
----------------------------------------------------------------------
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 4878e1e..240cf8a 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
@@ -51,6 +51,7 @@ import org.apache.james.modules.server.JMXServerModule;
 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.SieveQuotaRoutesModule;
 import org.apache.james.modules.server.SwaggerRoutesModule;
 import org.apache.james.modules.server.WebAdminServerModule;
 import org.apache.james.modules.spamassassin.SpamAssassinListenerModule;
@@ -69,7 +70,8 @@ public class CassandraJamesServerMain {
         new MailRepositoriesRoutesModule(),
         new SwaggerRoutesModule(),
         new WebAdminServerModule(),
-        new DLPRoutesModule());
+        new DLPRoutesModule(),
+        new SieveQuotaRoutesModule());
 
     public static final Module PROTOCOLS = Modules.combine(
         new CassandraJmapModule(),

http://git-wip-us.apache.org/repos/asf/james-project/blob/27c84365/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraSieveRepositoryModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraSieveRepositoryModule.java
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraSieveRepositoryModule.java
index 9021a53..f4947b8 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraSieveRepositoryModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraSieveRepositoryModule.java
@@ -21,6 +21,7 @@ package org.apache.james.modules.data;
 
 import org.apache.james.backends.cassandra.components.CassandraModule;
 import org.apache.james.sieve.cassandra.CassandraSieveRepository;
+import org.apache.james.sieverepository.api.SieveQuotaRepository;
 import org.apache.james.sieverepository.api.SieveRepository;
 
 import com.google.inject.AbstractModule;
@@ -33,6 +34,7 @@ public class CassandraSieveRepositoryModule extends AbstractModule {
     protected void configure() {
         bind(CassandraSieveRepository.class).in(Scopes.SINGLETON);
         bind(SieveRepository.class).to(CassandraSieveRepository.class);
+        bind(SieveQuotaRepository.class).to(CassandraSieveRepository.class);
 
         Multibinder<CassandraModule> cassandraDataDefinitions = Multibinder.newSetBinder(binder(),
CassandraModule.class);
         cassandraDataDefinitions.addBinding().to(org.apache.james.sieve.cassandra.CassandraSieveRepositoryModule.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/27c84365/server/container/guice/guice-common/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java
index c6b36fd..d27d1a3 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/data/SieveFileRepositoryModule.java
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.modules.data;
 
+import org.apache.james.sieverepository.api.SieveQuotaRepository;
 import org.apache.james.sieverepository.api.SieveRepository;
 import org.apache.james.sieverepository.file.SieveFileRepository;
 
@@ -31,6 +32,7 @@ public class SieveFileRepositoryModule extends AbstractModule {
         bind(SieveFileRepository.class).in(Scopes.SINGLETON);
 
         bind(SieveRepository.class).to(SieveFileRepository.class);
+        bind(SieveQuotaRepository.class).to(SieveFileRepository.class);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/27c84365/server/container/guice/jpa-guice/src/main/java/org/apache/james/JPAJamesServerMain.java
----------------------------------------------------------------------
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 743d25c..bd5f5cb 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
@@ -41,6 +41,7 @@ import org.apache.james.modules.server.MailRepositoriesRoutesModule;
 import org.apache.james.modules.server.MailboxRoutesModule;
 import org.apache.james.modules.server.NoJwtModule;
 import org.apache.james.modules.server.RawPostDequeueDecoratorModule;
+import org.apache.james.modules.server.SieveQuotaRoutesModule;
 import org.apache.james.modules.server.SwaggerRoutesModule;
 import org.apache.james.modules.server.WebAdminServerModule;
 import org.apache.james.modules.spamassassin.SpamAssassinListenerModule;
@@ -57,7 +58,8 @@ public class JPAJamesServerMain {
         new MailboxRoutesModule(),
         new MailQueueRoutesModule(),
         new MailRepositoriesRoutesModule(),
-        new SwaggerRoutesModule());
+        new SwaggerRoutesModule(),
+        new SieveQuotaRoutesModule());
 
     public static final Module PROTOCOLS = Modules.combine(
         new IMAPServerModule(),

http://git-wip-us.apache.org/repos/asf/james-project/blob/27c84365/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
----------------------------------------------------------------------
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 fc80fe6..7c5b961 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
@@ -41,6 +41,7 @@ import org.apache.james.modules.server.MailRepositoriesRoutesModule;
 import org.apache.james.modules.server.MailboxRoutesModule;
 import org.apache.james.modules.server.MemoryMailQueueModule;
 import org.apache.james.modules.server.RawPostDequeueDecoratorModule;
+import org.apache.james.modules.server.SieveQuotaRoutesModule;
 import org.apache.james.modules.server.SwaggerRoutesModule;
 import org.apache.james.modules.server.WebAdminServerModule;
 import org.apache.james.modules.spamassassin.SpamAssassinListenerModule;
@@ -58,7 +59,8 @@ public class MemoryJamesServerMain {
         new MailQueueRoutesModule(),
         new MailRepositoriesRoutesModule(),
         new SwaggerRoutesModule(),
-        new DLPRoutesModule());
+        new DLPRoutesModule(),
+        new SieveQuotaRoutesModule());
 
     public static final Module PROTOCOLS = Modules.combine(
         new IMAPServerModule(),

http://git-wip-us.apache.org/repos/asf/james-project/blob/27c84365/server/container/guice/protocols/webadmin-data/src/main/java/org/apache/james/modules/server/SieveQuotaRoutesModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/webadmin-data/src/main/java/org/apache/james/modules/server/SieveQuotaRoutesModule.java
b/server/container/guice/protocols/webadmin-data/src/main/java/org/apache/james/modules/server/SieveQuotaRoutesModule.java
new file mode 100644
index 0000000..27fdcbb
--- /dev/null
+++ b/server/container/guice/protocols/webadmin-data/src/main/java/org/apache/james/modules/server/SieveQuotaRoutesModule.java
@@ -0,0 +1,35 @@
+/****************************************************************
+ * 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.modules.server;
+
+import org.apache.james.webadmin.Routes;
+import org.apache.james.webadmin.routes.SieveQuotaRoutes;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.multibindings.Multibinder;
+
+public class SieveQuotaRoutesModule extends AbstractModule {
+    @Override
+    protected void configure() {
+        Multibinder.newSetBinder(binder(), Routes.class)
+            .addBinding()
+            .to(SieveQuotaRoutes.class);
+    }
+}


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


Mime
View raw message