Merged in changes from the rel_5_3_0 Branch.
This commit is contained in:
@@ -11,8 +11,8 @@ import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
||||
import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor;
|
||||
import ca.uhn.fhir.jpa.bulk.provider.BulkDataExportProvider;
|
||||
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
|
||||
import ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingInterceptor;
|
||||
import ca.uhn.fhir.jpa.packages.IPackageInstallerSvc;
|
||||
import ca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson;
|
||||
import ca.uhn.fhir.jpa.packages.PackageInstallationSpec;
|
||||
import ca.uhn.fhir.jpa.partition.PartitionManagementProvider;
|
||||
import ca.uhn.fhir.jpa.provider.*;
|
||||
@@ -98,6 +98,9 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
@Autowired
|
||||
ApplicationContext myApplicationContext;
|
||||
|
||||
@Autowired(required = false)
|
||||
IRepositoryValidationInterceptorFactory factory;
|
||||
|
||||
// These are set only if the features are enabled
|
||||
private CqlProviderLoader cqlProviderLoader;
|
||||
|
||||
@@ -354,28 +357,24 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
if (appProperties.getImplementationGuides() != null) {
|
||||
Map<String, AppProperties.ImplementationGuide> guides = appProperties.getImplementationGuides();
|
||||
for (Map.Entry<String, AppProperties.ImplementationGuide> guide : guides.entrySet()) {
|
||||
packageInstallerSvc.install(new PackageInstallationSpec()
|
||||
.setPackageUrl(guide.getValue().getUrl())
|
||||
.setName(guide.getValue().getName())
|
||||
.setVersion(guide.getValue().getVersion())
|
||||
.setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL));
|
||||
packageInstallerSvc.install(new PackageInstallationSpec()
|
||||
.setPackageUrl(guide.getValue().getUrl())
|
||||
.setName(guide.getValue().getName())
|
||||
.setVersion(guide.getValue().getVersion())
|
||||
.setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(factory != null) {
|
||||
interceptorService.registerInterceptor(factory.buildUsingStoredStructureDefinitions());
|
||||
}
|
||||
|
||||
|
||||
if (appProperties.getLastn_enabled()) {
|
||||
daoConfig.setLastNEnabled(true);
|
||||
}
|
||||
|
||||
daoConfig.getModelConfig().setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
||||
|
||||
// Repository Validating Interceptor
|
||||
if (Boolean.TRUE.equals(appProperties.getEnable_repository_validating_interceptor())) {
|
||||
RepositoryValidationInterceptorFactory repositoryValidationInterceptorFactory = myApplicationContext.getBean(RepositoryValidationInterceptorFactory.class);
|
||||
RepositoryValidatingInterceptor interceptor = repositoryValidationInterceptorFactory.build();
|
||||
interceptorService.registerInterceptor(interceptor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user