Merge pull request #53 from lantanagroup/more-properties
Adding properties
This commit is contained in:
@@ -28,6 +28,10 @@ public class FhirServerConfigCommon {
|
|||||||
|
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirServerConfigCommon.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirServerConfigCommon.class);
|
||||||
|
|
||||||
|
private Boolean enableIndexMissingFields = HapiProperties.getEnableIndexMissingFields();
|
||||||
|
private Boolean autoCreatePlaceholderReferenceTargets = HapiProperties.getAutoCreatePlaceholderReferenceTargets();
|
||||||
|
private Boolean enforceReferentialIntegrityOnWrite = HapiProperties.getEnforceReferentialIntegrityOnWrite();
|
||||||
|
private Boolean enforceReferentialIntegrityOnDelete = HapiProperties.getEnforceReferentialIntegrityOnDelete();
|
||||||
private Boolean allowContainsSearches = HapiProperties.getAllowContainsSearches();
|
private Boolean allowContainsSearches = HapiProperties.getAllowContainsSearches();
|
||||||
private Boolean allowMultipleDelete = HapiProperties.getAllowMultipleDelete();
|
private Boolean allowMultipleDelete = HapiProperties.getAllowMultipleDelete();
|
||||||
private Boolean allowExternalReferences = HapiProperties.getAllowExternalReferences();
|
private Boolean allowExternalReferences = HapiProperties.getAllowExternalReferences();
|
||||||
@@ -82,6 +86,10 @@ public class FhirServerConfigCommon {
|
|||||||
public DaoConfig daoConfig() {
|
public DaoConfig daoConfig() {
|
||||||
DaoConfig retVal = new DaoConfig();
|
DaoConfig retVal = new DaoConfig();
|
||||||
|
|
||||||
|
retVal.setIndexMissingFields(this.enableIndexMissingFields ? DaoConfig.IndexEnabledEnum.ENABLED : DaoConfig.IndexEnabledEnum.DISABLED);
|
||||||
|
retVal.setAutoCreatePlaceholderReferenceTargets(this.autoCreatePlaceholderReferenceTargets);
|
||||||
|
retVal.setEnforceReferentialIntegrityOnWrite(this.enforceReferentialIntegrityOnWrite);
|
||||||
|
retVal.setEnforceReferentialIntegrityOnDelete(this.enforceReferentialIntegrityOnDelete);
|
||||||
retVal.setAllowContainsSearches(this.allowContainsSearches);
|
retVal.setAllowContainsSearches(this.allowContainsSearches);
|
||||||
retVal.setAllowMultipleDelete(this.allowMultipleDelete);
|
retVal.setAllowMultipleDelete(this.allowMultipleDelete);
|
||||||
retVal.setAllowExternalReferences(this.allowExternalReferences);
|
retVal.setAllowExternalReferences(this.allowExternalReferences);
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ import java.util.stream.Collectors;
|
|||||||
import static org.apache.commons.lang3.StringUtils.*;
|
import static org.apache.commons.lang3.StringUtils.*;
|
||||||
|
|
||||||
public class HapiProperties {
|
public class HapiProperties {
|
||||||
public static final String BINARY_STORAGE_ENABLED = "binary_storage.enabled";
|
static final String ENABLE_INDEX_MISSING_FIELDS = "enable_index_missing_fields";
|
||||||
|
static final String AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS = "auto_create_placeholder_reference_targets";
|
||||||
|
static final String ENFORCE_REFERENTIAL_INTEGRITY_ON_WRITE = "enforce_referential_integrity_on_write";
|
||||||
|
static final String ENFORCE_REFERENTIAL_INTEGRITY_ON_DELETE = "enforce_referential_integrity_on_delete";
|
||||||
|
static final String BINARY_STORAGE_ENABLED = "binary_storage.enabled";
|
||||||
static final String ALLOW_EXTERNAL_REFERENCES = "allow_external_references";
|
static final String ALLOW_EXTERNAL_REFERENCES = "allow_external_references";
|
||||||
static final String ALLOW_MULTIPLE_DELETE = "allow_multiple_delete";
|
static final String ALLOW_MULTIPLE_DELETE = "allow_multiple_delete";
|
||||||
static final String ALLOW_PLACEHOLDER_REFERENCES = "allow_placeholder_references";
|
static final String ALLOW_PLACEHOLDER_REFERENCES = "allow_placeholder_references";
|
||||||
@@ -377,8 +381,23 @@ public class HapiProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean getGraphqlEnabled() {
|
public static boolean getGraphqlEnabled() {
|
||||||
return HapiProperties.getBooleanProperty(GRAPHQL_ENABLED, true);
|
return HapiProperties.getBooleanProperty(GRAPHQL_ENABLED, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean getEnforceReferentialIntegrityOnDelete() {
|
||||||
|
return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_DELETE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean getEnforceReferentialIntegrityOnWrite() {
|
||||||
|
return HapiProperties.getBooleanProperty(ENFORCE_REFERENTIAL_INTEGRITY_ON_WRITE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean getAutoCreatePlaceholderReferenceTargets() {
|
||||||
|
return HapiProperties.getBooleanProperty(AUTO_CREATE_PLACEHOLDER_REFERENCE_TARGETS, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean getEnableIndexMissingFields() {
|
||||||
|
return HapiProperties.getBooleanProperty(ENABLE_INDEX_MISSING_FIELDS, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ fhir_version=R4
|
|||||||
# accessible from the server itself.
|
# accessible from the server itself.
|
||||||
server_address=http://localhost:8080/hapi-fhir-jpaserver/fhir/
|
server_address=http://localhost:8080/hapi-fhir-jpaserver/fhir/
|
||||||
|
|
||||||
|
enable_index_missing_fields=false
|
||||||
|
auto_create_placeholder_reference_targets=false
|
||||||
|
enforce_referential_integrity_on_write=false
|
||||||
|
enforce_referential_integrity_on_delete=false
|
||||||
default_encoding=JSON
|
default_encoding=JSON
|
||||||
etag_support=ENABLED
|
etag_support=ENABLED
|
||||||
reuse_cached_search_results_millis=-1
|
reuse_cached_search_results_millis=-1
|
||||||
|
|||||||
Reference in New Issue
Block a user