Interface ConfigurationAdapter
-
- All Known Implementing Classes:
AbstractSystemConfigurationImpl
,V2ConfigurationImpl
public interface ConfigurationAdapter
Configuration provides a common interface to the fhir-server-config.json. and enables seamless reads of constant values which may be set in the future. The interface adds an @implNote for fixed or system (default), All other are dynamic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
enabled()
String
getApplicationName()
get the application name used in the javabatch framework.String
getBaseFileLocation(String provider)
get the base file locationString
getCoreApiBatchPassword()
String
getCoreApiBatchTrustStore()
String
getCoreApiBatchTrustStorePassword()
String
getCoreApiBatchUrl()
String
getCoreApiBatchUser()
String
getCoreBatchIdEncryptionKey()
get core batch id encryption key for the job id that is returnedint
getCoreCosObjectResourceCountThreshold()
The number of resources at which to finish writing to a given COS object, or 0 to indicate that there is no resource count threshold.long
getCoreCosObjectSizeThreshold()
The size (in bytes) at which to finish writing to a given COS object, or 0 to indicate that there is no object size threshold.int
getCoreCosPartUploadTriggerSize()
The size (in bytes) at which to begin writing a part for a COS multi-part upload.int
getCoreCosRequestTimeout()
int
getCoreCosSocketTimeout()
boolean
getCoreCosTcpKeepAlive()
get the COS TCP Keep alive setting (true or false)long
getCoreFastMaxReadTimeout()
get the number ms to read payloads from the persistence layer before stopping to checkpointint
getCoreFileResourceCountThreshold()
The number of resources at which to finish writing to a given file, or 0 to indicate that there is no resource count threshold.long
getCoreFileSizeThreshold()
The size (in bytes) at which to finish writing to a given file, or 0 to indicate that there is no file size threshold.int
getCoreFileWriteTriggerSize()
The size (in bytes) to buffer before writing to file.String
getCoreIamEndpoint()
get the core iam endpoint (it is set one time for the whole system)int
getCoreMaxPartitions()
get core max partitionsint
getCorePageSize()
get the core page size used in Search.byte[]
getEndOfFileDelimiter(String provider)
int
getImportInflyRateNumberOfFhirResources(String provider)
the infly rate for the importint
getImportNumberOfFhirResourcesPerRead(String provider)
get the import fhir resources per readint
getInputLimit()
limit of inputsString
getJobXMLName()
get the job xml used in the javabatch framework.String
getModuleName()
get the module name used in javabatch framework.int
getPresignedUrlExpiry()
the expiry time of the generated presigned urls.String
getStorageProviderAuthType(String provider)
String
getStorageProviderAuthTypeHmacAccessKey(String provider)
String
getStorageProviderAuthTypeHmacSecretKey(String provider)
String
getStorageProviderAuthTypeIamApiKey(String provider)
String
getStorageProviderAuthTypeIamApiResourceInstanceId(String provider)
String
getStorageProviderAuthTypePassword(String provider)
String
getStorageProviderAuthTypeUsername(String provider)
String
getStorageProviderBucketName(String provider)
gets the StorageProvider's bucket name for cos sources.String
getStorageProviderEndpointExternal(String provider)
get the external endpoint for the storage provider.String
getStorageProviderEndpointInternal(String provider)
get the internal endpoint for the storage provider.String
getStorageProviderLocation(String provider)
gets the location of the cos endpoint.StorageType
getStorageProviderStorageType(String provider)
String
getStorageProviderType(String provider)
gets the StorageProvider type which aligns with the StorageTypeList<String>
getStorageProviderValidBaseUrls(String provider)
gets the StorageProvider's valid base urls for HTTPS sources.String
getTenant()
gets a tenant in the current contextboolean
isFastExport()
indicating if it's the new fast exportboolean
isStorageProviderAuthTypeBasic(String provider)
boolean
isStorageProviderAuthTypeHmac(String provider)
boolean
isStorageProviderAuthTypeIam(String provider)
boolean
isStorageProviderExportPublic(String provider)
boolean
isStorageProviderHmacPresigned(String provider)
boolean
isStorageProviderParquetEnabled(String provider)
boolean
isStorageTypeAllowed(String storageType)
checks if theboolean
legacy()
identifies the configuration as legacy or not.void
registerRequestContext(String tenantId, String datastoreId, String incomingUrl)
creates a uniform request context for the $import and $export operations.boolean
shouldCoreApiBatchTrustAll()
boolean
shouldCoreCosUseServerTruststore()
boolean
shouldStorageProviderCheckDuplicate(String provider)
boolean
shouldStorageProviderCollectOperationOutcomes(String provider)
boolean
shouldStorageProviderCreate(String provider)
boolean
shouldStorageProviderValidateBaseUrl(String provider)
boolean
shouldStorageProviderValidateResources(String provider)
-
-
-
Method Detail
-
getApplicationName
String getApplicationName()
get the application name used in the javabatch framework.- Returns:
-
getModuleName
String getModuleName()
get the module name used in javabatch framework.- Returns:
-
getJobXMLName
String getJobXMLName()
get the job xml used in the javabatch framework.- Returns:
-
registerRequestContext
void registerRequestContext(String tenantId, String datastoreId, String incomingUrl) throws FHIRException
creates a uniform request context for the $import and $export operations.- Parameters:
tenantId
-datastoreId
-incomingUrl
-- Throws:
FHIRException
-
legacy
boolean legacy()
identifies the configuration as legacy or not.- Returns:
-
enabled
boolean enabled()
- Returns:
- the status of the bulkdata feature, enabled = true, disabled = false
-
getCoreApiBatchUrl
String getCoreApiBatchUrl()
- Returns:
- the local batch api URL
-
getCoreApiBatchUser
String getCoreApiBatchUser()
- Returns:
- the local batch api user, it should be an admin
-
getCoreApiBatchPassword
String getCoreApiBatchPassword()
- Returns:
- the local batch api user password
-
getCoreApiBatchTrustStore
String getCoreApiBatchTrustStore()
- Returns:
- the local batch api user password
-
getCoreApiBatchTrustStorePassword
String getCoreApiBatchTrustStorePassword()
- Returns:
- the local batch api user password
-
shouldCoreApiBatchTrustAll
boolean shouldCoreApiBatchTrustAll()
- Returns:
- should we trust the calls to the backend
-
getCoreCosPartUploadTriggerSize
int getCoreCosPartUploadTriggerSize()
The size (in bytes) at which to begin writing a part for a COS multi-part upload.- Returns:
-
getCoreCosObjectSizeThreshold
long getCoreCosObjectSizeThreshold()
The size (in bytes) at which to finish writing to a given COS object, or 0 to indicate that there is no object size threshold.- Returns:
-
getCoreCosObjectResourceCountThreshold
int getCoreCosObjectResourceCountThreshold()
The number of resources at which to finish writing to a given COS object, or 0 to indicate that there is no resource count threshold.- Returns:
-
shouldCoreCosUseServerTruststore
boolean shouldCoreCosUseServerTruststore()
- Returns:
- the system wide setting for using the server truststore.
-
getCoreCosRequestTimeout
int getCoreCosRequestTimeout()
- Returns:
- the timeout for the s3 request
-
getCoreCosSocketTimeout
int getCoreCosSocketTimeout()
- Returns:
- the timeout for the s3 socket
-
getCoreFileWriteTriggerSize
int getCoreFileWriteTriggerSize()
The size (in bytes) to buffer before writing to file.- Returns:
-
getCoreFileSizeThreshold
long getCoreFileSizeThreshold()
The size (in bytes) at which to finish writing to a given file, or 0 to indicate that there is no file size threshold.- Returns:
-
getCoreFileResourceCountThreshold
int getCoreFileResourceCountThreshold()
The number of resources at which to finish writing to a given file, or 0 to indicate that there is no resource count threshold.- Returns:
-
getCorePageSize
int getCorePageSize()
get the core page size used in Search.- Returns:
-
getCoreBatchIdEncryptionKey
String getCoreBatchIdEncryptionKey()
get core batch id encryption key for the job id that is returned- Returns:
-
getCoreMaxPartitions
int getCoreMaxPartitions()
get core max partitions- Returns:
-
getCoreIamEndpoint
String getCoreIamEndpoint()
get the core iam endpoint (it is set one time for the whole system)- Returns:
-
getCoreFastMaxReadTimeout
long getCoreFastMaxReadTimeout()
get the number ms to read payloads from the persistence layer before stopping to checkpoint- Returns:
-
getStorageProviderType
String getStorageProviderType(String provider)
gets the StorageProvider type which aligns with the StorageType- Parameters:
provider
-- Returns:
-
getStorageProviderValidBaseUrls
List<String> getStorageProviderValidBaseUrls(String provider)
gets the StorageProvider's valid base urls for HTTPS sources.- Parameters:
provider
-- Returns:
-
getStorageProviderBucketName
String getStorageProviderBucketName(String provider)
gets the StorageProvider's bucket name for cos sources.- Parameters:
provider
-- Returns:
-
getStorageProviderLocation
String getStorageProviderLocation(String provider)
gets the location of the cos endpoint.- Parameters:
provider
-- Returns:
-
getStorageProviderEndpointInternal
String getStorageProviderEndpointInternal(String provider)
get the internal endpoint for the storage provider.- Parameters:
provider
-- Returns:
-
getStorageProviderEndpointExternal
String getStorageProviderEndpointExternal(String provider)
get the external endpoint for the storage provider.- Parameters:
provider
-- Returns:
-
getStorageProviderAuthType
String getStorageProviderAuthType(String provider)
- Parameters:
provider
-- Returns:
-
isStorageProviderAuthTypeIam
boolean isStorageProviderAuthTypeIam(String provider)
- Parameters:
provider
-- Returns:
-
getStorageProviderAuthTypeIamApiKey
String getStorageProviderAuthTypeIamApiKey(String provider)
- Parameters:
provider
-- Returns:
-
getStorageProviderAuthTypeIamApiResourceInstanceId
String getStorageProviderAuthTypeIamApiResourceInstanceId(String provider)
- Parameters:
provider
-- Returns:
-
isStorageProviderAuthTypeHmac
boolean isStorageProviderAuthTypeHmac(String provider)
- Parameters:
provider
-- Returns:
-
getStorageProviderAuthTypeHmacAccessKey
String getStorageProviderAuthTypeHmacAccessKey(String provider)
- Parameters:
provider
-- Returns:
-
getStorageProviderAuthTypeHmacSecretKey
String getStorageProviderAuthTypeHmacSecretKey(String provider)
- Parameters:
provider
-- Returns:
-
isStorageProviderAuthTypeBasic
boolean isStorageProviderAuthTypeBasic(String provider)
- Parameters:
provider
-- Returns:
-
getStorageProviderAuthTypeUsername
String getStorageProviderAuthTypeUsername(String provider)
- Parameters:
provider
-- Returns:
-
getStorageProviderAuthTypePassword
String getStorageProviderAuthTypePassword(String provider)
- Parameters:
provider
-- Returns:
-
isStorageProviderParquetEnabled
boolean isStorageProviderParquetEnabled(String provider)
- Parameters:
provider
-- Returns:
-
shouldStorageProviderValidateBaseUrl
boolean shouldStorageProviderValidateBaseUrl(String provider)
- Parameters:
provider
-- Returns:
-
isStorageProviderExportPublic
boolean isStorageProviderExportPublic(String provider)
- Parameters:
provider
-- Returns:
-
shouldStorageProviderCollectOperationOutcomes
boolean shouldStorageProviderCollectOperationOutcomes(String provider)
- Parameters:
provider
-- Returns:
-
shouldStorageProviderCheckDuplicate
boolean shouldStorageProviderCheckDuplicate(String provider)
- Parameters:
provider
-- Returns:
-
shouldStorageProviderValidateResources
boolean shouldStorageProviderValidateResources(String provider)
- Parameters:
provider
-- Returns:
-
shouldStorageProviderCreate
boolean shouldStorageProviderCreate(String provider)
- Parameters:
provider
-- Returns:
-
isStorageTypeAllowed
boolean isStorageTypeAllowed(String storageType)
checks if the- Parameters:
storageType
-- Returns:
-
getStorageProviderStorageType
StorageType getStorageProviderStorageType(String provider)
- Parameters:
provider
- of the storage type- Returns:
-
getInputLimit
int getInputLimit()
limit of inputs- Returns:
-
getTenant
String getTenant()
gets a tenant in the current context- Returns:
-
isFastExport
boolean isFastExport()
indicating if it's the new fast export- Returns:
-
getCoreCosTcpKeepAlive
boolean getCoreCosTcpKeepAlive()
get the COS TCP Keep alive setting (true or false)- Returns:
-
getBaseFileLocation
String getBaseFileLocation(String provider)
get the base file location- Parameters:
provider
-- Returns:
-
isStorageProviderHmacPresigned
boolean isStorageProviderHmacPresigned(String provider)
- Parameters:
provider
-- Returns:
-
getEndOfFileDelimiter
byte[] getEndOfFileDelimiter(String provider)
- Parameters:
provider
-- Returns:
-
getImportNumberOfFhirResourcesPerRead
int getImportNumberOfFhirResourcesPerRead(String provider)
get the import fhir resources per read- Parameters:
provider
-- Returns:
-
getImportInflyRateNumberOfFhirResources
int getImportInflyRateNumberOfFhirResources(String provider)
the infly rate for the import- Parameters:
provider
-- Returns:
-
getPresignedUrlExpiry
int getPresignedUrlExpiry()
the expiry time of the generated presigned urls.- Returns:
-
-