diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 52c6744b1f6..e507dd7c4ad 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index bb5ac566d57..cc29f3cfb29 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 6f7b6e4248e..31d086623a2 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index 460f34eab7e..d32257cda95 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -4,14 +4,14 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
pom
HAPI FHIR BOM
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml
index 954a371fb94..9c88b6e6c07 100644
--- a/hapi-fhir-checkstyle/pom.xml
+++ b/hapi-fhir-checkstyle/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index 33f14aace2a..23a93b54bcf 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index 69a3ba5053a..8bbcde32d3a 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
index db0e10e2231..0251023a33f 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../../hapi-deployable-pom
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index ed6b4620b0c..72c8876f6d2 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index fd82fc33906..55ce4f8b9f9 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index f6915626737..47c9ab41740 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index 47e0fce5ca6..6d463b32802 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index cf889124527..075704bc1d5 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index ad7315822d2..6b0d1c47973 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/3439-job-schedule-interface.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/3439-job-schedule-interface.yaml
new file mode 100644
index 00000000000..1b584b32baf
--- /dev/null
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/3439-job-schedule-interface.yaml
@@ -0,0 +1,4 @@
+type: change
+issue: 3439
+title: 'Previously, jobs were scheduled via a @PostConstruct annotated method. This has been changed to an implementation
+of IJobScheduler interface so the job scheduler can schedule all the jobs after it has been started.'
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index 773ec839d2a..d0443b404dd 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index 8a2e53ba1d7..947a92cfd3f 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java
index 23db1597ee9..529379e375d 100644
--- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java
+++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java
@@ -20,22 +20,11 @@ package ca.uhn.fhir.jaxrs.server;
* #L%
*/
-import ca.uhn.fhir.i18n.Msg;
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.annotation.PostConstruct;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
+import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jaxrs.server.util.JaxRsRequest;
import ca.uhn.fhir.jaxrs.server.util.JaxRsRequest.Builder;
import ca.uhn.fhir.rest.annotation.IdParam;
@@ -58,15 +47,24 @@ import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r4.model.CapabilityStatement;
import org.slf4j.LoggerFactory;
+import javax.annotation.PostConstruct;
import javax.ws.rs.GET;
import javax.ws.rs.OPTIONS;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map.Entry;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
/**
* This is the conformance provider for the jax rs servers. It requires all providers to be registered during startup because the conformance profile is generated during the postconstruct phase.
@@ -91,7 +89,7 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv
/**
* the server configuration
*/
- private RestfulServerConfiguration serverConfiguration = new RestfulServerConfiguration();
+ private RestfulServerConfiguration myServerConfiguration = new RestfulServerConfiguration();
/**
* the conformance. It is created once during startup
@@ -111,10 +109,10 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv
* @param serverVersion the server version. If null, "" is used
*/
protected AbstractJaxRsConformanceProvider(String implementationDescription, String serverName, String serverVersion) {
- serverConfiguration.setFhirContext(getFhirContext());
- serverConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, ""));
- serverConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, ""));
- serverConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, ""));
+ myServerConfiguration.setFhirContext(getFhirContext());
+ myServerConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, ""));
+ myServerConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, ""));
+ myServerConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, ""));
}
/**
@@ -127,10 +125,10 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv
*/
protected AbstractJaxRsConformanceProvider(FhirContext ctx, String implementationDescription, String serverName, String serverVersion) {
super(ctx);
- serverConfiguration.setFhirContext(ctx);
- serverConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, ""));
- serverConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, ""));
- serverConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, ""));
+ myServerConfiguration.setFhirContext(ctx);
+ myServerConfiguration.setImplementationDescription(StringUtils.defaultIfEmpty(implementationDescription, ""));
+ myServerConfiguration.setServerName(StringUtils.defaultIfEmpty(serverName, ""));
+ myServerConfiguration.setServerVersion(StringUtils.defaultIfEmpty(serverVersion, ""));
}
/**
@@ -151,32 +149,32 @@ public abstract class AbstractJaxRsConformanceProvider extends AbstractJaxRsProv
for (ResourceBinding baseMethodBinding : myResourceNameToBinding.values()) {
serverBindings.addAll(baseMethodBinding.getMethodBindings());
}
- serverConfiguration.setServerBindings(serverBindings);
- serverConfiguration.setResourceBindings(new LinkedList(myResourceNameToBinding.values()));
- serverConfiguration.computeSharedSupertypeForResourcePerName(providers.values());
+ myServerConfiguration.setServerBindings(serverBindings);
+ myServerConfiguration.setResourceBindings(new LinkedList(myResourceNameToBinding.values()));
+ myServerConfiguration.computeSharedSupertypeForResourcePerName(providers.values());
HardcodedServerAddressStrategy hardcodedServerAddressStrategy = new HardcodedServerAddressStrategy();
hardcodedServerAddressStrategy.setValue(getBaseForServer());
- serverConfiguration.setServerAddressStrategy(hardcodedServerAddressStrategy);
+ myServerConfiguration.setServerAddressStrategy(hardcodedServerAddressStrategy);
FhirVersionEnum fhirContextVersion = super.getFhirContext().getVersion().getVersion();
switch (fhirContextVersion) {
case R4:
- ServerCapabilityStatementProvider r4ServerCapabilityStatementProvider = new ServerCapabilityStatementProvider(getFhirContext(), serverConfiguration);
+ ServerCapabilityStatementProvider r4ServerCapabilityStatementProvider = new ServerCapabilityStatementProvider(getFhirContext(), myServerConfiguration);
myR4CapabilityStatement = (CapabilityStatement) r4ServerCapabilityStatementProvider.getServerConformance(null, null);
break;
case DSTU3:
- org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider dstu3ServerCapabilityStatementProvider = new org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider(serverConfiguration);
+ org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider dstu3ServerCapabilityStatementProvider = new org.hl7.fhir.dstu3.hapi.rest.server.ServerCapabilityStatementProvider(myServerConfiguration);
myDstu3CapabilityStatement = dstu3ServerCapabilityStatementProvider.getServerConformance(null, null);
break;
case DSTU2_1:
- org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider dstu2_1ServerConformanceProvider = new org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider(serverConfiguration);
+ org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider dstu2_1ServerConformanceProvider = new org.hl7.fhir.dstu2016may.hapi.rest.server.ServerConformanceProvider(myServerConfiguration);
myDstu2_1Conformance = dstu2_1ServerConformanceProvider.getServerConformance(null, null);
break;
case DSTU2_HL7ORG:
- ServerConformanceProvider dstu2Hl7OrgServerConformanceProvider = new ServerConformanceProvider(serverConfiguration);
+ ServerConformanceProvider dstu2Hl7OrgServerConformanceProvider = new ServerConformanceProvider(myServerConfiguration);
myDstu2Hl7OrgConformance = dstu2Hl7OrgServerConformanceProvider.getServerConformance(null, null);
break;
case DSTU2:
- ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider dstu2ServerConformanceProvider = new ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider(serverConfiguration);
+ ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider dstu2ServerConformanceProvider = new ca.uhn.fhir.rest.server.provider.dstu2.ServerConformanceProvider(myServerConfiguration);
myDstu2Conformance = dstu2ServerConformanceProvider.getServerConformance(null, null);
break;
default:
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index b852374facf..053e9e20eee 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/IHasScheduledJobs.java
similarity index 66%
rename from hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java
rename to hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/IHasScheduledJobs.java
index 0b538eef71f..984f272ed67 100644
--- a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/ISmartLifecyclePhase.java
+++ b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/model/sched/IHasScheduledJobs.java
@@ -20,11 +20,9 @@ package ca.uhn.fhir.jpa.model.sched;
* #L%
*/
-public interface ISmartLifecyclePhase {
- // POST_CONSTRUCT is here as a marker for where post-construct fits into the smart lifecycle. Beans with negative phases
- // will be started before @PostConstruct are called
- int POST_CONSTRUCT = 0;
-
- // We want to start scheduled tasks fairly late in the startup process
- int SCHEDULER_1000 = 1000;
+/**
+ * This interface is implemented by classes that have scheduled jobs
+ */
+public interface IHasScheduledJobs {
+ void scheduleJobs(ISchedulerService theSchedulerService);
}
diff --git a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java
index a7b5abf2688..bed64818402 100644
--- a/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java
+++ b/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseSchedulerServiceImpl.java
@@ -23,8 +23,8 @@ package ca.uhn.fhir.jpa.sched;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.model.sched.IHapiScheduler;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
-import ca.uhn.fhir.jpa.model.sched.ISmartLifecyclePhase;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.util.StopWatch;
import com.google.common.annotations.VisibleForTesting;
@@ -34,10 +34,13 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
-import org.springframework.context.SmartLifecycle;
+import org.springframework.context.event.ContextClosedEvent;
+import org.springframework.context.event.ContextRefreshedEvent;
+import org.springframework.context.event.EventListener;
import org.springframework.core.env.Environment;
import javax.annotation.PostConstruct;
+import java.util.Collection;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -58,7 +61,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
*
*
*/
-public abstract class BaseSchedulerServiceImpl implements ISchedulerService, SmartLifecycle {
+public abstract class BaseSchedulerServiceImpl implements ISchedulerService {
public static final String SCHEDULING_DISABLED = "scheduling_disabled";
public static final String SCHEDULING_DISABLED_EQUALS_TRUE = SCHEDULING_DISABLED + "=true";
@@ -140,18 +143,10 @@ public abstract class BaseSchedulerServiceImpl implements ISchedulerService, Sma
protected abstract IHapiScheduler getClusteredScheduler();
- /**
- * We defer startup of executing started tasks until we're sure we're ready for it
- * and the startup is completely done
- */
-
- @Override
- public int getPhase() {
- return ISmartLifecyclePhase.SCHEDULER_1000;
- }
-
- @Override
+ @EventListener(ContextRefreshedEvent.class)
public void start() {
+ myStopping.set(false);
+
try {
ourLog.info("Starting task schedulers for context {}", myApplicationContext.getId());
if (myLocalScheduler != null) {
@@ -164,9 +159,17 @@ public abstract class BaseSchedulerServiceImpl implements ISchedulerService, Sma
ourLog.error("Failed to start scheduler", e);
throw new ConfigurationException(Msg.code(1632) + "Failed to start scheduler", e);
}
+
+ scheduleJobs();
}
- @Override
+ private void scheduleJobs() {
+ Collection values = myApplicationContext.getBeansOfType(IHasScheduledJobs.class).values();
+ ourLog.info("Scheduling {} jobs in {}", values.size(), myApplicationContext.getId());
+ values.forEach(t -> t.scheduleJobs(this));
+ }
+
+ @EventListener(ContextClosedEvent.class)
public void stop() {
ourLog.info("Shutting down task scheduler...");
@@ -175,11 +178,6 @@ public abstract class BaseSchedulerServiceImpl implements ISchedulerService, Sma
myClusteredScheduler.shutdown();
}
- @Override
- public boolean isRunning() {
- return !myStopping.get() && myLocalScheduler.isStarted() && myClusteredScheduler.isStarted();
- }
-
@Override
public void purgeAllScheduledJobsForUnitTest() throws SchedulerException {
myLocalScheduler.clear();
diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml
index 7bb045ffb1f..5cba5e7e9d1 100644
--- a/hapi-fhir-jpaserver-base/pom.xml
+++ b/hapi-fhir-jpaserver-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java
index 5f391978db1..b577653fe7a 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/export/svc/BulkDataExportJobSchedulingHelperImpl.java
@@ -20,7 +20,6 @@ package ca.uhn.fhir.jpa.bulk.export.svc;
* #L%
*/
-import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
@@ -33,6 +32,7 @@ import ca.uhn.fhir.jpa.entity.BulkExportCollectionEntity;
import ca.uhn.fhir.jpa.entity.BulkExportCollectionFileEntity;
import ca.uhn.fhir.jpa.entity.BulkExportJobEntity;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.rest.api.server.SystemRequestDetails;
@@ -47,16 +47,16 @@ import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionTemplate;
import javax.annotation.PostConstruct;
-import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.Optional;
import static org.slf4j.LoggerFactory.getLogger;
-public class BulkDataExportJobSchedulingHelperImpl implements IBulkDataExportJobSchedulingHelper {
+public class BulkDataExportJobSchedulingHelperImpl implements IBulkDataExportJobSchedulingHelper, IHasScheduledJobs {
private static final Logger ourLog = getLogger(BulkDataExportJobSchedulingHelperImpl.class);
@Autowired
@@ -72,30 +72,26 @@ public class BulkDataExportJobSchedulingHelperImpl implements IBulkDataExportJob
private PlatformTransactionManager myTxManager;
private TransactionTemplate myTxTemplate;
- @Autowired
- private ISchedulerService mySchedulerService;
-
@Autowired
private IBulkExportJobDao myBulkExportJobDao;
@Autowired
private DaoConfig myDaoConfig;
-
- @Autowired
- private FhirContext myContext;
-
@Autowired
private BulkExportHelperService myBulkExportHelperSvc;
@PostConstruct
public void start() {
myTxTemplate = new TransactionTemplate(myTxManager);
+ }
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
// job to cleanup unneeded BulkExportJobEntities that are persisted, but unwanted
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
jobDetail.setId(PurgeExpiredFilesJob.class.getName());
jobDetail.setJobClass(PurgeExpiredFilesJob.class);
- mySchedulerService.scheduleClusteredJob(DateUtils.MILLIS_PER_HOUR, jobDetail);
+ theSchedulerService.scheduleClusteredJob(DateUtils.MILLIS_PER_HOUR, jobDetail);
}
@Override
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java
index bc62472a703..0bebb4f459f 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/imprt/svc/BulkDataImportSvcImpl.java
@@ -35,6 +35,7 @@ import ca.uhn.fhir.jpa.dao.data.IBulkImportJobFileDao;
import ca.uhn.fhir.jpa.entity.BulkImportJobEntity;
import ca.uhn.fhir.jpa.entity.BulkImportJobFileEntity;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -50,11 +51,11 @@ import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionTemplate;
import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
-import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
@@ -63,7 +64,7 @@ import java.util.concurrent.Semaphore;
import static ca.uhn.fhir.batch2.jobs.importpull.BulkImportPullConfig.BULK_IMPORT_JOB_NAME;
-public class BulkDataImportSvcImpl implements IBulkDataImportSvc {
+public class BulkDataImportSvcImpl implements IBulkDataImportSvc, IHasScheduledJobs {
private static final Logger ourLog = LoggerFactory.getLogger(BulkDataImportSvcImpl.class);
private final Semaphore myRunningJobSemaphore = new Semaphore(1);
@Autowired
@@ -74,9 +75,6 @@ public class BulkDataImportSvcImpl implements IBulkDataImportSvc {
private PlatformTransactionManager myTxManager;
private TransactionTemplate myTxTemplate;
- @Autowired
- private ISchedulerService mySchedulerService;
-
@Autowired
private IJobCoordinator myJobCoordinator;
@@ -86,14 +84,19 @@ public class BulkDataImportSvcImpl implements IBulkDataImportSvc {
@PostConstruct
public void start() {
myTxTemplate = new TransactionTemplate(myTxManager);
+ }
+
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
// This job should be local so that each node in the cluster can pick up jobs
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
jobDetail.setId(ActivationJob.class.getName());
jobDetail.setJobClass(ActivationJob.class);
- mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
+ theSchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
}
+
@Override
@Transactional
public String createNewJob(BulkImportJobJson theJobDescription, @Nonnull List theInitialFiles) {
@@ -309,7 +312,6 @@ public class BulkDataImportSvcImpl implements IBulkDataImportSvc {
}
}
-
public static class ActivationJob implements HapiJob {
@Autowired
private IBulkDataImportSvc myTarget;
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
index 50194e56407..011d200ad9a 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
@@ -9,7 +9,6 @@ import ca.uhn.fhir.interceptor.api.IInterceptorService;
import ca.uhn.fhir.interceptor.executor.InterceptorService;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
-import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
import ca.uhn.fhir.jpa.binary.interceptor.BinaryStorageInterceptor;
@@ -46,6 +45,7 @@ import ca.uhn.fhir.jpa.dao.index.SearchParamWithInlineReferencesExtractor;
import ca.uhn.fhir.jpa.dao.mdm.JpaMdmLinkImplFactory;
import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDaoJpaImpl;
import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService;
+import ca.uhn.fhir.jpa.dao.validation.SearchParameterDaoValidator;
import ca.uhn.fhir.jpa.delete.DeleteConflictFinderService;
import ca.uhn.fhir.jpa.delete.DeleteConflictService;
import ca.uhn.fhir.jpa.delete.ThreadSafeResourceDeleterSvc;
@@ -132,11 +132,11 @@ import ca.uhn.fhir.jpa.term.api.ITermReindexingSvc;
import ca.uhn.fhir.jpa.term.config.TermCodeSystemConfig;
import ca.uhn.fhir.jpa.util.MemoryCacheService;
import ca.uhn.fhir.jpa.validation.ResourceLoaderImpl;
-import ca.uhn.fhir.jpa.dao.validation.SearchParameterDaoValidator;
import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.mdm.dao.IMdmLinkDao;
import ca.uhn.fhir.mdm.dao.IMdmLinkImplFactory;
import ca.uhn.fhir.mdm.svc.MdmLinkExpandSvc;
+import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.api.server.storage.IDeleteExpungeJobSubmitter;
import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
@@ -287,8 +287,8 @@ public class JpaConfig {
@Bean(name = "myBinaryStorageInterceptor")
@Lazy
- public BinaryStorageInterceptor binaryStorageInterceptor(DaoConfig theDaoConfig) {
- BinaryStorageInterceptor interceptor = new BinaryStorageInterceptor();
+ public BinaryStorageInterceptor extends IPrimitiveDatatype> binaryStorageInterceptor(DaoConfig theDaoConfig, FhirContext theCtx) {
+ BinaryStorageInterceptor extends IPrimitiveDatatype> interceptor = new BinaryStorageInterceptor<>(theCtx);
interceptor.setAllowAutoInflateBinaries(theDaoConfig.isAllowAutoInflateBinaries());
interceptor.setAutoInflateBinariesMaximumSize(theDaoConfig.getAutoInflateBinariesMaximumBytes());
return interceptor;
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java
index e69de29bb2d..6d4426c36c2 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderConceptMapDstu3.java
@@ -0,0 +1,19 @@
+/*-
+ * #%L
+ * HAPI FHIR JPA Server
+ * %%
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java
index b8886c0d71e..6daed999f1b 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/StaleSearchDeletingSvcImpl.java
@@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.search;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc;
@@ -30,8 +31,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
-import javax.annotation.PostConstruct;
-
import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.SEARCH_CLEANUP_JOB_INTERVAL_MILLIS;
/**
@@ -42,14 +41,12 @@ import static ca.uhn.fhir.jpa.search.cache.DatabaseSearchCacheSvcImpl.SEARCH_CLE
// it in BaseConfig. This is so that we can override the definition
// in Smile.
//
-public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc {
+public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc, IHasScheduledJobs {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StaleSearchDeletingSvcImpl.class);
@Autowired
private DaoConfig myDaoConfig;
@Autowired
private ISearchCacheSvc mySearchCacheSvc;
- @Autowired
- private ISchedulerService mySchedulerService;
@Override
@Transactional(propagation = Propagation.NEVER)
@@ -57,12 +54,12 @@ public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc {
mySearchCacheSvc.pollForStaleSearchesAndDeleteThem();
}
- @PostConstruct
- public void scheduleJob() {
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
jobDetail.setId(getClass().getName());
jobDetail.setJobClass(Job.class);
- mySchedulerService.scheduleClusteredJob(SEARCH_CLEANUP_JOB_INTERVAL_MILLIS, jobDetail);
+ theSchedulerService.scheduleClusteredJob(SEARCH_CLEANUP_JOB_INTERVAL_MILLIS, jobDetail);
}
public static class Job implements HapiJob {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java
index dc7c3e8ffbc..b8ad52ad179 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java
@@ -21,8 +21,8 @@ package ca.uhn.fhir.jpa.search.reindex;
*/
import ca.uhn.fhir.batch2.model.JobInstanceStartRequest;
-import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
@@ -32,6 +32,7 @@ import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
import ca.uhn.fhir.jpa.entity.ResourceReindexJobEntity;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.parser.DataFormatException;
@@ -53,6 +54,7 @@ import org.springframework.data.domain.Slice;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionCallback;
import org.springframework.transaction.support.TransactionTemplate;
@@ -62,7 +64,6 @@ import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;
import javax.persistence.Query;
-import org.springframework.transaction.annotation.Transactional;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@@ -84,7 +85,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
* @deprecated Use the Batch2 {@link ca.uhn.fhir.batch2.api.IJobCoordinator#startInstance(JobInstanceStartRequest)} instead.
*/
@Deprecated
-public class ResourceReindexingSvcImpl implements IResourceReindexingSvc {
+public class ResourceReindexingSvcImpl implements IResourceReindexingSvc, IHasScheduledJobs {
private static final Date BEGINNING_OF_TIME = new Date(0);
private static final Logger ourLog = LoggerFactory.getLogger(ResourceReindexingSvcImpl.class);
@@ -112,8 +113,6 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc {
@Autowired
private ISearchParamRegistry mySearchParamRegistry;
@Autowired
- private ISchedulerService mySchedulerService;
- @Autowired
private ResourceReindexer myResourceReindexer;
@VisibleForTesting
@@ -130,7 +129,6 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc {
public void start() {
myTxTemplate = new TransactionTemplate(myTxManager);
initExecutor();
- scheduleJob();
}
public void initExecutor() {
@@ -145,12 +143,12 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc {
);
}
-
- public void scheduleJob() {
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
jobDetail.setId(getClass().getName());
jobDetail.setJobClass(Job.class);
- mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
+ theSchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
}
@Override
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java
index 134fdd62a57..e8d5eb0a1f2 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/warm/CacheWarmingSvcImpl.java
@@ -20,15 +20,16 @@ package ca.uhn.fhir.jpa.search.warm;
* #L%
*/
-import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
+import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
import ca.uhn.fhir.jpa.api.model.WarmCacheEntry;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
@@ -50,7 +51,7 @@ import java.util.Map;
import java.util.Set;
@Component
-public class CacheWarmingSvcImpl implements ICacheWarmingSvc {
+public class CacheWarmingSvcImpl implements ICacheWarmingSvc, IHasScheduledJobs {
private static final Logger ourLog = LoggerFactory.getLogger(CacheWarmingSvcImpl.class);
@Autowired
@@ -62,8 +63,6 @@ public class CacheWarmingSvcImpl implements ICacheWarmingSvc {
private DaoRegistry myDaoRegistry;
@Autowired
private MatchUrlService myMatchUrlService;
- @Autowired
- private ISchedulerService mySchedulerService;
@Override
public synchronized void performWarmingPass() {
@@ -109,14 +108,14 @@ public class CacheWarmingSvcImpl implements ICacheWarmingSvc {
@PostConstruct
public void start() {
initCacheMap();
- scheduleJob();
}
- public void scheduleJob() {
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
jobDetail.setId(getClass().getName());
jobDetail.setJobClass(Job.class);
- mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
+ theSchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
}
public static class Job implements HapiJob {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java
index d246188f3b8..582bf435fc8 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java
@@ -35,6 +35,7 @@ import ca.uhn.fhir.jpa.entity.TermConcept;
import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc;
@@ -58,7 +59,6 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.transaction.support.TransactionTemplate;
-import javax.annotation.PostConstruct;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -73,7 +73,7 @@ import java.util.function.Supplier;
import static ca.uhn.fhir.batch2.jobs.termcodesystem.TermCodeSystemJobConfig.TERM_CODE_SYSTEM_DELETE_JOB_NAME;
import static ca.uhn.fhir.batch2.jobs.termcodesystem.TermCodeSystemJobConfig.TERM_CODE_SYSTEM_VERSION_DELETE_JOB_NAME;
-public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc {
+public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc, IHasScheduledJobs {
private static final Logger ourLog = LoggerFactory.getLogger(TermDeferredStorageSvcImpl.class);
private static final long SAVE_ALL_DEFERRED_WARN_MINUTES = 1;
@@ -105,8 +105,6 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc {
@Autowired
private ITermConceptParentChildLinkDao myConceptParentChildLinkDao;
@Autowired
- private ISchedulerService mySchedulerService;
- @Autowired
private ITermVersionAdapterSvc myTerminologyVersionAdapterSvc;
@Autowired
@@ -282,9 +280,9 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc {
Duration.of(SAVE_ALL_DEFERRED_ERROR_MINUTES, ChronoUnit.MINUTES));
}
- // Don't include executing jobs here since there's no point in thrashing over and over
- // in a busy wait while we wait for batch2 job processes to finish
- while (!isStorageQueueEmpty(false)) {
+ // Don't include executing jobs here since there's no point in thrashing over and over
+ // in a busy wait while we wait for batch2 job processes to finish
+ while (!isStorageQueueEmpty(false)) {
if (myAllowDeferredTasksTimeout) {
if (timeoutManager.checkTimeout()) {
ourLog.info(toString());
@@ -464,18 +462,6 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc {
return !myDeferredConceptMaps.isEmpty();
}
- @PostConstruct
- public void scheduleJob() {
- // TODO KHS what does this mean?
- // Register scheduled job to save deferred concepts
- // In the future it would be great to make this a cluster-aware task somehow
- ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition();
- jobDefinition.setId(Job.class.getName());
- jobDefinition.setJobClass(Job.class);
- mySchedulerService.scheduleLocalJob(5000, jobDefinition);
-
- }
-
@VisibleForTesting
void setTransactionManagerForUnitTest(PlatformTransactionManager theTxManager) {
myTransactionMgr = theTxManager;
@@ -496,8 +482,11 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc {
void setCodeSystemVersionDaoForUnitTest(ITermCodeSystemVersionDao theCodeSystemVersionDao) {
myCodeSystemVersionDao = theCodeSystemVersionDao;
}
+
@Override
- public void disallowDeferredTaskTimeout() { myAllowDeferredTasksTimeout = false; }
+ public void disallowDeferredTaskTimeout() {
+ myAllowDeferredTasksTimeout = false;
+ }
@Override
@VisibleForTesting
@@ -515,6 +504,17 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc {
myDeferredCodeSystemVersionsDeletions.add(theCodeSystemVersion);
}
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
+ // TODO KHS what does this mean?
+ // Register scheduled job to save deferred concepts
+ // In the future it would be great to make this a cluster-aware task somehow
+ ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition();
+ jobDefinition.setId(Job.class.getName());
+ jobDefinition.setJobClass(Job.class);
+ theSchedulerService.scheduleLocalJob(5000, jobDefinition);
+ }
+
public static class Job implements HapiJob {
@Autowired
private ITermDeferredStorageSvc myTerminologySvc;
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java
index c571aacf121..eb35ef43202 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java
@@ -65,6 +65,7 @@ import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.model.entity.ForcedId;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.jpa.model.util.JpaConstants;
@@ -192,7 +193,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
import static org.apache.commons.lang3.StringUtils.lowerCase;
import static org.apache.commons.lang3.StringUtils.startsWithIgnoreCase;
-public class TermReadSvcImpl implements ITermReadSvc {
+public class TermReadSvcImpl implements ITermReadSvc, IHasScheduledJobs {
public static final int DEFAULT_FETCH_SIZE = 250;
public static final int DEFAULT_MASS_INDEXER_OBJECT_LOADING_THREADS = 2;
// doesn't seem to be much gain by using more threads than this value
@@ -248,8 +249,6 @@ public class TermReadSvcImpl implements ITermReadSvc {
private ITermValueSetConceptViewDao myTermValueSetConceptViewDao;
@Autowired
private ITermValueSetConceptViewOracleDao myTermValueSetConceptViewOracleDao;
- @Autowired
- private ISchedulerService mySchedulerService;
@Autowired(required = false)
private ITermDeferredStorageSvc myDeferredStorageSvc;
@Autowired
@@ -1887,16 +1886,16 @@ public class TermReadSvcImpl implements ITermReadSvc {
RuleBasedTransactionAttribute rules = new RuleBasedTransactionAttribute();
rules.getRollbackRules().add(new NoRollbackRuleAttribute(ExpansionTooCostlyException.class));
myTxTemplate = new TransactionTemplate(myTransactionManager, rules);
- scheduleJob();
}
- public void scheduleJob() {
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
// Register scheduled job to pre-expand ValueSets
// In the future it would be great to make this a cluster-aware task somehow
ScheduledJobDefinition vsJobDefinition = new ScheduledJobDefinition();
vsJobDefinition.setId(getClass().getName());
vsJobDefinition.setJobClass(Job.class);
- mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_MINUTE, vsJobDefinition);
+ theSchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_MINUTE, vsJobDefinition);
}
@Override
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java
index 60574891f8e..6ac01ad168e 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReindexingSvcImpl.java
@@ -24,6 +24,7 @@ import ca.uhn.fhir.jpa.dao.data.ITermConceptDao;
import ca.uhn.fhir.jpa.dao.data.ITermConceptParentChildLinkDao;
import ca.uhn.fhir.jpa.entity.TermConcept;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc;
@@ -45,13 +46,12 @@ import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;
-import javax.annotation.PostConstruct;
import java.util.Collection;
import java.util.List;
import static org.apache.commons.lang3.StringUtils.isBlank;
-public class TermReindexingSvcImpl implements ITermReindexingSvc {
+public class TermReindexingSvcImpl implements ITermReindexingSvc, IHasScheduledJobs {
private static final Logger ourLog = LoggerFactory.getLogger(TermReindexingSvcImpl.class);
private static boolean ourForceSaveDeferredAlwaysForUnitTest;
@Autowired
@@ -64,8 +64,6 @@ public class TermReindexingSvcImpl implements ITermReindexingSvc {
@Autowired
private ITermDeferredStorageSvc myDeferredStorageSvc;
@Autowired
- private ISchedulerService mySchedulerService;
- @Autowired
private TermConceptDaoSvc myTermConceptDaoSvc;
@Override
@@ -147,15 +145,15 @@ public class TermReindexingSvcImpl implements ITermReindexingSvc {
}
- @PostConstruct
- public void scheduleJob() {
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
// TODO KHS what does this mean?
// Register scheduled job to save deferred concepts
// In the future it would be great to make this a cluster-aware task somehow
ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition();
jobDefinition.setId(this.getClass().getName());
jobDefinition.setJobClass(Job.class);
- mySchedulerService.scheduleLocalJob(DateUtils.MILLIS_PER_MINUTE, jobDefinition);
+ theSchedulerService.scheduleLocalJob(DateUtils.MILLIS_PER_MINUTE, jobDefinition);
}
public static class Job implements HapiJob {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java
index 652bb41d96c..d90d97ffc83 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/ResourceCountCache.java
@@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.util;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
+import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
import ca.uhn.fhir.jpa.model.sched.ISchedulerService;
import ca.uhn.fhir.jpa.model.sched.ScheduledJobDefinition;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@@ -32,12 +33,11 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import javax.annotation.PostConstruct;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicReference;
-public class ResourceCountCache {
+public class ResourceCountCache implements IHasScheduledJobs {
private static final Logger ourLog = LoggerFactory.getLogger(ResourceCountCache.class);
private static Long ourNowForUnitTest;
@@ -45,8 +45,6 @@ public class ResourceCountCache {
private volatile long myCacheMillis;
private AtomicReference
*/
-public class JobMaintenanceServiceImpl implements IJobMaintenanceService {
+public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasScheduledJobs {
private static final Logger ourLog = Logs.getBatchTroubleshootingLog();
public static final int INSTANCES_PER_PASS = 100;
@@ -111,8 +111,8 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService {
myJobExecutorSvc = theExecutor;
}
- @PostConstruct
- public void start() {
+ @Override
+ public void scheduleJobs(ISchedulerService theSchedulerService) {
mySchedulerService.scheduleClusteredJob(DateUtils.MILLIS_PER_MINUTE, buildJobDefinition());
}
diff --git a/hapi-fhir-storage-cr/pom.xml b/hapi-fhir-storage-cr/pom.xml
index 1f142a07ea8..439a7e9bfd4 100644
--- a/hapi-fhir-storage-cr/pom.xml
+++ b/hapi-fhir-storage-cr/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java
index 2df727d4aff..fe3f428d687 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CodeCacheResourceChangeListener.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java
index 7e926d7a8a7..ece96645b47 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlExceptionHandlingInterceptor.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java
index 4e304415270..3b53ec45231 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/CqlForkJoinWorkerThreadFactory.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java
index 1d2f988eb7e..491eaa5bae5 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirDal.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java
index b9347c913ba..c7ad9e20dde 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiFhirRetrieveProvider.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java
index 6f60cd5e1cf..18a555f307d 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiLibrarySourceProvider.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java
index 5dd050fd9f8..367b332890b 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/HapiTerminologyProvider.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java
index 3b6029278e7..be299555977 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDaoRegistryUser.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java
index 2dc79687dba..a14be2759fb 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IDataProviderFactory.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java
index 8a034caaa45..463c92a6fa3 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/IFhirDalFactory.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java
index e5673f3c931..e4cc2be5dc9 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibraryManagerFactory.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java
index 5cb5be05a94..35af240e5ed 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ILibrarySourceProviderFactory.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java
index f929b4bbd9b..feeef28ade0 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/ITerminologyProviderFactory.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java
index e2d745401c6..f9a3a2638c8 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/PreExpandedValidationSupport.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java
index 66fb711a97c..d3bb0d4acc4 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/Searches.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java
index b9c2419a988..0472ddf68bb 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/SupplementalDataConstants.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java
index 9992ecf93e2..05bf8e09ec4 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/common/TypedBundleProvider.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.common;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java
index 2c2e0178839..0f61dcfe9be 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/BaseClinicalReasoningConfig.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java
index 5984efaecb7..a7309da726e 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrDstu3Config.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java
index bfd01642ce9..49ffc3f61c4 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrProperties.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java
index cb2571200b9..7fe66c9695d 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/CrR4Config.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java
index 88120054259..33589c7afe9 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/config/PreExpandedValidationSupportLoader.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.config;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java
index 0b68858ee8c..f3647f17ecc 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/ISupplementalDataSearchParamUser.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.dstu3;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java
index c0f52d1adc0..5ae3ee459b7 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureOperationsProvider.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.dstu3.measure;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java
index 84d73f44d88..090d3f90b5b 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/dstu3/measure/MeasureService.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.dstu3.measure;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java
index a7ae87080c0..e2d5296da6e 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/ISupplementalDataSearchParamUser.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.r4;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java
index b36eea145f7..880cd6ff75d 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureOperationsProvider.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.r4.measure;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java
index 60a7aaac5fc..21e86424f02 100644
--- a/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java
+++ b/hapi-fhir-storage-cr/src/main/java/ca/uhn/fhir/cr/r4/measure/MeasureService.java
@@ -4,7 +4,7 @@ package ca.uhn.fhir.cr.r4.measure;
* #%L
* HAPI FHIR - Clinical Reasoning
* %%
- * Copyright (C) 2014 - 2022 Smile CDR, Inc.
+ * Copyright (C) 2014 - 2023 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml
index 8e6642bc185..4f4187c7be9 100644
--- a/hapi-fhir-storage-mdm/pom.xml
+++ b/hapi-fhir-storage-mdm/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml
index d204ce5cd98..bfa98843d88 100644
--- a/hapi-fhir-storage-test-utilities/pom.xml
+++ b/hapi-fhir-storage-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index 7e3abc2be73..252f4a7a6b4 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java
index 3231aaaba55..cfe460f941f 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/binary/interceptor/BinaryStorageInterceptor.java
@@ -20,20 +20,20 @@ package ca.uhn.fhir.jpa.binary.interceptor;
* #L%
*/
-import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.interceptor.api.Hook;
import ca.uhn.fhir.interceptor.api.Interceptor;
import ca.uhn.fhir.interceptor.api.Pointcut;
-import ca.uhn.fhir.jpa.binary.api.StoredDetails;
import ca.uhn.fhir.jpa.binary.api.IBinaryStorageSvc;
import ca.uhn.fhir.jpa.binary.api.IBinaryTarget;
+import ca.uhn.fhir.jpa.binary.api.StoredDetails;
import ca.uhn.fhir.jpa.binary.provider.BinaryAccessProvider;
import ca.uhn.fhir.jpa.model.util.JpaConstants;
-import ca.uhn.fhir.rest.api.server.storage.TransactionDetails;
import ca.uhn.fhir.rest.api.server.IPreResourceShowDetails;
+import ca.uhn.fhir.rest.api.server.storage.TransactionDetails;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.util.HapiExtensions;
import ca.uhn.fhir.util.IModelVisitor2;
@@ -49,7 +49,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Nonnull;
-import javax.annotation.PostConstruct;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -65,20 +64,28 @@ import static ca.uhn.fhir.util.HapiExtensions.EXT_EXTERNALIZED_BINARY_ID;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@Interceptor
-public class BinaryStorageInterceptor {
+public class BinaryStorageInterceptor> {
private static final Logger ourLog = LoggerFactory.getLogger(BinaryStorageInterceptor.class);
@Autowired
private IBinaryStorageSvc myBinaryStorageSvc;
- @Autowired
- private FhirContext myCtx;
+ private final FhirContext myCtx;
@Autowired
private BinaryAccessProvider myBinaryAccessProvider;
- private Class extends IPrimitiveType> myBinaryType;
+ private Class myBinaryType;
private String myDeferredListKey;
private long myAutoInflateBinariesMaximumBytes = 10 * FileUtils.ONE_MB;
private boolean myAllowAutoInflateBinaries = true;
+ public BinaryStorageInterceptor(FhirContext theCtx) {
+ myCtx = theCtx;
+ BaseRuntimeElementDefinition> base64Binary = myCtx.getElementDefinition("base64Binary");
+ assert base64Binary != null;
+ myBinaryType = (Class) base64Binary.getImplementingClass();
+ myDeferredListKey = getClass().getName() + "_" + hashCode() + "_DEFERRED_LIST";
+
+ }
+
/**
* Any externalized binaries will be rehydrated if their size is below this thhreshold when
* reading the resource back. Default is 10MB.
@@ -95,15 +102,6 @@ public class BinaryStorageInterceptor {
myAutoInflateBinariesMaximumBytes = theAutoInflateBinariesMaximumBytes;
}
- @SuppressWarnings("unchecked")
- @PostConstruct
- public void start() {
- BaseRuntimeElementDefinition> base64Binary = myCtx.getElementDefinition("base64Binary");
- assert base64Binary != null;
- myBinaryType = (Class extends IPrimitiveType>) base64Binary.getImplementingClass();
- myDeferredListKey = getClass().getName() + "_" + hashCode() + "_DEFERRED_LIST";
- }
-
@Hook(Pointcut.STORAGE_PRESTORAGE_EXPUNGE_RESOURCE)
public void expungeResource(AtomicInteger theCounter, IBaseResource theResource) {
@@ -144,7 +142,7 @@ public class BinaryStorageInterceptor {
private void blockIllegalExternalBinaryIds(IBaseResource thePreviousResource, IBaseResource theResource) {
Set existingBinaryIds = new HashSet<>();
if (thePreviousResource != null) {
- List extends IPrimitiveType> base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(thePreviousResource, myBinaryType);
+ List base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(thePreviousResource, myBinaryType);
for (IPrimitiveType nextBase64 : base64fields) {
if (nextBase64 instanceof IBaseHasExtensions) {
((IBaseHasExtensions) nextBase64)
@@ -160,7 +158,7 @@ public class BinaryStorageInterceptor {
}
}
- List extends IPrimitiveType> base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(theResource, myBinaryType);
+ List base64fields = myCtx.newTerser().getAllPopulatedChildElementsOfType(theResource, myBinaryType);
for (IPrimitiveType nextBase64 : base64fields) {
if (nextBase64 instanceof IBaseHasExtensions) {
Optional hasExternalizedBinaryReference = ((IBaseHasExtensions) nextBase64)
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index a8d67a05cc5..7cbe4f46fda 100644
--- a/hapi-fhir-structures-dstu2.1/pom.xml
+++ b/hapi-fhir-structures-dstu2.1/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index e5a8669cc1e..760656526a7 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index c6f75df874e..b1e2115d3f4 100644
--- a/hapi-fhir-structures-dstu3/pom.xml
+++ b/hapi-fhir-structures-dstu3/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml
index 4ec3bbac385..837b9d0d2ba 100644
--- a/hapi-fhir-structures-hl7org-dstu2/pom.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index f96e8aee90e..a2676874e03 100644
--- a/hapi-fhir-structures-r4/pom.xml
+++ b/hapi-fhir-structures-r4/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml
index b37e5e53845..cffd50fffa2 100644
--- a/hapi-fhir-structures-r4b/pom.xml
+++ b/hapi-fhir-structures-r4b/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index 699880d4ed2..042d8c204ca 100644
--- a/hapi-fhir-structures-r5/pom.xml
+++ b/hapi-fhir-structures-r5/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index 1dc21cab7f2..e905e2602c6 100644
--- a/hapi-fhir-test-utilities/pom.xml
+++ b/hapi-fhir-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index 5274b01a886..7c06f031ae1 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index 626983dae4b..963e8620883 100644
--- a/hapi-fhir-validation-resources-dstu2.1/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml
index b3d17c552dc..d0df4124769 100644
--- a/hapi-fhir-validation-resources-dstu2/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml
index 972cb850002..66c09309dc2 100644
--- a/hapi-fhir-validation-resources-dstu3/pom.xml
+++ b/hapi-fhir-validation-resources-dstu3/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml
index e9e900ac7b7..03e436b1d11 100644
--- a/hapi-fhir-validation-resources-r4/pom.xml
+++ b/hapi-fhir-validation-resources-r4/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml
index cc6e92574a3..b6b92e45934 100644
--- a/hapi-fhir-validation-resources-r5/pom.xml
+++ b/hapi-fhir-validation-resources-r5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index 8c30ef149bb..eda3b8db2f8 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index fdfc473da9d..33e10c91231 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index dbaf68b8624..00eebd17849 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index 3055f8d3f88..f6beb3a72fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
https://hapifhir.io
@@ -2117,7 +2117,7 @@
ca.uhn.hapi.fhir
hapi-fhir-checkstyle
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index ec3d4bab29f..feb735f57c7 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
index cbb312034e0..8b2a3f22137 100644
--- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
index 67e1c5682c1..94faaa5885f 100644
--- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.3.7-SNAPSHOT
+ 6.3.8-SNAPSHOT
../../pom.xml