ResourceParamsBasedDownloadWorkManager

DownloadWorkManager implementation based on the provided ResourceSearchParams to generate Resource search queries and parse Bundle.BundleType.SEARCHSET type Bundle. This implementation takes a DFS approach and downloads all available resources for a particular ResourceType before moving on to the next ResourceType.

Constructors

Link copied to clipboard
fun ResourceParamsBasedDownloadWorkManager(syncParams: ResourceSearchParams)

Functions

Link copied to clipboard
open suspend override fun getNextRequestUrl(context: SyncDownloadContext): String?

Returns the URL for the next download request, or null if there is no more download request to be issued.

Link copied to clipboard
open suspend override fun processResponse(response: <ERROR CLASS>): Collection<<ERROR CLASS>>

Processes the download response and returns the resources to be saved to the local database.