Enable terminology uploader by default

This commit is contained in:
jamesagnew
2020-09-17 05:46:42 -04:00
parent b2171cbd90
commit 2979aca07d

View File

@@ -16,6 +16,8 @@ import ca.uhn.fhir.jpa.partition.PartitionManagementProvider;
import ca.uhn.fhir.jpa.provider.GraphQLProvider; import ca.uhn.fhir.jpa.provider.GraphQLProvider;
import ca.uhn.fhir.jpa.provider.IJpaSystemProvider; import ca.uhn.fhir.jpa.provider.IJpaSystemProvider;
import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDstu2; import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDstu2;
import ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider;
import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider;
import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3; import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3;
import ca.uhn.fhir.jpa.provider.r4.JpaConformanceProviderR4; import ca.uhn.fhir.jpa.provider.r4.JpaConformanceProviderR4;
import ca.uhn.fhir.jpa.provider.r5.JpaConformanceProviderR5; import ca.uhn.fhir.jpa.provider.r5.JpaConformanceProviderR5;
@@ -35,6 +37,7 @@ import ca.uhn.fhir.validation.ResultSeverityEnum;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import org.hl7.fhir.r4.model.Bundle.BundleType; import org.hl7.fhir.r4.model.Bundle.BundleType;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfiguration;
@@ -95,6 +98,9 @@ public class BaseJpaRestfulServer extends RestfulServer {
@Autowired @Autowired
AppProperties appProperties; AppProperties appProperties;
@Autowired
ApplicationContext myApplicationContext;
public BaseJpaRestfulServer() { public BaseJpaRestfulServer() {
} }
@@ -236,16 +242,14 @@ public class BaseJpaRestfulServer extends RestfulServer {
* so it is a potential security vulnerability. Consider using an AuthorizationInterceptor * so it is a potential security vulnerability. Consider using an AuthorizationInterceptor
* with this feature. * with this feature.
*/ */
if (false) { // <-- DISABLED RIGHT NOW if (ctx.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3)) { // <-- ENABLED RIGHT NOW
//registerProvider(appCtx.getBean(TerminologyUploaderProvider.class)); registerProvider(myApplicationContext.getBean(TerminologyUploaderProvider.class));
} }
// If you want to enable the $trigger-subscription operation to allow // If you want to enable the $trigger-subscription operation to allow
// manual triggering of a subscription delivery, enable this provider // manual triggering of a subscription delivery, enable this provider
if (false) { // <-- DISABLED RIGHT NOW if (true) { // <-- ENABLED RIGHT NOW
/* SubscriptionTriggeringProvider retriggeringProvider = appCtx registerProvider(myApplicationContext.getBean(SubscriptionTriggeringProvider.class));
.getBean(SubscriptionTriggeringProvider.class);
registerProvider(retriggeringProvider);*/
} }
// Define your CORS configuration. This is an example // Define your CORS configuration. This is an example