Introduce backwards compatible constructor in ValidationEngineBuilder and deprecate (#1682)

* Introduce backwards compatible constructor + deprecate args constructors

* After review: fix useEcosystem set by param + deprecation annotation
This commit is contained in:
dotasek 2024-07-11 15:12:27 -04:00 committed by GitHub
parent 8fb95b49e0
commit d9f39b27fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 2 deletions

View File

@ -342,6 +342,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
@With
private boolean THO = true;
private static final boolean USE_ECOSYSTEM_DEFAULT = true;
public ValidationEngineBuilder() {
terminologyCachePath = null;
@ -352,10 +353,24 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
txVersion = null;
timeTracker = null;
canRunWithoutTerminologyServer = false;
useEcosystem = true;
useEcosystem = USE_ECOSYSTEM_DEFAULT;
loggingService = new SystemOutLoggingService();
}
/**
* @deprecated This method will be removed in a future release, and should not be used outside of this class.
* Use {@link #ValidationEngineBuilder()} instead.
*/
@Deprecated
public ValidationEngineBuilder(String terminologyCachePath, String userAgent, String version, String txServer, String txLog, FhirPublication txVersion, TimeTracker timeTracker, boolean canRunWithoutTerminologyServer, ILoggingService loggingService, boolean THO) {
this(terminologyCachePath, userAgent, version, txServer, txLog, txVersion, USE_ECOSYSTEM_DEFAULT, timeTracker, canRunWithoutTerminologyServer, loggingService, THO);
}
/**
* @deprecated This method will be made private in a future release, and should not be used outside of this class.
* Use {@link #ValidationEngineBuilder()} instead.
*/
@Deprecated
public ValidationEngineBuilder(String terminologyCachePath, String userAgent, String version, String txServer, String txLog, FhirPublication txVersion, boolean useEcosystem, TimeTracker timeTracker, boolean canRunWithoutTerminologyServer, ILoggingService loggingService, boolean THO) {
this.terminologyCachePath = terminologyCachePath;
this.userAgent = userAgent;
@ -366,7 +381,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
this.timeTracker = timeTracker;
this.canRunWithoutTerminologyServer = canRunWithoutTerminologyServer;
this.loggingService = loggingService;
this.useEcosystem = true;
this.useEcosystem = useEcosystem;
this.THO = THO;
}