You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2024/06/27 04:41:22 UTC
(james-project) 03/05: [ENHANCEMENT] Better reactify Identity methods - update for Postgres
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch postgres-doc-tmp
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 58810c3332c85942827b680ec0ffbe0d96393552
Author: Tung Tran <vt...@linagora.com>
AuthorDate: Wed Jun 26 18:07:39 2024 +0700
[ENHANCEMENT] Better reactify Identity methods - update for Postgres
---
.../apache/james/rrt/postgres/PostgresRecipientRewriteTable.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/server/data/data-postgres/src/main/java/org/apache/james/rrt/postgres/PostgresRecipientRewriteTable.java b/server/data/data-postgres/src/main/java/org/apache/james/rrt/postgres/PostgresRecipientRewriteTable.java
index f0ff1bfc0e..be6cd20ba4 100644
--- a/server/data/data-postgres/src/main/java/org/apache/james/rrt/postgres/PostgresRecipientRewriteTable.java
+++ b/server/data/data-postgres/src/main/java/org/apache/james/rrt/postgres/PostgresRecipientRewriteTable.java
@@ -36,6 +36,8 @@ import org.apache.james.rrt.lib.MappingsImpl;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
+import reactor.core.publisher.Flux;
+
public class PostgresRecipientRewriteTable extends AbstractRecipientRewriteTable {
private PostgresRecipientRewriteTableDAO postgresRecipientRewriteTableDAO;
@@ -85,4 +87,10 @@ public class PostgresRecipientRewriteTable extends AbstractRecipientRewriteTable
return postgresRecipientRewriteTableDAO.getSources(mapping).toStream();
}
+ @Override
+ public Flux<MappingSource> listSourcesReactive(Mapping mapping) {
+ Preconditions.checkArgument(listSourcesSupportedType.contains(mapping.getType()),
+ "Not supported mapping of type %s", mapping.getType());
+ return postgresRecipientRewriteTableDAO.getSources(mapping);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org