From 998c1f7751feaa67f83e89c962555241502ce38b Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Tue, 21 Apr 2020 14:32:41 -0400 Subject: [PATCH] Work on docs --- .../ca/uhn/fhir/jpa/config/BaseConfig.java | 18 ++++++------------ .../ca/uhn/fhir/jpa/config/TestJPAConfig.java | 6 ++++++ .../jpa/delete/DeleteConflictServiceTest.java | 3 +++ .../WebsocketConnectionValidatorTest.java | 4 ++++ 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java index 54fdf45a167..6cfc235e3b9 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/BaseConfig.java @@ -11,18 +11,16 @@ import ca.uhn.fhir.jpa.bulk.BulkDataExportProvider; import ca.uhn.fhir.jpa.bulk.BulkDataExportSvcImpl; import ca.uhn.fhir.jpa.bulk.IBulkDataExportSvc; import ca.uhn.fhir.jpa.dao.ISearchBuilder; -import ca.uhn.fhir.jpa.model.config.PartitionSettings; -import ca.uhn.fhir.jpa.partition.IPartitionConfigSvc; -import ca.uhn.fhir.jpa.partition.IRequestPartitionHelperService; -import ca.uhn.fhir.jpa.partition.PartitionConfigSvcImpl; -import ca.uhn.fhir.jpa.partition.PartitionManagementProvider; -import ca.uhn.fhir.jpa.partition.RequestPartitionHelperService; import ca.uhn.fhir.jpa.dao.index.DaoResourceLinkResolver; import ca.uhn.fhir.jpa.entity.Search; import ca.uhn.fhir.jpa.graphql.JpaStorageServices; import ca.uhn.fhir.jpa.interceptor.JpaConsentContextServices; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; -import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor; +import ca.uhn.fhir.jpa.partition.IPartitionConfigSvc; +import ca.uhn.fhir.jpa.partition.IRequestPartitionHelperService; +import ca.uhn.fhir.jpa.partition.PartitionConfigSvcImpl; +import ca.uhn.fhir.jpa.partition.PartitionManagementProvider; +import ca.uhn.fhir.jpa.partition.RequestPartitionHelperService; import ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider; import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider; import ca.uhn.fhir.jpa.sched.AutowiringSpringBeanJobFactory; @@ -44,6 +42,7 @@ import ca.uhn.fhir.jpa.searchparam.config.SearchParamConfig; import ca.uhn.fhir.jpa.searchparam.extractor.IResourceLinkResolver; import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.interceptor.consent.IConsentContextServices; +import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor; import org.hibernate.jpa.HibernatePersistenceProvider; import org.hl7.fhir.utilities.graphql.IGraphQLStorageServices; import org.springframework.beans.factory.annotation.Autowired; @@ -240,11 +239,6 @@ public abstract class BaseConfig { return new JpaConsentContextServices(); } - @Bean - public PartitionSettings partitionConfig() { - return new PartitionSettings(); - } - @Bean @Lazy public IPartitionConfigSvc partitionConfigSvc() { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java index b55be7f10a0..d8f536c782c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestJPAConfig.java @@ -1,6 +1,7 @@ package ca.uhn.fhir.jpa.config; import ca.uhn.fhir.jpa.api.config.DaoConfig; +import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.subscription.SubscriptionTestUtil; import ca.uhn.fhir.jpa.subscription.channel.config.SubscriptionChannelConfig; @@ -29,6 +30,11 @@ public class TestJPAConfig { return new DaoConfig(); } + @Bean + public PartitionSettings partitionSettings() { + return new PartitionSettings(); + } + @Bean public ModelConfig modelConfig() { return daoConfig().getModelConfig(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/DeleteConflictServiceTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/DeleteConflictServiceTest.java index 7ee372a2944..085f98c340b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/DeleteConflictServiceTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/delete/DeleteConflictServiceTest.java @@ -5,6 +5,7 @@ import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.jpa.api.model.DeleteConflictList; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.dao.data.IResourceLinkDao; +import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.entity.ResourceLink; import ca.uhn.fhir.jpa.model.entity.ResourceTable; import org.junit.Test; @@ -50,6 +51,8 @@ public class DeleteConflictServiceTest { DeleteConflictService myDeleteConflictService() { return new DeleteConflictService(); } @Bean DaoConfig myDaoConfig() { return new DaoConfig(); } + @Bean + PartitionSettings partitionSettings() { return new PartitionSettings(); } } @Test diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java index cddf8e3b339..c2dd000ab8e 100644 --- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java +++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/module/subscriber/websocket/WebsocketConnectionValidatorTest.java @@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.DaoRegistry; +import ca.uhn.fhir.jpa.model.config.PartitionSettings; import ca.uhn.fhir.jpa.model.entity.ModelConfig; import ca.uhn.fhir.jpa.model.sched.ISchedulerService; import ca.uhn.fhir.jpa.searchparam.MatchUrlService; @@ -112,6 +113,9 @@ public class WebsocketConnectionValidatorTest { return new DaoConfig(); } + @Bean + public PartitionSettings partitionSettings() { return new PartitionSettings(); } + @Bean public ModelConfig modelConfig() { return new ModelConfig();