From ff0e2b648ff138b8743ce492f01a06d0dc7a01e7 Mon Sep 17 00:00:00 2001 From: Volker Schmidt Date: Sun, 10 Feb 2019 15:01:05 +0100 Subject: [PATCH] Added enabled subscription types to JPA Example Server. --- .../main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java index 9ef7ae73549..87b195c66bb 100644 --- a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java +++ b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java @@ -11,6 +11,7 @@ import ca.uhn.fhir.jpa.util.DerbyTenSevenHapiFhirDialect; import org.apache.commons.dbcp2.BasicDataSource; import org.apache.commons.lang3.time.DateUtils; import org.hibernate.jpa.HibernatePersistenceProvider; +import org.hl7.fhir.instance.model.Subscription; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowire; import org.springframework.beans.factory.annotation.Autowired; @@ -43,6 +44,10 @@ public class FhirServerConfig extends BaseJavaConfigDstu3 { public DaoConfig daoConfig() { DaoConfig retVal = new DaoConfig(); retVal.setAllowMultipleDelete(true); + retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.WEBSOCKET); + retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK); + retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL); + retVal.setSubscriptionMatchingEnabled(true); return retVal; } @@ -54,7 +59,7 @@ public class FhirServerConfig extends BaseJavaConfigDstu3 { /** * The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a * directory called "jpaserver_derby_files". - * + * * A URL to a remote database could also be placed here, along with login credentials and other properties supported by BasicDataSource. */ @Bean(destroyMethod = "close")