Upgrade to 3.7.0

This commit is contained in:
James Agnew
2019-02-06 09:42:45 -05:00
parent 76f9a2f0f3
commit ce32efa582
3 changed files with 21 additions and 19 deletions

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>3.6.0</version>
<version>3.7.0</version>
</parent>
<groupId>ca.uhn.hapi.fhir.demo</groupId>

View File

@@ -5,11 +5,13 @@ import java.util.Properties;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
import ca.uhn.fhir.jpa.search.LuceneSearchMappingFactory;
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.factory.annotation.Autowire;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -38,9 +40,23 @@ public class FhirServerConfig extends BaseJavaConfigDstu3 {
public DaoConfig daoConfig() {
DaoConfig retVal = new DaoConfig();
retVal.setAllowMultipleDelete(true);
// You can enable these if you want to support Subscriptions from your server
if (false) {
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
}
if (false) {
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
}
return retVal;
}
@Bean
public ModelConfig modelConfig() {
return new ModelConfig();
}
/**
* 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".

View File

@@ -11,7 +11,6 @@ import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3;
import ca.uhn.fhir.jpa.provider.dstu3.JpaSystemProviderDstu3;
import ca.uhn.fhir.jpa.provider.dstu3.TerminologyUploaderProviderDstu3;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
import ca.uhn.fhir.jpa.subscription.resthook.SubscriptionRestHookInterceptor;
import ca.uhn.fhir.model.dstu2.composite.MetaDt;
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
import ca.uhn.fhir.rest.api.EncodingEnum;
@@ -22,6 +21,7 @@ import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.Meta;
import org.hl7.fhir.instance.model.Subscription;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.context.ContextLoaderListener;
@@ -162,26 +162,12 @@ public class JpaServerDemo extends RestfulServer {
}
}
/*
* If you want to support subscriptions, you will want to register interceptors for
* any type of subscriptions you want to support.
*/
boolean subscriptionsEnabled = false;
if (subscriptionsEnabled) { // <-- DISABLED RIGHT NOW
SubscriptionRestHookInterceptor restHookInterceptor = myAppCtx.getBean(SubscriptionRestHookInterceptor.class);
registerInterceptor(restHookInterceptor);
// You might alo want to enable other subscription interceptors too
// eg...
// myAppCtx.getBean(SubscriptionWebsocketInterceptor.class);
// myAppCtx.getBean(SubscriptionEmailInterceptor.class);
// If you want to enable the $trigger-subscription operation to allow
// manual triggering of a subscription delivery, enable this provider
if (false) { // <-- DISABLED RIGHT NOW
SubscriptionTriggeringProvider retriggeringProvider = myAppCtx.getBean(SubscriptionTriggeringProvider.class);
registerProvider(retriggeringProvider);
}
}
}