From e69c6c8609f898f6fc82b1744390f8140743a000 Mon Sep 17 00:00:00 2001 From: Ephraim Kigamba Date: Thu, 17 Sep 2020 17:00:14 +0300 Subject: [PATCH 1/5] Add configurable register contract - Add the configurable register contract as part of the BaseRegisterContract - Implement new method in the BaseRegisterActivity --- .../view/activity/BaseRegisterActivity.java | 9 ++- .../view/contract/BaseRegisterContract.java | 9 ++- .../ConfigurableRegisterActivityContract.java | 69 +++++++++++++++++++ .../ConfigurableRegisterFragmentContract.java | 50 ++++++++++++++ 4 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java diff --git a/opensrp-app/src/main/java/org/smartregister/view/activity/BaseRegisterActivity.java b/opensrp-app/src/main/java/org/smartregister/view/activity/BaseRegisterActivity.java index 41dc7be64..139d359c1 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/activity/BaseRegisterActivity.java +++ b/opensrp-app/src/main/java/org/smartregister/view/activity/BaseRegisterActivity.java @@ -29,6 +29,7 @@ import org.smartregister.util.PermissionUtils; import org.smartregister.util.Utils; import org.smartregister.view.contract.BaseRegisterContract; +import org.smartregister.view.contract.ConfigurableRegisterActivityContract; import org.smartregister.view.fragment.BaseRegisterFragment; import org.smartregister.view.viewpager.OpenSRPViewPager; @@ -41,7 +42,7 @@ * Created by keyman on 26/06/2018. */ -public abstract class BaseRegisterActivity extends SecuredNativeSmartRegisterActivity implements BaseRegisterContract.View { +public abstract class BaseRegisterActivity extends SecuredNativeSmartRegisterActivity implements BaseRegisterContract.View, ConfigurableRegisterActivityContract.View { protected OpenSRPViewPager mPager; @@ -354,4 +355,10 @@ public void setSelectedBottomBarMenuItem(int itemId) { public void setSearchTerm(String searchTerm) { mBaseFragment.setSearchTerm(searchTerm); } + + @Override + public ConfigurableRegisterActivityContract.Presenter presenter() { + initializePresenter(); + return presenter; + } } diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterContract.java index 16a235981..a217b37f1 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterContract.java @@ -11,7 +11,8 @@ * Created by keyamn on 27/06/2018. */ public interface BaseRegisterContract { - interface Presenter { + + interface Presenter extends ConfigurableRegisterActivityContract.Presenter { void registerViewConfigurations(List viewIdentifiers); @@ -22,7 +23,7 @@ interface Presenter { void updateInitials(); } - interface View { + interface View extends ConfigurableRegisterActivityContract.View { Context getContext(); @@ -44,4 +45,8 @@ interface View { void updateInitialsText(String initials); } + + interface Model extends ConfigurableRegisterActivityContract.Model { + + } } diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java new file mode 100644 index 000000000..ad5d82d04 --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java @@ -0,0 +1,69 @@ +package org.smartregister.view.contract; + +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +import org.apache.commons.lang3.tuple.Triple; +import org.json.JSONException; +import org.json.JSONObject; +import org.smartregister.domain.db.EventClient; +import org.smartregister.domain.tag.FormTag; +import org.smartregister.opensrp.configurable.register.and.profiles.pojo.RegisterParams; + +import java.util.List; + +public interface ConfigurableRegisterActivityContract { + + interface View { + Presenter presenter(); + + } + + interface Presenter { + + void saveLanguage(String language); + + void startForm(String formName, String entityId, String metadata, String currentLocationId); + + void saveForm(String jsonString, @NonNull RegisterParams registerParams); + + Interactor createInteractor(); + } + + interface Model { + + JSONObject getFormAsJson(String formName, String entityId, + String currentLocationId) throws JSONException; + + void registerViewConfigurations(List viewIdentifiers); + + void unregisterViewConfiguration(List viewIdentifiers); + + void saveLanguage(String language); + + List processRegistration(String jsonString, FormTag formTag); + + String getLocationId(String locationName); + + String getInitials(); + } + + interface Interactor { + + void onDestroy(boolean isChangingConfiguration); + + void getNextUniqueId(Triple triple, ConfigurableRegisterActivityContract.InteractorCallBack callBack); + + void saveRegistration(@Nullable final List clientList, final String jsonString, @NonNull RegisterParams registerParams, final ConfigurableRegisterActivityContract.InteractorCallBack callBack); + + } + + interface InteractorCallBack { + + void onUniqueIdFetched(Triple triple, String entityId); + + void onNoUniqueId(); + + void onRegistrationSaved(@NonNull RegisterParams registerParams, @Nullable List clientList); + } +} diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java new file mode 100644 index 000000000..1fb5c9ab6 --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java @@ -0,0 +1,50 @@ +package org.smartregister.view.contract; + +import org.json.JSONArray; +import org.smartregister.configurableviews.model.Field; +import org.smartregister.configurableviews.model.ViewConfiguration; +import org.smartregister.domain.Response; +import org.smartregister.view.contract.BaseRegisterFragmentContract; + +import java.util.List; +import java.util.Set; + +public interface ConfigurableRegisterFragmentContract { + + interface View extends BaseRegisterFragmentContract.View { + + void initializeAdapter(Set visibleColumns); + + Presenter presenter(); + + } + + interface Presenter extends BaseRegisterFragmentContract.Presenter { + + void updateSortAndFilter(List filterList, Field sortField); + + String getMainCondition(); + + String getDefaultSortQuery(); + + String getQueryTable(); + } + + interface Model { + + ViewConfiguration getViewConfiguration(String viewConfigurationIdentifier); + + Set getRegisterActiveColumns(String viewConfigurationIdentifier); + + String countSelect(String tableName, String mainCondition); + + String mainSelect(String tableName, String mainCondition); + + String getFilterText(List filterList, String filter); + + String getSortText(Field sortField); + + JSONArray getJsonArray(Response response); + + } +} From 8ea7af91df348acdae5db58ac023631ec8717ba9 Mon Sep 17 00:00:00 2001 From: Ephraim Kigamba Date: Thu, 17 Sep 2020 17:32:20 +0300 Subject: [PATCH 2/5] Add View Configuration interfaces - Add RegisterParams pojo --- .../ConfigurableRegisterFragmentContract.java | 14 +++--- .../view/contract/IBaseConfiguration.java | 18 +++++++ .../smartregister/view/contract/IField.java | 16 +++++++ .../view/contract/IResidence.java | 19 ++++++++ .../smartregister/view/contract/IView.java | 40 ++++++++++++++++ .../view/contract/IViewConfiguration.java | 31 ++++++++++++ .../view/contract/RegisterParams.java | 47 +++++++++++++++++++ 7 files changed, 177 insertions(+), 8 deletions(-) create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/IField.java create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/IResidence.java create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/IView.java create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/IViewConfiguration.java create mode 100644 opensrp-app/src/main/java/org/smartregister/view/contract/RegisterParams.java diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java index 1fb5c9ab6..29e0fc434 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java @@ -1,8 +1,6 @@ package org.smartregister.view.contract; import org.json.JSONArray; -import org.smartregister.configurableviews.model.Field; -import org.smartregister.configurableviews.model.ViewConfiguration; import org.smartregister.domain.Response; import org.smartregister.view.contract.BaseRegisterFragmentContract; @@ -13,7 +11,7 @@ public interface ConfigurableRegisterFragmentContract { interface View extends BaseRegisterFragmentContract.View { - void initializeAdapter(Set visibleColumns); + void initializeAdapter(Set visibleColumns); Presenter presenter(); @@ -21,7 +19,7 @@ interface View extends BaseRegisterFragmentContract.View { interface Presenter extends BaseRegisterFragmentContract.Presenter { - void updateSortAndFilter(List filterList, Field sortField); + void updateSortAndFilter(List filterList, IField sortField); String getMainCondition(); @@ -32,17 +30,17 @@ interface Presenter extends BaseRegisterFragmentContract.Presenter { interface Model { - ViewConfiguration getViewConfiguration(String viewConfigurationIdentifier); + IViewConfiguration getViewConfiguration(String viewConfigurationIdentifier); - Set getRegisterActiveColumns(String viewConfigurationIdentifier); + Set getRegisterActiveColumns(String viewConfigurationIdentifier); String countSelect(String tableName, String mainCondition); String mainSelect(String tableName, String mainCondition); - String getFilterText(List filterList, String filter); + String getFilterText(List filterList, String filter); - String getSortText(Field sortField); + String getSortText(IField sortField); JSONArray getJsonArray(Response response); diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java b/opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java new file mode 100644 index 000000000..c4da0fac1 --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java @@ -0,0 +1,18 @@ +package org.smartregister.view.contract; + +/** + * Created by Ephraim Kigamba - nek.eam@gmail.com on 17-09-2020. + */ +public interface IBaseConfiguration { + + public String getLanguage(); + + public void setLanguage(String language); + public String getApplicationName(); + + public void setApplicationName(String applicationName); + + public boolean isEnableJsonViews(); + + public void setEnableJsonViews(boolean enableJsonViews); +} diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/IField.java b/opensrp-app/src/main/java/org/smartregister/view/contract/IField.java new file mode 100644 index 000000000..0239ef48f --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/IField.java @@ -0,0 +1,16 @@ +package org.smartregister.view.contract; + +/** + * Created by Ephraim Kigamba - nek.eam@gmail.com on 17-09-2020. + */ +public interface IField { + + + String getDisplayName(); + + void setDisplayName(String displayName); + + String getDbAlias(); + + void setDbAlias(String dbAlias); +} diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/IResidence.java b/opensrp-app/src/main/java/org/smartregister/view/contract/IResidence.java new file mode 100644 index 000000000..0cf859bdf --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/IResidence.java @@ -0,0 +1,19 @@ +package org.smartregister.view.contract; + +/** + * Created by Ephraim Kigamba - nek.eam@gmail.com on 17-09-2020. + */ +public interface IResidence { + + String getParent(); + + void setParent(String parent); + + int getPosition(); + + void setPosition(int position); + + String getLayoutWeight(); + + void setLayoutWeight(String layoutWeight); +} diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/IView.java b/opensrp-app/src/main/java/org/smartregister/view/contract/IView.java new file mode 100644 index 000000000..1e33da386 --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/IView.java @@ -0,0 +1,40 @@ +package org.smartregister.view.contract; + +import java.util.Map; + +/** + * Created by Ephraim Kigamba - nek.eam@gmail.com on 17-09-2020. + */ +public interface IView { + + + void setParent(String parent); + + String getIdentifier(); + + void setIdentifier(String identifier); + + String getType(); + + void setType(String type); + + String getOrientation(); + + void setOrientation(String orientation); + + boolean isVisible(); + + void setVisible(boolean visible); + + String getLabel(); + + void setLabel(String label); + + IResidence getResidence(); + + void setResidence(IResidence residence); + + Map getMetadata(); + + void setMetadata(Map metadata); +} diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/IViewConfiguration.java b/opensrp-app/src/main/java/org/smartregister/view/contract/IViewConfiguration.java new file mode 100644 index 000000000..c0cf9e926 --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/IViewConfiguration.java @@ -0,0 +1,31 @@ +package org.smartregister.view.contract; + +import java.util.List; +import java.util.Map; + +/** + * Created by Ephraim Kigamba - nek.eam@gmail.com on 17-09-2020. + */ +public interface IViewConfiguration { + + + String getIdentifier(); + + void setIdentifier(String identifier); + + IBaseConfiguration getMetadata(); + + void setMetadata(IBaseConfiguration metadata); + + List getViews(); + + void setViews(List views); + + Map getLabels(); + + void setLabels(Map labels); + + Map getJsonView(); + + void setJsonView(Map jsonView); +} diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/RegisterParams.java b/opensrp-app/src/main/java/org/smartregister/view/contract/RegisterParams.java new file mode 100644 index 000000000..26b7de75a --- /dev/null +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/RegisterParams.java @@ -0,0 +1,47 @@ +package org.smartregister.view.contract; + +import org.smartregister.domain.tag.FormTag; +import org.smartregister.repository.BaseRepository; + +public class RegisterParams { + + private String status = BaseRepository.TYPE_Unsynced; + + private boolean editMode; + + private boolean saved; + + private FormTag formTag; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public boolean isEditMode() { + return editMode; + } + + public void setEditMode(boolean editMode) { + this.editMode = editMode; + } + + public boolean isSaved() { + return saved; + } + + public void setSaved(boolean saved) { + this.saved = saved; + } + + public FormTag getFormTag() { + return formTag; + } + + public void setFormTag(FormTag formTag) { + this.formTag = formTag; + } +} From 198bd4ccfa9824287cb0458cfacee65356198c6d Mon Sep 17 00:00:00 2001 From: Ephraim Kigamba Date: Fri, 18 Sep 2020 11:26:06 +0300 Subject: [PATCH 3/5] Include configurable register contract in base register --- .../view/contract/BaseRegisterFragmentContract.java | 8 ++++++-- .../ConfigurableRegisterActivityContract.java | 1 - .../ConfigurableRegisterFragmentContract.java | 4 ++-- .../view/contract/IBaseConfiguration.java | 13 +++++++------ .../view/fragment/BaseRegisterFragment.java | 13 +++++++++++++ 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterFragmentContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterFragmentContract.java index a42a50372..ea1609098 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterFragmentContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/BaseRegisterFragmentContract.java @@ -4,7 +4,7 @@ public interface BaseRegisterFragmentContract { - interface View { + interface View extends ConfigurableRegisterFragmentContract.View { void initializeQueryParams(String tableName, String countSelect, String mainSelect); @@ -29,7 +29,7 @@ interface View { void setTotalPatients(); } - interface Presenter { + interface Presenter extends ConfigurableRegisterFragmentContract.Presenter { void processViewConfigurations(); @@ -41,5 +41,9 @@ interface Presenter { } + interface Model extends ConfigurableRegisterFragmentContract.Model { + + } + } diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java index ad5d82d04..1463197ad 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java @@ -8,7 +8,6 @@ import org.json.JSONObject; import org.smartregister.domain.db.EventClient; import org.smartregister.domain.tag.FormTag; -import org.smartregister.opensrp.configurable.register.and.profiles.pojo.RegisterParams; import java.util.List; diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java index 29e0fc434..27e5a0929 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java @@ -9,7 +9,7 @@ public interface ConfigurableRegisterFragmentContract { - interface View extends BaseRegisterFragmentContract.View { + interface View { void initializeAdapter(Set visibleColumns); @@ -17,7 +17,7 @@ interface View extends BaseRegisterFragmentContract.View { } - interface Presenter extends BaseRegisterFragmentContract.Presenter { + interface Presenter { void updateSortAndFilter(List filterList, IField sortField); diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java b/opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java index c4da0fac1..0c6088174 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/IBaseConfiguration.java @@ -5,14 +5,15 @@ */ public interface IBaseConfiguration { - public String getLanguage(); + String getLanguage(); - public void setLanguage(String language); - public String getApplicationName(); + void setLanguage(String language); - public void setApplicationName(String applicationName); + String getApplicationName(); - public boolean isEnableJsonViews(); + void setApplicationName(String applicationName); - public void setEnableJsonViews(boolean enableJsonViews); + boolean isEnableJsonViews(); + + void setEnableJsonViews(boolean enableJsonViews); } diff --git a/opensrp-app/src/main/java/org/smartregister/view/fragment/BaseRegisterFragment.java b/opensrp-app/src/main/java/org/smartregister/view/fragment/BaseRegisterFragment.java index 82f4fbafd..443891796 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/fragment/BaseRegisterFragment.java +++ b/opensrp-app/src/main/java/org/smartregister/view/fragment/BaseRegisterFragment.java @@ -35,9 +35,12 @@ import org.smartregister.view.activity.BaseRegisterActivity; import org.smartregister.view.activity.SecuredNativeSmartRegisterActivity; import org.smartregister.view.contract.BaseRegisterFragmentContract; +import org.smartregister.view.contract.ConfigurableRegisterFragmentContract; +import org.smartregister.view.contract.IView; import org.smartregister.view.dialog.DialogOption; import java.util.HashMap; +import java.util.Set; import timber.log.Timber; @@ -476,6 +479,16 @@ protected void refreshSyncProgressSpinner() { } } + @Override + public void initializeAdapter(Set visibleColumns) { + // Do nothing + } + + @Override + public ConfigurableRegisterFragmentContract.Presenter presenter() { + initializePresenter(); + return presenter; + } //////////////////////////////////////////////////////////////// // Inner classes From 585bcbd4e0f8393f8c7513b2fed7cd9c7f775714 Mon Sep 17 00:00:00 2001 From: Ephraim Kigamba Date: Fri, 18 Sep 2020 14:42:15 +0300 Subject: [PATCH 4/5] Code cleanup --- .../view/contract/ConfigurableRegisterFragmentContract.java | 1 - 1 file changed, 1 deletion(-) diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java index 27e5a0929..cc02b5478 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java @@ -2,7 +2,6 @@ import org.json.JSONArray; import org.smartregister.domain.Response; -import org.smartregister.view.contract.BaseRegisterFragmentContract; import java.util.List; import java.util.Set; From 53ba30089306b892dfbf173eaf047414f2eca7b8 Mon Sep 17 00:00:00 2001 From: Ephraim Kigamba Date: Mon, 21 Sep 2020 15:20:09 +0300 Subject: [PATCH 5/5] Add default implementation of new presenter methods --- gradle.properties | 2 +- .../ConfigurableRegisterActivityContract.java | 17 ++++++++++++----- .../ConfigurableRegisterFragmentContract.java | 8 ++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index c1446212c..6aa092b2c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=2.1.2-SNAPSHOT +VERSION_NAME=2.1.2.1-SNAPSHOT VERSION_CODE=1 GROUP=org.smartregister POM_SETTING_DESCRIPTION=OpenSRP Client Core Application diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java index 1463197ad..15c393226 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterActivityContract.java @@ -15,18 +15,25 @@ public interface ConfigurableRegisterActivityContract { interface View { Presenter presenter(); - } interface Presenter { - void saveLanguage(String language); + default void saveLanguage(String language) { + + } + + default void startForm(String formName, String entityId, String metadata, String currentLocationId) { + + } - void startForm(String formName, String entityId, String metadata, String currentLocationId); + default void saveForm(String jsonString, @NonNull RegisterParams registerParams) { - void saveForm(String jsonString, @NonNull RegisterParams registerParams); + } - Interactor createInteractor(); + default Interactor createInteractor() { + return null; + } } interface Model { diff --git a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java index cc02b5478..101377c5d 100644 --- a/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java +++ b/opensrp-app/src/main/java/org/smartregister/view/contract/ConfigurableRegisterFragmentContract.java @@ -18,13 +18,13 @@ interface View { interface Presenter { - void updateSortAndFilter(List filterList, IField sortField); + default void updateSortAndFilter(List filterList, IField sortField) {} - String getMainCondition(); + default String getMainCondition() { return null; } - String getDefaultSortQuery(); + default String getDefaultSortQuery() { return null; } - String getQueryTable(); + default String getQueryTable() {return null; } } interface Model {