-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide ResourceSyncParams based DownloadManager for syncing data. #1259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change! Just one minor comment
...ne/src/main/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManager.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1259 +/- ##
============================================
- Coverage 84.15% 83.92% -0.23%
- Complexity 666 678 +12
============================================
Files 146 147 +1
Lines 10609 10622 +13
Branches 807 844 +37
============================================
- Hits 8928 8915 -13
+ Misses 1278 1271 -7
- Partials 403 436 +33
Continue to review full report at Codecov.
|
* [DownloadManager] implementation based on the provided [ResourceSyncParams] to generate | ||
* [Resource] search queries and parse [Bundle.BundleType.SEARCHSET] type [Bundle]. | ||
*/ | ||
class ResourceParamsBasedDownloadManager(syncParams: ResourceSyncParams) : DownloadManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do the following
- remove
SyncConfiguration
inConfig.kt
and clean upParamMap.concatParams
- move
ResourceSyncParams
to this file - rename
ResourceSyncParams
toResourceSearchParams
as they are actually search parameters and have nothing to do with uploading.
...rc/test/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManagerTest.kt
Outdated
Show resolved
Hide resolved
...ne/src/main/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManager.kt
Outdated
Show resolved
Hide resolved
...rc/test/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManagerTest.kt
Outdated
Show resolved
Hide resolved
...rc/test/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManagerTest.kt
Outdated
Show resolved
Hide resolved
...rc/test/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManagerTest.kt
Outdated
Show resolved
Hide resolved
...rc/test/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManagerTest.kt
Outdated
Show resolved
Hide resolved
...rc/test/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManagerTest.kt
Outdated
Show resolved
Hide resolved
...ne/src/main/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManager.kt
Outdated
Show resolved
Hide resolved
...rc/test/java/com/google/android/fhir/sync/download/ResourceParamsBasedDownloadManagerTest.kt
Outdated
Show resolved
Hide resolved
…orkManagaer apis. Also, review comment changes
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #1258
Description
Implemented ResourceParamsBasedDownloadManager which takes ResourceSyncParams to generate the search urls for the resources and parses Bundle SearchSet to get extract resources and next urls.
Alternative(s) considered
No
Type
Choose one: Code health
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.