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 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:
      • getCoreAzureObjectSizeThreshold

        long getCoreAzureObjectSizeThreshold()
        The size (in bytes) at which to finish writing to a given AzureBlob object,
        Returns:
      • getCoreAzureObjectResourceCountThreshold

        int getCoreAzureObjectResourceCountThreshold()
        The number of resources at which to finish writing to a given AzureBlob object,
        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:
      • getDefaultImportProvider

        String getDefaultImportProvider()
        get default import provider
        Returns:
      • getDefaultExportProvider

        String getDefaultExportProvider()
        get default export provider
        Returns:
      • getOperationOutcomeProvider

        String getOperationOutcomeProvider​(String provider)
        get the OperationOutcome provider
        Parameters:
        provider - the storage provider
        Returns:
      • hasStorageProvider

        boolean hasStorageProvider​(String storageProvider)
        Parameters:
        storageProvider -
        Returns:
        True, iff the provider exists in the configuration.
      • 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:
      • 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:
      • getStorageProviderAuthTypeConnectionString

        String getStorageProviderAuthTypeConnectionString​(String provider)
        get the connection string for the azure type account with a connection string.
        Parameters:
        provider -
        Returns:
      • isStorageProviderAuthTypeConnectionString

        boolean isStorageProviderAuthTypeConnectionString​(String provider)
        checks the provider to see if this is an azure connection string.
        Parameters:
        provider -
        Returns:
        true, if connectionString
      • enableSkippableUpdates

        boolean enableSkippableUpdates()
        Returns:
        the status of skippable updates
      • getS3HostStyleByStorageProvider

        S3HostStyle getS3HostStyleByStorageProvider​(String provider)
        gets the storage type
        Parameters:
        provider -
        Returns:
      • getStorageProviderUsesRequestAccessToken

        boolean getStorageProviderUsesRequestAccessToken​(String provider)
        reports back to the client if the StorageProvider supports requestAccessTokens
        Parameters:
        provider -
        Returns: