james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [02/24] james-project git commit: JAMES-2366 Get ride of getUserDomainMappingsInternal useless RRT method
Date Fri, 20 Apr 2018 02:12:47 GMT
JAMES-2366 Get ride of getUserDomainMappingsInternal useless RRT method


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

Branch: refs/heads/master
Commit: 2001f8c9564b0d13519d6d55a6461d1b85d88a37
Parents: 25589cb
Author: benwa <btellier@linagora.com>
Authored: Fri Apr 6 09:48:37 2018 +0700
Committer: benwa <btellier@linagora.com>
Committed: Thu Apr 19 11:12:06 2018 +0700

----------------------------------------------------------------------
 .../cassandra/CassandraRecipientRewriteTable.java   |  2 +-
 .../james/rrt/file/XMLRecipientRewriteTable.java    |  2 +-
 .../james/rrt/hbase/HBaseRecipientRewriteTable.java |  2 +-
 .../james/rrt/jdbc/JDBCRecipientRewriteTable.java   |  2 +-
 .../james/rrt/jpa/JPARecipientRewriteTable.java     |  2 +-
 .../rrt/lib/AbstractRecipientRewriteTable.java      | 16 ----------------
 .../rrt/memory/MemoryRecipientRewriteTable.java     |  2 +-
 7 files changed, 6 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/2001f8c9/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/CassandraRecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/CassandraRecipientRewriteTable.java
b/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/CassandraRecipientRewriteTable.java
index c41ae1b..863857f 100644
--- a/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/CassandraRecipientRewriteTable.java
+++ b/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/CassandraRecipientRewriteTable.java
@@ -112,7 +112,7 @@ public class CassandraRecipientRewriteTable extends AbstractRecipientRewriteTabl
     }
 
     @Override
-    protected Mappings getUserDomainMappingsInternal(String user, Domain domain) {
+    public Mappings getUserDomainMappings(String user, Domain domain) {
         return retrieveMappings(user, domain)
             .orElse(null);
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/2001f8c9/server/data/data-file/src/main/java/org/apache/james/rrt/file/XMLRecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-file/src/main/java/org/apache/james/rrt/file/XMLRecipientRewriteTable.java
b/server/data/data-file/src/main/java/org/apache/james/rrt/file/XMLRecipientRewriteTable.java
index de67ca7..31bbb6c 100644
--- a/server/data/data-file/src/main/java/org/apache/james/rrt/file/XMLRecipientRewriteTable.java
+++ b/server/data/data-file/src/main/java/org/apache/james/rrt/file/XMLRecipientRewriteTable.java
@@ -66,7 +66,7 @@ public class XMLRecipientRewriteTable extends AbstractRecipientRewriteTable
{
     }
 
     @Override
-    protected Mappings getUserDomainMappingsInternal(String user, Domain domain) throws RecipientRewriteTableException
{
+    public Mappings getUserDomainMappings(String user, Domain domain) throws RecipientRewriteTableException
{
         if (mappings == null) {
             return null;
         } else {

http://git-wip-us.apache.org/repos/asf/james-project/blob/2001f8c9/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
b/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
index 98301b5..ff37108 100644
--- a/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
+++ b/server/data/data-hbase/src/main/java/org/apache/james/rrt/hbase/HBaseRecipientRewriteTable.java
@@ -72,7 +72,7 @@ public class HBaseRecipientRewriteTable extends AbstractRecipientRewriteTable
{
     }
 
     @Override
-    protected Mappings getUserDomainMappingsInternal(String user, Domain domain) throws
+    public Mappings getUserDomainMappings(String user, Domain domain) throws
             RecipientRewriteTableException {
         HTableInterface table = null;
         Mappings list = MappingsImpl.empty();

http://git-wip-us.apache.org/repos/asf/james-project/blob/2001f8c9/server/data/data-jdbc/src/main/java/org/apache/james/rrt/jdbc/JDBCRecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-jdbc/src/main/java/org/apache/james/rrt/jdbc/JDBCRecipientRewriteTable.java
b/server/data/data-jdbc/src/main/java/org/apache/james/rrt/jdbc/JDBCRecipientRewriteTable.java
index eb9ae06..64b6a49 100644
--- a/server/data/data-jdbc/src/main/java/org/apache/james/rrt/jdbc/JDBCRecipientRewriteTable.java
+++ b/server/data/data-jdbc/src/main/java/org/apache/james/rrt/jdbc/JDBCRecipientRewriteTable.java
@@ -227,7 +227,7 @@ public class JDBCRecipientRewriteTable extends AbstractRecipientRewriteTable
{
     }
 
     @Override
-    protected Mappings getUserDomainMappingsInternal(String user, Domain domain) throws RecipientRewriteTableException
{
+    public Mappings getUserDomainMappings(String user, Domain domain) throws RecipientRewriteTableException
{
         Connection conn = null;
         PreparedStatement mappingStmt = null;
         try {

http://git-wip-us.apache.org/repos/asf/james-project/blob/2001f8c9/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java
b/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java
index 87a6fa7..7740bf6 100644
--- a/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java
+++ b/server/data/data-jpa/src/main/java/org/apache/james/rrt/jpa/JPARecipientRewriteTable.java
@@ -112,7 +112,7 @@ public class JPARecipientRewriteTable extends AbstractRecipientRewriteTable
{
     }
 
     @Override
-    protected Mappings getUserDomainMappingsInternal(String user, Domain domain) throws RecipientRewriteTableException
{
+    public Mappings getUserDomainMappings(String user, Domain domain) throws RecipientRewriteTableException
{
         EntityManager entityManager = entityManagerFactory.createEntityManager();
         final EntityTransaction transaction = entityManager.getTransaction();
         try {

http://git-wip-us.apache.org/repos/asf/james-project/blob/2001f8c9/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
index e1b9035..bb82a8e 100644
--- a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
+++ b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
@@ -313,11 +313,6 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT
     }
 
     @Override
-    public Mappings getUserDomainMappings(String user, Domain domain) throws RecipientRewriteTableException
{
-        return getUserDomainMappingsInternal(user, domain);
-    }
-
-    @Override
     public void addAliasDomainMapping(Domain aliasDomain, Domain realDomain) throws RecipientRewriteTableException
{
         LOGGER.info("Add domain mapping: {} => {}", aliasDomain, realDomain);
         addMappingInternal(null, aliasDomain, MappingImpl.domain(realDomain));
@@ -372,17 +367,6 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT
     protected abstract void removeMappingInternal(String user, Domain domain, Mapping mapping)
throws RecipientRewriteTableException;
 
     /**
-     * Return Collection of all mappings for the given username and domain
-     * 
-     * @param user
-     *            the user
-     * @param domain
-     *            the domain
-     * @return Collection which hold the mappings
-     */
-    protected abstract Mappings getUserDomainMappingsInternal(String user, Domain domain)
throws RecipientRewriteTableException;
-
-    /**
      * Return a Map which holds all Mappings
      * 
      * @return Map

http://git-wip-us.apache.org/repos/asf/james-project/blob/2001f8c9/server/data/data-memory/src/main/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTable.java
----------------------------------------------------------------------
diff --git a/server/data/data-memory/src/main/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTable.java
b/server/data/data-memory/src/main/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTable.java
index 761373b..79bf3da 100644
--- a/server/data/data-memory/src/main/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTable.java
+++ b/server/data/data-memory/src/main/java/org/apache/james/rrt/memory/MemoryRecipientRewriteTable.java
@@ -103,7 +103,7 @@ public class MemoryRecipientRewriteTable extends AbstractRecipientRewriteTable
{
     }
 
     @Override
-    protected Mappings getUserDomainMappingsInternal(String user, Domain domain) {
+    public Mappings getUserDomainMappings(String user, Domain domain) {
         return retrieveMappings(user, domain)
             .orElse(null);
     }


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