From bd89cf022bd2ca0f39b7c59d20527bc43d9a5f51 Mon Sep 17 00:00:00 2001
From: VK-SMILECDR <88211153+VK-SMILECDR@users.noreply.github.com>
Date: Thu, 9 Dec 2021 17:05:42 -0500
Subject: [PATCH] Improve mail service (#3230)
* move mail config to mail service constructor
* update subscription email sender
* added license text
* [2669] bump HAPI version to 5.7.0-PRE6-SNAPSHOT
* add changelog
---
hapi-deployable-pom/pom.xml | 2 +-
hapi-fhir-android/pom.xml | 2 +-
hapi-fhir-base/pom.xml | 2 +-
hapi-fhir-batch/pom.xml | 2 +-
hapi-fhir-bom/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +-
hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +-
hapi-fhir-cli/pom.xml | 2 +-
hapi-fhir-client-okhttp/pom.xml | 2 +-
hapi-fhir-client/pom.xml | 2 +-
hapi-fhir-converter/pom.xml | 2 +-
hapi-fhir-dist/pom.xml | 2 +-
hapi-fhir-docs/pom.xml | 2 +-
.../5_7_0/3230-improve-mail-service.yaml | 3 ++
hapi-fhir-jacoco/pom.xml | 2 +-
hapi-fhir-jaxrsserver-base/pom.xml | 2 +-
hapi-fhir-jpa/pom.xml | 2 +-
hapi-fhir-jpaserver-base/pom.xml | 2 +-
.../uhn/fhir/jpa/config/TestDstu3Config.java | 15 +++----
.../email/EmailSenderImplTest.java | 11 +++--
.../email/EmailSubscriptionDstu2Test.java | 13 +++---
.../email/EmailSubscriptionDstu3Test.java | 22 +++++-----
hapi-fhir-jpaserver-cql/pom.xml | 2 +-
hapi-fhir-jpaserver-mdm/pom.xml | 2 +-
hapi-fhir-jpaserver-model/pom.xml | 2 +-
hapi-fhir-jpaserver-searchparam/pom.xml | 2 +-
hapi-fhir-jpaserver-subscription/pom.xml | 2 +-
.../match/deliver/email/EmailSenderImpl.java | 19 ++++-----
hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +-
hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +-
hapi-fhir-server-mdm/pom.xml | 2 +-
hapi-fhir-server-openapi/pom.xml | 2 +-
hapi-fhir-server/pom.xml | 2 +-
.../uhn/fhir/rest/server/mail/IMailSvc.java | 38 +++++++++++++++++
.../ca/uhn/fhir/rest/server/mail/MailSvc.java | 41 ++++++++++---------
.../uhn/fhir/rest/server/mail/MailSvcIT.java | 16 +++-----
...java => ResourceOperationMessageTest.java} | 0
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../hapi-fhir-spring-boot-samples/pom.xml | 2 +-
.../hapi-fhir-spring-boot-starter/pom.xml | 2 +-
hapi-fhir-spring-boot/pom.xml | 2 +-
hapi-fhir-sql-migrate/pom.xml | 2 +-
hapi-fhir-storage/pom.xml | 2 +-
hapi-fhir-structures-dstu2.1/pom.xml | 2 +-
hapi-fhir-structures-dstu2/pom.xml | 2 +-
hapi-fhir-structures-dstu3/pom.xml | 2 +-
hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +-
hapi-fhir-structures-r4/pom.xml | 2 +-
hapi-fhir-structures-r5/pom.xml | 2 +-
hapi-fhir-test-utilities/pom.xml | 2 +-
hapi-fhir-testpage-overlay/pom.xml | 2 +-
.../pom.xml | 2 +-
hapi-fhir-validation-resources-dstu2/pom.xml | 2 +-
hapi-fhir-validation-resources-dstu3/pom.xml | 2 +-
hapi-fhir-validation-resources-r4/pom.xml | 2 +-
hapi-fhir-validation-resources-r5/pom.xml | 2 +-
hapi-fhir-validation/pom.xml | 2 +-
hapi-tinder-plugin/pom.xml | 16 ++++----
hapi-tinder-test/pom.xml | 2 +-
pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
67 files changed, 173 insertions(+), 133 deletions(-)
create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/3230-improve-mail-service.yaml
create mode 100644 hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/IMailSvc.java
rename hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/{BaseResourceModifiedMessageTest.java => ResourceOperationMessageTest.java} (100%)
diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index c947c601f61..85dc12952a0 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index 2a12e1be615..89b110dc730 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 186d4237e7e..439d47119f0 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-batch/pom.xml b/hapi-fhir-batch/pom.xml
index aef49abd551..4a75321076b 100644
--- a/hapi-fhir-batch/pom.xml
+++ b/hapi-fhir-batch/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index d108f02965b..7c6ba3f7ad6 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -10,7 +10,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index 5acb12af54c..81e4980769b 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index a0c8e5d216b..340898f7527 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
index b05bf7d2c20..2ceb0f92c71 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../../hapi-deployable-pom
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index f5b60f0db09..acc22c0edc9 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index 37e8301fe05..c69a7458598 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index 8f41896b0dc..a9790bb406d 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index 50f88dda261..3506fe85676 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index 5a0a86e2897..5688d3d3d88 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index e59e48fe8a2..5cf297785c9 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/3230-improve-mail-service.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/3230-improve-mail-service.yaml
new file mode 100644
index 00000000000..2b2de9609a9
--- /dev/null
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/3230-improve-mail-service.yaml
@@ -0,0 +1,3 @@
+---
+type: change
+title: "Add email configuration to MailSvc constructor"
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index 46f05a91fa8..f38b69c835b 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index 290056b8b65..df2bc57b79f 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index a7d69d03a25..f2b67e44a85 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml
index 251d39e3436..689cc8d0b4b 100644
--- a/hapi-fhir-jpaserver-base/pom.xml
+++ b/hapi-fhir-jpaserver-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java
index a2c11283658..393c22b5ec5 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java
@@ -1,21 +1,18 @@
package ca.uhn.fhir.jpa.config;
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
-import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer;
import ca.uhn.fhir.jpa.subscription.match.deliver.email.EmailSenderImpl;
import ca.uhn.fhir.jpa.subscription.match.deliver.email.IEmailSender;
import ca.uhn.fhir.jpa.util.CircularQueueCaptureQueriesListener;
import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
+import ca.uhn.fhir.rest.server.mail.IMailSvc;
import ca.uhn.fhir.rest.server.mail.MailConfig;
+import ca.uhn.fhir.rest.server.mail.MailSvc;
import ca.uhn.fhir.validation.ResultSeverityEnum;
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
import org.apache.commons.dbcp2.BasicDataSource;
import org.hibernate.dialect.H2Dialect;
-import org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings;
-import org.hibernate.search.backend.lucene.cfg.LuceneIndexSettings;
-import org.hibernate.search.engine.cfg.BackendSettings;
-import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -32,8 +29,6 @@ import java.util.Map;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
-import static ca.uhn.fhir.jpa.dao.BaseJpaTest.buildHeapLuceneHibernateSearchProperties;
-import static ca.uhn.fhir.jpa.dao.BaseJpaTest.buildHibernateSearchProperties;
import static org.junit.jupiter.api.Assertions.fail;
@Configuration
@@ -65,7 +60,7 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 {
ourLog.error("Exceeded maximum wait for connection", e);
logGetConnectionStackTrace();
// if ("true".equals(System.getStringProperty("ci"))) {
- fail("Exceeded maximum wait for connection: " + e.toString());
+ fail("Exceeded maximum wait for connection: " + e);
// }
// System.exit(1);
retVal = null;
@@ -138,7 +133,9 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 {
@Bean
public IEmailSender emailSender() {
- return new EmailSenderImpl(new MailConfig().setSmtpHostname("localhost").setSmtpPort(3025));
+ final MailConfig mailConfig = new MailConfig().setSmtpHostname("localhost").setSmtpPort(3025);
+ final IMailSvc mailSvc = new MailSvc(mailConfig);
+ return new EmailSenderImpl(mailSvc);
}
@Override
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSenderImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSenderImplTest.java
index b31903966c5..6ac7c8796e3 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSenderImplTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSenderImplTest.java
@@ -2,7 +2,9 @@ package ca.uhn.fhir.jpa.subscription.email;
import ca.uhn.fhir.jpa.subscription.match.deliver.email.EmailDetails;
import ca.uhn.fhir.jpa.subscription.match.deliver.email.EmailSenderImpl;
+import ca.uhn.fhir.rest.server.mail.IMailSvc;
import ca.uhn.fhir.rest.server.mail.MailConfig;
+import ca.uhn.fhir.rest.server.mail.MailSvc;
import com.icegreen.greenmail.junit5.GreenMailExtension;
import com.icegreen.greenmail.util.GreenMailUtil;
import com.icegreen.greenmail.util.ServerSetupTest;
@@ -31,7 +33,7 @@ public class EmailSenderImplTest {
@BeforeEach
public void setUp() {
- fixture = new EmailSenderImpl(withMailConfig());
+ fixture = new EmailSenderImpl(withMailService());
}
@Test
@@ -62,10 +64,11 @@ public class EmailSenderImplTest {
assertEquals("foo", foundBody);
}
- private MailConfig withMailConfig() {
- return new MailConfig()
+ private IMailSvc withMailService() {
+ final MailConfig mailConfig = new MailConfig()
.setSmtpHostname(ServerSetupTest.SMTP.getBindAddress())
- .setSmtpPort(ServerSetupTest.SMTP.getPort());
+ .setSmtpPort(ourGreenMail.getSmtp().getPort());
+ return new MailSvc(mailConfig);
}
}
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu2Test.java
index 91b55bf142e..70c60ddaf24 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu2Test.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu2Test.java
@@ -11,7 +11,9 @@ import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
import ca.uhn.fhir.rest.api.MethodOutcome;
+import ca.uhn.fhir.rest.server.mail.IMailSvc;
import ca.uhn.fhir.rest.server.mail.MailConfig;
+import ca.uhn.fhir.rest.server.mail.MailSvc;
import com.icegreen.greenmail.junit5.GreenMailExtension;
import com.icegreen.greenmail.util.GreenMailUtil;
import com.icegreen.greenmail.util.ServerSetupTest;
@@ -43,7 +45,7 @@ public class EmailSubscriptionDstu2Test extends BaseResourceProviderDstu2Test {
@RegisterExtension
static GreenMailExtension ourGreenMail = new GreenMailExtension(ServerSetupTest.SMTP.withPort(0));
- private List mySubscriptionIds = new ArrayList<>();
+ private final List mySubscriptionIds = new ArrayList<>();
@Autowired
private SubscriptionTestUtil mySubscriptionTestUtil;
@@ -122,8 +124,8 @@ public class EmailSubscriptionDstu2Test extends BaseResourceProviderDstu2Test {
Subscription subscription1 = createSubscription(criteria1, payload, "to1@example.com,to2@example.com");
mySubscriptionTestUtil.waitForQueueToDrain();
- await().until(()->mySubscriptionRegistry.get(subscription1.getIdElement().getIdPart()), Matchers.not(Matchers.nullValue()));
- mySubscriptionTestUtil.setEmailSender(subscription1.getIdElement(), new EmailSenderImpl(withMailConfig()));
+ await().until(() -> mySubscriptionRegistry.get(subscription1.getIdElement().getIdPart()), Matchers.not(Matchers.nullValue()));
+ mySubscriptionTestUtil.setEmailSender(subscription1.getIdElement(), new EmailSenderImpl(withMailService()));
assertEquals(0, Arrays.asList(ourGreenMail.getReceivedMessages()).size());
Observation observation1 = sendObservation(code, "SNOMED-CT");
@@ -145,10 +147,11 @@ public class EmailSubscriptionDstu2Test extends BaseResourceProviderDstu2Test {
assertEquals("", foundBody);
}
- private MailConfig withMailConfig() {
- return new MailConfig()
+ private IMailSvc withMailService() {
+ final MailConfig mailConfig = new MailConfig()
.setSmtpHostname(ServerSetupTest.SMTP.getBindAddress())
.setSmtpPort(ourGreenMail.getSmtp().getPort());
+ return new MailSvc(mailConfig);
}
}
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu3Test.java
index 873ae422d7a..a6ca6a82aac 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu3Test.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/subscription/email/EmailSubscriptionDstu3Test.java
@@ -5,12 +5,13 @@ import ca.uhn.fhir.jpa.provider.dstu3.BaseResourceProviderDstu3Test;
import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil;
import ca.uhn.fhir.jpa.subscription.match.deliver.email.EmailSenderImpl;
import ca.uhn.fhir.rest.api.MethodOutcome;
+import ca.uhn.fhir.rest.server.mail.IMailSvc;
import ca.uhn.fhir.rest.server.mail.MailConfig;
+import ca.uhn.fhir.rest.server.mail.MailSvc;
import ca.uhn.fhir.util.HapiExtensions;
import com.icegreen.greenmail.junit5.GreenMailExtension;
import com.icegreen.greenmail.store.FolderException;
import com.icegreen.greenmail.util.ServerSetupTest;
-import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.Observation;
@@ -32,7 +33,6 @@ import java.util.function.Consumer;
import static ca.uhn.fhir.jpa.subscription.resthook.RestHookTestDstu3Test.logAllInterceptors;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
@@ -48,7 +48,7 @@ public class EmailSubscriptionDstu3Test extends BaseResourceProviderDstu3Test {
@Autowired
private SubscriptionTestUtil mySubscriptionTestUtil;
- private List mySubscriptionIds = new ArrayList<>();
+ private final List mySubscriptionIds = new ArrayList<>();
@AfterEach
public void afterUnregisterEmailListener() {
@@ -140,7 +140,7 @@ public class EmailSubscriptionDstu3Test extends BaseResourceProviderDstu3Test {
String criteria1 = "Observation?code=SNOMED-CT|" + code + "&_format=xml";
Subscription subscription = createSubscription(criteria1, payload);
waitForQueueToDrain();
- mySubscriptionTestUtil.setEmailSender(subscription.getIdElement(), new EmailSenderImpl(withMailConfig()));
+ mySubscriptionTestUtil.setEmailSender(subscription.getIdElement(), new EmailSenderImpl(withMailService()));
sendObservation(code, "SNOMED-CT");
waitForQueueToDrain();
@@ -185,7 +185,7 @@ public class EmailSubscriptionDstu3Test extends BaseResourceProviderDstu3Test {
Subscription sub1 = createSubscription(criteria1, payload, modifier);
waitForQueueToDrain();
- mySubscriptionTestUtil.setEmailSender(sub1.getIdElement(), new EmailSenderImpl(withMailConfig()));
+ mySubscriptionTestUtil.setEmailSender(sub1.getIdElement(), new EmailSenderImpl(withMailService()));
sendObservation(code, "SNOMED-CT");
waitForQueueToDrain();
@@ -199,7 +199,7 @@ public class EmailSubscriptionDstu3Test extends BaseResourceProviderDstu3Test {
assertEquals(1, received.get(0).getAllRecipients().length);
assertEquals("foo@example.com", ((InternetAddress) received.get(0).getAllRecipients()[0]).getAddress());
assertEquals("text/plain; charset=UTF-8", received.get(0).getContentType());
- assertEquals("This is a subject", received.get(0).getSubject().toString().trim());
+ assertEquals("This is a subject", received.get(0).getSubject().trim());
assertEquals(mySubscriptionIds.get(0).toUnqualifiedVersionless().getValue(), received.get(0).getHeader("X-FHIR-Subscription")[0]);
// Expect the body of the email subscription to be an Observation formatted as JSON
@@ -232,7 +232,7 @@ public class EmailSubscriptionDstu3Test extends BaseResourceProviderDstu3Test {
Subscription sub1 = createSubscription(criteria1, payload, modifier);
waitForQueueToDrain();
- mySubscriptionTestUtil.setEmailSender(sub1.getIdElement(), new EmailSenderImpl(withMailConfig()));
+ mySubscriptionTestUtil.setEmailSender(sub1.getIdElement(), new EmailSenderImpl(withMailService()));
sendObservation(code, "SNOMED-CT");
waitForQueueToDrain();
@@ -247,7 +247,7 @@ public class EmailSubscriptionDstu3Test extends BaseResourceProviderDstu3Test {
assertEquals(1, received.get(0).getAllRecipients().length);
assertEquals("foo@example.com", ((InternetAddress) received.get(0).getAllRecipients()[0]).getAddress());
assertEquals("text/plain; charset=UTF-8", received.get(0).getContentType());
- assertEquals("This is a subject", received.get(0).getSubject().toString().trim());
+ assertEquals("This is a subject", received.get(0).getSubject().trim());
assertEquals("", received.get(0).getContent().toString().trim());
assertEquals(mySubscriptionIds.get(0).toUnqualifiedVersionless().getValue(), received.get(0).getHeader("X-FHIR-Subscription")[0]);
@@ -260,11 +260,11 @@ public class EmailSubscriptionDstu3Test extends BaseResourceProviderDstu3Test {
mySubscriptionTestUtil.waitForQueueToDrain();
}
- private MailConfig withMailConfig() {
- return new MailConfig()
+ private IMailSvc withMailService() {
+ final MailConfig mailConfig = new MailConfig()
.setSmtpHostname(ServerSetupTest.SMTP.getBindAddress())
.setSmtpPort(ourGreenMail.getSmtp().getPort());
+ return new MailSvc(mailConfig);
}
-
}
diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml
index bffab9b32bd..2c0549a0ba4 100644
--- a/hapi-fhir-jpaserver-cql/pom.xml
+++ b/hapi-fhir-jpaserver-cql/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml
index ddb8c8d3b67..b2ec0a4a5a8 100644
--- a/hapi-fhir-jpaserver-mdm/pom.xml
+++ b/hapi-fhir-jpaserver-mdm/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml
index 37325cb1c11..caa3f0ec03d 100644
--- a/hapi-fhir-jpaserver-model/pom.xml
+++ b/hapi-fhir-jpaserver-model/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml
index 436cad51e85..87bcd4cb904 100755
--- a/hapi-fhir-jpaserver-searchparam/pom.xml
+++ b/hapi-fhir-jpaserver-searchparam/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml
index 6ef1c263560..e9f4dbc64cc 100644
--- a/hapi-fhir-jpaserver-subscription/pom.xml
+++ b/hapi-fhir-jpaserver-subscription/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/email/EmailSenderImpl.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/email/EmailSenderImpl.java
index 7c88646612c..cd7a0c38790 100644
--- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/email/EmailSenderImpl.java
+++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/email/EmailSenderImpl.java
@@ -20,8 +20,7 @@ package ca.uhn.fhir.jpa.subscription.match.deliver.email;
* #L%
*/
-import ca.uhn.fhir.rest.server.mail.MailConfig;
-import ca.uhn.fhir.rest.server.mail.MailSvc;
+import ca.uhn.fhir.rest.server.mail.IMailSvc;
import ca.uhn.fhir.util.StopWatch;
import org.apache.commons.lang3.Validate;
import org.simplejavamail.api.email.Email;
@@ -33,32 +32,30 @@ import javax.annotation.Nonnull;
public class EmailSenderImpl implements IEmailSender {
private static final Logger ourLog = LoggerFactory.getLogger(EmailSenderImpl.class);
- private MailSvc myMailSvc = new MailSvc();
- private MailConfig myMailConfig;
- public EmailSenderImpl(@Nonnull MailConfig theMailConfig) {
- Validate.notNull(theMailConfig);
- myMailConfig = theMailConfig;
+ private final IMailSvc myMailSvc;
+
+ public EmailSenderImpl(@Nonnull IMailSvc theMailSvc) {
+ Validate.notNull(theMailSvc);
+ myMailSvc = theMailSvc;
}
@Override
public void send(EmailDetails theDetails) {
- Validate.notNull(myMailConfig, "Mail configuration is not set!");
-
StopWatch stopWatch = new StopWatch();
ourLog.info("Sending email for subscription {} from [{}] to recipients: [{}]", theDetails.getSubscriptionId(), theDetails.getFrom(), theDetails.getTo());
Email email = theDetails.toEmail();
- myMailSvc.sendMail(myMailConfig, email,
+ myMailSvc.sendMail(email,
() -> ourLog.info("Done sending email for subscription {} from [{}] to recipients: [{}] (took {}ms)",
theDetails.getSubscriptionId(), theDetails.getFrom(), theDetails.getTo(), stopWatch.getMillis()),
(e) -> {
ourLog.error("Error sending email for subscription {} from [{}] to recipients: [{}] (took {}ms)",
theDetails.getSubscriptionId(), theDetails.getFrom(), theDetails.getTo(), stopWatch.getMillis());
ourLog.error("Error sending email", e);
- });
+ });
}
}
diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml
index 666b04f7009..3d2d5b7a27e 100644
--- a/hapi-fhir-jpaserver-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
index 22918bd8306..425abab9f43 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
+++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml
index 2524a791d05..542a2ebbc6f 100644
--- a/hapi-fhir-server-mdm/pom.xml
+++ b/hapi-fhir-server-mdm/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index ca12d2d56ac..97a83b16787 100644
--- a/hapi-fhir-server-openapi/pom.xml
+++ b/hapi-fhir-server-openapi/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index 6c205e83c0b..e4a9cab76f2 100644
--- a/hapi-fhir-server/pom.xml
+++ b/hapi-fhir-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/IMailSvc.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/IMailSvc.java
new file mode 100644
index 00000000000..a477aea619d
--- /dev/null
+++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/IMailSvc.java
@@ -0,0 +1,38 @@
+package ca.uhn.fhir.rest.server.mail;
+
+/*-
+ * #%L
+ * HAPI FHIR - Server Framework
+ * %%
+ * Copyright (C) 2014 - 2021 Smile CDR, Inc.
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+import org.simplejavamail.api.email.Email;
+import org.simplejavamail.api.mailer.AsyncResponse;
+
+import javax.annotation.Nonnull;
+import java.util.List;
+
+public interface IMailSvc {
+ void sendMail(@Nonnull List theEmails);
+
+ void sendMail(@Nonnull Email theEmail);
+
+ void sendMail(@Nonnull Email theEmail,
+ @Nonnull Runnable theOnSuccess,
+ @Nonnull AsyncResponse.ExceptionConsumer theErrorHandler);
+
+}
diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java
index df1cd4e9dca..123b142863d 100644
--- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java
+++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/mail/MailSvc.java
@@ -36,41 +36,44 @@ import javax.annotation.Nonnull;
import java.util.List;
import java.util.stream.Collectors;
-public class MailSvc {
+public class MailSvc implements IMailSvc {
private static final Logger ourLog = LoggerFactory.getLogger(MailSvc.class);
- public void sendMail(@Nonnull MailConfig theMailConfig, @Nonnull List theEmails) {
+ private final MailConfig myMailConfig;
+ private final Mailer myMailer;
+
+ public MailSvc(@Nonnull MailConfig theMailConfig) {
Validate.notNull(theMailConfig);
+ myMailConfig = theMailConfig;
+ myMailer = makeMailer(myMailConfig);
+ }
+
+ @Override
+ public void sendMail(@Nonnull List theEmails) {
Validate.notNull(theEmails);
- final Mailer mailer = makeMailer(theMailConfig);
- theEmails.forEach(theEmail -> sendMail(mailer, theEmail, new OnSuccess(theEmail), new ErrorHandler(theEmail)));
+ theEmails.forEach(theEmail -> send(theEmail, new OnSuccess(theEmail), new ErrorHandler(theEmail)));
}
- public void sendMail(@Nonnull MailConfig theMailConfig, @Nonnull Email theEmail) {
- Validate.notNull(theMailConfig);
- final Mailer mailer = makeMailer(theMailConfig);
- sendMail(mailer, theEmail, new OnSuccess(theEmail), new ErrorHandler(theEmail));
+ @Override
+ public void sendMail(@Nonnull Email theEmail) {
+ send(theEmail, new OnSuccess(theEmail), new ErrorHandler(theEmail));
}
- public void sendMail(@Nonnull MailConfig theMailConfig,
- @Nonnull Email theEmail,
+ @Override
+ public void sendMail(@Nonnull Email theEmail,
@Nonnull Runnable theOnSuccess,
@Nonnull ExceptionConsumer theErrorHandler) {
- Validate.notNull(theMailConfig);
- final Mailer mailer = makeMailer(theMailConfig);
- sendMail(mailer, theEmail, theOnSuccess, theErrorHandler);
+ send(theEmail, theOnSuccess, theErrorHandler);
}
- private void sendMail(@Nonnull Mailer theMailer,
- @Nonnull Email theEmail,
- @Nonnull Runnable theOnSuccess,
- @Nonnull ExceptionConsumer theErrorHandler) {
- Validate.notNull(theMailer);
+ private void send(@Nonnull Email theEmail,
+ @Nonnull Runnable theOnSuccess,
+ @Nonnull ExceptionConsumer theErrorHandler) {
Validate.notNull(theEmail);
Validate.notNull(theOnSuccess);
Validate.notNull(theErrorHandler);
try {
- final AsyncResponse asyncResponse = theMailer.sendMail(theEmail, true);
+ final AsyncResponse asyncResponse = myMailer.sendMail(theEmail, true);
if (asyncResponse != null) {
asyncResponse.onSuccess(theOnSuccess);
asyncResponse.onException(theErrorHandler);
diff --git a/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/mail/MailSvcIT.java b/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/mail/MailSvcIT.java
index 143e7a73983..f1075ffb98a 100644
--- a/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/mail/MailSvcIT.java
+++ b/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/mail/MailSvcIT.java
@@ -28,20 +28,19 @@ public class MailSvcIT {
@RegisterExtension
static GreenMailExtension ourGreenMail = new GreenMailExtension(ServerSetupTest.SMTP);
- private MailSvc fixture;
+ private IMailSvc fixture;
@BeforeEach
public void setUp() {
- fixture = new MailSvc();
+ fixture = new MailSvc(withMailConfig());
}
@Test
public void testSendSingleMail() throws Exception {
// setup
- final MailConfig mailConfig = withMailConfig();
final Email email = withEmail();
// execute
- fixture.sendMail(mailConfig, email);
+ fixture.sendMail(email);
// validate
assertTrue(ourGreenMail.waitForIncomingEmail(1000, 1));
final MimeMessage[] receivedMessages = ourGreenMail.getReceivedMessages();
@@ -53,10 +52,9 @@ public class MailSvcIT {
@Test
public void testSendMultipleMail() throws Exception {
// setup
- final MailConfig mailConfig = withMailConfig();
final List emails = Arrays.asList(withEmail(), withEmail(), withEmail());
// execute
- fixture.sendMail(mailConfig, emails);
+ fixture.sendMail(emails);
// validate
assertTrue(ourGreenMail.waitForIncomingEmail(1000, emails.size()));
final MimeMessage[] receivedMessages = ourGreenMail.getReceivedMessages();
@@ -72,10 +70,9 @@ public class MailSvcIT {
@Test
public void testSendMailWithInvalidToAddress() {
// setup
- final MailConfig mailConfig = withMailConfig();
final Email email = withEmail("xyz");
// execute
- fixture.sendMail(mailConfig, email);
+ fixture.sendMail(email);
// validate
assertTrue(ourGreenMail.waitForIncomingEmail(1000, 0));
final MimeMessage[] receivedMessages = ourGreenMail.getReceivedMessages();
@@ -85,10 +82,9 @@ public class MailSvcIT {
@Test
public void testSendMailWithInvalidToAddressExpectErrorHandler() {
// setup
- final MailConfig mailConfig = withMailConfig();
final Email email = withEmail("xyz");
// execute
- fixture.sendMail(mailConfig, email,
+ fixture.sendMail(email,
() -> fail("Should not execute on Success"),
(e) -> {
assertTrue(e instanceof MailException);
diff --git a/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/BaseResourceModifiedMessageTest.java b/hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/ResourceOperationMessageTest.java
similarity index 100%
rename from hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/BaseResourceModifiedMessageTest.java
rename to hapi-fhir-server/src/test/java/ca/uhn/fhir/rest/server/messaging/ResourceOperationMessageTest.java
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
index 2c57b33dd22..71c4eece69f 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
index 4ffe8120b0e..27b79222bb8 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
hapi-fhir-spring-boot-sample-client-apache
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
index ee5a6022524..a63004c0987 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
hapi-fhir-spring-boot-sample-client-okhttp
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
index 64d99ac4c15..fa9440765f8 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
hapi-fhir-spring-boot-sample-server-jersey
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
index 63d7e852271..bec79ba5225 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
hapi-fhir-spring-boot-samples
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
index e55fcf528a4..847f7d5a0cd 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index 412c98cc63e..487b2021e49 100644
--- a/hapi-fhir-spring-boot/pom.xml
+++ b/hapi-fhir-spring-boot/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index 9933fea8888..098d61a50c8 100644
--- a/hapi-fhir-sql-migrate/pom.xml
+++ b/hapi-fhir-sql-migrate/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index 929bac38b1d..3c75f26c4e4 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index 8ce3ca295ff..71bd515d19f 100644
--- a/hapi-fhir-structures-dstu2.1/pom.xml
+++ b/hapi-fhir-structures-dstu2.1/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index 9e4f987ec3b..76d0f3506c3 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index 10af08f73e8..3a342ac99de 100644
--- a/hapi-fhir-structures-dstu3/pom.xml
+++ b/hapi-fhir-structures-dstu3/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml
index eb3eaf95ff6..7326f806c3d 100644
--- a/hapi-fhir-structures-hl7org-dstu2/pom.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index 847a5c5cf9b..fac21deba0e 100644
--- a/hapi-fhir-structures-r4/pom.xml
+++ b/hapi-fhir-structures-r4/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index 41e594ea9c7..b14b96cd88b 100644
--- a/hapi-fhir-structures-r5/pom.xml
+++ b/hapi-fhir-structures-r5/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index 117520d0661..5e3c55e38b1 100644
--- a/hapi-fhir-test-utilities/pom.xml
+++ b/hapi-fhir-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index 80afd7decf3..42e79edc220 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index 575dcaac456..96f90b2a6f5 100644
--- a/hapi-fhir-validation-resources-dstu2.1/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml
index 790e17da63b..95ce0f6756e 100644
--- a/hapi-fhir-validation-resources-dstu2/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml
index 9c31602ad65..1f17694f61e 100644
--- a/hapi-fhir-validation-resources-dstu3/pom.xml
+++ b/hapi-fhir-validation-resources-dstu3/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml
index 505e8b10db8..8598a179c13 100644
--- a/hapi-fhir-validation-resources-r4/pom.xml
+++ b/hapi-fhir-validation-resources-r4/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml
index 361b15a1909..d5888dd5bf3 100644
--- a/hapi-fhir-validation-resources-r5/pom.xml
+++ b/hapi-fhir-validation-resources-r5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index 30c674c3dac..3b226ca5fd1 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index 84865dc2b09..cb1ebec1b46 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
@@ -58,37 +58,37 @@
ca.uhn.hapi.fhir
hapi-fhir-structures-dstu3
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-hl7org-dstu2
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r4
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r5
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu2
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu3
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-r4
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
org.apache.velocity
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index 171d2cdbc74..c68568be045 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index 053724fa9f9..89298fbddb1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
https://hapifhir.io
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index cc81bbe4696..a45687cc42f 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
index 40a1416a89f..636958f1e29 100644
--- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
index 07943cd5db9..4d36de0c4ab 100644
--- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.7.0-PRE5-SNAPSHOT
+ 5.7.0-PRE6-SNAPSHOT
../../pom.xml