|
1 | 1 | package ca.uhn.fhir.jpa.starter.common;
|
2 | 2 |
|
3 | 3 | import ca.uhn.fhir.batch2.config.Batch2JobRegisterer;
|
4 |
| -import ca.uhn.fhir.batch2.coordinator.JobDefinitionRegistry; |
5 | 4 | import ca.uhn.fhir.batch2.jobs.export.BulkDataExportProvider;
|
6 | 5 | import ca.uhn.fhir.batch2.jobs.imprt.BulkDataImportProvider;
|
7 |
| -import ca.uhn.fhir.batch2.jobs.reindex.ReindexJobParameters; |
8 | 6 | import ca.uhn.fhir.batch2.jobs.reindex.ReindexProvider;
|
9 |
| -import ca.uhn.fhir.batch2.model.JobDefinition; |
10 | 7 | import ca.uhn.fhir.context.ConfigurationException;
|
11 | 8 | import ca.uhn.fhir.context.FhirContext;
|
12 | 9 | import ca.uhn.fhir.context.FhirVersionEnum;
|
|
21 | 18 | import ca.uhn.fhir.jpa.binary.provider.BinaryAccessProvider;
|
22 | 19 | import ca.uhn.fhir.jpa.config.util.HapiEntityManagerFactoryUtil;
|
23 | 20 | import ca.uhn.fhir.jpa.config.util.ResourceCountCacheUtil;
|
24 |
| - |
25 | 21 | import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl;
|
26 | 22 | import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
|
27 | 23 | import ca.uhn.fhir.jpa.dao.search.HSearchSortHelperImpl;
|
|
35 | 31 | import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
|
36 | 32 | import ca.uhn.fhir.jpa.packages.IPackageInstallerSvc;
|
37 | 33 | import ca.uhn.fhir.jpa.packages.PackageInstallationSpec;
|
38 |
| -import ca.uhn.fhir.jpa.partition.PartitionManagementProvider; |
| 34 | +import ca.uhn.fhir.jpa.provider.DaoRegistryResourceSupportedSvc; |
| 35 | +import ca.uhn.fhir.jpa.provider.IJpaSystemProvider; |
| 36 | +import ca.uhn.fhir.jpa.provider.JpaCapabilityStatementProvider; |
| 37 | +import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDstu2; |
| 38 | +import ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider; |
| 39 | +import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider; |
| 40 | +import ca.uhn.fhir.jpa.provider.ValueSetOperationProvider; |
39 | 41 | import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3;
|
40 |
| -import ca.uhn.fhir.jpa.provider.*; |
41 | 42 | import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
42 | 43 | import ca.uhn.fhir.jpa.search.IStaleSearchDeletingSvc;
|
43 | 44 | import ca.uhn.fhir.jpa.search.StaleSearchDeletingSvcImpl;
|
|
49 | 50 | import ca.uhn.fhir.jpa.starter.util.EnvironmentHelper;
|
50 | 51 | import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor;
|
51 | 52 | import ca.uhn.fhir.jpa.util.ResourceCountCache;
|
52 |
| -import ca.uhn.fhir.jpa.validation.JpaValidationSupportChain; |
53 | 53 | import ca.uhn.fhir.mdm.provider.MdmProviderLoader;
|
54 | 54 | import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
|
55 | 55 | import ca.uhn.fhir.narrative2.NullNarrativeGenerator;
|
56 | 56 | import ca.uhn.fhir.rest.api.IResourceSupportedSvc;
|
57 | 57 | import ca.uhn.fhir.rest.openapi.OpenApiInterceptor;
|
58 |
| -import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor; |
59 |
| -import ca.uhn.fhir.rest.server.*; |
60 |
| -import ca.uhn.fhir.rest.server.interceptor.*; |
| 58 | +import ca.uhn.fhir.rest.server.ApacheProxyAddressStrategy; |
| 59 | +import ca.uhn.fhir.rest.server.ETagSupportEnum; |
| 60 | +import ca.uhn.fhir.rest.server.HardcodedServerAddressStrategy; |
| 61 | +import ca.uhn.fhir.rest.server.IServerConformanceProvider; |
| 62 | +import ca.uhn.fhir.rest.server.IncomingRequestAddressStrategy; |
| 63 | +import ca.uhn.fhir.rest.server.RestfulServer; |
| 64 | +import ca.uhn.fhir.rest.server.interceptor.CorsInterceptor; |
| 65 | +import ca.uhn.fhir.rest.server.interceptor.FhirPathFilterInterceptor; |
| 66 | +import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; |
| 67 | +import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; |
| 68 | +import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; |
| 69 | +import ca.uhn.fhir.rest.server.interceptor.ResponseValidatingInterceptor; |
61 | 70 | import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
|
62 |
| -import ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy; |
63 | 71 | import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
64 | 72 | import ca.uhn.fhir.validation.IValidatorModule;
|
65 | 73 | import ca.uhn.fhir.validation.ResultSeverityEnum;
|
66 | 74 | import com.google.common.base.Strings;
|
67 | 75 | import jakarta.persistence.EntityManagerFactory;
|
68 |
| -import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport; |
69 | 76 | import org.slf4j.Logger;
|
70 | 77 | import org.slf4j.LoggerFactory;
|
71 | 78 | import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
72 | 79 | import org.springframework.beans.factory.annotation.Autowired;
|
73 | 80 | import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
74 | 81 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
75 | 82 | import org.springframework.context.ApplicationContext;
|
76 |
| -import org.springframework.context.annotation.*; |
| 83 | +import org.springframework.context.annotation.Bean; |
| 84 | +import org.springframework.context.annotation.ComponentScan; |
| 85 | +import org.springframework.context.annotation.Conditional; |
| 86 | +import org.springframework.context.annotation.Configuration; |
| 87 | +import org.springframework.context.annotation.Import; |
| 88 | +import org.springframework.context.annotation.Primary; |
77 | 89 | import org.springframework.core.env.ConfigurableEnvironment;
|
78 | 90 | import org.springframework.http.HttpHeaders;
|
79 | 91 | import org.springframework.orm.jpa.JpaTransactionManager;
|
80 | 92 | import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
81 | 93 | import org.springframework.web.cors.CorsConfiguration;
|
82 | 94 |
|
83 |
| -import java.util.*; |
84 | 95 | import javax.sql.DataSource;
|
| 96 | +import java.util.Arrays; |
| 97 | +import java.util.Collections; |
| 98 | +import java.util.List; |
| 99 | +import java.util.Map; |
| 100 | +import java.util.Optional; |
85 | 101 |
|
86 | 102 | import static ca.uhn.fhir.jpa.starter.common.validation.IRepositoryValidationInterceptorFactory.ENABLE_REPOSITORY_VALIDATING_INTERCEPTOR;
|
87 | 103 |
|
@@ -267,7 +283,6 @@ public RestfulServer restfulServer(
|
267 | 283 | BulkDataImportProvider bulkDataImportProvider,
|
268 | 284 | ValueSetOperationProvider theValueSetOperationProvider,
|
269 | 285 | ReindexProvider reindexProvider,
|
270 |
| - PartitionManagementProvider partitionManagementProvider, |
271 | 286 | Optional<RepositoryValidatingInterceptor> repositoryValidatingInterceptor,
|
272 | 287 | IPackageInstallerSvc packageInstallerSvc,
|
273 | 288 | ThreadSafeResourceDeleterSvc theThreadSafeResourceDeleterSvc,
|
@@ -438,12 +453,7 @@ public RestfulServer restfulServer(
|
438 | 453 | // reindex Provider $reindex
|
439 | 454 | fhirServer.registerProvider(reindexProvider);
|
440 | 455 |
|
441 |
| - // Partitioning |
442 |
| - if (appProperties.getPartitioning() != null) { |
443 |
| - fhirServer.registerInterceptor(new RequestTenantPartitionInterceptor()); |
444 |
| - fhirServer.setTenantIdentificationStrategy(new UrlBaseTenantIdentificationStrategy()); |
445 |
| - fhirServer.registerProviders(partitionManagementProvider); |
446 |
| - } |
| 456 | + // Validation |
447 | 457 | repositoryValidatingInterceptor.ifPresent(fhirServer::registerInterceptor);
|
448 | 458 |
|
449 | 459 | // register custom interceptors
|
|
0 commit comments