Adding properties:
- enforce referential integrity on delete - enforce referential integrity on write - auto create reference targets
This commit is contained in:
@@ -28,6 +28,9 @@ public class FhirServerConfigCommon {
|
||||
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirServerConfigCommon.class);
|
||||
|
||||
private Boolean autoCreatePlaceholderReferenceTargets = HapiProperties.getAutoCreatePlaceholderReferenceTargets();
|
||||
private Boolean enforceReferentialIntegrityOnWrite = HapiProperties.getEnforceReferentialIntegrityOnWrite();
|
||||
private Boolean enforceReferentialIntegrityOnDelete = HapiProperties.getEnforceReferentialIntegrityOnDelete();
|
||||
private Boolean allowContainsSearches = HapiProperties.getAllowContainsSearches();
|
||||
private Boolean allowMultipleDelete = HapiProperties.getAllowMultipleDelete();
|
||||
private Boolean allowExternalReferences = HapiProperties.getAllowExternalReferences();
|
||||
@@ -82,6 +85,9 @@ public class FhirServerConfigCommon {
|
||||
public DaoConfig daoConfig() {
|
||||
DaoConfig retVal = new DaoConfig();
|
||||
|
||||
retVal.setAutoCreatePlaceholderReferenceTargets(this.autoCreatePlaceholderReferenceTargets);
|
||||
retVal.setEnforceReferentialIntegrityOnWrite(this.enforceReferentialIntegrityOnWrite);
|
||||
retVal.setEnforceReferentialIntegrityOnDelete(this.enforceReferentialIntegrityOnDelete);
|
||||
retVal.setAllowContainsSearches(this.allowContainsSearches);
|
||||
retVal.setAllowMultipleDelete(this.allowMultipleDelete);
|
||||
retVal.setAllowExternalReferences(this.allowExternalReferences);
|
||||
|
||||
@@ -16,7 +16,10 @@ import java.util.stream.Collectors;
|
||||
import static org.apache.commons.lang3.StringUtils.*;
|
||||
|
||||
public class HapiProperties {
|
||||
public static final String BINARY_STORAGE_ENABLED = "binary_storage.enabled";
|
||||
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_MULTIPLE_DELETE = "allow_multiple_delete";
|
||||
static final String ALLOW_PLACEHOLDER_REFERENCES = "allow_placeholder_references";
|
||||
@@ -377,8 +380,19 @@ public class HapiProperties {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user