Merge pull request #254 from hapifhir/feature/install_transitive_dependencies
Added option for installing transitive IG's - default is true
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -14,7 +14,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>5.4.0</version>
|
<version>5.4.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public class AppProperties {
|
|||||||
private Subscription subscription = new Subscription();
|
private Subscription subscription = new Subscription();
|
||||||
private Cors cors = null;
|
private Cors cors = null;
|
||||||
private Partitioning partitioning = null;
|
private Partitioning partitioning = null;
|
||||||
|
private Boolean install_transitive_ig_dependencies = true;
|
||||||
private Map<String, ImplementationGuide> implementationGuides = null;
|
private Map<String, ImplementationGuide> implementationGuides = null;
|
||||||
|
|
||||||
private Boolean lastn_enabled = false;
|
private Boolean lastn_enabled = false;
|
||||||
@@ -462,6 +463,14 @@ public class AppProperties {
|
|||||||
this.search_coord_queue_capacity = search_coord_queue_capacity;
|
this.search_coord_queue_capacity = search_coord_queue_capacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getInstall_transitive_ig_dependencies() {
|
||||||
|
return install_transitive_ig_dependencies;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstall_transitive_ig_dependencies(boolean install_transitive_ig_dependencies) {
|
||||||
|
this.install_transitive_ig_dependencies = install_transitive_ig_dependencies;
|
||||||
|
}
|
||||||
|
|
||||||
public static class Cors {
|
public static class Cors {
|
||||||
private Boolean allow_Credentials = true;
|
private Boolean allow_Credentials = true;
|
||||||
private List<String> allowed_origin = ImmutableList.of("*");
|
private List<String> allowed_origin = ImmutableList.of("*");
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
|||||||
import ca.uhn.fhir.validation.IValidatorModule;
|
import ca.uhn.fhir.validation.IValidatorModule;
|
||||||
import ca.uhn.fhir.validation.ResultSeverityEnum;
|
import ca.uhn.fhir.validation.ResultSeverityEnum;
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.hl7.fhir.r4.model.Bundle.BundleType;
|
import org.hl7.fhir.r4.model.Bundle.BundleType;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
@@ -365,12 +366,16 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
|||||||
if (appProperties.getImplementationGuides() != null) {
|
if (appProperties.getImplementationGuides() != null) {
|
||||||
Map<String, AppProperties.ImplementationGuide> guides = appProperties.getImplementationGuides();
|
Map<String, AppProperties.ImplementationGuide> guides = appProperties.getImplementationGuides();
|
||||||
for (Map.Entry<String, AppProperties.ImplementationGuide> guide : guides.entrySet()) {
|
for (Map.Entry<String, AppProperties.ImplementationGuide> guide : guides.entrySet()) {
|
||||||
packageInstallerSvc.install(new PackageInstallationSpec()
|
PackageInstallationSpec packageInstallationSpec = new PackageInstallationSpec()
|
||||||
.setPackageUrl(guide.getValue().getUrl())
|
.setPackageUrl(guide.getValue().getUrl())
|
||||||
.setName(guide.getValue().getName())
|
.setName(guide.getValue().getName())
|
||||||
.setVersion(guide.getValue().getVersion())
|
.setVersion(guide.getValue().getVersion());
|
||||||
.setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL));
|
if(appProperties.getInstall_transitive_ig_dependencies()) {
|
||||||
|
packageInstallationSpec.setFetchDependencies(true)
|
||||||
|
.setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL);
|
||||||
|
packageInstallationSpec.setDependencyExcludes(ImmutableList.of("hl7.fhir.r2.core", "hl7.fhir.r3.core", "hl7.fhir.r4.core", "hl7.fhir.r5.core"));
|
||||||
|
}
|
||||||
|
packageInstallerSvc.install(packageInstallationSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ hapi:
|
|||||||
### enable to set the Server URL
|
### enable to set the Server URL
|
||||||
# server_address: http://hapi.fhir.org/baseR4
|
# server_address: http://hapi.fhir.org/baseR4
|
||||||
# defer_indexing_for_codesystems_of_size: 101
|
# defer_indexing_for_codesystems_of_size: 101
|
||||||
|
# install_transitive_ig_dependencies: true
|
||||||
# implementationguides:
|
# implementationguides:
|
||||||
### example from registry (packages.fhir.org)
|
### example from registry (packages.fhir.org)
|
||||||
# swiss:
|
# swiss:
|
||||||
|
|||||||
Reference in New Issue
Block a user