diff --git a/pom.xml b/pom.xml index 8613864..3bf5549 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-fhir - 3.7.0-SNAPSHOT + 3.7.0 ca.uhn.hapi.fhir.demo @@ -255,15 +255,6 @@ - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - org.apache.maven.plugins diff --git a/pom.xml.orig b/pom.xml.orig new file mode 100644 index 0000000..a2e30af --- /dev/null +++ b/pom.xml.orig @@ -0,0 +1,291 @@ + + 4.0.0 + + + + ca.uhn.hapi.fhir + hapi-fhir +<<<<<<< HEAD + 3.7.0 +======= + 3.7.0-SNAPSHOT +>>>>>>> 18c85900e500863b2b24080da9fe5e11c6d0a434 + + + ca.uhn.hapi.fhir.demo + hapi-fhir-jpaserver-starter + war + + HAPI FHIR JPA Server - Starter Project + + + + oss-snapshots + + true + + https://oss.sonatype.org/content/repositories/snapshots/ + + + + + + org.eclipse.jetty.websocket + websocket-api + ${jetty_version} + + + org.eclipse.jetty.websocket + websocket-client + ${jetty_version} + + + mysql + mysql-connector-java + 6.0.5 + + + + + ca.uhn.hapi.fhir + hapi-fhir-base + ${project.version} + + + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu3 + ${project.version} + + + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-base + ${project.version} + + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-elasticsearch + ${project.version} + + + + + ca.uhn.hapi.fhir + hapi-fhir-testpage-overlay + ${project.version} + war + provided + + + ca.uhn.hapi.fhir + hapi-fhir-testpage-overlay + ${project.version} + classes + provided + + + + + ch.qos.logback + logback-classic + + + + + javax.servlet + javax.servlet-api + provided + + + + + org.thymeleaf + thymeleaf + + + + + org.ebaysf.web + cors-filter + + + servlet-api + javax.servlet + + + + + + + org.springframework + spring-web + + + + + org.apache.commons + commons-dbcp2 + + + + + org.apache.derby + derby + + + org.apache.derby + derbynet + + + org.apache.derby + derbyclient + + + + + org.eclipse.jetty + jetty-servlets + test + + + org.eclipse.jetty + jetty-servlet + test + + + org.eclipse.jetty.websocket + websocket-server + test + + + org.eclipse.jetty + jetty-server + test + + + org.eclipse.jetty + jetty-util + test + + + org.eclipse.jetty + jetty-webapp + test + + + com.helger + ph-schematron + + + Saxon-HE + net.sf.saxon + + + + + + + javax.interceptor + javax.interceptor-api + provided + + + + + + + + hapi-fhir-jpaserver + + + + + + org.eclipse.jetty + jetty-maven-plugin + 9.4.8.v20180619 + + + /hapi-fhir-jpaserver + true + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + + + org.apache.maven.plugins + maven-war-plugin + + + + ${maven.build.timestamp} + + + + + ca.uhn.hapi.fhir + hapi-fhir-testpage-overlay + + + src/main/webapp/WEB-INF/web.xml + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + true + + + + + integration-test + verify + + + + + + + + + diff --git a/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java b/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java index f1cd8f6..1f6182b 100644 --- a/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java +++ b/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java @@ -8,10 +8,14 @@ import javax.persistence.EntityManagerFactory; import javax.sql.DataSource; import ca.uhn.fhir.context.ConfigurationException; +import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; 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; @@ -42,7 +46,21 @@ public class FhirServerConfig extends BaseJavaConfigDstu3 { retVal.setAllowMultipleDelete(HapiProperties.getAllowMultipleDelete()); retVal.setAllowExternalReferences(HapiProperties.getAllowExternalReferences()); retVal.setExpungeEnabled(HapiProperties.getExpungeEnabled()); - return retVal; + + // 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(); } /** @@ -65,7 +83,7 @@ public class FhirServerConfig extends BaseJavaConfigDstu3 { * A URL to a remote database could also be placed here, along with login credentials and other properties supported by BasicDataSource. */ @Bean(destroyMethod = "close") - public DataSource dataSource() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { + public BasicDataSource dataSource() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { BasicDataSource retVal = new BasicDataSource(); Driver driver = (Driver) Class.forName(HapiProperties.getDataSourceDriver()).getConstructor().newInstance(); retVal.setDriver(driver); diff --git a/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java b/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java index eea8cde..012f867 100644 --- a/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java +++ b/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java @@ -13,7 +13,6 @@ import ca.uhn.fhir.jpa.provider.dstu3.TerminologyUploaderProviderDstu3; import ca.uhn.fhir.jpa.provider.r4.JpaSystemProviderR4; import ca.uhn.fhir.jpa.provider.r4.TerminologyUploaderProviderR4; 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.server.HardcodedServerAddressStrategy; @@ -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; @@ -176,26 +176,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 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); } - } }