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

ResourceParamsBasedDownloadWorkManager
Link copied to clipboard
fun ResourceParamsBasedDownloadWorkManager(syncParams: ResourceSearchParams)

Functions

getNextRequestUrl
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.
processResponse
Link copied to clipboard
open suspend override fun processResponse(response: Resource): Collection<Resource>
Processes the download response and returns the resources to be saved to the local database.

Sources

androidJvm source
Link copied to clipboard