From a8882ccb045ee7d57f066bbe1a048268ad807b32 Mon Sep 17 00:00:00 2001 From: josemp10 Date: Fri, 9 Feb 2018 12:05:49 +0100 Subject: [PATCH] Adding syncTEI() to D2 --- build.gradle | 4 ++-- core/src/main/java/org/hisp/dhis/android/core/D2.java | 11 +++++++++++ gradle.properties | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 75953d29c4..645011efdb 100644 --- a/build.gradle +++ b/build.gradle @@ -54,8 +54,8 @@ ext { buildToolsVersion: "25.0.2", minSdkVersion : 15, targetSdkVersion : 25, - versionCode : 42_2, - versionName : "0.4.2.2-SNAPSHOT" + versionCode : 42_3, + versionName : "0.4.2.3-SNAPSHOT" ] libraries = [ diff --git a/core/src/main/java/org/hisp/dhis/android/core/D2.java b/core/src/main/java/org/hisp/dhis/android/core/D2.java index b87bb17072..b0a64b6421 100644 --- a/core/src/main/java/org/hisp/dhis/android/core/D2.java +++ b/core/src/main/java/org/hisp/dhis/android/core/D2.java @@ -66,6 +66,7 @@ import org.hisp.dhis.android.core.common.GenericHandler; import org.hisp.dhis.android.core.common.IdentifiableObjectStore; import org.hisp.dhis.android.core.common.ObjectStore; +import org.hisp.dhis.android.core.common.Payload; import org.hisp.dhis.android.core.configuration.ConfigurationModel; import org.hisp.dhis.android.core.data.api.FieldsConverterFactory; import org.hisp.dhis.android.core.data.api.FilterConverterFactory; @@ -139,6 +140,8 @@ import org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueHandler; import org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueStore; import org.hisp.dhis.android.core.trackedentity.TrackedEntityDataValueStoreImpl; +import org.hisp.dhis.android.core.trackedentity.TrackedEntityInstance; +import org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceEndPointCall; import org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceHandler; import org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceService; import org.hisp.dhis.android.core.trackedentity.TrackedEntityInstanceStore; @@ -166,6 +169,7 @@ import org.hisp.dhis.android.core.user.UserStoreImpl; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.concurrent.Callable; @@ -521,6 +525,13 @@ public Call syncTrackerData() { trackedEntityInstanceHandler); } + @NonNull + public Call>> syncTEI(String trackedEntityInstanceUid) { + return new TrackedEntityInstanceEndPointCall( + trackedEntityInstanceService, databaseAdapter, trackedEntityInstanceHandler, + resourceHandler, new Date(), trackedEntityInstanceUid); + } + @NonNull public Call> syncTrackedEntityInstances() { return new TrackedEntityInstancePostCall(trackedEntityInstanceService, diff --git a/gradle.properties b/gradle.properties index c3472c8369..729cfff63c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,8 +12,8 @@ org.gradle.jvmargs=-Xmx1536m # Properties which are consumed by plugins/gradle-mvn-push.gradle plugin. # They are used for publishing artifact to snapshot repository. -VERSION_NAME=0.4.2.2-SNAPSHOT -VERSION_CODE=42_2 +VERSION_NAME=0.4.2.3-SNAPSHOT +VERSION_CODE=42_3 GROUP=org.hisp.dhis POM_DESCRIPTION=Android SDK for DHIS 2.