Merge pull request #177 from jvitrifork/spring-pr
Ease setting environment configuration values
This commit is contained in:
@@ -7,8 +7,10 @@ import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.hl7.fhir.r4.model.Bundle;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@@ -55,12 +57,12 @@ public class AppProperties {
|
||||
private Boolean narrative_enabled = true;
|
||||
|
||||
private Validation validation = new Validation();
|
||||
private List<Tester> tester = ImmutableList.of(new Tester());
|
||||
private Map<String, Tester> tester = ImmutableMap.of("home", new Tester());
|
||||
private Logger logger = new Logger();
|
||||
private Subscription subscription = new Subscription();
|
||||
private Cors cors = null;
|
||||
private Partitioning partitioning = null;
|
||||
private List<ImplementationGuide> implementationGuides = null;
|
||||
private Map<String, ImplementationGuide> implementationGuides = null;
|
||||
|
||||
private Boolean lastn_enabled = false;
|
||||
|
||||
@@ -72,11 +74,11 @@ public class AppProperties {
|
||||
this.defer_indexing_for_codesystems_of_size = defer_indexing_for_codesystems_of_size;
|
||||
}
|
||||
|
||||
public List<ImplementationGuide> getImplementationGuides() {
|
||||
public Map<String, ImplementationGuide> getImplementationGuides() {
|
||||
return implementationGuides;
|
||||
}
|
||||
|
||||
public void setImplementationGuides(List<ImplementationGuide> implementationGuides) {
|
||||
public void setImplementationGuides(Map<String, ImplementationGuide> implementationGuides) {
|
||||
this.implementationGuides = implementationGuides;
|
||||
}
|
||||
|
||||
@@ -366,11 +368,11 @@ public class AppProperties {
|
||||
this.reuse_cached_search_results_millis = reuse_cached_search_results_millis;
|
||||
}
|
||||
|
||||
public List<Tester> getTester() {
|
||||
public Map<String, Tester> getTester() {
|
||||
return tester;
|
||||
}
|
||||
|
||||
public void setTester(List<Tester> tester) {
|
||||
public void setTester(Map<String, Tester> tester) {
|
||||
this.tester = tester;
|
||||
}
|
||||
|
||||
@@ -458,7 +460,6 @@ public class AppProperties {
|
||||
|
||||
public static class Tester {
|
||||
|
||||
private String id = "home";
|
||||
private String name = "Local Tester";
|
||||
private String server_address = "http://localhost:8080/fhir";
|
||||
private Boolean refuse_to_fetch_third_party_urls = true;
|
||||
@@ -472,14 +473,6 @@ public class AppProperties {
|
||||
this.fhir_version = fhir_version;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user