diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts index 69f2a6e84a5..649e1e41418 100644 --- a/core/common/build.gradle.kts +++ b/core/common/build.gradle.kts @@ -40,4 +40,5 @@ dependencies { testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + implementation("com.squareup.retrofit2:converter-gson:2.9.0") } \ No newline at end of file diff --git a/core/common/src/main/java/com/mifos/core/common/utils/Constants.kt b/core/common/src/main/java/com/mifos/core/common/utils/Constants.kt index 8cd7dc936a2..66dda6c354b 100644 --- a/core/common/src/main/java/com/mifos/core/common/utils/Constants.kt +++ b/core/common/src/main/java/com/mifos/core/common/utils/Constants.kt @@ -1,7 +1,207 @@ +/* + * This project is licensed under the open source MPL V2. + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.common.utils +/** + * Created by satya on 13/04/14. + */ object Constants { + const val INSTANCE_URL_KEY = "instanceURL" + const val INSTANCE_DOMAIN_KEY = "instanceDomain" + const val INSTANCE_PORT_KEY = "instancePort" + const val TENANT_IDENTIFIER_KEY = "tenant identifier" + const val PROTOCOL_HTTP = "http://" + const val PROTOCOL_HTTPS = "https://" + const val API_PATH = "/mifosng-provider/api/v1" + /** + * Entity Type, Like Clients, Groups, Staff, Loans, Savings and Client Identifiers + */ + const val ENTITY_TYPE_CLIENTS = "clients" + const val ENTITY_TYPE_GROUPS = "groups" + const val ENTITY_TYPE_LOANS = "loans" + const val ENTITY_TYPE_SAVINGS = "savings" + const val ENTITY_TYPE_STAFF = "staff" + const val ENTITY_TYPE_CLIENT_IDENTIFIERS = "client_identifiers" + + //Search Entities + const val SEARCH_ENTITY_CLIENT = "CLIENT" + const val SEARCH_ENTITY_GROUP = "GROUP" + const val SEARCH_ENTITY_LOAN = "LOAN" + const val SEARCH_ENTITY_SAVING = "SAVING" + const val SEARCH_ENTITY_CENTER = "CENTER" + const val CLIENT_NAME = "clientName" + const val CLIENT_ID = "clientId" + const val ID = "id" + const val CLIENT = "Client" + const val CLIENTS = "clients" + const val LOAN_ACCOUNT_NUMBER = "loanAccountNumber" + const val LOAN_PAYMENT_TYPE_OPTIONS = "LoanPaymentTypeOptions" + const val LOAN_SUMMARY = "loanWithAssociation" + const val SAVINGS_ACCOUNT_NUMBER = "savingsAccountNumber" + const val SAVINGS_ACCOUNT_ID = "savingsAccountId" + const val SAVINGS_ACCOUNT_TYPE = "savingsAccountType" + const val SAVINGS_ACCOUNT_TRANSACTION_TYPE = "transactionType" + const val SAVINGS_ACCOUNT_TRANSACTION_DEPOSIT = "Deposit" + const val SAVINGS_ACCOUNT_TRANSACTION_WITHDRAWAL = "Withdrawal" + const val DATA_TABLE_REGISTERED_NAME = "dataTableRegisteredName" + const val CENTER_ID = "centerId" + const val GROUP_ID = "groupId" + const val GROUP_NAME = "groupName" + const val GROUPS = "groups" + const val GROUP_ACCOUNT = "isGroupAccount" + const val CENTER = "center" + const val ENTITY_TYPE = "entityType" + const val ENTITY_ID = "entityId" + const val DOCUMENT_ACTIONS = "document_actions" + const val DOCUMENT = "document_title" + const val DOCUMENT_DESCRIPTION = "document_description" + const val CHARGE_ID = "chargeId" + const val DATE_OF_COLLECTION = "dateOfCollection" + const val REPAYMENT_DATE = "repaymentDate" + const val DATE_FORMAT = "dateFormat" + const val CALENDAR_INSTANCE_ID = "calendarInstanceId" + const val LOCALE = "locale" + const val LOCALE_EN = "en" + const val DATE_FORMAT_LONG = "dd MMMM yyyy" + const val TRANSACTIONS = "transactions" + const val SURVEYS = "surveys" + const val ANSWERS = "answers" + const val QUESTION_DATA = "question data" + const val IS_A_PARENT_FRAGMENT = "isAParentFragment" + const val STOP_TRACKING = "stop_tracking" const val SERVICE_STATUS = "service_status" + const val DATA_TABLE_NAME = "data_table_name" + const val DIALOG_FRAGMENT = 1 + const val ACTIVATE_CLIENT = "activate_client" + const val ACTIVATE_CENTER = "activate_center" + const val ACTIVATE_GROUP = "activate_group" + const val ACTIVATE_TYPE = "activation_type" + const val INTIAL_LOGIN = "initial_login" + const val INDIVIDUAL_SHEET = "collection_sheet" + const val DISBURSEMENT_DATE = "disbursement_date" + const val TRANSACTION_DATE = "transaction_date" + const val ADAPTER_POSITION = "adapter_position" + const val PAYLOAD = "payload" + const val PAYMENT_LIST = "payment_list" + const val LOAN_AND_CLIENT = "loan_and_client_item" + const val PAYMENT_OPTIONS = "payment_options" + const val MEMBERS = "members" + const val NEW = "NEW" + const val SAVED = "SAVED" + const val FILLNOW = "FillNow" + + //This needs to be 8 bits because validateRequestPermissionsRequestCode + // in FragmentActivity requires requestCode to be of 8 bits, meaning the range is from 0 to 255. + const val REQUEST_PERMISSION_SETTING = 254 + + /** + * PERMISSIONS_........ is an app-defined int constant of RunTime Permission . The callback + * method gets the result of the request. + */ + const val PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE = 1 + const val PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE = 2 + const val PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION = 3 + + /** + * String Constant of Permissions in SharedPreference + */ + const val READ_EXTERNAL_STORAGE_STATUS = "read_external_storage_status" + const val WRITE_EXTERNAL_STORAGE_STATUS = "write_external_storage_status" + const val ACCESS_FINE_LOCATION_STATUS = "access_fine_location_status" + + /** + * Constants to identify which Data Tables have to be shown + */ + const val DATA_TABLE_CLIENTS = 2001 + const val DATA_TABLE_LOANS = 2002 + const val DATA_TABLES_SAVINGS_ACCOUNTS = 2003 + + /** + * Constants to for Data Table Menu Names + */ + const val DATA_TABLE_CLIENTS_NAME = "More Client Info" + const val DATA_TABLE_LOAN_NAME = "More Loan Info" + const val DATA_TABLE_SAVINGS_ACCOUNTS_NAME = "More Savings Account Info" + const val DATA_TABLE_NAME_CLIENT = "m_client" + const val DATA_TABLE_NAME_SAVINGS = "m_savings_account" + const val DATA_TABLE_NAME_LOANS = "m_loan" + const val DATA_TABLE_NAME_GROUP = "m_group" + + /** + * User Logged In Status + * 0 for Online and 1 for Offline + */ + const val USER_ONLINE = false + const val USER_OFFLINE = true + + /** + * Constants to determine in the generic DataTableListFragment, the type of query that + * has to be forwarded after showing the datatables and adding the values + * to the corresponding payload. + */ + const val CREATE_CLIENT = 3001 + const val CLIENT_LOAN = 3002 + const val GROUP_LOAN = 3003 + + /** + * Constant to identify whether Simple Collection Sheet fragment has to be opened + * or the Individual Collection Sheet. + */ + const val COLLECTION_TYPE = "collection_type" + const val EXTRA_COLLECTION_INDIVIDUAL = "individual" + const val EXTRA_COLLECTION_COLLECTION = "collection" + /** + * Constants related to RunReports + */ + const val REPORT_NAME = "report_name" + const val REPORT_ID = "report_id" + const val CLIENT_REPORT_ITEM = "client_report_item" + const val CLIENT_REPORT = "client_report" + const val REPORT_CATEGORY = "report_category" + const val LOAN = "Loan" + const val ACCOUNTING = "Accounting" + const val FUND = "Fund" + const val SAVINGS = "Savings" + const val LOAN_OFFICER_ID_SELECT = "loanOfficerIdSelectAll" + const val LOAN_PRODUCT_ID_SELECT = "loanProductIdSelectAll" + const val LOAN_PURPOSE_ID_SELECT = "loanPurposeIdSelectAll" + const val FUND_ID_SELECT = "fundIdSelectAll" + const val CURRENCY_ID_SELECT = "currencyIdSelectAll" + const val OFFICE_ID_SELECT = "OfficeIdSelectOne" + const val PAR_TYPE_SELECT = "parTypeSelect" + const val SAVINGS_ACCOUNT_SUB_STATUS = "SavingsAccountSubStatus" + const val SELECT_GL_ACCOUNT_NO = "SelectGLAccountNO" + const val OBLIG_DATE_TYPE_SELECT = "obligDateTypeSelect" + const val R_LOAN_OFFICER_ID = "R_loanOfficerId" + const val R_LOAN_PRODUCT_ID = "R_loanProductId" + const val R_LOAN_PURPOSE_ID = "R_loanPurposeId" + const val R_FUND_ID = "R_fundId" + const val R_CURRENCY_ID = "R_currencyId" + const val R_OFFICE_ID = "R_officeId" + const val R_PAR_TYPE = "R_parType" + const val R_SUB_STATUS = "R_subStatus" + const val R_ACCOUNT = "R_account" + const val R_OBLIG_DATE_TYPE = "R_obligDateType" + const val START_DATE_SELECT = "startDateSelect" + const val END_DATE_SELECT = "endDateSelect" + const val SELECT_ACCOUNT = "selectAccount" + const val FROM_X_SELECT = "fromXSelect" + const val TO_Y_SELECT = "toYSelect" + const val OVERDUE_X_SELECT = "overdueXSelect" + const val OVERDUE_Y_SELECT = "overdueYSelect" + const val R_START_DATE = "R_startDate" + const val R_END_DATE = "R_endDate" + const val R_ACCOUNT_NO = "R_accountNo" + const val R_FROM_X = "R_fromX" + const val R_TO_Y = "R_toY" + const val R_OVERDUE_X = "R_overdueX" + const val R_OVERDUE_Y = "R_overdueY" + const val ACTION_REPORT = "report" + const val CURR_PASSWORD = "currentPassword" + const val IS_TO_UPDATE_PASS_CODE = "updatePassCode" + const val HAS_SETTING_CHANGED = "hasSettingsChanged" } \ No newline at end of file diff --git a/core/common/src/main/java/com/mifos/core/common/utils/MapDeserializer.kt b/core/common/src/main/java/com/mifos/core/common/utils/MapDeserializer.kt new file mode 100644 index 00000000000..aef4671dbb8 --- /dev/null +++ b/core/common/src/main/java/com/mifos/core/common/utils/MapDeserializer.kt @@ -0,0 +1,54 @@ +package com.mifos.core.common.utils + +import com.google.gson.JsonDeserializationContext +import com.google.gson.JsonDeserializer +import com.google.gson.JsonElement +import com.google.gson.JsonParseException +import java.lang.reflect.Type + +class MapDeserializer : JsonDeserializer?> { + @Throws(JsonParseException::class) + override fun deserialize( + json: JsonElement, typeOfT: Type, + context: JsonDeserializationContext + ): Map? { + return read(json) as Map? + } + + fun read(`in`: JsonElement): Any? { + if (`in`.isJsonArray) { + val list: MutableList = ArrayList() + val arr = `in`.asJsonArray + for (anArr in arr) { + list.add(read(anArr)) + } + return list + } else if (`in`.isJsonObject) { + val map: MutableMap = HashMap() + val obj = `in`.asJsonObject + val entitySet = obj.entrySet() + for ((key, value) in entitySet) { + map[key] = read(value) + } + return map + } else if (`in`.isJsonPrimitive) { + val prim = `in`.asJsonPrimitive + if (prim.isBoolean) { + return prim.asBoolean + } else if (prim.isString) { + return prim.asString + } else if (prim.isNumber) { + val num = prim.asNumber + // here you can handle double int/long values + // and return any type you want + // this solution will transform 3.0 float to long values + return if (Math.ceil(num.toDouble()) == num.toLong().toDouble()) { + num.toLong() + } else { + num.toDouble() + } + } + } + return null + } +} \ No newline at end of file diff --git a/core/data/src/main/java/com/mifos/core/data/model/client/Client.kt b/core/data/src/main/java/com/mifos/core/data/model/client/Client.kt deleted file mode 100644 index 6233dc18a94..00000000000 --- a/core/data/src/main/java/com/mifos/core/data/model/client/Client.kt +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This project is licensed under the open source MPL V2. - * See https://github.com/openMF/android-client/blob/master/LICENSE.md - */ -package com.mifos.core.data.model.client - -import android.os.Parcelable -import kotlinx.parcelize.Parcelize - -/** - * Created by ishankhanna on 08/02/14. - */ -@Parcelize -data class Client( - - var id: Int = 0, - - var groupId: Int? = 0, - - var accountNo: String? = null, - - var clientId: Int? = null, - - var status: Status? = null, - - var sync: Boolean = false, - - var active: Boolean = false, - - var clientDate: ClientDate? = null, - - var activationDate: List = ArrayList(), - - var dobDate: List = ArrayList(), - - var groups: List = ArrayList(), - - var mobileNo: String? = null, - - var firstname: String? = null, - - var middlename: String? = null, - - var lastname: String? = null, - - var displayName: String? = null, - - var officeId: Int = 0, - - var officeName: String? = null, - - var staffId: Int = 0, - - var staffName: String? = null, - - var timeline: Timeline? = null, - - var fullname: String? = null, - - var imageId: Int = 0, - - var imagePresent: Boolean = false, - - var externalId: String? = null -) : Parcelable { - - /** - * This method is returning the comma separated names of all the client's group - * in the form of a string. - */ - val groupNames: String - get() { - var groupNames = "" - if (groups.isEmpty()) return "" - for (group in groups) { - groupNames += group!!.name + ", " - } - return groupNames.substring(0, groupNames.length - 2) - } -} \ No newline at end of file diff --git a/core/data/src/main/java/com/mifos/core/data/model/client/ClientDate.kt b/core/data/src/main/java/com/mifos/core/data/model/client/ClientDate.kt deleted file mode 100644 index b7ad4362fb6..00000000000 --- a/core/data/src/main/java/com/mifos/core/data/model/client/ClientDate.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.mifos.core.data.model.client - -import android.os.Parcelable -import kotlinx.parcelize.Parcelize - -/** - * Created by Rajan Maurya on 04/07/16. - */ -@Parcelize -data class ClientDate( - - var clientId: Long = 0, - - var chargeId: Long = 0, - - var day: Int = 0, - - var month: Int = 0, - - var year: Int = 0 -) : Parcelable \ No newline at end of file diff --git a/core/data/src/main/java/com/mifos/core/data/model/client/Group.kt b/core/data/src/main/java/com/mifos/core/data/model/client/Group.kt deleted file mode 100644 index 91db4ddc09f..00000000000 --- a/core/data/src/main/java/com/mifos/core/data/model/client/Group.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This project is licensed under the open source MPL V2. - * See https://github.com/openMF/android-client/blob/master/LICENSE.md - */ -package com.mifos.core.data.model.client - -import android.os.Parcelable -import kotlinx.parcelize.Parcelize - -/** - * This is the Groups Model Table - * Created by ishankhanna on 28/06/14. - */ -@Parcelize -data class Group( - var id: Int? = null, - - var accountNo: String? = null, - - var sync: Boolean = false, - - var name: String? = null, - - var status: Status? = null, - - var active: Boolean? = null, - - var groupDate: GroupDate? = null, - - var activationDate: List = ArrayList(), - - var officeId: Int? = null, - - var officeName: String? = null, - - var centerId: Int? = 0, - - var centerName: String? = null, - - var staffId: Int? = null, - - var staffName: String? = null, - - var hierarchy: String? = null, - - var groupLevel: Int = 0, - - var timeline: Timeline? = null, - - var externalId: String? = null -) : Parcelable \ No newline at end of file diff --git a/core/data/src/main/java/com/mifos/core/data/model/client/GroupDate.kt b/core/data/src/main/java/com/mifos/core/data/model/client/GroupDate.kt deleted file mode 100644 index 3253b7b7d40..00000000000 --- a/core/data/src/main/java/com/mifos/core/data/model/client/GroupDate.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.mifos.core.data.model.client - -import android.os.Parcelable -import kotlinx.parcelize.Parcelize - -/** - * Created by Rajan Maurya on 18/09/16. - */ -@Parcelize -data class GroupDate( - - var groupId: Long = 0, - - var chargeId: Long = 0, - - var day: Int = 0, - - var month: Int = 0, - - var year: Int = 0 -) : Parcelable \ No newline at end of file diff --git a/core/data/src/main/java/com/mifos/core/data/model/client/Status.kt b/core/data/src/main/java/com/mifos/core/data/model/client/Status.kt deleted file mode 100644 index 8616b47dd14..00000000000 --- a/core/data/src/main/java/com/mifos/core/data/model/client/Status.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This project is licensed under the open source MPL V2. - * See https://github.com/openMF/android-client/blob/master/LICENSE.md - */ -package com.mifos.core.data.model.client - -import android.os.Parcelable -import kotlinx.parcelize.Parcelize - -/** - * This Model is the common for Client and Group. So we can use it in both client and group - * database. - * Created by ishankhanna on 09/02/14. - */ -@Parcelize -data class Status( - - var id: Int = 0, - - var code: String? = null, - - var value: String? = null, -) : Parcelable { - - - companion object { - private val STATUS_ACTIVE = "Active" - - fun isActive(value: String): Boolean { - return value == STATUS_ACTIVE - } - } -} \ No newline at end of file diff --git a/core/data/src/main/java/com/mifos/core/data/model/client/Timeline.kt b/core/data/src/main/java/com/mifos/core/data/model/client/Timeline.kt deleted file mode 100644 index dc69f96e33d..00000000000 --- a/core/data/src/main/java/com/mifos/core/data/model/client/Timeline.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This project is licensed under the open source MPL V2. - * See https://github.com/openMF/android-client/blob/master/LICENSE.md - */ -package com.mifos.core.data.model.client - -import android.os.Parcelable -import kotlinx.parcelize.Parcelize - -/** - * Created by ishankhanna on 09/02/14. - */ -@Parcelize -data class Timeline( - var submittedOnDate: MutableList = ArrayList(), - - var submittedByUsername: String? = null, - - var submittedByFirstname: String? = null, - - var submittedByLastname: String? = null, - - var activatedOnDate: MutableList = ArrayList(), - - var activatedByUsername: String? = null, - - var activatedByFirstname: String? = null, - - var activatedByLastname: String? = null, - - var closedOnDate: MutableList = ArrayList(), - - var closedByUsername: String? = null, - - var closedByFirstname: String? = null, - - var closedByLastname: String? = null -) : Parcelable \ No newline at end of file diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts index 23c3b1be4e9..d0189530bac 100644 --- a/core/datastore/build.gradle.kts +++ b/core/datastore/build.gradle.kts @@ -4,6 +4,8 @@ plugins { id("kotlin-kapt") id("com.google.dagger.hilt.android") id("io.realm.kotlin") + id("kotlin-parcelize") + id("org.jetbrains.kotlin.plugin.serialization") } android { diff --git a/mifosng-android/src/main/java/com/mifos/services/data/CenterPayload.kt b/core/datastore/src/main/java/com/mifos/core/data/CenterPayload.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/services/data/CenterPayload.kt rename to core/datastore/src/main/java/com/mifos/core/data/CenterPayload.kt index f93febd820c..07826fa8331 100644 --- a/mifosng-android/src/main/java/com/mifos/services/data/CenterPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/data/CenterPayload.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.services.data +package com.mifos.core.data import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/services/data/ChargesPayload.kt b/core/datastore/src/main/java/com/mifos/core/data/ChargesPayload.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/services/data/ChargesPayload.kt rename to core/datastore/src/main/java/com/mifos/core/data/ChargesPayload.kt index 221c3f324c7..03355bdd3f8 100644 --- a/mifosng-android/src/main/java/com/mifos/services/data/ChargesPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/data/ChargesPayload.kt @@ -1,4 +1,4 @@ -package com.mifos.services.data +package com.mifos.core.data /** * Created by nellyk on 2/15/2016. diff --git a/mifosng-android/src/main/java/com/mifos/services/data/GroupLoanPayload.kt b/core/datastore/src/main/java/com/mifos/core/data/GroupLoanPayload.kt similarity index 97% rename from mifosng-android/src/main/java/com/mifos/services/data/GroupLoanPayload.kt rename to core/datastore/src/main/java/com/mifos/core/data/GroupLoanPayload.kt index 0c22750c85c..ac789110a00 100644 --- a/mifosng-android/src/main/java/com/mifos/services/data/GroupLoanPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/data/GroupLoanPayload.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.services.data +package com.mifos.core.data import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/services/data/LoansPayload.kt b/core/datastore/src/main/java/com/mifos/core/data/LoansPayload.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/services/data/LoansPayload.kt rename to core/datastore/src/main/java/com/mifos/core/data/LoansPayload.kt index f31cd062121..2345cec6301 100644 --- a/mifosng-android/src/main/java/com/mifos/services/data/LoansPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/data/LoansPayload.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.services.data +package com.mifos.core.data import android.os.Parcelable -import com.mifos.objects.noncore.DataTablePayload +import com.mifos.core.objects.noncore.DataTablePayload import kotlinx.parcelize.Parcelize /** @@ -13,7 +13,7 @@ import kotlinx.parcelize.Parcelize */ @Parcelize class LoansPayload( - var allowPartialPeriodInterestCalcualtion: Boolean ? = null, + var allowPartialPeriodInterestCalcualtion: Boolean? = null, var amortizationType: Int? = null, var clientId: Int? = null, var dateFormat: String? = null, diff --git a/mifosng-android/src/main/java/com/mifos/services/data/SavingsPayload.kt b/core/datastore/src/main/java/com/mifos/core/data/SavingsPayload.kt similarity index 96% rename from mifosng-android/src/main/java/com/mifos/services/data/SavingsPayload.kt rename to core/datastore/src/main/java/com/mifos/core/data/SavingsPayload.kt index 1015c747681..ef245ee9c84 100644 --- a/mifosng-android/src/main/java/com/mifos/services/data/SavingsPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/data/SavingsPayload.kt @@ -1,4 +1,4 @@ -package com.mifos.services.data +package com.mifos.core.data /** * Created by nellyk on 2/10/2016. diff --git a/core/datastore/src/main/java/com/mifos/core/database/DatabaseClientQuery.kt b/core/datastore/src/main/java/com/mifos/core/database/DatabaseClientQuery.kt index 952313c6be3..8a9069d0f90 100644 --- a/core/datastore/src/main/java/com/mifos/core/database/DatabaseClientQuery.kt +++ b/core/datastore/src/main/java/com/mifos/core/database/DatabaseClientQuery.kt @@ -1,7 +1,7 @@ package com.mifos.core.database -import com.mifos.core.common.utils.Page import com.mifos.core.model.ClientDb +import com.mifos.core.objects.client.Page import io.realm.kotlin.Realm import io.realm.kotlin.ext.query import io.realm.kotlin.query.Sort diff --git a/mifosng-android/src/main/java/com/mifos/api/local/MifosDatabase.kt b/core/datastore/src/main/java/com/mifos/core/database/MifosDatabase.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/api/local/MifosDatabase.kt rename to core/datastore/src/main/java/com/mifos/core/database/MifosDatabase.kt index fbab11a4879..a06bbd7ae65 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/MifosDatabase.kt +++ b/core/datastore/src/main/java/com/mifos/core/database/MifosDatabase.kt @@ -1,4 +1,4 @@ -package com.mifos.api.local +package com.mifos.core.database import com.raizlabs.android.dbflow.annotation.Database diff --git a/mifosng-android/src/main/java/com/mifos/api/local/database/MigrationVersion2.kt b/core/datastore/src/main/java/com/mifos/core/database/MigrationVersion2.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/api/local/database/MigrationVersion2.kt rename to core/datastore/src/main/java/com/mifos/core/database/MigrationVersion2.kt index 8298c3240e2..4f929777a1d 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/database/MigrationVersion2.kt +++ b/core/datastore/src/main/java/com/mifos/core/database/MigrationVersion2.kt @@ -1,9 +1,8 @@ -package com.mifos.api.local.database +package com.mifos.core.database -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.accounts.loan.LoanAccount -import com.mifos.objects.accounts.savings.SavingsAccount -import com.mifos.objects.group.Center +import com.mifos.core.objects.accounts.loan.LoanAccount +import com.mifos.core.objects.accounts.savings.SavingsAccount +import com.mifos.core.objects.group.Center import com.raizlabs.android.dbflow.annotation.Migration import com.raizlabs.android.dbflow.sql.SQLiteType import com.raizlabs.android.dbflow.sql.migration.AlterTableMigration diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperCenter.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperCenter.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperCenter.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperCenter.kt index 61333c9d38b..5a7b61762a3 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperCenter.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperCenter.kt @@ -1,20 +1,19 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper import android.os.AsyncTask -import com.mifos.objects.accounts.CenterAccounts -import com.mifos.objects.client.Page -import com.mifos.objects.group.Center -import com.mifos.objects.group.CenterDate -import com.mifos.objects.group.CenterWithAssociations -import com.mifos.objects.group.Group -import com.mifos.objects.group.Group_Table -import com.mifos.objects.response.SaveResponse -import com.mifos.services.data.CenterPayload -import com.mifos.services.data.CenterPayload_Table +import com.mifos.core.data.CenterPayload +import com.mifos.core.data.CenterPayload_Table +import com.mifos.core.objects.accounts.CenterAccounts +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.Center +import com.mifos.core.objects.group.CenterDate +import com.mifos.core.objects.group.CenterWithAssociations +import com.mifos.core.objects.group.Group +import com.mifos.core.objects.group.Group_Table +import com.mifos.core.objects.response.SaveResponse import com.raizlabs.android.dbflow.sql.language.Delete import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable -import rx.Subscriber import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperCharge.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperCharge.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperCharge.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperCharge.kt index 073a7e0463d..e5e4419cf97 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperCharge.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperCharge.kt @@ -1,14 +1,12 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper import android.os.AsyncTask -import com.mifos.objects.client.Charges -import com.mifos.objects.client.Charges_Table -import com.mifos.objects.client.ClientDate -import com.mifos.objects.client.Page +import com.mifos.core.objects.client.Charges +import com.mifos.core.objects.client.Charges_Table +import com.mifos.core.objects.client.ClientDate +import com.mifos.core.objects.client.Page import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable -import rx.Subscriber -import java.util.Arrays import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperClient.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperClient.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperClient.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperClient.kt index 9de015fe18c..27da56bd1d9 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperClient.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperClient.kt @@ -1,45 +1,42 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper import com.google.gson.Gson import com.google.gson.GsonBuilder import com.google.gson.reflect.TypeToken -import com.mifos.objects.accounts.ClientAccounts -import com.mifos.objects.accounts.loan.LoanAccount -import com.mifos.objects.accounts.loan.LoanAccount_Table -import com.mifos.objects.accounts.savings.SavingsAccount -import com.mifos.objects.accounts.savings.SavingsAccount_Table -import com.mifos.objects.client.Client -import com.mifos.objects.client.ClientDate -import com.mifos.objects.client.ClientPayload -import com.mifos.objects.client.ClientPayload_Table -import com.mifos.objects.client.Client_Table -import com.mifos.objects.client.Page -import com.mifos.objects.group.GroupWithAssociations -import com.mifos.objects.noncore.ColumnHeader -import com.mifos.objects.noncore.ColumnHeader_Table -import com.mifos.objects.noncore.ColumnValue -import com.mifos.objects.noncore.ColumnValue_Table -import com.mifos.objects.noncore.DataTable -import com.mifos.objects.noncore.DataTablePayload -import com.mifos.objects.noncore.DataTablePayload_Table -import com.mifos.objects.noncore.DataTable_Table -import com.mifos.objects.templates.clients.ClientsTemplate -import com.mifos.objects.templates.clients.InterestType -import com.mifos.objects.templates.clients.OfficeOptions -import com.mifos.objects.templates.clients.Options -import com.mifos.objects.templates.clients.Options_Table -import com.mifos.objects.templates.clients.SavingProductOptions -import com.mifos.objects.templates.clients.StaffOptions -import com.mifos.utils.Constants -import com.mifos.utils.MapDeserializer +import com.mifos.core.common.utils.Constants +import com.mifos.core.common.utils.MapDeserializer +import com.mifos.core.objects.accounts.ClientAccounts +import com.mifos.core.objects.accounts.loan.LoanAccount +import com.mifos.core.objects.accounts.loan.LoanAccount_Table +import com.mifos.core.objects.accounts.savings.SavingsAccount +import com.mifos.core.objects.accounts.savings.SavingsAccount_Table +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.ClientDate +import com.mifos.core.objects.client.ClientPayload +import com.mifos.core.objects.client.ClientPayload_Table +import com.mifos.core.objects.client.Client_Table +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.GroupWithAssociations +import com.mifos.core.objects.noncore.ColumnHeader +import com.mifos.core.objects.noncore.ColumnHeader_Table +import com.mifos.core.objects.noncore.ColumnValue +import com.mifos.core.objects.noncore.ColumnValue_Table +import com.mifos.core.objects.noncore.DataTable +import com.mifos.core.objects.noncore.DataTablePayload +import com.mifos.core.objects.noncore.DataTablePayload_Table +import com.mifos.core.objects.noncore.DataTable_Table +import com.mifos.core.objects.templates.clients.ClientsTemplate +import com.mifos.core.objects.templates.clients.InterestType +import com.mifos.core.objects.templates.clients.OfficeOptions +import com.mifos.core.objects.templates.clients.Options +import com.mifos.core.objects.templates.clients.Options_Table +import com.mifos.core.objects.templates.clients.SavingProductOptions +import com.mifos.core.objects.templates.clients.StaffOptions import com.raizlabs.android.dbflow.sql.language.Delete import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable -import rx.Subscriber -import rx.functions.Action1 import rx.functions.Func0 import java.lang.reflect.Type -import java.util.Arrays import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperDataTable.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperDataTable.kt similarity index 79% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperDataTable.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperDataTable.kt index 941929ea204..3365e39100c 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperDataTable.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperDataTable.kt @@ -1,4 +1,4 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperGroups.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperGroups.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperGroups.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperGroups.kt index a244278978c..0aa6517e209 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperGroups.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperGroups.kt @@ -1,22 +1,21 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper -import com.mifos.objects.accounts.GroupAccounts -import com.mifos.objects.accounts.loan.LoanAccount -import com.mifos.objects.accounts.loan.LoanAccount_Table -import com.mifos.objects.accounts.savings.SavingsAccount -import com.mifos.objects.accounts.savings.SavingsAccount_Table -import com.mifos.objects.client.Page -import com.mifos.objects.group.Group -import com.mifos.objects.group.GroupDate -import com.mifos.objects.group.GroupPayload -import com.mifos.objects.group.GroupPayload_Table -import com.mifos.objects.group.Group_Table -import com.mifos.objects.response.SaveResponse +import com.mifos.core.objects.accounts.GroupAccounts +import com.mifos.core.objects.accounts.loan.LoanAccount +import com.mifos.core.objects.accounts.loan.LoanAccount_Table +import com.mifos.core.objects.accounts.savings.SavingsAccount +import com.mifos.core.objects.accounts.savings.SavingsAccount_Table +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.Group +import com.mifos.core.objects.group.GroupDate +import com.mifos.core.objects.group.GroupPayload +import com.mifos.core.objects.group.GroupPayload_Table +import com.mifos.core.objects.group.Group_Table +import com.mifos.core.objects.response.SaveResponse import com.raizlabs.android.dbflow.sql.language.Delete import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable import rx.functions.Func0 -import java.util.Arrays import javax.inject.Inject import javax.inject.Singleton @@ -38,9 +37,9 @@ class DatabaseHelperGroups @Inject constructor() { return Observable.defer(Func0 { if (group.activationDate.isNotEmpty()) { val groupDate = group.id?.toLong()?.let { - group.activationDate[0]?.let { it1 -> - group.activationDate[1]?.let { it2 -> - group.activationDate[2]?.let { it3 -> + group.activationDate[0].let { it1 -> + group.activationDate[1].let { it2 -> + group.activationDate[2].let { it3 -> GroupDate( it, 0, it1, diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperLoan.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperLoan.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperLoan.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperLoan.kt index 15dc8c23c15..fadcb4055b9 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperLoan.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperLoan.kt @@ -1,19 +1,18 @@ -package com.mifos.api.local.databasehelper - -import com.mifos.objects.PaymentTypeOption -import com.mifos.objects.accounts.loan.ActualDisbursementDate -import com.mifos.objects.accounts.loan.LoanRepaymentRequest -import com.mifos.objects.accounts.loan.LoanRepaymentRequest_Table -import com.mifos.objects.accounts.loan.LoanRepaymentResponse -import com.mifos.objects.accounts.loan.LoanWithAssociations -import com.mifos.objects.accounts.loan.LoanWithAssociations_Table -import com.mifos.objects.templates.loans.LoanRepaymentTemplate -import com.mifos.objects.templates.loans.LoanRepaymentTemplate_Table +package com.mifos.core.databasehelper + +import com.mifos.core.objects.PaymentTypeOption +import com.mifos.core.objects.accounts.loan.ActualDisbursementDate +import com.mifos.core.objects.accounts.loan.LoanRepaymentRequest +import com.mifos.core.objects.accounts.loan.LoanRepaymentRequest_Table +import com.mifos.core.objects.accounts.loan.LoanRepaymentResponse +import com.mifos.core.objects.accounts.loan.LoanWithAssociations +import com.mifos.core.objects.accounts.loan.LoanWithAssociations_Table +import com.mifos.core.objects.templates.loans.LoanRepaymentTemplate +import com.mifos.core.objects.templates.loans.LoanRepaymentTemplate_Table import com.raizlabs.android.dbflow.sql.language.Delete import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable import rx.functions.Func0 -import java.util.Arrays import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperNote.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperNote.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperNote.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperNote.kt index 25b16911bbc..cbccacca711 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperNote.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperNote.kt @@ -1,4 +1,4 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperOffices.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperOffices.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperOffices.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperOffices.kt index ac8bfd6c1e4..ca9e2536750 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperOffices.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperOffices.kt @@ -1,12 +1,10 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper import android.os.AsyncTask -import com.mifos.objects.organisation.Office -import com.mifos.objects.organisation.OfficeOpeningDate +import com.mifos.core.objects.organisation.Office +import com.mifos.core.objects.organisation.OfficeOpeningDate import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable -import rx.Subscriber -import java.util.Arrays import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperSavings.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperSavings.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperSavings.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperSavings.kt index 4655377691c..12395915a59 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperSavings.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperSavings.kt @@ -1,22 +1,20 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper -import com.mifos.objects.PaymentTypeOption -import com.mifos.objects.accounts.savings.SavingsAccountTransactionRequest -import com.mifos.objects.accounts.savings.SavingsAccountTransactionRequest_Table -import com.mifos.objects.accounts.savings.SavingsAccountTransactionResponse -import com.mifos.objects.accounts.savings.SavingsAccountWithAssociations -import com.mifos.objects.accounts.savings.SavingsAccountWithAssociations_Table -import com.mifos.objects.accounts.savings.SavingsTransactionDate -import com.mifos.objects.accounts.savings.Transaction -import com.mifos.objects.accounts.savings.Transaction_Table -import com.mifos.objects.templates.savings.SavingsAccountTransactionTemplate -import com.mifos.objects.templates.savings.SavingsAccountTransactionTemplate_Table +import com.mifos.core.objects.PaymentTypeOption +import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionRequest +import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionRequest_Table +import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionResponse +import com.mifos.core.objects.accounts.savings.SavingsAccountWithAssociations +import com.mifos.core.objects.accounts.savings.SavingsAccountWithAssociations_Table +import com.mifos.core.objects.accounts.savings.SavingsTransactionDate +import com.mifos.core.objects.accounts.savings.Transaction +import com.mifos.core.objects.accounts.savings.Transaction_Table +import com.mifos.core.objects.templates.savings.SavingsAccountTransactionTemplate +import com.mifos.core.objects.templates.savings.SavingsAccountTransactionTemplate_Table import com.raizlabs.android.dbflow.sql.language.Delete import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable import rx.functions.Action1 -import rx.functions.Func0 -import java.util.Arrays import javax.inject.Inject import javax.inject.Singleton @@ -37,7 +35,7 @@ class DatabaseHelperSavings @Inject constructor() { ): Observable { return Observable.defer { val transactions = savingsAccountWithAssociations.transactions - if (transactions.size != 0) { + if (transactions.isNotEmpty()) { Observable.from(transactions) .subscribe(Action1 { transaction -> val savingsTransactionDate = SavingsTransactionDate( diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperStaff.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperStaff.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperStaff.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperStaff.kt index 5a5e953f417..22f9596897f 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperStaff.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperStaff.kt @@ -1,11 +1,10 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper import android.os.AsyncTask -import com.mifos.objects.organisation.Staff -import com.mifos.objects.organisation.Staff_Table +import com.mifos.core.objects.organisation.Staff +import com.mifos.core.objects.organisation.Staff_Table import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable -import rx.Subscriber import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperSurveys.kt b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperSurveys.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperSurveys.kt rename to core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperSurveys.kt index c2dca7560ff..4c8b3207601 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/databasehelper/DatabaseHelperSurveys.kt +++ b/core/datastore/src/main/java/com/mifos/core/databasehelper/DatabaseHelperSurveys.kt @@ -1,10 +1,10 @@ -package com.mifos.api.local.databasehelper +package com.mifos.core.databasehelper -import com.mifos.objects.survey.QuestionDatas -import com.mifos.objects.survey.QuestionDatas_Table -import com.mifos.objects.survey.ResponseDatas -import com.mifos.objects.survey.ResponseDatas_Table -import com.mifos.objects.survey.Survey +import com.mifos.core.objects.survey.QuestionDatas +import com.mifos.core.objects.survey.QuestionDatas_Table +import com.mifos.core.objects.survey.ResponseDatas +import com.mifos.core.objects.survey.ResponseDatas_Table +import com.mifos.core.objects.survey.Survey import com.raizlabs.android.dbflow.sql.language.SQLite import rx.Observable import javax.inject.Inject diff --git a/core/datastore/src/main/java/com/mifos/core/datastore/PrefManager.kt b/core/datastore/src/main/java/com/mifos/core/datastore/PrefManager.kt index 99124b9e3ae..afafb90393e 100644 --- a/core/datastore/src/main/java/com/mifos/core/datastore/PrefManager.kt +++ b/core/datastore/src/main/java/com/mifos/core/datastore/PrefManager.kt @@ -14,8 +14,9 @@ import javax.inject.Inject * Created by Aditya Gupta on 19/08/23. */ -class PrefManager @Inject constructor(@ApplicationContext context: Context) : - UserPreferences() { +class PrefManager @Inject constructor( + @ApplicationContext context: Context +) : UserPreferences() { private val USER_DETAILS = "user_details" diff --git a/core/datastore/src/main/java/com/mifos/core/di/DatabaseModule.kt b/core/datastore/src/main/java/com/mifos/core/di/DatabaseModule.kt new file mode 100644 index 00000000000..40d19de470a --- /dev/null +++ b/core/datastore/src/main/java/com/mifos/core/di/DatabaseModule.kt @@ -0,0 +1,11 @@ +package com.mifos.core.di + +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent + +@Module +@InstallIn(SingletonComponent::class) +object DatabaseModule { + +} \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/model/APIEndPoint.kt b/core/datastore/src/main/java/com/mifos/core/model/APIEndPoint.kt similarity index 97% rename from mifosng-android/src/main/java/com/mifos/api/model/APIEndPoint.kt rename to core/datastore/src/main/java/com/mifos/core/model/APIEndPoint.kt index 9a00da35d3c..0bbe854ae87 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/APIEndPoint.kt +++ b/core/datastore/src/main/java/com/mifos/core/model/APIEndPoint.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.model +package com.mifos.core.model /** * Created by ishankhanna on 23/06/14. diff --git a/core/datastore/src/main/java/com/mifos/core/model/BulkRepaymentTransactions.kt b/core/datastore/src/main/java/com/mifos/core/model/BulkRepaymentTransactions.kt new file mode 100644 index 00000000000..6fb4c344ca5 --- /dev/null +++ b/core/datastore/src/main/java/com/mifos/core/model/BulkRepaymentTransactions.kt @@ -0,0 +1,29 @@ +/* + * This project is licensed under the open source MPL V2. + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.model + +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize +data class BulkRepaymentTransactions( + + var loanId: Int = 0, + + var transactionAmount: Double = 0.0, + + // Optional fields + var accountNumber: String? = null, + + var bankNumber: String? = null, + + var checkNumber: String? = null, + + var paymentTypeId: Int? = null, + + var receiptNumber: String? = null, + + var routingCode: String? = null +) : Parcelable \ No newline at end of file diff --git a/core/datastore/src/main/java/com/mifos/core/model/ClientsAttendance.kt b/core/datastore/src/main/java/com/mifos/core/model/ClientsAttendance.kt new file mode 100644 index 00000000000..a14058bd64d --- /dev/null +++ b/core/datastore/src/main/java/com/mifos/core/model/ClientsAttendance.kt @@ -0,0 +1,16 @@ +/* + * This project is licensed under the open source MPL V2. + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.model + +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize +data class ClientsAttendance( + + var attendanceType: Int, + + var clientId: Int +) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/local/MifosBaseModel.kt b/core/datastore/src/main/java/com/mifos/core/model/client/MifosBaseModel.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/api/local/MifosBaseModel.kt rename to core/datastore/src/main/java/com/mifos/core/model/client/MifosBaseModel.kt index 88179664479..e6a09a7ba86 100644 --- a/mifosng-android/src/main/java/com/mifos/api/local/MifosBaseModel.kt +++ b/core/datastore/src/main/java/com/mifos/core/model/client/MifosBaseModel.kt @@ -1,4 +1,4 @@ -package com.mifos.api.local +package com.mifos.core.model.client import com.google.gson.Gson import com.raizlabs.android.dbflow.structure.BaseModel diff --git a/mifosng-android/src/main/java/com/mifos/objects/Changes.kt b/core/datastore/src/main/java/com/mifos/core/objects/Changes.kt similarity index 96% rename from mifosng-android/src/main/java/com/mifos/objects/Changes.kt rename to core/datastore/src/main/java/com/mifos/core/objects/Changes.kt index ae60baf7dc0..f718d815706 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/Changes.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/Changes.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects +package com.mifos.core.objects import android.os.Parcelable import com.google.gson.annotations.Expose diff --git a/mifosng-android/src/main/java/com/mifos/objects/ErrorSyncServerMessage.kt b/core/datastore/src/main/java/com/mifos/core/objects/ErrorSyncServerMessage.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/objects/ErrorSyncServerMessage.kt rename to core/datastore/src/main/java/com/mifos/core/objects/ErrorSyncServerMessage.kt index e73af8812ea..bc42f86915f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/ErrorSyncServerMessage.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/ErrorSyncServerMessage.kt @@ -1,4 +1,4 @@ -package com.mifos.objects +package com.mifos.core.objects /** * Created by Rajan Maurya on 23/07/16. @@ -8,7 +8,7 @@ class ErrorSyncServerMessage { var httpStatusCode = 0 var defaultUserMessage: String? = null var userMessageGlobalisationCode: String? = null - var errors: List? = null + var errors: List? = null inner class Error { var developerMessage: String? = null diff --git a/mifosng-android/src/main/java/com/mifos/objects/PaymentTypeOption.kt b/core/datastore/src/main/java/com/mifos/core/objects/PaymentTypeOption.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/PaymentTypeOption.kt rename to core/datastore/src/main/java/com/mifos/core/objects/PaymentTypeOption.kt index 76cd26caa93..bdff2ed61e8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/PaymentTypeOption.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/PaymentTypeOption.kt @@ -2,13 +2,13 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects +package com.mifos.core.objects import android.os.Parcel import android.os.Parcelable import com.google.gson.annotations.SerializedName -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/SearchedEntity.kt b/core/datastore/src/main/java/com/mifos/core/objects/SearchedEntity.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/SearchedEntity.kt rename to core/datastore/src/main/java/com/mifos/core/objects/SearchedEntity.kt index 9afad899da0..ab654471b15 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/SearchedEntity.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/SearchedEntity.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects +package com.mifos.core.objects import android.os.Parcelable -import com.mifos.objects.common.InterestType +import com.mifos.core.objects.common.InterestType import kotlinx.parcelize.Parcelize /** @@ -29,6 +29,6 @@ data class SearchedEntity( var entityStatus: InterestType? = null ) : Parcelable { - val description : String + val description: String get() = "#$entityId - $entityName" } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/Timeline.kt b/core/datastore/src/main/java/com/mifos/core/objects/Timeline.kt similarity index 98% rename from mifosng-android/src/main/java/com/mifos/objects/Timeline.kt rename to core/datastore/src/main/java/com/mifos/core/objects/Timeline.kt index 36d7929f0b5..f16ed7c2281 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/Timeline.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/Timeline.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects +package com.mifos.core.objects import android.os.Parcel import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/CenterAccounts.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/CenterAccounts.kt similarity index 68% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/CenterAccounts.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/CenterAccounts.kt index b7b8f2b2eff..17ca5b2b842 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/CenterAccounts.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/CenterAccounts.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.accounts +package com.mifos.core.objects.accounts import android.os.Parcelable -import com.mifos.objects.accounts.loan.LoanAccount -import com.mifos.objects.accounts.savings.SavingsAccount +import com.mifos.core.objects.accounts.loan.LoanAccount +import com.mifos.core.objects.accounts.savings.SavingsAccount import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/ClientAccounts.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/ClientAccounts.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/ClientAccounts.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/ClientAccounts.kt index 14f04998a87..15eaa57e6f4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/ClientAccounts.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/ClientAccounts.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts +package com.mifos.core.objects.accounts import android.os.Parcelable -import com.mifos.objects.accounts.loan.LoanAccount -import com.mifos.objects.accounts.savings.SavingsAccount +import com.mifos.core.objects.accounts.loan.LoanAccount +import com.mifos.core.objects.accounts.savings.SavingsAccount import kotlinx.parcelize.Parcelize @Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/GroupAccounts.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/GroupAccounts.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/GroupAccounts.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/GroupAccounts.kt index 2e65ae9998d..d124d3c18a8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/GroupAccounts.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/GroupAccounts.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts +package com.mifos.core.objects.accounts import android.os.Parcelable -import com.mifos.objects.accounts.loan.LoanAccount -import com.mifos.objects.accounts.savings.SavingsAccount +import com.mifos.core.objects.accounts.loan.LoanAccount +import com.mifos.core.objects.accounts.savings.SavingsAccount import kotlinx.parcelize.Parcelize @Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/AccountLinkingOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/AccountLinkingOptions.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/AccountLinkingOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/AccountLinkingOptions.kt index 2792a2d5a6d..e5396c66256 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/AccountLinkingOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/AccountLinkingOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/ActualDisbursementDate.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/ActualDisbursementDate.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/ActualDisbursementDate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/ActualDisbursementDate.kt index b59d8df2fa1..7f7fb4c4a00 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/ActualDisbursementDate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/ActualDisbursementDate.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/AmortizationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/AmortizationType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/AmortizationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/AmortizationType.kt index 10c8d7e6859..afbc24a12d9 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/AmortizationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/AmortizationType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Currency.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Currency.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Currency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Currency.kt index e56be8f343e..ecde1373d1e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Currency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Currency.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/DaysInMonthType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/DaysInMonthType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/DaysInMonthType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/DaysInMonthType.kt index 65bf773af5f..d7e9c629116 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/DaysInMonthType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/DaysInMonthType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/DaysInYearType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/DaysInYearType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/DaysInYearType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/DaysInYearType.kt index be59b4e810c..8e20db6d678 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/DaysInYearType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/DaysInYearType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestCalculationPeriodType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestCalculationPeriodType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestCalculationPeriodType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestCalculationPeriodType.kt index 8effd3f1ef0..63ac4cde846 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestCalculationPeriodType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestCalculationPeriodType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestRateFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestRateFrequencyType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestRateFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestRateFrequencyType.kt index a59c085e162..c7a55ee452f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestRateFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestRateFrequencyType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestType.kt index b6beaf41e2d..64a3921d9b6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/InterestType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/InterestType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Loan.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Loan.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Loan.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Loan.kt index 2665a6c7840..1f175c6c16b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Loan.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Loan.kt @@ -2,10 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan - -import com.mifos.objects.Timeline -import com.mifos.objects.accounts.savings.Currency +package com.mifos.core.objects.accounts.loan data class Loan( diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanAccount.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanAccount.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanAccount.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanAccount.kt index ed7a3497389..292e282d5d7 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanAccount.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanAccount.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanApproval.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanApproval.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanApproval.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanApproval.kt index 00a6800b5a5..4d239c8cc6f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanApproval.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanApproval.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanApprovalRequest.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanApprovalRequest.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanApprovalRequest.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanApprovalRequest.kt index 7edcc8fa59a..fc36a45933e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanApprovalRequest.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanApprovalRequest.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanDisbursement.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanDisbursement.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanDisbursement.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanDisbursement.kt index 7da1ab525d6..c930d8d9672 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanDisbursement.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanDisbursement.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanPurposeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanPurposeOptions.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanPurposeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanPurposeOptions.kt index bc8680349c2..3a8aaf5aa34 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanPurposeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanPurposeOptions.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanRepaymentRequest.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanRepaymentRequest.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanRepaymentRequest.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanRepaymentRequest.kt index 23500594322..d67671e9e01 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanRepaymentRequest.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanRepaymentRequest.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanRepaymentResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanRepaymentResponse.kt similarity index 77% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanRepaymentResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanRepaymentResponse.kt index f60ccadeb68..9423cc96926 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanRepaymentResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanRepaymentResponse.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import com.google.gson.annotations.Expose -import com.mifos.objects.Changes +import com.mifos.core.objects.Changes import kotlinx.parcelize.Parcelize @Parcelize @@ -24,5 +24,5 @@ data class LoanRepaymentResponse ( var resourceId: Int? = null, @Expose - var changes: Changes? = null + var changes: com.mifos.core.objects.Changes? = null ) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanType.kt similarity index 83% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanType.kt index e4f11d04586..d4575b9dcd7 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanType.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanWithAssociations.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanWithAssociations.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanWithAssociations.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanWithAssociations.kt index b2b95a5d876..2c76b43cd47 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/LoanWithAssociations.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/LoanWithAssociations.kt @@ -2,12 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.accounts.savings.Currency +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer @@ -121,7 +120,7 @@ data class LoanWithAssociations( var isNPA: Boolean = false, ) : MifosBaseModel(), Parcelable { - fun isInArrears() : Boolean { + fun isInArrears(): Boolean { return inArrears } } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Loans.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Loans.kt similarity index 97% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Loans.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Loans.kt index 9beb23b4c7d..4f771d684ce 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Loans.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Loans.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentDetailData.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentDetailData.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentDetailData.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentDetailData.kt index e146e987dfe..ea4b16ff949 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentDetailData.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentDetailData.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentType.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentType.kt index bed4501db15..f14ab434b00 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentTypeOptions.kt similarity index 81% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentTypeOptions.kt index 6c109b5dd22..e6af497b215 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/PaymentTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/PaymentTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Period.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Period.kt similarity index 97% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Period.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Period.kt index 1d6a93623af..008a0929cb3 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Period.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Period.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyDayOfWeekType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyDayOfWeekType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyDayOfWeekType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyDayOfWeekType.kt index 8ba3f2098c3..a6fd573d153 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyDayOfWeekType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyDayOfWeekType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyNthDayType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyNthDayType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyNthDayType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyNthDayType.kt index c5a17794afc..2ad4948be7b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyNthDayType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyNthDayType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyType.kt index e1c2c8e363a..feab89c4fba 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyTypeOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyTypeOptions.kt index 26583b47846..70b7656b7e2 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentFrequencyTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentFrequencyTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentSchedule.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentSchedule.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentSchedule.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentSchedule.kt index 3e39700e8e3..4908401a7d0 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/RepaymentSchedule.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/RepaymentSchedule.kt @@ -2,10 +2,9 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.objects.accounts.savings.Currency import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/SavingsApproval.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/SavingsApproval.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/SavingsApproval.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/SavingsApproval.kt index 3d84a0192e0..d81f91cbf99 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/SavingsApproval.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/SavingsApproval.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Status.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Status.kt similarity index 75% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Status.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Status.kt index a3103ef174c..ecc757237df 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Status.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Status.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey @@ -51,35 +51,35 @@ class Status( var overpaid: Boolean? = null ) : MifosBaseModel(), Parcelable { - fun isPendingApproval() : Boolean? { + fun isPendingApproval(): Boolean? { return pendingApproval } - fun isWaitingForDisbursal() : Boolean? { + fun isWaitingForDisbursal(): Boolean? { return waitingForDisbursal } - fun isActive() : Boolean? { + fun isActive(): Boolean? { return active } - fun isClosedObligationsMet() : Boolean? { + fun isClosedObligationsMet(): Boolean? { return closedObligationsMet } - fun isClosedWrittenOff() : Boolean? { + fun isClosedWrittenOff(): Boolean? { return closedWrittenOff } - fun isClosedRescheduled() : Boolean? { + fun isClosedRescheduled(): Boolean? { return closedRescheduled } - fun isClosed() : Boolean? { + fun isClosed(): Boolean? { return closed } - fun isOverpaid() : Boolean? { + fun isOverpaid(): Boolean? { return overpaid } } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Summary.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Summary.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Summary.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Summary.kt index 8ef4a1838a8..1c5667577b6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Summary.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Summary.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TermFrequencyTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TermFrequencyTypeOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TermFrequencyTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TermFrequencyTypeOptions.kt index b02c4af0037..214de520db6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TermFrequencyTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TermFrequencyTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TermPeriodFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TermPeriodFrequencyType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TermPeriodFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TermPeriodFrequencyType.kt index aff53853b6d..e8f89f597b4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TermPeriodFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TermPeriodFrequencyType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Timeline.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Timeline.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Timeline.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Timeline.kt index f0589dc0d92..b861e2b949c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Timeline.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Timeline.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Transaction.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Transaction.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Transaction.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Transaction.kt index 99ad0c271a2..a9ee7eb15bf 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Transaction.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Transaction.kt @@ -2,10 +2,9 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable -import com.mifos.objects.accounts.savings.Currency import kotlinx.parcelize.Parcelize @Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TransactionProcessingStrategy.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TransactionProcessingStrategy.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TransactionProcessingStrategy.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TransactionProcessingStrategy.kt index aea3d25ce44..d1cf79e5a7c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/TransactionProcessingStrategy.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/TransactionProcessingStrategy.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Type.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Type.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Type.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Type.kt index e44e2f799cf..e41a60c03b7 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Type.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/loan/Type.kt @@ -2,12 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.accounts.loan import android.os.Parcelable import kotlinx.parcelize.Parcelize - @Parcelize data class Type( var id: Int? = null, diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Charge.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Charge.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Charge.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Charge.kt index c4b789a4e30..f5a45ee3e2c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Charge.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Charge.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/ChargeCalculationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/ChargeCalculationType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/ChargeCalculationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/ChargeCalculationType.kt index 84aac1d46e3..a1458e4eed1 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/ChargeCalculationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/ChargeCalculationType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/ChargeTimeType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/ChargeTimeType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/ChargeTimeType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/ChargeTimeType.kt index 9da37cb94a1..3d03b86e54c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/ChargeTimeType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/ChargeTimeType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Currency.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Currency.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Currency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Currency.kt index 4e452b95112..5854c6fa17a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Currency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Currency.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/DepositType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/DepositType.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/DepositType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/DepositType.kt index 67c87d6614d..143930f27c8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/DepositType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/DepositType.kt @@ -1,11 +1,9 @@ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings -import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.api.model.APIEndPoint +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.APIEndPoint +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey @@ -28,7 +26,7 @@ class DepositType( @Column var value: String? = null -) : MifosBaseModel() , Parcelable { +) : MifosBaseModel(), Parcelable { val isRecurring: Boolean get() = ServerTypes.RECURRING.id == id diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/FieldOfficerOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/FieldOfficerOptions.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/FieldOfficerOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/FieldOfficerOptions.kt index d83fbefc6b6..e20107ac940 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/FieldOfficerOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/FieldOfficerOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCalculationDaysInYearType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCalculationDaysInYearType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCalculationDaysInYearType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCalculationDaysInYearType.kt index aad6f44411b..eee8d23b158 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCalculationDaysInYearType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCalculationDaysInYearType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCalculationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCalculationType.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCalculationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCalculationType.kt index cfdff462856..007ab1fa6a1 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCalculationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCalculationType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCompoundingPeriodType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCompoundingPeriodType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCompoundingPeriodType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCompoundingPeriodType.kt index b9ea7e40cef..5d7b6c4c5f3 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestCompoundingPeriodType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestCompoundingPeriodType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestPostingPeriodType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestPostingPeriodType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestPostingPeriodType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestPostingPeriodType.kt index 050400dc01c..c045b0845e4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/InterestPostingPeriodType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/InterestPostingPeriodType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/LockinPeriodFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/LockinPeriodFrequencyType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/LockinPeriodFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/LockinPeriodFrequencyType.kt index 31df78b15f6..c3a0b697c79 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/LockinPeriodFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/LockinPeriodFrequencyType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccount.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccount.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccount.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccount.kt index c51f0d93177..3ef9af8269f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccount.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccount.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountTransactionRequest.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountTransactionRequest.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountTransactionRequest.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountTransactionRequest.kt index 8b7cda93907..5b17c612478 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountTransactionRequest.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountTransactionRequest.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountTransactionResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountTransactionResponse.kt similarity index 77% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountTransactionResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountTransactionResponse.kt index 9f31c55d5c6..dfea6135a31 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountTransactionResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountTransactionResponse.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import com.google.gson.annotations.Expose -import com.mifos.objects.Changes +import com.mifos.core.objects.Changes import kotlinx.parcelize.Parcelize /** @@ -25,5 +25,5 @@ data class SavingsAccountTransactionResponse ( var resourceId: Int? = null, @Expose - var changes: Changes? = null + var changes: com.mifos.core.objects.Changes? = null ) \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountWithAssociations.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountWithAssociations.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountWithAssociations.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountWithAssociations.kt index 747a68e83a8..8125ae12d58 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsAccountWithAssociations.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsAccountWithAssociations.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer @@ -22,7 +22,7 @@ data class SavingsAccountWithAssociations( var id: Int? = null, @Column - var accountNo: Int ? =null, + var accountNo: Int? = null, var clientId: Int? = null, diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsTransactionDate.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsTransactionDate.kt similarity index 81% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsTransactionDate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsTransactionDate.kt index 7b85e183b25..b39a1ad00c4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/SavingsTransactionDate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/SavingsTransactionDate.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Status.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Status.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Status.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Status.kt index fa94ecc17bd..075061b0cae 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Status.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Status.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Summary.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Summary.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Summary.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Summary.kt index d79bee6cdcd..c98b9f0bfb8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Summary.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Summary.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Timeline.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Timeline.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Timeline.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Timeline.kt index 52193cbe286..e3a35e0e7c9 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Timeline.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Timeline.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Transaction.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Transaction.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Transaction.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Transaction.kt index 5b6fbcb73e1..b919215d5a0 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/Transaction.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/Transaction.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/TransactionType.kt b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/TransactionType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/savings/TransactionType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/TransactionType.kt index f10face56a8..08cba044e3b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/savings/TransactionType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/accounts/savings/TransactionType.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.savings +package com.mifos.core.objects.accounts.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/CheckerInboxSearchTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/CheckerInboxSearchTemplate.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/CheckerInboxSearchTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/CheckerInboxSearchTemplate.kt index ca6479bffc9..69053e335d4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/CheckerInboxSearchTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/CheckerInboxSearchTemplate.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.checkerinboxandtasks +package com.mifos.core.objects.checkerinboxandtasks import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/CheckerTask.kt b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/CheckerTask.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/CheckerTask.kt rename to core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/CheckerTask.kt index b9a10c91fcd..c935f3cc581 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/CheckerTask.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/CheckerTask.kt @@ -1,4 +1,4 @@ -package com.mifos.objects +package com.mifos.core.objects.checkerinboxandtasks import android.annotation.SuppressLint import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/RescheduleLoansTask.kt b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/RescheduleLoansTask.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/RescheduleLoansTask.kt rename to core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/RescheduleLoansTask.kt index 98d0d3b2a3d..0ef659b230f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/RescheduleLoansTask.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/RescheduleLoansTask.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.checkerinboxandtasks +package com.mifos.core.objects.checkerinboxandtasks import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/RescheduleReasonCodeValue.kt b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/RescheduleReasonCodeValue.kt similarity index 75% rename from mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/RescheduleReasonCodeValue.kt rename to core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/RescheduleReasonCodeValue.kt index 8e6a99d202f..980612ade4c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/checkerinboxandtasks/RescheduleReasonCodeValue.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/checkerinboxandtasks/RescheduleReasonCodeValue.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.checkerinboxandtasks +package com.mifos.core.objects.checkerinboxandtasks data class RescheduleReasonCodeValue (var id : Int, var name : String, var active : Boolean, var mandatory : Boolean) \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ActivatePayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ActivatePayload.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/client/ActivatePayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ActivatePayload.kt index 444369eb591..786848bcafd 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ActivatePayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ActivatePayload.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Address.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Address.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/client/Address.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Address.kt index 4cf603e4a26..0aa7cae9116 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Address.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Address.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ChargeCalculationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargeCalculationType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/client/ChargeCalculationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ChargeCalculationType.kt index d0f8abca76a..62a8c3c71b6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ChargeCalculationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargeCalculationType.kt @@ -1,9 +1,9 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable import com.google.gson.annotations.SerializedName -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ChargeCreationResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargeCreationResponse.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/client/ChargeCreationResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ChargeCreationResponse.kt index d57884c62c2..1fdf944ea29 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ChargeCreationResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargeCreationResponse.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ChargeTimeType.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargeTimeType.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/objects/client/ChargeTimeType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ChargeTimeType.kt index 4a17bc7cc8c..615005a7f5b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ChargeTimeType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargeTimeType.kt @@ -1,9 +1,8 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable -import com.google.gson.annotations.SerializedName -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Charges.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Charges.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/client/Charges.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Charges.kt index 2ec107e2e80..904dc6f027c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Charges.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Charges.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ChargesRename.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargesRename.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/client/ChargesRename.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ChargesRename.kt index 401fc0db972..3df21fc25e6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ChargesRename.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ChargesRename.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client /** * Created by nellyk on 2/15/2016. diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Client.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Client.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/client/Client.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Client.kt index 6f979dc5abd..9f59079ac33 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Client.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Client.kt @@ -2,13 +2,13 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.Timeline -import com.mifos.objects.group.Group +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel +import com.mifos.core.objects.Timeline +import com.mifos.core.objects.group.Group import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ClientAddressRequest.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientAddressRequest.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/client/ClientAddressRequest.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ClientAddressRequest.kt index d3736ed726a..7aeec38378a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ClientAddressRequest.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientAddressRequest.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ClientAddressResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientAddressResponse.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/client/ClientAddressResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ClientAddressResponse.kt index f9dc85d6571..3102b9e30d1 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ClientAddressResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientAddressResponse.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ClientDate.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientDate.kt similarity index 83% rename from mifosng-android/src/main/java/com/mifos/objects/client/ClientDate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ClientDate.kt index 8fa1053ae06..33633ae5385 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ClientDate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientDate.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/ClientPayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientPayload.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/client/ClientPayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/ClientPayload.kt index 51e2db98006..fff2420a61f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/ClientPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/ClientPayload.kt @@ -1,9 +1,9 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.noncore.DataTablePayload +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel +import com.mifos.core.objects.noncore.DataTablePayload import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Currency.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Currency.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/client/Currency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Currency.kt index 3400908bec4..9c6e2822c72 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Currency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Currency.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Page.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Page.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/client/Page.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Page.kt index 7e70b4962a7..fc18bc11bdd 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Page.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Page.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client +package com.mifos.core.objects.client /** * Created by ishankhanna on 09/02/14. diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/PageItem.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/PageItem.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/client/PageItem.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/PageItem.kt index 1bc5acb73f5..13b581b9f5c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/PageItem.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/PageItem.kt @@ -2,8 +2,9 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client -import com.mifos.objects.Timeline +package com.mifos.core.objects.client + +import com.mifos.core.objects.Timeline /** * Created by ishankhanna on 09/02/14. diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Permission.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Permission.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/client/Permission.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Permission.kt index da44a6e76dd..d10f1544a22 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Permission.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Permission.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client +package com.mifos.core.objects.client /** * Created by ishankhanna on 09/02/14. diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Role.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Role.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/client/Role.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Role.kt index 554614867ad..6fef8d11cb3 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Role.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Role.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client +package com.mifos.core.objects.client /** * Created by ishankhanna on 09/02/14. diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Savings.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Savings.kt similarity index 68% rename from mifosng-android/src/main/java/com/mifos/objects/client/Savings.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Savings.kt index cb10b1b94da..cb70549ffbc 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Savings.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Savings.kt @@ -1,8 +1,6 @@ -package com.mifos.objects.client +package com.mifos.core.objects.client -import com.mifos.objects.accounts.savings.Currency -import com.mifos.objects.accounts.savings.DepositType -import com.mifos.objects.accounts.savings.Status +import com.mifos.core.objects.accounts.savings.DepositType /** * Created by nellyk on 2/19/2016. diff --git a/mifosng-android/src/main/java/com/mifos/objects/client/Status.kt b/core/datastore/src/main/java/com/mifos/core/objects/client/Status.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/client/Status.kt rename to core/datastore/src/main/java/com/mifos/core/objects/client/Status.kt index bf0bf624ad9..d8f57934e60 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/client/Status.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/client/Status.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.client +package com.mifos.core.objects.client import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table @@ -31,7 +31,7 @@ data class Status( ) : MifosBaseModel(), Parcelable { - companion object{ + companion object { private val STATUS_ACTIVE = "Active" fun isActive(value: String): Boolean { diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/AttendanceTypeOption.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/AttendanceTypeOption.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/AttendanceTypeOption.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/AttendanceTypeOption.kt index 277d8a5c9f2..dc8f0caaf0a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/AttendanceTypeOption.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/AttendanceTypeOption.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/BulkSavingsDueTransaction.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/BulkSavingsDueTransaction.kt similarity index 83% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/BulkSavingsDueTransaction.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/BulkSavingsDueTransaction.kt index 11ab13edb6d..3e1d33c9063 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/BulkSavingsDueTransaction.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/BulkSavingsDueTransaction.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CenterDetail.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CenterDetail.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CenterDetail.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CenterDetail.kt index 1609ab4352f..1152faca371 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CenterDetail.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CenterDetail.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/ClientCollectionSheet.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/ClientCollectionSheet.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/ClientCollectionSheet.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/ClientCollectionSheet.kt index bc454f135d9..391e2e31aee 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/ClientCollectionSheet.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/ClientCollectionSheet.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionFrequency.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionFrequency.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionFrequency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionFrequency.kt index 700490605ba..deeda93bf1c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionFrequency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionFrequency.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet /** * Created by ishankhanna on 16/07/14. diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionMeetingCalendar.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionMeetingCalendar.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionMeetingCalendar.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionMeetingCalendar.kt index 54d13e38856..79ab1853eeb 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionMeetingCalendar.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionMeetingCalendar.kt @@ -2,19 +2,16 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet -import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator -import com.google.gson.annotations.SerializedName import kotlinx.parcelize.Parcelize /** * Created by ishankhanna on 16/07/14. */ @Parcelize -data class CollectionMeetingCalendar ( +data class CollectionMeetingCalendar( var id: Int = 0, var calendarInstanceId: Int? = null, diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetPayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetPayload.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetPayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetPayload.kt index 0b8568a3478..fd871a7d1cf 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetPayload.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable -import com.mifos.api.model.BulkRepaymentTransactions -import com.mifos.api.model.ClientsAttendance +import com.mifos.core.model.BulkRepaymentTransactions +import com.mifos.core.model.ClientsAttendance import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetRequestPayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetRequestPayload.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetRequestPayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetRequestPayload.kt index 6abd3bfb054..3032719fc49 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetRequestPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetRequestPayload.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetResponse.kt similarity index 61% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetResponse.kt index 43a43f1139d..088c56f1df2 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/CollectionSheetResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/CollectionSheetResponse.kt @@ -1,10 +1,7 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet -import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator -import com.mifos.objects.PaymentTypeOption -import com.mifos.objects.organisation.LoanProducts +import com.mifos.core.objects.organisation.LoanProducts import kotlinx.parcelize.Parcelize /** @@ -20,7 +17,7 @@ data class CollectionSheetResponse( var loanProducts: List = ArrayList(), - var paymentTypeOptions: List = ArrayList(), + var paymentTypeOptions: List = ArrayList(), var savingsProducts: List = ArrayList() - ) : Parcelable \ No newline at end of file +) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/EntityType.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/EntityType.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/EntityType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/EntityType.kt index e22b5240b7e..094f4f78d19 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/EntityType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/EntityType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/GroupCollectionSheet.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/GroupCollectionSheet.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/GroupCollectionSheet.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/GroupCollectionSheet.kt index b9aeff2b1f9..0d514482760 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/GroupCollectionSheet.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/GroupCollectionSheet.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/IndividualCollectionSheet.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/IndividualCollectionSheet.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/IndividualCollectionSheet.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/IndividualCollectionSheet.kt index c61512fe8e0..7ab6c042e6f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/IndividualCollectionSheet.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/IndividualCollectionSheet.kt @@ -1,9 +1,9 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcel import android.os.Parcelable import com.google.gson.annotations.SerializedName -import com.mifos.objects.accounts.loan.PaymentTypeOptions +import com.mifos.core.objects.accounts.loan.PaymentTypeOptions /** * Created by Tarun on 06-07-2017. diff --git a/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/LoanAndClientName.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/LoanAndClientName.kt new file mode 100644 index 00000000000..3b747c3fee6 --- /dev/null +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/LoanAndClientName.kt @@ -0,0 +1,14 @@ +package com.mifos.core.objects.collectionsheet + +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +/** + * Created by Tarun on 17-07-2017. + */ +@Parcelize +class LoanAndClientName( + val loan: LoanCollectionSheet?, + val clientName: String?, + val id: Int +) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/LoanCollectionSheet.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/LoanCollectionSheet.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/LoanCollectionSheet.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/LoanCollectionSheet.kt index 696f3f2eae4..2cdc76331a8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/LoanCollectionSheet.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/LoanCollectionSheet.kt @@ -1,9 +1,8 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator -import com.mifos.objects.accounts.loan.Currency +import com.mifos.core.objects.accounts.loan.Currency /** * Created by Tarun on 06-07-2017. @@ -17,7 +16,7 @@ class LoanCollectionSheet() : Parcelable { var loanId: Int = 0 var principalDue: Double? = null var productId: Double? = null - var totalDue: Double =0.0 + var totalDue: Double = 0.0 var chargesDue: Double = 0.0 var productShortName: String? = null diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/MeetingFallCalendar.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/MeetingFallCalendar.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/MeetingFallCalendar.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/MeetingFallCalendar.kt index 57707ce8d68..7fc3fc8988a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/MeetingFallCalendar.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/MeetingFallCalendar.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable -import com.mifos.objects.accounts.loan.Status +import com.mifos.core.objects.accounts.loan.Status import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/ProductiveCollectionSheetPayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/ProductiveCollectionSheetPayload.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/ProductiveCollectionSheetPayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/ProductiveCollectionSheetPayload.kt index cfe63ab212b..54a787d3bbe 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/ProductiveCollectionSheetPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/ProductiveCollectionSheetPayload.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable -import com.mifos.api.model.BulkRepaymentTransactions +import com.mifos.core.model.BulkRepaymentTransactions import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/SavingsCollectionSheet.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/SavingsCollectionSheet.kt similarity index 83% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/SavingsCollectionSheet.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/SavingsCollectionSheet.kt index 07083aa1dc8..67919a57c42 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/SavingsCollectionSheet.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/SavingsCollectionSheet.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable -import com.mifos.objects.accounts.savings.Currency +import com.mifos.core.objects.accounts.savings.Currency import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/SavingsProduct.kt b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/SavingsProduct.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/collectionsheet/SavingsProduct.kt rename to core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/SavingsProduct.kt index ebae85d7b1d..c77a77b801a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/collectionsheet/SavingsProduct.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/collectionsheet/SavingsProduct.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.collectionsheet +package com.mifos.core.objects.collectionsheet import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/common/InterestType.kt b/core/datastore/src/main/java/com/mifos/core/objects/common/InterestType.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/common/InterestType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/common/InterestType.kt index 659746dee68..346cac8261a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/common/InterestType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/common/InterestType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.common +package com.mifos.core.objects.common import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/Account.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/Account.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/db/Account.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/Account.kt index 6498404263d..523cbed0a2f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/Account.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/Account.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/AttendanceType.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/AttendanceType.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/db/AttendanceType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/AttendanceType.kt index e68222a64a2..2ddb16ccebc 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/AttendanceType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/AttendanceType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/Client.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/Client.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/db/Client.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/Client.kt index 69773065cc9..1aa875a76c8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/Client.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/Client.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/CollectionMeetingCalendar.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/CollectionMeetingCalendar.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/objects/db/CollectionMeetingCalendar.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/CollectionMeetingCalendar.kt index 16ee2fe9d6e..2d0a98a450b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/CollectionMeetingCalendar.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/CollectionMeetingCalendar.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/CollectionSheet.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/CollectionSheet.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/db/CollectionSheet.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/CollectionSheet.kt index 9d31881400e..d2bdce3e1ff 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/CollectionSheet.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/CollectionSheet.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import com.google.gson.Gson diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/Currency.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/Currency.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/db/Currency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/Currency.kt index 79d82357ef6..09d6c20f45b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/Currency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/Currency.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/EntityType.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/EntityType.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/db/EntityType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/EntityType.kt index 141df34ca00..eea21fff08d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/EntityType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/EntityType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/Loan.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/Loan.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/objects/db/Loan.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/Loan.kt index aa5a7a2034e..3801b1ebf4b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/Loan.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/Loan.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/MeetingCenter.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/MeetingCenter.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/objects/db/MeetingCenter.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/MeetingCenter.kt index e69fc94a664..35f8b7116c9 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/MeetingCenter.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/MeetingCenter.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/MeetingDate.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/MeetingDate.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/db/MeetingDate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/MeetingDate.kt index e6966297754..fb2ae0d9ba0 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/MeetingDate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/MeetingDate.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/MifosGroup.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/MifosGroup.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/db/MifosGroup.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/MifosGroup.kt index 5a8ae4c7ca0..5f75bd0f42d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/MifosGroup.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/MifosGroup.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/OfflineCenter.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/OfflineCenter.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/db/OfflineCenter.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/OfflineCenter.kt index c015f96b487..eb76ad0e658 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/OfflineCenter.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/OfflineCenter.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/RepaymentTransaction.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/RepaymentTransaction.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/db/RepaymentTransaction.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/RepaymentTransaction.kt index 4e85b86f8aa..5250052aa1b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/RepaymentTransaction.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/RepaymentTransaction.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/db/Status.kt b/core/datastore/src/main/java/com/mifos/core/objects/db/Status.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/db/Status.kt rename to core/datastore/src/main/java/com/mifos/core/objects/db/Status.kt index 71fc2987e00..e0ed35e60e5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/db/Status.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/db/Status.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.db +package com.mifos.core.objects.db import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/Center.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/Center.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/group/Center.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/Center.kt index 1ddcae2ba05..26c7a4cec91 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/Center.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/Center.kt @@ -2,13 +2,13 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.group +package com.mifos.core.objects.group import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.Timeline -import com.mifos.objects.client.Status +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel +import com.mifos.core.objects.Timeline +import com.mifos.core.objects.client.Status import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/CenterDate.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/CenterDate.kt similarity index 83% rename from mifosng-android/src/main/java/com/mifos/objects/group/CenterDate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/CenterDate.kt index 77781df70c3..5ca8f06c33c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/CenterDate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/CenterDate.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.group +package com.mifos.core.objects.group import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/CenterInfo.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/CenterInfo.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/group/CenterInfo.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/CenterInfo.kt index 81a6a28fe83..e0e50b7f90d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/CenterInfo.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/CenterInfo.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.group +package com.mifos.core.objects.group import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/CenterWithAssociations.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/CenterWithAssociations.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/objects/group/CenterWithAssociations.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/CenterWithAssociations.kt index 8185e0d39c1..bbc9e8fca4b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/CenterWithAssociations.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/CenterWithAssociations.kt @@ -2,12 +2,12 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.group +package com.mifos.core.objects.group import android.os.Parcelable -import com.mifos.objects.Timeline -import com.mifos.objects.client.Status -import com.mifos.objects.collectionsheet.CollectionMeetingCalendar +import com.mifos.core.objects.Timeline +import com.mifos.core.objects.client.Status +import com.mifos.core.objects.collectionsheet.CollectionMeetingCalendar import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/Group.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/Group.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/group/Group.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/Group.kt index a16e62ca519..532092d9697 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/Group.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/Group.kt @@ -2,13 +2,13 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.group +package com.mifos.core.objects.group import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.Timeline -import com.mifos.objects.client.Status +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel +import com.mifos.core.objects.Timeline +import com.mifos.core.objects.client.Status import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/GroupDate.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/GroupDate.kt similarity index 83% rename from mifosng-android/src/main/java/com/mifos/objects/group/GroupDate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/GroupDate.kt index 4cb71cb678b..eb7e024426b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/GroupDate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/GroupDate.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.group +package com.mifos.core.objects.group import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/GroupPayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/GroupPayload.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/group/GroupPayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/GroupPayload.kt index f3db85a30d2..9c0277fb12b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/GroupPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/GroupPayload.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.group +package com.mifos.core.objects.group import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/group/GroupWithAssociations.kt b/core/datastore/src/main/java/com/mifos/core/objects/group/GroupWithAssociations.kt similarity index 71% rename from mifosng-android/src/main/java/com/mifos/objects/group/GroupWithAssociations.kt rename to core/datastore/src/main/java/com/mifos/core/objects/group/GroupWithAssociations.kt index d8bde633b88..8f225428e89 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/group/GroupWithAssociations.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/group/GroupWithAssociations.kt @@ -2,22 +2,19 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.group +package com.mifos.core.objects.group -import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator -import com.google.gson.annotations.SerializedName -import com.mifos.objects.Timeline -import com.mifos.objects.client.Client -import com.mifos.objects.client.Status +import com.mifos.core.objects.Timeline +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Status import kotlinx.parcelize.Parcelize /** * Created by ishankhanna on 29/06/14. */ @Parcelize -data class GroupWithAssociations ( +data class GroupWithAssociations( var id: Int? = null, var accountNo: String? = null, @@ -45,4 +42,4 @@ data class GroupWithAssociations ( var clientMembers: List = ArrayList(), var timeline: Timeline? = null -) :Parcelable \ No newline at end of file +) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/mifoserror/Arg.kt b/core/datastore/src/main/java/com/mifos/core/objects/mifoserror/Arg.kt similarity index 68% rename from mifosng-android/src/main/java/com/mifos/objects/mifoserror/Arg.kt rename to core/datastore/src/main/java/com/mifos/core/objects/mifoserror/Arg.kt index f5c27346bc2..fdb2c9d482c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/mifoserror/Arg.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/mifoserror/Arg.kt @@ -2,15 +2,13 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.mifoserror +package com.mifos.core.objects.mifoserror -import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator import kotlinx.parcelize.Parcelize @Parcelize -data class Arg ( +data class Arg( var value: String? = null ) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/mifoserror/Errors.kt b/core/datastore/src/main/java/com/mifos/core/objects/mifoserror/Errors.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/mifoserror/Errors.kt rename to core/datastore/src/main/java/com/mifos/core/objects/mifoserror/Errors.kt index 5f6b96e7d93..9406bcfc050 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/mifoserror/Errors.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/mifoserror/Errors.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.mifoserror +package com.mifos.core.objects.mifoserror import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/mifoserror/MifosError.kt b/core/datastore/src/main/java/com/mifos/core/objects/mifoserror/MifosError.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/mifoserror/MifosError.kt rename to core/datastore/src/main/java/com/mifos/core/objects/mifoserror/MifosError.kt index ac094319f7f..8357a17779b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/mifoserror/MifosError.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/mifoserror/MifosError.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.mifoserror +package com.mifos.core.objects.mifoserror import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/navigation/ClientArgs.kt b/core/datastore/src/main/java/com/mifos/core/objects/navigation/ClientArgs.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/navigation/ClientArgs.kt rename to core/datastore/src/main/java/com/mifos/core/objects/navigation/ClientArgs.kt index 335853ae140..bc3d42dffda 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/navigation/ClientArgs.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/navigation/ClientArgs.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.navigation +package com.mifos.core.objects.navigation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/core/datastore/src/main/java/com/mifos/core/objects/navigation/ClientListArgs.kt b/core/datastore/src/main/java/com/mifos/core/objects/navigation/ClientListArgs.kt new file mode 100644 index 00000000000..e6534d4b780 --- /dev/null +++ b/core/datastore/src/main/java/com/mifos/core/objects/navigation/ClientListArgs.kt @@ -0,0 +1,16 @@ +package com.mifos.core.objects.navigation + +import android.os.Parcelable +import com.mifos.core.objects.client.Client +import kotlinx.parcelize.Parcelize + +/* + * Created by Aditya Gupta on 22/7/23. +*/ + +@Parcelize +data class ClientListArgs( + var clientsList: List = ArrayList(), + + var isParentFragment: Boolean = false +) : Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/ColumnHeader.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/ColumnHeader.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/ColumnHeader.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/ColumnHeader.kt index 5f5024a6049..d987052335d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/ColumnHeader.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/ColumnHeader.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/ColumnValue.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/ColumnValue.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/ColumnValue.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/ColumnValue.kt index c726def8761..873bcc97a49 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/ColumnValue.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/ColumnValue.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/DataTable.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/DataTable.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/DataTable.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/DataTable.kt index 9da4420f0de..65f5c587cab 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/DataTable.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/DataTable.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/DataTablePayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/DataTablePayload.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/DataTablePayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/DataTablePayload.kt index 2143acacc37..37ee2c60839 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/DataTablePayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/DataTablePayload.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey @@ -35,5 +35,5 @@ data class DataTablePayload( var registeredTableName: String? = null, - var data: HashMap? = null + var data: HashMap? = null ) : MifosBaseModel(), Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/Document.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/Document.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/Document.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/Document.kt index 66480e86c4b..70a2e8bd7a0 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/Document.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/Document.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/DocumentType.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/DocumentType.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/DocumentType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/DocumentType.kt index d20f26478f2..f6080c1c54d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/DocumentType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/DocumentType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/Identifier.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/Identifier.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/Identifier.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/Identifier.kt index 41f29fc7a2d..74ccfe8a699 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/Identifier.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/Identifier.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierCreationResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierCreationResponse.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierCreationResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierCreationResponse.kt index 02754b1c50e..5f1db4a4d67 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierCreationResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierCreationResponse.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierPayload.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierPayload.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierPayload.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierPayload.kt index 4caa4f181b8..925145b308c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierPayload.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierPayload.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierTemplate.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierTemplate.kt index 9f464911c4a..e796ffd5ab0 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierTemplate.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierType.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierType.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierType.kt index 3ba552ea402..318212cc30f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/IdentifierType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/IdentifierType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/noncore/Note.kt b/core/datastore/src/main/java/com/mifos/core/objects/noncore/Note.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/noncore/Note.kt rename to core/datastore/src/main/java/com/mifos/core/objects/noncore/Note.kt index 94cd673fc43..8d79d9a1ebc 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/noncore/Note.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/noncore/Note.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.noncore +package com.mifos.core.objects.noncore import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel +import com.mifos.core.model.client.MifosBaseModel import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/AccountingRule.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/AccountingRule.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/AccountingRule.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/AccountingRule.kt index c6b470b791c..18f80efaf7e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/AccountingRule.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/AccountingRule.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/AllowAttributeOverrides.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/AllowAttributeOverrides.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/AllowAttributeOverrides.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/AllowAttributeOverrides.kt index 8152805cb06..fdec96b53b7 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/AllowAttributeOverrides.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/AllowAttributeOverrides.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/AmortizationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/AmortizationType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/AmortizationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/AmortizationType.kt index 7ec75f4f057..d3cbd921237 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/AmortizationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/AmortizationType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/ClientClassificationOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/ClientClassificationOptions.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/ClientClassificationOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/ClientClassificationOptions.kt index 220959ec100..56fededa9fc 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/ClientClassificationOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/ClientClassificationOptions.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nkiboi on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/ClientTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/ClientTypeOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/ClientTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/ClientTypeOptions.kt index b17ca4ba2f5..d2085aa6c32 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/ClientTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/ClientTypeOptions.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nkiboi on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/Currency.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/Currency.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/Currency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/Currency.kt index fb00bd78d7c..8ba66b6d8ad 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/Currency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/Currency.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/DaysInMonthType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/DaysInMonthType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/DaysInMonthType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/DaysInMonthType.kt index 2ce14f5d651..a4ddc58411d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/DaysInMonthType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/DaysInMonthType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/DaysInYearType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/DaysInYearType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/DaysInYearType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/DaysInYearType.kt index f8eb3e8b21b..02b93b9ee0c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/DaysInYearType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/DaysInYearType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/GenderOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/GenderOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/GenderOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/GenderOptions.kt index c630709e8fc..ed8b726906f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/GenderOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/GenderOptions.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nkiboi on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationDaysInYearType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationDaysInYearType.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationDaysInYearType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationDaysInYearType.kt index 0c4015a5f5b..fdc8906b1a2 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationDaysInYearType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationDaysInYearType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nkiboi on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationPeriodType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationPeriodType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationPeriodType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationPeriodType.kt index f7d4ff4698d..8b64d6fc22e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationPeriodType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationPeriodType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationTypeOptions.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationTypeOptions.kt index 01881427c25..740c7b5bc6e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCalculationTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCalculationTypeOptions.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nkiboi on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCompoundingPeriod.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCompoundingPeriod.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCompoundingPeriod.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCompoundingPeriod.kt index ed5bfed8604..6b21c361312 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestCompoundingPeriod.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestCompoundingPeriod.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nkiboi on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestPostingPeriodType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestPostingPeriodType.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/InterestPostingPeriodType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestPostingPeriodType.kt index 9a45ffeba4e..c15a5ae5a33 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestPostingPeriodType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestPostingPeriodType.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nkiboi on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestRateFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestRateFrequencyType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/InterestRateFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestRateFrequencyType.kt index 4d2d03a3117..e2caca15553 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestRateFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestRateFrequencyType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/InterestType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestType.kt index 9d5c4c066f1..4d4e9d601e2 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/InterestType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/InterestType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/LoanFund.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanFund.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/LoanFund.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanFund.kt index 7154f257ea0..0cea66f9bbe 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/LoanFund.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanFund.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nellyk on 2/21/2016. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/LoanProducts.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanProducts.kt similarity index 99% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/LoanProducts.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanProducts.kt index 3553b0034be..0169bf47739 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/LoanProducts.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanProducts.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/LoanPurpose.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanPurpose.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/LoanPurpose.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanPurpose.kt index 89acff4f9ae..da75b1d721e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/LoanPurpose.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/LoanPurpose.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nellyk on 2/21/2016. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/Office.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/Office.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/Office.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/Office.kt index 06caf0d6a29..4b594fa7fff 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/Office.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/Office.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ForeignKey import com.raizlabs.android.dbflow.annotation.ModelContainer diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/OfficeOpeningDate.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/OfficeOpeningDate.kt similarity index 81% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/OfficeOpeningDate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/OfficeOpeningDate.kt index 2bed047d9b0..c30551db2dc 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/OfficeOpeningDate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/OfficeOpeningDate.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/ProductSavings.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/ProductSavings.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/ProductSavings.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/ProductSavings.kt index 6e74e592a34..ca02f31a72b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/ProductSavings.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/ProductSavings.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation /** * Created by nellyk on 12/15/2015. diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/RepaymentFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/RepaymentFrequencyType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/RepaymentFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/RepaymentFrequencyType.kt index 06e1e5f7262..fb9035e251b 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/RepaymentFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/RepaymentFrequencyType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/organisation/Staff.kt b/core/datastore/src/main/java/com/mifos/core/objects/organisation/Staff.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/organisation/Staff.kt rename to core/datastore/src/main/java/com/mifos/core/objects/organisation/Staff.kt index f27f1a9ab89..325fb7143c4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/organisation/Staff.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/organisation/Staff.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.organisation +package com.mifos.core.objects.organisation import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/response/SaveResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/response/SaveResponse.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/response/SaveResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/response/SaveResponse.kt index f37774f70a5..650c08f2df8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/response/SaveResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/response/SaveResponse.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.response +package com.mifos.core.objects.response import com.google.gson.Gson import com.google.gson.annotations.SerializedName -import com.mifos.api.model.Changes +import com.mifos.core.objects.Changes class SaveResponse { @SerializedName("groupId") diff --git a/mifosng-android/src/main/java/com/mifos/objects/runreports/ColumnHeader.kt b/core/datastore/src/main/java/com/mifos/core/objects/runreports/ColumnHeader.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/runreports/ColumnHeader.kt rename to core/datastore/src/main/java/com/mifos/core/objects/runreports/ColumnHeader.kt index bfcc4f7017a..34364e53a67 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/runreports/ColumnHeader.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/runreports/ColumnHeader.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.runreports +package com.mifos.core.objects.runreports import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/runreports/DataRow.kt b/core/datastore/src/main/java/com/mifos/core/objects/runreports/DataRow.kt similarity index 81% rename from mifosng-android/src/main/java/com/mifos/objects/runreports/DataRow.kt rename to core/datastore/src/main/java/com/mifos/core/objects/runreports/DataRow.kt index e24b8aa3ccb..b66f704330a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/runreports/DataRow.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/runreports/DataRow.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.runreports +package com.mifos.core.objects.runreports import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/runreports/FullParameterListResponse.kt b/core/datastore/src/main/java/com/mifos/core/objects/runreports/FullParameterListResponse.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/runreports/FullParameterListResponse.kt rename to core/datastore/src/main/java/com/mifos/core/objects/runreports/FullParameterListResponse.kt index 52f42119c80..104b5ef4ee7 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/runreports/FullParameterListResponse.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/runreports/FullParameterListResponse.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.runreports +package com.mifos.core.objects.runreports import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/runreports/client/ClientReportTypeItem.kt b/core/datastore/src/main/java/com/mifos/core/objects/runreports/client/ClientReportTypeItem.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/objects/runreports/client/ClientReportTypeItem.kt rename to core/datastore/src/main/java/com/mifos/core/objects/runreports/client/ClientReportTypeItem.kt index 3b4018f48ab..bc27498b7fe 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/runreports/client/ClientReportTypeItem.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/runreports/client/ClientReportTypeItem.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.runreports.client +package com.mifos.core.objects.runreports.client import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/survey/ComponentDatas.kt b/core/datastore/src/main/java/com/mifos/core/objects/survey/ComponentDatas.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/survey/ComponentDatas.kt rename to core/datastore/src/main/java/com/mifos/core/objects/survey/ComponentDatas.kt index 58b6dc3af13..3165236698d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/survey/ComponentDatas.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/survey/ComponentDatas.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.survey +package com.mifos.core.objects.survey import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table diff --git a/mifosng-android/src/main/java/com/mifos/objects/survey/QuestionDatas.kt b/core/datastore/src/main/java/com/mifos/core/objects/survey/QuestionDatas.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/survey/QuestionDatas.kt rename to core/datastore/src/main/java/com/mifos/core/objects/survey/QuestionDatas.kt index 5441afd5e65..195965a181c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/survey/QuestionDatas.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/survey/QuestionDatas.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.survey +package com.mifos.core.objects.survey import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table diff --git a/mifosng-android/src/main/java/com/mifos/objects/survey/ResponseDatas.kt b/core/datastore/src/main/java/com/mifos/core/objects/survey/ResponseDatas.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/survey/ResponseDatas.kt rename to core/datastore/src/main/java/com/mifos/core/objects/survey/ResponseDatas.kt index 1c63b8ae702..12d862029a1 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/survey/ResponseDatas.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/survey/ResponseDatas.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.survey +package com.mifos.core.objects.survey import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table diff --git a/mifosng-android/src/main/java/com/mifos/objects/survey/Scorecard.kt b/core/datastore/src/main/java/com/mifos/core/objects/survey/Scorecard.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/survey/Scorecard.kt rename to core/datastore/src/main/java/com/mifos/core/objects/survey/Scorecard.kt index 66e16458dea..5f5c558d6ee 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/survey/Scorecard.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/survey/Scorecard.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.survey +package com.mifos.core.objects.survey import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/survey/ScorecardValues.kt b/core/datastore/src/main/java/com/mifos/core/objects/survey/ScorecardValues.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/survey/ScorecardValues.kt rename to core/datastore/src/main/java/com/mifos/core/objects/survey/ScorecardValues.kt index 5df9c9e08d1..ebbc148cbe5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/survey/ScorecardValues.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/survey/ScorecardValues.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.survey +package com.mifos.core.objects.survey import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/survey/Survey.kt b/core/datastore/src/main/java/com/mifos/core/objects/survey/Survey.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/survey/Survey.kt rename to core/datastore/src/main/java/com/mifos/core/objects/survey/Survey.kt index 5b8e04fa36a..c690dbc4b7a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/survey/Survey.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/survey/Survey.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.survey +package com.mifos.core.objects.survey import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/system/Code.kt b/core/datastore/src/main/java/com/mifos/core/objects/system/Code.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/system/Code.kt rename to core/datastore/src/main/java/com/mifos/core/objects/system/Code.kt index e2f33b3e8e5..ad2202f6701 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/system/Code.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/system/Code.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.system +package com.mifos.core.objects.system /** * Created by ishankhanna on 16/06/14. diff --git a/mifosng-android/src/main/java/com/mifos/objects/system/CodeValue.kt b/core/datastore/src/main/java/com/mifos/core/objects/system/CodeValue.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/system/CodeValue.kt rename to core/datastore/src/main/java/com/mifos/core/objects/system/CodeValue.kt index e4ba1961647..16b5a9be474 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/system/CodeValue.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/system/CodeValue.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.system +package com.mifos.core.objects.system /** * Created by ishankhanna on 16/06/14. diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeAppliesTo.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeAppliesTo.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeAppliesTo.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeAppliesTo.kt index 911e2f40589..c9eb8812247 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeAppliesTo.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeAppliesTo.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeCalculationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeCalculationType.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeCalculationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeCalculationType.kt index b51ec192ba1..02130be4b77 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeCalculationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeCalculationType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeOptions.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeOptions.kt index 5c414ff88ef..0d001a8fd42 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargePaymentMode.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargePaymentMode.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargePaymentMode.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargePaymentMode.kt index 1644d1d81ce..e5ab977e204 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargePaymentMode.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargePaymentMode.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeTemplate.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeTemplate.kt index c9d3942ea6b..7ea5ac4e609 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeTemplate.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeTimeType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeTimeType.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeTimeType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeTimeType.kt index e67b494733a..d87a47da345 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ChargeTimeType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ChargeTimeType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcel import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ClientsTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ClientsTemplate.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/ClientsTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ClientsTemplate.kt index 57d14a94e48..474836a0414 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/ClientsTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/ClientsTemplate.kt @@ -1,16 +1,13 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients -import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.noncore.DataTable +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel +import com.mifos.core.objects.noncore.DataTable import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table import kotlinx.parcelize.Parcelize -import java.util.Arrays /* * This project is licensed under the open source MPL V2. diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/Currency.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/Currency.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/Currency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/Currency.kt index c268d0bbb2d..d1927092f1a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/Currency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/Currency.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/IncomeOrLiabilityAccount.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/IncomeOrLiabilityAccount.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/IncomeOrLiabilityAccount.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/IncomeOrLiabilityAccount.kt index d3328525f80..9a5a4d312b4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/IncomeOrLiabilityAccount.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/IncomeOrLiabilityAccount.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/InterestType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/InterestType.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/InterestType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/InterestType.kt index ac92994299b..08ac7d82493 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/InterestType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/InterestType.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/OfficeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/OfficeOptions.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/OfficeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/OfficeOptions.kt index 67da1515be4..2497db57a39 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/OfficeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/OfficeOptions.kt @@ -1,8 +1,8 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/Options.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/Options.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/Options.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/Options.kt index 5e0fbe5a3e8..b1705da55a0 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/Options.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/Options.kt @@ -1,11 +1,10 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator import com.google.gson.annotations.SerializedName -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/SavingProductOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/SavingProductOptions.kt similarity index 52% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/SavingProductOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/SavingProductOptions.kt index 4e7ad787ef0..5e82cb9672e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/SavingProductOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/SavingProductOptions.kt @@ -1,12 +1,8 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients -import android.os.Parcel import android.os.Parcelable -import android.os.Parcelable.Creator -import com.google.gson.annotations.SerializedName -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.raizlabs.android.dbflow.annotation.Column +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table @@ -27,13 +23,4 @@ data class SavingProductOptions( val name: String = "", val withdrawalFeeForTransfers: Boolean = false, val allowOverdraft: Boolean = false -) : MifosBaseModel(), Parcelable { - override fun toString(): String { - return "SavingProductOptions{" + - "id=" + id + - ", name='" + name + '\'' + - ", withdrawalFeeForTransfers=" + withdrawalFeeForTransfers + - ", allowOverdraft=" + allowOverdraft + - '}' - } -} +) : MifosBaseModel(), Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/StaffOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/StaffOptions.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/clients/StaffOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/clients/StaffOptions.kt index 1894ac3cde8..b73817fdb03 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/clients/StaffOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/clients/StaffOptions.kt @@ -1,9 +1,9 @@ -package com.mifos.objects.templates.clients +package com.mifos.core.objects.templates.clients import android.os.Parcelable import com.google.gson.annotations.SerializedName -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AccountingRule.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AccountingRule.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/AccountingRule.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AccountingRule.kt index a6520072a76..0be3a10ead9 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AccountingRule.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AccountingRule.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AllowAttributeOverrides.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AllowAttributeOverrides.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/AllowAttributeOverrides.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AllowAttributeOverrides.kt index a24109e2b6e..da230d81d71 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AllowAttributeOverrides.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AllowAttributeOverrides.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AmortizationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AmortizationType.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/AmortizationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AmortizationType.kt index edc919ae42d..3d35a0565a5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AmortizationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AmortizationType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AmortizationTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AmortizationTypeOptions.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/AmortizationTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AmortizationTypeOptions.kt index b1370306397..5aac40c6c0d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/AmortizationTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/AmortizationTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/CalendarOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/CalendarOptions.kt similarity index 96% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/CalendarOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/CalendarOptions.kt index 9fe54cbe326..dc291ec85c5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/CalendarOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/CalendarOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/CalendarOptionsType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/CalendarOptionsType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/CalendarOptionsType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/CalendarOptionsType.kt index 2137d7ee922..d1bd6309fd5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/CalendarOptionsType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/CalendarOptionsType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeAppliesTo.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeAppliesTo.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeAppliesTo.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeAppliesTo.kt index dca328d7e85..f096d38882e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeAppliesTo.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeAppliesTo.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeCalculationType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeCalculationType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeCalculationType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeCalculationType.kt index daa0ff3b451..894345cebf4 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeCalculationType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeCalculationType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeOptions.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeOptions.kt index e272e5ed4bb..92af86ae49c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargePaymentMode.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargePaymentMode.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargePaymentMode.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargePaymentMode.kt index 67210454fbe..39b2fe2f2c8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargePaymentMode.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargePaymentMode.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeTimeType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeTimeType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeTimeType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeTimeType.kt index 5d71dbede88..18ee9478d90 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ChargeTimeType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ChargeTimeType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Charges.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Charges.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Charges.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Charges.kt index 35f52a252a7..52a266ff7c5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Charges.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Charges.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Currency.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Currency.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Currency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Currency.kt index 28f8410a68f..e90a89d1568 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Currency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Currency.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/DaysInMonthType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/DaysInMonthType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/DaysInMonthType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/DaysInMonthType.kt index adafde8f528..324436c0630 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/DaysInMonthType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/DaysInMonthType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/DaysInYearType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/DaysInYearType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/DaysInYearType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/DaysInYearType.kt index 71921ab9e89..f2228b7a2de 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/DaysInYearType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/DaysInYearType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/EntityType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/EntityType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/EntityType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/EntityType.kt index 2341fdd5964..43b7a33a6fb 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/EntityType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/EntityType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Frequency.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Frequency.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Frequency.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Frequency.kt index 760ba8a5b0a..3356df3e556 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Frequency.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Frequency.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/FundOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/FundOptions.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/FundOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/FundOptions.kt index 3312b247785..4b3c632605c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/FundOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/FundOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcel import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Group.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Group.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Group.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Group.kt index 88d9d9f5087..ac2846537be 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Group.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Group.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/GroupLoanTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/GroupLoanTemplate.kt similarity index 98% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/GroupLoanTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/GroupLoanTemplate.kt index 211065d5466..7131534d792 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/GroupLoanTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/GroupLoanTemplate.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/GroupTimeline.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/GroupTimeline.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/GroupTimeline.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/GroupTimeline.kt index 1a4ca0a44ed..00603645dc8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/GroupTimeline.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/GroupTimeline.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestCalculationPeriodType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestCalculationPeriodType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestCalculationPeriodType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestCalculationPeriodType.kt index b4150a91733..750d24274a0 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestCalculationPeriodType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestCalculationPeriodType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestCalculationPeriodTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestCalculationPeriodTypeOptions.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestCalculationPeriodTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestCalculationPeriodTypeOptions.kt index 121434cb32b..f54fea6a213 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestCalculationPeriodTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestCalculationPeriodTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRateFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRateFrequencyType.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRateFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRateFrequencyType.kt index c9fa5e746ed..b27690f4e50 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRateFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRateFrequencyType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRateFrequencyTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRateFrequencyTypeOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRateFrequencyTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRateFrequencyTypeOptions.kt index d2b1727b467..f7ca0e8d7d8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRateFrequencyTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRateFrequencyTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRecalculationCompoundingType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRecalculationCompoundingType.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRecalculationCompoundingType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRecalculationCompoundingType.kt index f9923aa6a98..252229b96ae 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRecalculationCompoundingType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRecalculationCompoundingType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRecalculationData.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRecalculationData.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRecalculationData.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRecalculationData.kt index 09621c765b0..9a6a944d47d 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestRecalculationData.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestRecalculationData.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestType.kt index b80c0d48ef3..ffe3b590617 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestTypeOptions.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestTypeOptions.kt index 0a259712e4c..b1227039eb8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/InterestTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/InterestTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanCollateralOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanCollateralOptions.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanCollateralOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanCollateralOptions.kt index 5d719cae6f0..fd35e8e240e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanCollateralOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanCollateralOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanOfficerOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanOfficerOptions.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanOfficerOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanOfficerOptions.kt index 14dd07ecb7c..2d6b8617f90 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanOfficerOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanOfficerOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanPurposeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanPurposeOptions.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanPurposeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanPurposeOptions.kt index 87e0fc2154f..988a4caaafe 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanPurposeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanPurposeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanRepaymentTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanRepaymentTemplate.kt similarity index 77% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanRepaymentTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanRepaymentTemplate.kt index 5b3a86b76e8..c7bacf48e83 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanRepaymentTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanRepaymentTemplate.kt @@ -2,13 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.PaymentTypeOption -import com.mifos.objects.accounts.savings.Currency +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey @@ -43,5 +41,5 @@ data class LoanRepaymentTemplate( @Column var penaltyChargesPortion: Double? = null, - var paymentTypeOptions: MutableList? = null + var paymentTypeOptions: MutableList? = null ) : MifosBaseModel(), Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanTemplate.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanTemplate.kt index d996449cd60..150d67e06d1 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanTemplate.kt @@ -1,9 +1,8 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable -import com.google.gson.annotations.SerializedName -import com.mifos.objects.accounts.loan.AccountLinkingOptions -import com.mifos.objects.noncore.DataTable +import com.mifos.core.objects.accounts.loan.AccountLinkingOptions +import com.mifos.core.objects.noncore.DataTable import kotlinx.parcelize.Parcelize /** diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanTransactionTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanTransactionTemplate.kt similarity index 67% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanTransactionTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanTransactionTemplate.kt index 2405919199e..45c9e66b002 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/LoanTransactionTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/LoanTransactionTemplate.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable -import com.mifos.objects.PaymentTypeOption +import com.mifos.core.objects.PaymentTypeOption import kotlinx.parcelize.Parcelize /** @@ -19,5 +19,5 @@ data class LoanTransactionTemplate( var possibleNextRepaymentDate: List = ArrayList(), - var paymentTypeOptions: List = ArrayList() + var paymentTypeOptions: List = ArrayList() ) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/OverdueCharges.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/OverdueCharges.kt similarity index 77% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/OverdueCharges.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/OverdueCharges.kt index 8d74738f0e1..61e8a58a56a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/OverdueCharges.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/OverdueCharges.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/PreClosureInterestCalculationStrategy.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/PreClosureInterestCalculationStrategy.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/PreClosureInterestCalculationStrategy.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/PreClosureInterestCalculationStrategy.kt index c9ed4fbfca8..62e25572ec5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/PreClosureInterestCalculationStrategy.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/PreClosureInterestCalculationStrategy.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Product.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Product.kt similarity index 98% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Product.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Product.kt index ea82f2af435..85dc76b1c4e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Product.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Product.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ProductOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ProductOptions.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/ProductOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ProductOptions.kt index af5f6905428..00ee071ded8 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/ProductOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/ProductOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RecalculationRestFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RecalculationRestFrequencyType.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/RecalculationRestFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RecalculationRestFrequencyType.kt index faa8deeb9da..1c985a1a6fd 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RecalculationRestFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RecalculationRestFrequencyType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyDaysOfWeekTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyDaysOfWeekTypeOptions.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyDaysOfWeekTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyDaysOfWeekTypeOptions.kt index 552603c8604..39c42813ba6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyDaysOfWeekTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyDaysOfWeekTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcel import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyNthDayTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyNthDayTypeOptions.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyNthDayTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyNthDayTypeOptions.kt index d6cf678cb2c..d15e99873de 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyNthDayTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyNthDayTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import com.google.gson.annotations.SerializedName diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyType.kt index 347a4d5d160..33a566a857a 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyTypeOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyTypeOptions.kt index d62a35b9486..1900dc26ef9 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepaymentFrequencyTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepaymentFrequencyTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepeatsOnNthDayOfMonth.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepeatsOnNthDayOfMonth.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepeatsOnNthDayOfMonth.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepeatsOnNthDayOfMonth.kt index ddaf4c9099d..6047020323f 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RepeatsOnNthDayOfMonth.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RepeatsOnNthDayOfMonth.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RescheduleStrategyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RescheduleStrategyType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/RescheduleStrategyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RescheduleStrategyType.kt index f2b3dd6c2f5..eb9574a759e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/RescheduleStrategyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/RescheduleStrategyType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Status.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Status.kt similarity index 83% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Status.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Status.kt index ad888b43a53..7c124840f91 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Status.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Status.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TaxGroup.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TaxGroup.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/TaxGroup.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TaxGroup.kt index fa4acbc9f95..e95ba614452 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TaxGroup.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TaxGroup.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcel import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TermFrequencyTypeOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TermFrequencyTypeOptions.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/TermFrequencyTypeOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TermFrequencyTypeOptions.kt index ae579ad9225..f6fc367f8d9 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TermFrequencyTypeOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TermFrequencyTypeOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TermPeriodFrequencyType.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TermPeriodFrequencyType.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/TermPeriodFrequencyType.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TermPeriodFrequencyType.kt index 41d1c289f71..ddf9dd4c527 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TermPeriodFrequencyType.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TermPeriodFrequencyType.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Timeline.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Timeline.kt similarity index 81% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/Timeline.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Timeline.kt index 726527277dc..11385177280 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/Timeline.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Timeline.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TransactionProcessingStrategyOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TransactionProcessingStrategyOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/templates/loans/TransactionProcessingStrategyOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TransactionProcessingStrategyOptions.kt index 9989b4d30f4..2c4a7d408ef 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/loans/TransactionProcessingStrategyOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/TransactionProcessingStrategyOptions.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.loans +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Type.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Type.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Type.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Type.kt index 1c0637c6450..1ed15959e19 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/accounts/loan/Type.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/loans/Type.kt @@ -2,11 +2,12 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.accounts.loan +package com.mifos.core.objects.templates.loans import android.os.Parcelable import kotlinx.parcelize.Parcelize + @Parcelize data class Type( var id: Int? = null, diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/AccountOptions.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/AccountOptions.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/objects/templates/savings/AccountOptions.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/savings/AccountOptions.kt index 8fa97e0e297..f4af3636e69 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/AccountOptions.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/AccountOptions.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.templates.savings +package com.mifos.core.objects.templates.savings import android.os.Parcelable -import com.mifos.objects.common.InterestType +import com.mifos.core.objects.accounts.loan.InterestType import kotlinx.parcelize.Parcelize /* diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/SavingProductsTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/SavingProductsTemplate.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/objects/templates/savings/SavingProductsTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/savings/SavingProductsTemplate.kt index 4b18dd5ff78..7fa1588bbc3 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/SavingProductsTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/SavingProductsTemplate.kt @@ -1,10 +1,9 @@ -package com.mifos.objects.templates.savings +package com.mifos.core.objects.templates.savings import android.os.Parcelable -import com.mifos.objects.PaymentTypeOption -import com.mifos.objects.accounts.savings.Currency -import com.mifos.objects.accounts.savings.FieldOfficerOptions -import com.mifos.objects.common.InterestType +import com.mifos.core.objects.accounts.savings.Currency +import com.mifos.core.objects.accounts.savings.FieldOfficerOptions +import com.mifos.core.objects.common.InterestType import kotlinx.parcelize.Parcelize /* @@ -42,7 +41,7 @@ class SavingProductsTemplate( var withdrawalFeeTypeOptions: List? = null, - var paymentTypeOptions: List? = null, + var paymentTypeOptions: List? = null, var accountingRuleOptions: List? = null, diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/SavingsAccountTransactionTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/SavingsAccountTransactionTemplate.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/objects/templates/savings/SavingsAccountTransactionTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/savings/SavingsAccountTransactionTemplate.kt index 71c5dab34b4..b7d69983a0c 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/SavingsAccountTransactionTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/SavingsAccountTransactionTemplate.kt @@ -2,12 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.templates.savings +package com.mifos.core.objects.templates.savings import android.os.Parcelable -import com.mifos.api.local.MifosBaseModel -import com.mifos.api.local.MifosDatabase -import com.mifos.objects.PaymentTypeOption +import com.mifos.core.database.MifosDatabase +import com.mifos.core.model.client.MifosBaseModel import com.raizlabs.android.dbflow.annotation.Column import com.raizlabs.android.dbflow.annotation.ModelContainer import com.raizlabs.android.dbflow.annotation.PrimaryKey @@ -32,7 +31,7 @@ class SavingsAccountTransactionTemplate( @Column var reversed: Boolean? = null, - var paymentTypeOptions: List = ArrayList() + var paymentTypeOptions: List = ArrayList() ) : MifosBaseModel(), Parcelable { diff --git a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/TagId.kt b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/TagId.kt similarity index 73% rename from mifosng-android/src/main/java/com/mifos/objects/templates/savings/TagId.kt rename to core/datastore/src/main/java/com/mifos/core/objects/templates/savings/TagId.kt index a2846b0d578..1dab79a86e5 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/templates/savings/TagId.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/templates/savings/TagId.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.templates.savings +package com.mifos.core.objects.templates.savings import android.os.Parcelable import kotlinx.parcelize.Parcelize diff --git a/mifosng-android/src/main/java/com/mifos/objects/user/User.kt b/core/datastore/src/main/java/com/mifos/core/objects/user/User.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/objects/user/User.kt rename to core/datastore/src/main/java/com/mifos/core/objects/user/User.kt index 80373b8ef48..6684f14fa46 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/user/User.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/user/User.kt @@ -2,9 +2,9 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.objects.user +package com.mifos.core.objects.user -import com.mifos.objects.client.Role +import com.mifos.core.objects.client.Role class User { //{"username":"User1","userId":1,"base64EncodedAuthenticationKey":"VXNlcjE6dGVjaDRtZg\u003d diff --git a/mifosng-android/src/main/java/com/mifos/objects/user/UserLatLng.kt b/core/datastore/src/main/java/com/mifos/core/objects/user/UserLatLng.kt similarity index 97% rename from mifosng-android/src/main/java/com/mifos/objects/user/UserLatLng.kt rename to core/datastore/src/main/java/com/mifos/core/objects/user/UserLatLng.kt index 8a9aa1ab850..a2a12bb81a2 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/user/UserLatLng.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/user/UserLatLng.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.user +package com.mifos.core.objects.user import android.os.Parcel import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/user/UserLocation.kt b/core/datastore/src/main/java/com/mifos/core/objects/user/UserLocation.kt similarity index 97% rename from mifosng-android/src/main/java/com/mifos/objects/user/UserLocation.kt rename to core/datastore/src/main/java/com/mifos/core/objects/user/UserLocation.kt index 6ba9d333447..6fd6ea8efb6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/user/UserLocation.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/user/UserLocation.kt @@ -1,4 +1,4 @@ -package com.mifos.objects.user +package com.mifos.core.objects.user import android.os.Parcel import android.os.Parcelable diff --git a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/ClientAndClientAccounts.kt b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/ClientAndClientAccounts.kt similarity index 66% rename from mifosng-android/src/main/java/com/mifos/objects/zipmodels/ClientAndClientAccounts.kt rename to core/datastore/src/main/java/com/mifos/core/objects/zipmodels/ClientAndClientAccounts.kt index 57403d6f83f..341823fe009 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/ClientAndClientAccounts.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/ClientAndClientAccounts.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.zipmodels +package com.mifos.core.objects.zipmodels -import com.mifos.objects.accounts.ClientAccounts -import com.mifos.objects.client.Client +import com.mifos.core.objects.accounts.ClientAccounts +import com.mifos.core.objects.client.Client /** * Model for Observable.zip. This Model used to combine the Client and ClientAccount in response diff --git a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/GroupAndGroupAccounts.kt b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/GroupAndGroupAccounts.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/objects/zipmodels/GroupAndGroupAccounts.kt rename to core/datastore/src/main/java/com/mifos/core/objects/zipmodels/GroupAndGroupAccounts.kt index 5d75a33a36e..2f9b0cdc208 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/GroupAndGroupAccounts.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/GroupAndGroupAccounts.kt @@ -1,10 +1,10 @@ -package com.mifos.objects.zipmodels +package com.mifos.core.objects.zipmodels import android.os.Parcel import android.os.Parcelable import android.os.Parcelable.Creator -import com.mifos.objects.accounts.GroupAccounts -import com.mifos.objects.group.Group +import com.mifos.core.objects.accounts.GroupAccounts +import com.mifos.core.objects.group.Group /** * Created by Rajan Maurya on 11/09/16. @@ -21,7 +21,7 @@ class GroupAndGroupAccounts : Parcelable { dest.writeParcelable(groupAccounts, flags) } - constructor() {} + constructor() constructor(group: Group?, groupAccounts: GroupAccounts?) { this.group = group this.groupAccounts = groupAccounts @@ -35,7 +35,7 @@ class GroupAndGroupAccounts : Parcelable { companion object { @JvmField val CREATOR: Creator = object : Creator { - override fun createFromParcel(source: Parcel): GroupAndGroupAccounts? { + override fun createFromParcel(source: Parcel): GroupAndGroupAccounts { return GroupAndGroupAccounts(source) } diff --git a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/LoanAndLoanRepayment.kt b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/LoanAndLoanRepayment.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/objects/zipmodels/LoanAndLoanRepayment.kt rename to core/datastore/src/main/java/com/mifos/core/objects/zipmodels/LoanAndLoanRepayment.kt index 6d047218efd..06b0e811878 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/LoanAndLoanRepayment.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/LoanAndLoanRepayment.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.zipmodels +package com.mifos.core.objects.zipmodels -import com.mifos.objects.accounts.loan.LoanWithAssociations -import com.mifos.objects.templates.loans.LoanRepaymentTemplate +import com.mifos.core.objects.accounts.loan.LoanWithAssociations +import com.mifos.core.objects.templates.loans.LoanRepaymentTemplate /** * @@ -11,7 +11,7 @@ class LoanAndLoanRepayment { var loanWithAssociations: LoanWithAssociations? = null var loanRepaymentTemplate: LoanRepaymentTemplate? = null - constructor() {} + constructor() constructor( loanWithAssociations: LoanWithAssociations?, loanRepaymentTemplate: LoanRepaymentTemplate? diff --git a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/SavingProductsAndTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/SavingProductsAndTemplate.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/objects/zipmodels/SavingProductsAndTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/zipmodels/SavingProductsAndTemplate.kt index 3ec082762e7..f1e195c894e 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/SavingProductsAndTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/SavingProductsAndTemplate.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.zipmodels +package com.mifos.core.objects.zipmodels -import com.mifos.objects.organisation.ProductSavings -import com.mifos.objects.templates.savings.SavingProductsTemplate +import com.mifos.core.objects.organisation.ProductSavings +import com.mifos.core.objects.templates.savings.SavingProductsTemplate /** * Created by Rajan Maurya on 02/09/16. diff --git a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/SavingsAccountAndTransactionTemplate.kt b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/SavingsAccountAndTransactionTemplate.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/objects/zipmodels/SavingsAccountAndTransactionTemplate.kt rename to core/datastore/src/main/java/com/mifos/core/objects/zipmodels/SavingsAccountAndTransactionTemplate.kt index 3bc57c7c571..f9c3e8a50e6 100644 --- a/mifosng-android/src/main/java/com/mifos/objects/zipmodels/SavingsAccountAndTransactionTemplate.kt +++ b/core/datastore/src/main/java/com/mifos/core/objects/zipmodels/SavingsAccountAndTransactionTemplate.kt @@ -1,7 +1,7 @@ -package com.mifos.objects.zipmodels +package com.mifos.core.objects.zipmodels -import com.mifos.objects.accounts.savings.SavingsAccountWithAssociations -import com.mifos.objects.templates.savings.SavingsAccountTransactionTemplate +import com.mifos.core.objects.accounts.savings.SavingsAccountWithAssociations +import com.mifos.core.objects.templates.savings.SavingsAccountTransactionTemplate /** * Created by Rajan Maurya on 21/08/16. @@ -10,7 +10,7 @@ class SavingsAccountAndTransactionTemplate { var savingsAccountWithAssociations: SavingsAccountWithAssociations? = null var savingsAccountTransactionTemplate: SavingsAccountTransactionTemplate? = null - constructor() {} + constructor() constructor( savingsAccountWithAssociations: SavingsAccountWithAssociations?, savingsAccountTransactionTemplate: SavingsAccountTransactionTemplate? diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts index 63cd7d6b04e..f05dcfe72da 100644 --- a/core/network/build.gradle.kts +++ b/core/network/build.gradle.kts @@ -3,6 +3,8 @@ plugins { id("org.jetbrains.kotlin.android") id("kotlin-kapt") id("com.google.dagger.hilt.android") + id("kotlin-parcelize") + id("org.jetbrains.kotlin.plugin.serialization") } android { @@ -69,4 +71,21 @@ dependencies { // Mongo Realm implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1") implementation("io.realm.kotlin:library-base:1.11.0") + + + //Square dependencies + implementation("com.squareup.retrofit2:retrofit:2.9.0") { + // exclude Retrofit’s OkHttp peer-dependency module and define your own module import + exclude(module = "okhttp") + } + implementation("com.squareup.retrofit2:converter-gson:2.9.0") + implementation("com.squareup.retrofit2:converter-scalars:2.9.0") + implementation("com.squareup.retrofit2:adapter-rxjava:2.9.0") + implementation("com.squareup.okhttp3:okhttp:4.9.2") + implementation("com.squareup.okhttp3:logging-interceptor:4.11.0") + implementation("com.jakewharton.fliptables:fliptables:1.0.1") + + //stetho dependencies + implementation("com.facebook.stetho:stetho:1.3.1") + implementation("com.facebook.stetho:stetho-okhttp3:1.3.1") } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/BaseApiManager.kt b/core/network/src/main/java/com/mifos/core/network/BaseApiManager.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/api/BaseApiManager.kt rename to core/network/src/main/java/com/mifos/core/network/BaseApiManager.kt index fa83717609f..2101b2a050e 100644 --- a/mifosng-android/src/main/java/com/mifos/api/BaseApiManager.kt +++ b/core/network/src/main/java/com/mifos/core/network/BaseApiManager.kt @@ -2,40 +2,43 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api +package com.mifos.core.network import com.google.gson.GsonBuilder -import com.mifos.api.services.CenterService -import com.mifos.api.services.ChargeService -import com.mifos.api.services.CheckerInboxService -import com.mifos.api.services.ClientAccountsService -import com.mifos.api.services.ClientService -import com.mifos.api.services.CollectionSheetService -import com.mifos.api.services.DataTableService -import com.mifos.api.services.DocumentService -import com.mifos.api.services.GroupService -import com.mifos.api.services.LoanService -import com.mifos.api.services.NoteService -import com.mifos.api.services.OfficeService -import com.mifos.api.services.RunReportsService -import com.mifos.api.services.SavingsAccountService -import com.mifos.api.services.SearchService -import com.mifos.api.services.StaffService -import com.mifos.api.services.SurveyService -import com.mifos.utils.JsonDateSerializer -import com.mifos.utils.PrefManager +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.services.CenterService +import com.mifos.core.network.services.ChargeService +import com.mifos.core.network.services.CheckerInboxService +import com.mifos.core.network.services.ClientAccountsService +import com.mifos.core.network.services.ClientService +import com.mifos.core.network.services.CollectionSheetService +import com.mifos.core.network.services.DataTableService +import com.mifos.core.network.services.DocumentService +import com.mifos.core.network.services.GroupService +import com.mifos.core.network.services.LoanService +import com.mifos.core.network.services.NoteService +import com.mifos.core.network.services.OfficeService +import com.mifos.core.network.services.RunReportsService +import com.mifos.core.network.services.SavingsAccountService +import com.mifos.core.network.services.SearchService +import com.mifos.core.network.services.StaffService +import com.mifos.core.network.services.SurveyService +import org.mifos.core.utils.JsonDateSerializer import retrofit2.Retrofit import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory import retrofit2.converter.gson.GsonConverterFactory import retrofit2.converter.scalars.ScalarsConverterFactory import java.util.Date +import javax.inject.Inject /** * @author fomenkoo */ -class BaseApiManager { +class BaseApiManager @Inject constructor(private val prefManager: PrefManager) { + + init { - createService() + createService(prefManager) } val centerApi: CenterService @@ -151,15 +154,15 @@ class BaseApiManager { return mRetrofit!!.create(clazz) } - fun createService() { + fun createService(prefManager: PrefManager) { val gson = GsonBuilder() .registerTypeAdapter(Date::class.java, JsonDateSerializer()).create() mRetrofit = Retrofit.Builder() - .baseUrl(PrefManager.getInstanceUrl()) + .baseUrl(prefManager.getInstanceUrl()) .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create(gson)) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) - .client(MifosOkHttpClient().mifosOkHttpClient) + .client(MifosOkHttpClient(prefManager).mifosOkHttpClient) .build() init() } diff --git a/mifosng-android/src/main/java/com/mifos/api/BaseUrl.kt b/core/network/src/main/java/com/mifos/core/network/BaseUrl.kt similarity index 93% rename from mifosng-android/src/main/java/com/mifos/api/BaseUrl.kt rename to core/network/src/main/java/com/mifos/core/network/BaseUrl.kt index 1d8bf52e952..9b3289fadc6 100644 --- a/mifosng-android/src/main/java/com/mifos/api/BaseUrl.kt +++ b/core/network/src/main/java/com/mifos/core/network/BaseUrl.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api +package com.mifos.core.network /** * @author fomenkoo diff --git a/mifosng-android/src/main/java/com/mifos/api/DataManager.kt b/core/network/src/main/java/com/mifos/core/network/DataManager.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/api/DataManager.kt rename to core/network/src/main/java/com/mifos/core/network/DataManager.kt index cf2c54eeb7f..0d24acfb66e 100644 --- a/mifosng-android/src/main/java/com/mifos/api/DataManager.kt +++ b/core/network/src/main/java/com/mifos/core/network/DataManager.kt @@ -1,28 +1,28 @@ -package com.mifos.api - -import com.mifos.api.datamanager.DataManagerClient -import com.mifos.api.model.CollectionSheetPayload -import com.mifos.api.model.Payload -import com.mifos.objects.accounts.loan.LoanApproval -import com.mifos.objects.accounts.loan.LoanWithAssociations -import com.mifos.objects.accounts.loan.Loans -import com.mifos.objects.client.ChargeCreationResponse -import com.mifos.objects.client.Charges -import com.mifos.objects.client.Page -import com.mifos.objects.db.CollectionSheet -import com.mifos.objects.db.OfflineCenter -import com.mifos.objects.group.Center -import com.mifos.objects.group.CenterWithAssociations -import com.mifos.objects.group.Group -import com.mifos.objects.group.GroupWithAssociations -import com.mifos.objects.organisation.LoanProducts -import com.mifos.objects.organisation.Office -import com.mifos.objects.organisation.Staff -import com.mifos.objects.response.SaveResponse -import com.mifos.objects.templates.clients.ChargeTemplate -import com.mifos.objects.templates.loans.GroupLoanTemplate -import com.mifos.services.data.ChargesPayload -import com.mifos.services.data.GroupLoanPayload +package com.mifos.core.network + +import com.mifos.core.data.ChargesPayload +import com.mifos.core.data.GroupLoanPayload +import com.mifos.core.network.datamanager.DataManagerClient +import com.mifos.core.network.model.CollectionSheetPayload +import com.mifos.core.network.model.Payload +import com.mifos.core.objects.accounts.loan.LoanApproval +import com.mifos.core.objects.accounts.loan.LoanWithAssociations +import com.mifos.core.objects.accounts.loan.Loans +import com.mifos.core.objects.client.ChargeCreationResponse +import com.mifos.core.objects.client.Charges +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.db.CollectionSheet +import com.mifos.core.objects.db.OfflineCenter +import com.mifos.core.objects.group.Center +import com.mifos.core.objects.group.CenterWithAssociations +import com.mifos.core.objects.group.Group +import com.mifos.core.objects.group.GroupWithAssociations +import com.mifos.core.objects.organisation.LoanProducts +import com.mifos.core.objects.organisation.Office +import com.mifos.core.objects.organisation.Staff +import com.mifos.core.objects.response.SaveResponse +import com.mifos.core.objects.templates.clients.ChargeTemplate +import com.mifos.core.objects.templates.loans.GroupLoanTemplate import okhttp3.ResponseBody import rx.Observable import javax.inject.Inject diff --git a/mifosng-android/src/main/java/com/mifos/api/GenericRequest.kt b/core/network/src/main/java/com/mifos/core/network/GenericRequest.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/api/GenericRequest.kt rename to core/network/src/main/java/com/mifos/core/network/GenericRequest.kt index 4325077c449..6d9c6c7ec16 100644 --- a/mifosng-android/src/main/java/com/mifos/api/GenericRequest.kt +++ b/core/network/src/main/java/com/mifos/core/network/GenericRequest.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api +package com.mifos.core.network /** * Created by ishankhanna on 24/06/14. diff --git a/mifosng-android/src/main/java/com/mifos/api/GenericResponse.kt b/core/network/src/main/java/com/mifos/core/network/GenericResponse.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/api/GenericResponse.kt rename to core/network/src/main/java/com/mifos/core/network/GenericResponse.kt index b63459e194e..e3fa646de5d 100644 --- a/mifosng-android/src/main/java/com/mifos/api/GenericResponse.kt +++ b/core/network/src/main/java/com/mifos/core/network/GenericResponse.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api +package com.mifos.core.network /** * Created by ishankhanna on 24/06/14. diff --git a/mifosng-android/src/main/java/com/mifos/api/MifosInterceptor.kt b/core/network/src/main/java/com/mifos/core/network/MifosInterceptor.kt similarity index 66% rename from mifosng-android/src/main/java/com/mifos/api/MifosInterceptor.kt rename to core/network/src/main/java/com/mifos/core/network/MifosInterceptor.kt index c408a58d6d7..935a833588d 100644 --- a/mifosng-android/src/main/java/com/mifos/api/MifosInterceptor.kt +++ b/core/network/src/main/java/com/mifos/core/network/MifosInterceptor.kt @@ -2,23 +2,25 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api +package com.mifos.core.network -import com.mifos.utils.PrefManager +import com.mifos.core.datastore.PrefManager import okhttp3.Interceptor import okhttp3.Response import java.io.IOException +import javax.inject.Inject /** * @author fomenkoo */ -class MifosInterceptor : Interceptor { +class MifosInterceptor(private val prefManager: PrefManager) : Interceptor { + @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { val chianrequest = chain.request() val builder = chianrequest.newBuilder() - .header(HEADER_TENANT, PrefManager.getTenant()) - if (PrefManager.isAuthenticated()) builder.header(HEADER_AUTH, PrefManager.getToken()) + .header(HEADER_TENANT, prefManager.getTenant()) + if (prefManager.isAuthenticated()) builder.header(HEADER_AUTH, prefManager.getToken()) val request = builder.build() return chain.proceed(request) } diff --git a/mifosng-android/src/main/java/com/mifos/api/MifosOkHttpClient.kt b/core/network/src/main/java/com/mifos/core/network/MifosOkHttpClient.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/api/MifosOkHttpClient.kt rename to core/network/src/main/java/com/mifos/core/network/MifosOkHttpClient.kt index 8a33579d429..f7148ce6fc5 100644 --- a/mifosng-android/src/main/java/com/mifos/api/MifosOkHttpClient.kt +++ b/core/network/src/main/java/com/mifos/core/network/MifosOkHttpClient.kt @@ -1,6 +1,7 @@ -package com.mifos.api +package com.mifos.core.network import com.facebook.stetho.okhttp3.StethoInterceptor +import com.mifos.core.datastore.PrefManager import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import java.security.SecureRandom @@ -14,7 +15,7 @@ import javax.net.ssl.X509TrustManager /** * Created by Rajan Maurya on 16/06/16. */ -class MifosOkHttpClient { +class MifosOkHttpClient(private val prefManager: PrefManager) { // Create a trust manager that does not validate certificate chains val mifosOkHttpClient: OkHttpClient @@ -84,7 +85,7 @@ class MifosOkHttpClient { //Interceptor :> Full Body Logger and ApiRequest Header builder.addInterceptor(logger) - builder.addInterceptor(MifosInterceptor()) + builder.addInterceptor(MifosInterceptor(prefManager)) builder.addNetworkInterceptor(StethoInterceptor()) return builder.build() } diff --git a/mifosng-android/src/main/java/com/mifos/api/UnsafeSSLSocketFactory.kt b/core/network/src/main/java/com/mifos/core/network/UnsafeSSLSocketFactory.kt similarity index 98% rename from mifosng-android/src/main/java/com/mifos/api/UnsafeSSLSocketFactory.kt rename to core/network/src/main/java/com/mifos/core/network/UnsafeSSLSocketFactory.kt index f298171224d..4341518e1a1 100644 --- a/mifosng-android/src/main/java/com/mifos/api/UnsafeSSLSocketFactory.kt +++ b/core/network/src/main/java/com/mifos/core/network/UnsafeSSLSocketFactory.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api +package com.mifos.core.network import java.io.IOException import java.net.InetAddress diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerAuth.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerAuth.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerAuth.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerAuth.kt index aaecdb9363b..630d1ed4a77 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerAuth.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerAuth.kt @@ -1,4 +1,4 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager import org.apache.fineract.client.models.PostAuthenticationRequest import org.apache.fineract.client.models.PostAuthenticationResponse diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCenter.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCenter.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCenter.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCenter.kt index 9a66572e12b..0301eaba2cc 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCenter.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCenter.kt @@ -1,22 +1,20 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.api.local.databasehelper.DatabaseHelperCenter -import com.mifos.mappers.centers.GetCentersResponseMapper -import com.mifos.mappers.offices.GetOfficeResponseMapper -import com.mifos.objects.accounts.CenterAccounts -import com.mifos.objects.client.ActivatePayload -import com.mifos.objects.client.Page -import com.mifos.objects.group.Center -import com.mifos.objects.group.CenterWithAssociations -import com.mifos.objects.organisation.Office -import com.mifos.objects.response.SaveResponse -import com.mifos.services.data.CenterPayload -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.data.CenterPayload +import com.mifos.core.databasehelper.DatabaseHelperCenter +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.mappers.centers.GetCentersResponseMapper +import com.mifos.core.network.mappers.offices.GetOfficeResponseMapper +import com.mifos.core.objects.accounts.CenterAccounts +import com.mifos.core.objects.client.ActivatePayload +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.Center +import com.mifos.core.objects.group.CenterWithAssociations +import com.mifos.core.objects.organisation.Office +import com.mifos.core.objects.response.SaveResponse import org.apache.fineract.client.models.PostCentersCenterIdRequest import org.apache.fineract.client.models.PostCentersCenterIdResponse -import org.apache.fineract.client.models.PostClientsClientIdRequest import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -31,7 +29,8 @@ import javax.inject.Singleton class DataManagerCenter @Inject constructor( val mBaseApiManager: BaseApiManager, private val mDatabaseHelperCenter: DatabaseHelperCenter, - private val baseApiManager : org.mifos.core.apimanager.BaseApiManager + private val baseApiManager: org.mifos.core.apimanager.BaseApiManager, + private val prefManager: PrefManager ) { /** * This Method sending the Request to REST API if UserStatus is 0 and @@ -50,12 +49,13 @@ class DataManagerCenter @Inject constructor( * @return Centers List page from offset to max Limit */ fun getCenters(paged: Boolean, offset: Int, limit: Int): Observable> { - return when (userStatus) { + return when (prefManager.userStatus) { false -> baseApiManager.getCenterApi() .retrieveAll23( null, null, null, null, null, paged, offset, limit, null, null, null, null, null ).map(GetCentersResponseMapper::mapFromEntity) + true -> { /** * Return All Centers List from DatabaseHelperCenter only one time. @@ -109,7 +109,7 @@ class DataManagerCenter @Inject constructor( } fun createCenter(centerPayload: CenterPayload): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.centerApi.createCenter(centerPayload) true -> /** @@ -125,7 +125,7 @@ class DataManagerCenter @Inject constructor( * @return CenterWithAssociations */ fun getCenterWithAssociations(centerId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.centerApi.getAllGroupsForCenter(centerId) true -> /** @@ -188,11 +188,13 @@ class DataManagerCenter @Inject constructor( centerId: Int, activatePayload: ActivatePayload? ): Observable { - return baseApiManager.getCenterApi().activate2(centerId.toLong(), + return baseApiManager.getCenterApi().activate2( + centerId.toLong(), PostCentersCenterIdRequest().apply { closureDate = activatePayload?.activationDate dateFormat = activatePayload?.dateFormat locale = activatePayload?.locale - },"activate") + }, "activate" + ) } } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCharge.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCharge.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCharge.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCharge.kt index c7a41e26fc8..e0632fae4a2 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCharge.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCharge.kt @@ -1,10 +1,10 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.local.databasehelper.DatabaseHelperCharge -import com.mifos.objects.client.Charges -import com.mifos.objects.client.Page -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.databasehelper.DatabaseHelperCharge +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.objects.client.Charges +import com.mifos.core.objects.client.Page import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -20,7 +20,8 @@ import javax.inject.Singleton @Singleton class DataManagerCharge @Inject constructor( val mBaseApiManager: BaseApiManager, - val mDatabaseHelperCharge: DatabaseHelperCharge + val mDatabaseHelperCharge: DatabaseHelperCharge, + private val prefManager: PrefManager ) { /** * This Method Request the Charge API at @@ -34,7 +35,7 @@ class DataManagerCharge @Inject constructor( * where position is Starting according to offset> */ fun getClientCharges(clientId: Int, offset: Int, limit: Int): Observable> { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.chargeApi.getListOfCharges(clientId, offset, limit) .concatMap { chargesPage -> mDatabaseHelperCharge.saveClientCharges(chargesPage, clientId) diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCheckerInbox.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCheckerInbox.kt similarity index 76% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCheckerInbox.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCheckerInbox.kt index bd73a159633..359c483dca3 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCheckerInbox.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCheckerInbox.kt @@ -1,17 +1,18 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.objects.CheckerTask -import com.mifos.objects.checkerinboxandtasks.CheckerInboxSearchTemplate -import com.mifos.objects.checkerinboxandtasks.RescheduleLoansTask +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.checkerinboxandtasks.CheckerInboxSearchTemplate +import com.mifos.core.objects.checkerinboxandtasks.CheckerTask +import com.mifos.core.objects.checkerinboxandtasks.RescheduleLoansTask import rx.Observable import javax.inject.Inject -class DataManagerCheckerInbox @Inject constructor() { - //class DataManagerCheckerInbox { - val mBaseApiManager = BaseApiManager() +class DataManagerCheckerInbox @Inject constructor( + private val mBaseApiManager: BaseApiManager +) { + fun getCheckerTaskList( actionName: String? = null, entityName: String? = null, diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerClient.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerClient.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerClient.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerClient.kt index ecb102109c4..43dc93a6407 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerClient.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerClient.kt @@ -1,25 +1,25 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.api.local.databasehelper.DatabaseHelperClient -import com.mifos.mappers.clients.GetClientResponseMapper -import com.mifos.mappers.clients.GetClientsClientIdAccountMapper -import com.mifos.mappers.clients.GetIdentifiersTemplateMapper -import com.mifos.mappers.clients.IdentifierMapper -import com.mifos.objects.accounts.ClientAccounts -import com.mifos.objects.client.ActivatePayload -import com.mifos.objects.client.Client -import com.mifos.objects.client.ClientAddressRequest -import com.mifos.objects.client.ClientAddressResponse -import com.mifos.objects.client.ClientPayload -import com.mifos.objects.client.Page -import com.mifos.objects.noncore.Identifier -import com.mifos.objects.noncore.IdentifierCreationResponse -import com.mifos.objects.noncore.IdentifierPayload -import com.mifos.objects.noncore.IdentifierTemplate -import com.mifos.objects.templates.clients.ClientsTemplate -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.databasehelper.DatabaseHelperClient +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.network.mappers.clients.GetClientResponseMapper +import com.mifos.core.network.mappers.clients.GetClientsClientIdAccountMapper +import com.mifos.core.network.mappers.clients.GetIdentifiersTemplateMapper +import com.mifos.core.network.mappers.clients.IdentifierMapper +import com.mifos.core.objects.accounts.ClientAccounts +import com.mifos.core.objects.client.ActivatePayload +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.ClientAddressRequest +import com.mifos.core.objects.client.ClientAddressResponse +import com.mifos.core.objects.client.ClientPayload +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.noncore.Identifier +import com.mifos.core.objects.noncore.IdentifierCreationResponse +import com.mifos.core.objects.noncore.IdentifierPayload +import com.mifos.core.objects.noncore.IdentifierTemplate +import com.mifos.core.objects.templates.clients.ClientsTemplate import okhttp3.MultipartBody import okhttp3.ResponseBody import org.apache.fineract.client.models.DeleteClientsClientIdIdentifiersIdentifierIdResponse @@ -38,7 +38,8 @@ import javax.inject.Singleton class DataManagerClient @Inject constructor( val mBaseApiManager: BaseApiManager, private val mDatabaseHelperClient: DatabaseHelperClient, - private val baseApiManager: org.mifos.core.apimanager.BaseApiManager + private val baseApiManager: org.mifos.core.apimanager.BaseApiManager, + private val prefManager: PrefManager ) { /** * This Method sending the Request to REST API if UserStatus is 0 and @@ -57,7 +58,7 @@ class DataManagerClient @Inject constructor( * @return Client List from offset to max Limit */ fun getAllClients(paged: Boolean, offset: Int, limit: Int): Observable> { - return when (userStatus) { + return when (prefManager.userStatus) { false -> baseApiManager.getClientsApi().retrieveAll21( null, null, null, null, null, null, @@ -92,7 +93,7 @@ class DataManagerClient @Inject constructor( * @return The Client Details */ fun getClient(clientId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.clientsApi.getClient(clientId) .concatMap { client -> Observable.just(client) } @@ -120,7 +121,7 @@ class DataManagerClient @Inject constructor( * @return All Clients Account, Like Savings, Loan etc Accounts. */ fun getClientAccounts(clientId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> baseApiManager.getClientsApi().retrieveAssociatedAccounts(clientId.toLong()) .map(GetClientsClientIdAccountMapper::mapFromEntity) @@ -188,7 +189,7 @@ class DataManagerClient @Inject constructor( * @return ClientTemplate */ val clientTemplate: Observable - get() = when (userStatus) { + get() = when (prefManager.userStatus) { false -> mBaseApiManager.clientsApi.clientTemplate .concatMap { clientsTemplate -> mDatabaseHelperClient.saveClientTemplate( @@ -215,7 +216,7 @@ class DataManagerClient @Inject constructor( * @return Client */ fun createClient(clientPayload: ClientPayload): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.clientsApi.createClient(clientPayload) .concatMap { client -> Observable.just(client) } @@ -303,8 +304,14 @@ class DataManagerClient @Inject constructor( * @param identifierId Identifier Id * @return GenericResponse */ - fun deleteClientIdentifier(clientId: Int, identifierId: Int): Observable { - return baseApiManager.getClient().clientIdentifiers.deleteClientIdentifier(clientId.toLong(),identifierId.toLong()) + fun deleteClientIdentifier( + clientId: Int, + identifierId: Int + ): Observable { + return baseApiManager.getClient().clientIdentifiers.deleteClientIdentifier( + clientId.toLong(), + identifierId.toLong() + ) } /** @@ -375,11 +382,13 @@ class DataManagerClient @Inject constructor( clientId: Int, clientActivate: ActivatePayload? ): Observable { - return baseApiManager.getClientsApi().activate1(clientId.toLong(), + return baseApiManager.getClientsApi().activate1( + clientId.toLong(), PostClientsClientIdRequest().apply { activationDate = clientActivate?.activationDate dateFormat = clientActivate?.dateFormat locale = clientActivate?.locale - },"activate") + }, "activate" + ) } } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCollectionSheet.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCollectionSheet.kt similarity index 72% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCollectionSheet.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCollectionSheet.kt index 5506d716847..385c7b6711e 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerCollectionSheet.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerCollectionSheet.kt @@ -1,16 +1,16 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.api.model.IndividualCollectionSheetPayload -import com.mifos.api.model.RequestCollectionSheetPayload -import com.mifos.objects.collectionsheet.CenterDetail -import com.mifos.objects.collectionsheet.CollectionSheetPayload -import com.mifos.objects.collectionsheet.CollectionSheetRequestPayload -import com.mifos.objects.collectionsheet.CollectionSheetResponse -import com.mifos.objects.collectionsheet.IndividualCollectionSheet -import com.mifos.objects.collectionsheet.ProductiveCollectionSheetPayload -import com.mifos.objects.group.CenterWithAssociations +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.network.model.IndividualCollectionSheetPayload +import com.mifos.core.network.model.RequestCollectionSheetPayload +import com.mifos.core.objects.collectionsheet.CenterDetail +import com.mifos.core.objects.collectionsheet.CollectionSheetPayload +import com.mifos.core.objects.collectionsheet.CollectionSheetRequestPayload +import com.mifos.core.objects.collectionsheet.CollectionSheetResponse +import com.mifos.core.objects.collectionsheet.IndividualCollectionSheet +import com.mifos.core.objects.collectionsheet.ProductiveCollectionSheetPayload +import com.mifos.core.objects.group.CenterWithAssociations import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -19,7 +19,9 @@ import javax.inject.Singleton * Created by Tarun on 22-07-2017. */ @Singleton -class DataManagerCollectionSheet @Inject constructor(private val mBaseApiManager: BaseApiManager) { +class DataManagerCollectionSheet @Inject constructor( + private val mBaseApiManager: BaseApiManager +) { /** * Individual CollectionSheet API */ diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerDataTable.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerDataTable.kt similarity index 76% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerDataTable.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerDataTable.kt index 7d31f2c8ba8..8f4760b033d 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerDataTable.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerDataTable.kt @@ -1,14 +1,13 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager import com.google.gson.JsonArray -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.api.local.databasehelper.DatabaseHelperDataTable -import com.mifos.mappers.dataTable.GetDataTablesResponseMapper -import com.mifos.objects.noncore.DataTable -import com.mifos.objects.user.UserLocation +import com.mifos.core.databasehelper.DatabaseHelperDataTable +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.network.mappers.dataTable.GetDataTablesResponseMapper +import com.mifos.core.objects.noncore.DataTable +import com.mifos.core.objects.user.UserLocation import org.apache.fineract.client.models.DeleteDataTablesDatatableAppTableIdDatatableIdResponse -import org.apache.fineract.client.models.GetDataTablesResponse import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -36,7 +35,8 @@ class DataManagerDataTable @Inject constructor( */ fun getDataTable(tableName: String?): Observable> { return baseApiManager.getDataTableApi().getDatatables(tableName).map( - GetDataTablesResponseMapper::mapFromEntityList) + GetDataTablesResponseMapper::mapFromEntityList + ) } fun getDataTableInfo(table: String?, entityId: Int): Observable { @@ -50,8 +50,13 @@ class DataManagerDataTable @Inject constructor( .createEntryInDataTable(table, entityId, payload) } - fun deleteDataTableEntry(table: String?, entity: Int, rowId: Int): Observable { - return baseApiManager.getDataTableApi().deleteDatatableEntries1(table,entity.toLong(),rowId.toLong()) + fun deleteDataTableEntry( + table: String?, + entity: Int, + rowId: Int + ): Observable { + return baseApiManager.getDataTableApi() + .deleteDatatableEntries1(table, entity.toLong(), rowId.toLong()) } /** diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerDocument.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerDocument.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerDocument.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerDocument.kt index 16091d71449..56c0b57cf2a 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerDocument.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerDocument.kt @@ -1,8 +1,8 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.objects.noncore.Document +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.noncore.Document import okhttp3.MultipartBody import okhttp3.ResponseBody import rx.Observable diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerGroups.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerGroups.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerGroups.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerGroups.kt index 30ce0d5d2ca..4ec8c0e9647 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerGroups.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerGroups.kt @@ -1,18 +1,18 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.api.local.databasehelper.DatabaseHelperClient -import com.mifos.api.local.databasehelper.DatabaseHelperGroups -import com.mifos.mappers.groups.GetGroupsResponseMapper -import com.mifos.objects.accounts.GroupAccounts -import com.mifos.objects.client.ActivatePayload -import com.mifos.objects.client.Page -import com.mifos.objects.group.Group -import com.mifos.objects.group.GroupPayload -import com.mifos.objects.group.GroupWithAssociations -import com.mifos.objects.response.SaveResponse -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.databasehelper.DatabaseHelperClient +import com.mifos.core.databasehelper.DatabaseHelperGroups +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.network.mappers.groups.GetGroupsResponseMapper +import com.mifos.core.objects.accounts.GroupAccounts +import com.mifos.core.objects.client.ActivatePayload +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.Group +import com.mifos.core.objects.group.GroupPayload +import com.mifos.core.objects.group.GroupWithAssociations +import com.mifos.core.objects.response.SaveResponse import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -28,7 +28,8 @@ class DataManagerGroups @Inject constructor( val mBaseApiManager: BaseApiManager, private val mDatabaseHelperGroups: DatabaseHelperGroups, private val mDatabaseHelperClient: DatabaseHelperClient, - private val baseApiManager: org.mifos.core.apimanager.BaseApiManager + private val baseApiManager: org.mifos.core.apimanager.BaseApiManager, + private val prefManager: PrefManager ) { /** * This Method sending the Request to REST API if UserStatus is 0 and @@ -47,7 +48,7 @@ class DataManagerGroups @Inject constructor( * @return Groups List page from offset to max Limit */ fun getGroups(paged: Boolean, offset: Int, limit: Int): Observable> { - return when (userStatus) { + return when (prefManager.userStatus) { false -> baseApiManager.getGroupApi().retrieveAll24( null, null, @@ -94,7 +95,7 @@ class DataManagerGroups @Inject constructor( * @return Group */ fun getGroup(groupId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.groupApi.getGroup(groupId) true -> /** @@ -120,7 +121,7 @@ class DataManagerGroups @Inject constructor( * @return GroupWithAssociations */ fun getGroupWithAssociations(groupId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.groupApi.getGroupWithAssociations(groupId) true -> /** @@ -138,7 +139,7 @@ class DataManagerGroups @Inject constructor( * @return GroupAccounts */ fun getGroupAccounts(groupId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.groupApi.getGroupAccounts(groupId) true -> /** @@ -173,7 +174,7 @@ class DataManagerGroups @Inject constructor( * @return Group */ fun createGroup(groupPayload: GroupPayload): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.groupApi.createGroup(groupPayload) true -> /** diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerLoan.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerLoan.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerLoan.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerLoan.kt index afdf89bcdb8..ca28c09370a 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerLoan.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerLoan.kt @@ -1,20 +1,19 @@ -package com.mifos.api.datamanager - -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.api.local.databasehelper.DatabaseHelperLoan -import com.mifos.objects.PaymentTypeOption -import com.mifos.objects.accounts.loan.LoanDisbursement -import com.mifos.objects.accounts.loan.LoanRepaymentRequest -import com.mifos.objects.accounts.loan.LoanRepaymentResponse -import com.mifos.objects.accounts.loan.LoanWithAssociations -import com.mifos.objects.accounts.loan.Loans -import com.mifos.objects.organisation.LoanProducts -import com.mifos.objects.templates.loans.LoanRepaymentTemplate -import com.mifos.objects.templates.loans.LoanTemplate -import com.mifos.objects.templates.loans.LoanTransactionTemplate -import com.mifos.services.data.LoansPayload -import com.mifos.utils.PrefManager.userStatus +package com.mifos.core.network.datamanager + +import com.mifos.core.data.LoansPayload +import com.mifos.core.databasehelper.DatabaseHelperLoan +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.accounts.loan.LoanDisbursement +import com.mifos.core.objects.accounts.loan.LoanRepaymentRequest +import com.mifos.core.objects.accounts.loan.LoanRepaymentResponse +import com.mifos.core.objects.accounts.loan.LoanWithAssociations +import com.mifos.core.objects.accounts.loan.Loans +import com.mifos.core.objects.organisation.LoanProducts +import com.mifos.core.objects.templates.loans.LoanRepaymentTemplate +import com.mifos.core.objects.templates.loans.LoanTemplate +import com.mifos.core.objects.templates.loans.LoanTransactionTemplate import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -25,7 +24,8 @@ import javax.inject.Singleton @Singleton class DataManagerLoan @Inject constructor( val mBaseApiManager: BaseApiManager, - val mDatabaseHelperLoan: DatabaseHelperLoan + val mDatabaseHelperLoan: DatabaseHelperLoan, + private val prefManager: PrefManager ) { /** * This Method sending the Request to REST API if UserStatus is 0 and @@ -42,7 +42,7 @@ class DataManagerLoan @Inject constructor( * @return LoanWithAssociation */ fun getLoanById(loanId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.loanApi.getLoanByIdWithAllAssociations(loanId) true -> /** @@ -102,7 +102,7 @@ class DataManagerLoan @Inject constructor( * @return LoanRepaymentTemplate */ fun getLoanRepayTemplate(loanId: Int): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.loanApi.getLoanRepaymentTemplate(loanId) true -> /** @@ -153,7 +153,7 @@ class DataManagerLoan @Inject constructor( loanId: Int, request: LoanRepaymentRequest ): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.loanApi.submitPayment(loanId, request) .concatMap { loanRepaymentResponse -> Observable.just(loanRepaymentResponse) } @@ -200,7 +200,7 @@ class DataManagerLoan @Inject constructor( * * @return List */ - val paymentTypeOption: Observable> + val paymentTypeOption: Observable> get() = mDatabaseHelperLoan.paymentTypeOption /** diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerNote.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerNote.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerNote.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerNote.kt index ee3454a438c..0015cdb1aab 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerNote.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerNote.kt @@ -1,8 +1,8 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.local.databasehelper.DatabaseHelperNote -import com.mifos.objects.noncore.Note +import com.mifos.core.databasehelper.DatabaseHelperNote +import com.mifos.core.network.BaseApiManager +import com.mifos.core.objects.noncore.Note import rx.Observable import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerOffices.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerOffices.kt similarity index 74% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerOffices.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerOffices.kt index 81ed45d24c0..4017f5a2436 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerOffices.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerOffices.kt @@ -1,10 +1,10 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.local.databasehelper.DatabaseHelperOffices -import com.mifos.mappers.offices.GetOfficeResponseMapper -import com.mifos.objects.organisation.Office -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.databasehelper.DatabaseHelperOffices +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.mappers.offices.GetOfficeResponseMapper +import com.mifos.core.objects.organisation.Office import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -20,13 +20,14 @@ import javax.inject.Singleton class DataManagerOffices @Inject constructor( val mBaseApiManager: BaseApiManager, private val mDatabaseHelperOffices: DatabaseHelperOffices, - private val baseApiManager: org.mifos.core.apimanager.BaseApiManager + private val baseApiManager: org.mifos.core.apimanager.BaseApiManager, + private val prefManager: PrefManager ) { /** * return all List of Offices from DatabaseHelperOffices */ val offices: Observable> - get() = when (userStatus) { + get() = when (prefManager.userStatus) { false -> baseApiManager.getOfficeApi().retrieveOffices(null, null, null) .map(GetOfficeResponseMapper::mapFromEntityList) diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerRunReport.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerRunReport.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerRunReport.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerRunReport.kt index b593d5516bd..1d7ae194e89 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerRunReport.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerRunReport.kt @@ -1,9 +1,9 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.objects.group.CenterInfo -import com.mifos.objects.runreports.FullParameterListResponse -import com.mifos.objects.runreports.client.ClientReportTypeItem +import com.mifos.core.network.BaseApiManager +import com.mifos.core.objects.group.CenterInfo +import com.mifos.core.objects.runreports.FullParameterListResponse +import com.mifos.core.objects.runreports.client.ClientReportTypeItem import rx.Observable import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSavings.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSavings.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSavings.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSavings.kt index e74d0acfa5d..5443e0ca8cd 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSavings.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSavings.kt @@ -1,18 +1,18 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.GenericResponse -import com.mifos.api.local.databasehelper.DatabaseHelperSavings -import com.mifos.objects.accounts.loan.SavingsApproval -import com.mifos.objects.accounts.savings.SavingsAccountTransactionRequest -import com.mifos.objects.accounts.savings.SavingsAccountTransactionResponse -import com.mifos.objects.accounts.savings.SavingsAccountWithAssociations -import com.mifos.objects.client.Savings -import com.mifos.objects.organisation.ProductSavings -import com.mifos.objects.templates.savings.SavingProductsTemplate -import com.mifos.objects.templates.savings.SavingsAccountTransactionTemplate -import com.mifos.services.data.SavingsPayload -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.data.SavingsPayload +import com.mifos.core.databasehelper.DatabaseHelperSavings +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.accounts.loan.SavingsApproval +import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionRequest +import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionResponse +import com.mifos.core.objects.accounts.savings.SavingsAccountWithAssociations +import com.mifos.core.objects.client.Savings +import com.mifos.core.objects.organisation.ProductSavings +import com.mifos.core.objects.templates.savings.SavingProductsTemplate +import com.mifos.core.objects.templates.savings.SavingsAccountTransactionTemplate import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -24,7 +24,8 @@ import javax.inject.Singleton @Singleton class DataManagerSavings @Inject constructor( val mBaseApiManager: BaseApiManager, - val mDatabaseHelperSavings: DatabaseHelperSavings + val mDatabaseHelperSavings: DatabaseHelperSavings, + private val prefManager: PrefManager ) { /** * This Method Make the Request to the REST API @@ -44,7 +45,7 @@ class DataManagerSavings @Inject constructor( fun getSavingsAccount( type: String?, savingsAccountId: Int, association: String? ): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.savingsApi.getSavingsAccountWithAssociations( type, savingsAccountId, association ) @@ -112,7 +113,7 @@ class DataManagerSavings @Inject constructor( fun getSavingsAccountTransactionTemplate( type: String?, savingsAccountId: Int, transactionType: String? ): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.savingsApi.getSavingsAccountTransactionTemplate( type, savingsAccountId, transactionType @@ -170,7 +171,7 @@ class DataManagerSavings @Inject constructor( savingsAccountType: String?, savingsAccountId: Int, transactionType: String?, request: SavingsAccountTransactionRequest ): Observable { - return when (userStatus) { + return when (prefManager.userStatus) { false -> mBaseApiManager.savingsApi.processTransaction( savingsAccountType, savingsAccountId, transactionType, request @@ -243,7 +244,7 @@ class DataManagerSavings @Inject constructor( ) } - val savingsAccounts : Observable> + val savingsAccounts: Observable> get() = mBaseApiManager.savingsApi.allSavingsAccounts fun createSavingsAccount(savingsPayload: SavingsPayload?): Observable { diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSearch.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSearch.kt similarity index 77% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSearch.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSearch.kt index e4d6029f748..2e85a36fdb2 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSearch.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSearch.kt @@ -1,7 +1,7 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.objects.SearchedEntity +import com.mifos.core.network.BaseApiManager +import com.mifos.core.objects.SearchedEntity import rx.Observable import javax.inject.Inject import javax.inject.Singleton diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerStaff.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerStaff.kt similarity index 68% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerStaff.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerStaff.kt index 200c6c2f99d..b7727c4b1ae 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerStaff.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerStaff.kt @@ -1,10 +1,10 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.local.databasehelper.DatabaseHelperStaff -import com.mifos.mappers.staffs.StaffMapper -import com.mifos.objects.organisation.Staff -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.databasehelper.DatabaseHelperStaff +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.network.mappers.staffs.StaffMapper +import com.mifos.core.objects.organisation.Staff import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -16,14 +16,15 @@ import javax.inject.Singleton class DataManagerStaff @Inject constructor( val mBaseApiManager: BaseApiManager, private val mDatabaseHelperStaff: DatabaseHelperStaff, - private val baseApiManager: org.mifos.core.apimanager.BaseApiManager + private val baseApiManager: org.mifos.core.apimanager.BaseApiManager, + private val prefManager: PrefManager ) { /** * @param officeId * @return */ fun getStaffInOffice(officeId: Int): Observable> { - return when (userStatus) { + return when (prefManager.userStatus) { false -> baseApiManager.getStaffApi().retrieveAll16(officeId.toLong(), null, null, null) .map(StaffMapper::mapFromEntityList) diff --git a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSurveys.kt b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSurveys.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSurveys.kt rename to core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSurveys.kt index 2b8b568dec7..6ff3318105b 100644 --- a/mifosng-android/src/main/java/com/mifos/api/datamanager/DataManagerSurveys.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanager/DataManagerSurveys.kt @@ -1,12 +1,12 @@ -package com.mifos.api.datamanager +package com.mifos.core.network.datamanager -import com.mifos.api.BaseApiManager -import com.mifos.api.local.databasehelper.DatabaseHelperSurveys -import com.mifos.objects.survey.QuestionDatas -import com.mifos.objects.survey.ResponseDatas -import com.mifos.objects.survey.Scorecard -import com.mifos.objects.survey.Survey -import com.mifos.utils.PrefManager.userStatus +import com.mifos.core.databasehelper.DatabaseHelperSurveys +import com.mifos.core.datastore.PrefManager +import com.mifos.core.network.BaseApiManager +import com.mifos.core.objects.survey.QuestionDatas +import com.mifos.core.objects.survey.ResponseDatas +import com.mifos.core.objects.survey.Scorecard +import com.mifos.core.objects.survey.Survey import rx.Observable import javax.inject.Inject import javax.inject.Singleton @@ -20,7 +20,8 @@ import javax.inject.Singleton @Singleton class DataManagerSurveys @Inject constructor( val mBaseApiManager: BaseApiManager, - private val mDatabaseHelperSurveys: DatabaseHelperSurveys + private val mDatabaseHelperSurveys: DatabaseHelperSurveys, + private val prefManager: PrefManager ) { /** * This Method sending the Request to REST API : @@ -30,7 +31,7 @@ class DataManagerSurveys @Inject constructor( * @return Observable> */ val allSurvey: Observable> - get() = when (userStatus) { + get() = when (prefManager.userStatus) { false -> mBaseApiManager.surveyApi.allSurveys true -> mDatabaseHelperSurveys.readAllSurveys() } diff --git a/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerAuth.kt b/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerAuth.kt index 0a1ca8a8696..44ee3856aed 100644 --- a/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerAuth.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerAuth.kt @@ -1,6 +1,5 @@ package com.mifos.core.network.datamanger -import com.mifos.core.network.di.BaseApiManagerQualifier import org.apache.fineract.client.models.PostAuthenticationRequest import org.apache.fineract.client.models.PostAuthenticationResponse import org.mifos.core.apimanager.BaseApiManager @@ -12,7 +11,7 @@ import javax.inject.Singleton * Created by Rajan Maurya on 19/02/17. */ @Singleton -class DataManagerAuth @Inject constructor(@BaseApiManagerQualifier private val baseApiManager: BaseApiManager) { +class DataManagerAuth @Inject constructor(private val baseApiManager: BaseApiManager) { /** * @param username Username * @param password Password diff --git a/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerClient.kt b/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerClient.kt index f5bf124fcfe..6653c96aaf0 100644 --- a/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerClient.kt +++ b/core/network/src/main/java/com/mifos/core/network/datamanger/DataManagerClient.kt @@ -1,20 +1,17 @@ package com.mifos.core.network.datamanger -import com.mifos.core.common.utils.Page -import com.mifos.core.data.model.client.Client import com.mifos.core.database.DatabaseClientQuery -import com.mifos.core.datastore.PrefManager import com.mifos.core.model.ClientDb -import com.mifos.core.network.di.BaseApiManagerQualifier import com.mifos.core.network.mappers.clients.GetClientResponseMapper -import io.realm.kotlin.Realm +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Page import kotlinx.coroutines.flow.Flow import org.mifos.core.apimanager.BaseApiManager import rx.Observable import javax.inject.Inject class DataManagerClient @Inject constructor( - @BaseApiManagerQualifier private val baseApiManager: BaseApiManager, + private val baseApiManager: BaseApiManager, private val databaseClientQuery: DatabaseClientQuery ) { diff --git a/core/network/src/main/java/com/mifos/core/network/di/BaseApiManagerQualifier.kt b/core/network/src/main/java/com/mifos/core/network/di/BaseApiManagerQualifier.kt deleted file mode 100644 index 2326c0bf2b7..00000000000 --- a/core/network/src/main/java/com/mifos/core/network/di/BaseApiManagerQualifier.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.mifos.core.network.di - -import javax.inject.Qualifier - -@Qualifier -@Retention(AnnotationRetention.BINARY) -annotation class BaseApiManagerQualifier \ No newline at end of file diff --git a/core/network/src/main/java/com/mifos/core/network/di/NetworkModule.kt b/core/network/src/main/java/com/mifos/core/network/di/NetworkModule.kt index fbf4a750ce1..17e9678cf71 100644 --- a/core/network/src/main/java/com/mifos/core/network/di/NetworkModule.kt +++ b/core/network/src/main/java/com/mifos/core/network/di/NetworkModule.kt @@ -1,10 +1,10 @@ package com.mifos.core.network.di import com.mifos.core.datastore.PrefManager -import com.mifos.core.model.ClientDb import com.mifos.core.model.ClientDateDb -import com.mifos.core.model.GroupDb +import com.mifos.core.model.ClientDb import com.mifos.core.model.GroupDateDb +import com.mifos.core.model.GroupDb import com.mifos.core.model.StatusDb import dagger.Module import dagger.Provides @@ -21,7 +21,12 @@ object NetworkModule { @Provides @Singleton - @BaseApiManagerQualifier + fun provideBaseApiManager(prefManager: PrefManager): com.mifos.core.network.BaseApiManager { + return com.mifos.core.network.BaseApiManager(prefManager) + } + + @Provides + @Singleton fun provideSdkBaseApiManager(prefManager: PrefManager): BaseApiManager { val usernamePassword: Pair = prefManager.usernamePassword val baseManager = BaseApiManager.getInstance() diff --git a/mifosng-android/src/main/java/com/mifos/mappers/centers/CenterMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/centers/CenterMapper.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/mappers/centers/CenterMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/centers/CenterMapper.kt index f8b1aaac028..5dfefe67483 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/centers/CenterMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/centers/CenterMapper.kt @@ -1,7 +1,7 @@ -package com.mifos.mappers.centers +package com.mifos.core.network.mappers.centers -import com.mifos.objects.client.Status -import com.mifos.objects.group.Center +import com.mifos.core.objects.client.Status +import com.mifos.core.objects.group.Center import org.apache.fineract.client.models.GetCentersPageItems import org.apache.fineract.client.models.GetCentersStatus import org.mifos.core.data.AbstractMapper diff --git a/mifosng-android/src/main/java/com/mifos/mappers/centers/GetCentersResponseMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/centers/GetCentersResponseMapper.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/mappers/centers/GetCentersResponseMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/centers/GetCentersResponseMapper.kt index befcb7be1cf..be44a4f1537 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/centers/GetCentersResponseMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/centers/GetCentersResponseMapper.kt @@ -1,7 +1,7 @@ -package com.mifos.mappers.centers +package com.mifos.core.network.mappers.centers -import com.mifos.objects.client.Page -import com.mifos.objects.group.Center +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.Center import org.apache.fineract.client.models.GetCentersResponse import org.mifos.core.data.AbstractMapper diff --git a/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientMapper.kt index ead20c30014..14b3790c091 100644 --- a/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientMapper.kt @@ -1,7 +1,7 @@ package com.mifos.core.network.mappers.clients -import com.mifos.core.data.model.client.Client -import com.mifos.core.data.model.client.Status +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Status import org.apache.fineract.client.models.GetClientStatus import org.apache.fineract.client.models.GetClientsPageItemsResponse import org.mifos.core.data.AbstractMapper diff --git a/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientToClientDbMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientToClientDbMapper.kt index 42b56747606..510c9104a1f 100644 --- a/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientToClientDbMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/clients/ClientToClientDbMapper.kt @@ -1,9 +1,9 @@ package com.mifos.core.network.mappers.clients -import com.mifos.core.data.model.client.Client -import com.mifos.core.data.model.client.Status import com.mifos.core.model.ClientDb import com.mifos.core.model.StatusDb +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Status import org.mifos.core.data.AbstractMapper object ClientToClientDbMapper : AbstractMapper() { diff --git a/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetClientResponseMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetClientResponseMapper.kt index 11617542329..8799eb9f2f6 100644 --- a/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetClientResponseMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetClientResponseMapper.kt @@ -1,7 +1,7 @@ package com.mifos.core.network.mappers.clients -import com.mifos.core.common.utils.Page -import com.mifos.core.data.model.client.Client +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Page import org.apache.fineract.client.models.GetClientsResponse import org.mifos.core.data.AbstractMapper diff --git a/mifosng-android/src/main/java/com/mifos/mappers/clients/GetClientsClientIdAccountMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetClientsClientIdAccountMapper.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/mappers/clients/GetClientsClientIdAccountMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/clients/GetClientsClientIdAccountMapper.kt index 83ad7f52a50..d28852af26c 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/clients/GetClientsClientIdAccountMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetClientsClientIdAccountMapper.kt @@ -1,12 +1,12 @@ -package com.mifos.mappers.clients +package com.mifos.core.network.mappers.clients -import com.mifos.objects.accounts.ClientAccounts -import com.mifos.objects.accounts.loan.LoanAccount -import com.mifos.objects.accounts.loan.LoanType -import com.mifos.objects.accounts.savings.Currency -import com.mifos.objects.accounts.savings.DepositType -import com.mifos.objects.accounts.savings.SavingsAccount -import com.mifos.objects.accounts.savings.Status +import com.mifos.core.objects.accounts.ClientAccounts +import com.mifos.core.objects.accounts.loan.LoanAccount +import com.mifos.core.objects.accounts.loan.LoanType +import com.mifos.core.objects.accounts.savings.Currency +import com.mifos.core.objects.accounts.savings.DepositType +import com.mifos.core.objects.accounts.savings.SavingsAccount +import com.mifos.core.objects.accounts.savings.Status import org.apache.fineract.client.models.GetClientsClientIdAccountsResponse import org.apache.fineract.client.models.GetClientsLoanAccounts import org.apache.fineract.client.models.GetClientsLoanAccountsStatus @@ -64,7 +64,7 @@ object GetClientsClientIdAccountMapper : externalId = it.externalId.toString() productId = it.productId productName = it.productName - status = com.mifos.objects.accounts.loan.Status().apply { + status = com.mifos.core.objects.accounts.loan.Status().apply { id = it.status?.id code = it.status?.code value = it.status?.description diff --git a/mifosng-android/src/main/java/com/mifos/mappers/clients/GetIdentifiersTemplateMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetIdentifiersTemplateMapper.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/mappers/clients/GetIdentifiersTemplateMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/clients/GetIdentifiersTemplateMapper.kt index 4701684b1e5..65d9a0ec118 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/clients/GetIdentifiersTemplateMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/clients/GetIdentifiersTemplateMapper.kt @@ -1,7 +1,7 @@ -package com.mifos.mappers.clients +package com.mifos.core.network.mappers.clients -import com.mifos.objects.noncore.DocumentType -import com.mifos.objects.noncore.IdentifierTemplate +import com.mifos.core.objects.noncore.DocumentType +import com.mifos.core.objects.noncore.IdentifierTemplate import org.apache.fineract.client.models.GetClientsAllowedDocumentTypes import org.apache.fineract.client.models.GetClientsClientIdIdentifiersTemplateResponse import org.mifos.core.data.AbstractMapper diff --git a/mifosng-android/src/main/java/com/mifos/mappers/clients/IdentifierMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/clients/IdentifierMapper.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/mappers/clients/IdentifierMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/clients/IdentifierMapper.kt index c10718d4cdf..67d3d24a8a0 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/clients/IdentifierMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/clients/IdentifierMapper.kt @@ -1,7 +1,7 @@ -package com.mifos.mappers.clients +package com.mifos.core.network.mappers.clients -import com.mifos.objects.noncore.DocumentType -import com.mifos.objects.noncore.Identifier +import com.mifos.core.objects.noncore.DocumentType +import com.mifos.core.objects.noncore.Identifier import org.apache.fineract.client.models.GetClientsClientIdIdentifiersResponse import org.apache.fineract.client.models.GetClientsDocumentType import org.mifos.core.data.AbstractMapper diff --git a/mifosng-android/src/main/java/com/mifos/mappers/dataTable/GetDataTablesResponseMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/dataTable/GetDataTablesResponseMapper.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/mappers/dataTable/GetDataTablesResponseMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/dataTable/GetDataTablesResponseMapper.kt index 279365ac059..46bbfb007e3 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/dataTable/GetDataTablesResponseMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/dataTable/GetDataTablesResponseMapper.kt @@ -1,7 +1,7 @@ -package com.mifos.mappers.dataTable +package com.mifos.core.network.mappers.dataTable -import com.mifos.objects.noncore.ColumnHeader -import com.mifos.objects.noncore.DataTable +import com.mifos.core.objects.noncore.ColumnHeader +import com.mifos.core.objects.noncore.DataTable import org.apache.fineract.client.models.GetDataTablesResponse import org.apache.fineract.client.models.ResultsetColumnHeaderData import org.mifos.core.data.AbstractMapper diff --git a/mifosng-android/src/main/java/com/mifos/mappers/groups/GetGroupsResponseMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/groups/GetGroupsResponseMapper.kt similarity index 84% rename from mifosng-android/src/main/java/com/mifos/mappers/groups/GetGroupsResponseMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/groups/GetGroupsResponseMapper.kt index 7f30f514366..da28801429e 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/groups/GetGroupsResponseMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/groups/GetGroupsResponseMapper.kt @@ -1,7 +1,7 @@ -package com.mifos.mappers.groups +package com.mifos.core.network.mappers.groups -import com.mifos.objects.client.Page -import com.mifos.objects.group.Group +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.Group import org.apache.fineract.client.models.GetGroupsResponse import org.mifos.core.data.AbstractMapper diff --git a/mifosng-android/src/main/java/com/mifos/mappers/groups/GroupMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/groups/GroupMapper.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/mappers/groups/GroupMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/groups/GroupMapper.kt index 91c816a1689..d11622167f7 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/groups/GroupMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/groups/GroupMapper.kt @@ -1,7 +1,7 @@ -package com.mifos.mappers.groups +package com.mifos.core.network.mappers.groups -import com.mifos.objects.client.Status -import com.mifos.objects.group.Group +import com.mifos.core.objects.client.Status +import com.mifos.core.objects.group.Group import org.apache.fineract.client.models.GetGroupsPageItems import org.apache.fineract.client.models.GetGroupsStatus import org.mifos.core.data.AbstractMapper diff --git a/mifosng-android/src/main/java/com/mifos/mappers/offices/GetOfficeResponseMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/offices/GetOfficeResponseMapper.kt similarity index 92% rename from mifosng-android/src/main/java/com/mifos/mappers/offices/GetOfficeResponseMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/offices/GetOfficeResponseMapper.kt index 40d0cf28c7d..b7c6afdefae 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/offices/GetOfficeResponseMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/offices/GetOfficeResponseMapper.kt @@ -1,6 +1,6 @@ -package com.mifos.mappers.offices +package com.mifos.core.network.mappers.offices -import com.mifos.objects.organisation.Office +import com.mifos.core.objects.organisation.Office import org.apache.fineract.client.models.GetOfficesResponse import org.mifos.core.data.AbstractMapper import java.util.Date diff --git a/mifosng-android/src/main/java/com/mifos/mappers/staffs/StaffMapper.kt b/core/network/src/main/java/com/mifos/core/network/mappers/staffs/StaffMapper.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/mappers/staffs/StaffMapper.kt rename to core/network/src/main/java/com/mifos/core/network/mappers/staffs/StaffMapper.kt index f0b7d2c3018..422d59ffd9d 100644 --- a/mifosng-android/src/main/java/com/mifos/mappers/staffs/StaffMapper.kt +++ b/core/network/src/main/java/com/mifos/core/network/mappers/staffs/StaffMapper.kt @@ -1,10 +1,10 @@ -package com.mifos.mappers.staffs +package com.mifos.core.network.mappers.staffs -import com.mifos.objects.organisation.Staff +import com.mifos.core.objects.organisation.Staff import org.apache.fineract.client.models.RetrieveOneResponse import org.mifos.core.data.AbstractMapper -object StaffMapper: AbstractMapper() { +object StaffMapper : AbstractMapper() { override fun mapFromEntity(entity: RetrieveOneResponse): Staff { return Staff().apply { id = entity.id!!.toInt() diff --git a/mifosng-android/src/main/java/com/mifos/api/model/Changes.kt b/core/network/src/main/java/com/mifos/core/network/model/Changes.kt similarity index 89% rename from mifosng-android/src/main/java/com/mifos/api/model/Changes.kt rename to core/network/src/main/java/com/mifos/core/network/model/Changes.kt index 9d08c8d5584..12b00b34c06 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/Changes.kt +++ b/core/network/src/main/java/com/mifos/core/network/model/Changes.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.model +package com.mifos.core.network.model import com.google.gson.Gson diff --git a/mifosng-android/src/main/java/com/mifos/api/model/CollectionSheetPayload.kt b/core/network/src/main/java/com/mifos/core/network/model/CollectionSheetPayload.kt similarity index 85% rename from mifosng-android/src/main/java/com/mifos/api/model/CollectionSheetPayload.kt rename to core/network/src/main/java/com/mifos/core/network/model/CollectionSheetPayload.kt index 1f2b56919b9..01a54a9a839 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/CollectionSheetPayload.kt +++ b/core/network/src/main/java/com/mifos/core/network/model/CollectionSheetPayload.kt @@ -2,9 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.model +package com.mifos.core.network.model import com.google.gson.Gson +import com.mifos.core.model.BulkRepaymentTransactions class CollectionSheetPayload : Payload() { var actualDisbursementDate: String? = null diff --git a/mifosng-android/src/main/java/com/mifos/api/model/DefaultPayload.kt b/core/network/src/main/java/com/mifos/core/network/model/DefaultPayload.kt similarity index 79% rename from mifosng-android/src/main/java/com/mifos/api/model/DefaultPayload.kt rename to core/network/src/main/java/com/mifos/core/network/model/DefaultPayload.kt index 1ecce88c8d6..681abc6ac43 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/DefaultPayload.kt +++ b/core/network/src/main/java/com/mifos/core/network/model/DefaultPayload.kt @@ -1,4 +1,4 @@ -package com.mifos.api.model +package com.mifos.core.network.model /** * Created by ADMIN on 16-Jun-15. diff --git a/core/network/src/main/java/com/mifos/core/network/model/IndividualCollectionSheetPayload.kt b/core/network/src/main/java/com/mifos/core/network/model/IndividualCollectionSheetPayload.kt new file mode 100644 index 00000000000..005b85b4333 --- /dev/null +++ b/core/network/src/main/java/com/mifos/core/network/model/IndividualCollectionSheetPayload.kt @@ -0,0 +1,20 @@ +package com.mifos.core.network.model + +import android.os.Parcelable +import com.mifos.core.model.BulkRepaymentTransactions +import kotlinx.parcelize.Parcelize + +/** + * Created by Tarun on 11-07-2017. + */ + +@Parcelize +data class IndividualCollectionSheetPayload( + var bulkRepaymentTransactions: ArrayList = ArrayList(), + var actualDisbursementDate: String? = null, + var bulkDisbursementTransactions: List = ArrayList(), + var bulkSavingsDueTransactions: List = ArrayList(), + var dateFormat: String = "dd MMMM YYYY", + var locale: String = "en", + var transactionDate: String? = null +) : Parcelable \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/model/Payload.kt b/core/network/src/main/java/com/mifos/core/network/model/Payload.kt similarity index 94% rename from mifosng-android/src/main/java/com/mifos/api/model/Payload.kt rename to core/network/src/main/java/com/mifos/core/network/model/Payload.kt index a5240e01c04..61e366e6b72 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/Payload.kt +++ b/core/network/src/main/java/com/mifos/core/network/model/Payload.kt @@ -2,7 +2,7 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.model +package com.mifos.core.network.model //TODO Remove calendarId and TransactionDate from this Payload class; open class Payload { diff --git a/mifosng-android/src/main/java/com/mifos/api/model/RequestCollectionSheetPayload.kt b/core/network/src/main/java/com/mifos/core/network/model/RequestCollectionSheetPayload.kt similarity index 87% rename from mifosng-android/src/main/java/com/mifos/api/model/RequestCollectionSheetPayload.kt rename to core/network/src/main/java/com/mifos/core/network/model/RequestCollectionSheetPayload.kt index 6476cd18804..732ec0ccb1b 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/RequestCollectionSheetPayload.kt +++ b/core/network/src/main/java/com/mifos/core/network/model/RequestCollectionSheetPayload.kt @@ -1,4 +1,4 @@ -package com.mifos.api.model +package com.mifos.core.network.model /** * Created by Tarun on 06-07-2017. diff --git a/mifosng-android/src/main/java/com/mifos/api/model/ScorecardPayload.kt b/core/network/src/main/java/com/mifos/core/network/model/ScorecardPayload.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/api/model/ScorecardPayload.kt rename to core/network/src/main/java/com/mifos/core/network/model/ScorecardPayload.kt index ac7e675365d..d03dcfbae8a 100644 --- a/mifosng-android/src/main/java/com/mifos/api/model/ScorecardPayload.kt +++ b/core/network/src/main/java/com/mifos/core/network/model/ScorecardPayload.kt @@ -2,9 +2,9 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.model +package com.mifos.core.network.model -import com.mifos.objects.survey.ScorecardValues +import com.mifos.core.objects.survey.ScorecardValues import java.util.Date /** diff --git a/mifosng-android/src/main/java/com/mifos/api/services/CenterService.kt b/core/network/src/main/java/com/mifos/core/network/services/CenterService.kt similarity index 81% rename from mifosng-android/src/main/java/com/mifos/api/services/CenterService.kt rename to core/network/src/main/java/com/mifos/core/network/services/CenterService.kt index e6d349976ea..944f06d888e 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/CenterService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/CenterService.kt @@ -2,21 +2,21 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.api.model.CollectionSheetPayload -import com.mifos.api.model.Payload -import com.mifos.objects.accounts.CenterAccounts -import com.mifos.objects.client.ActivatePayload -import com.mifos.objects.client.Page -import com.mifos.objects.db.CollectionSheet -import com.mifos.objects.db.OfflineCenter -import com.mifos.objects.group.Center -import com.mifos.objects.group.CenterWithAssociations -import com.mifos.objects.response.SaveResponse -import com.mifos.services.data.CenterPayload +import com.mifos.core.data.CenterPayload +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.network.model.CollectionSheetPayload +import com.mifos.core.network.model.Payload +import com.mifos.core.objects.accounts.CenterAccounts +import com.mifos.core.objects.client.ActivatePayload +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.db.CollectionSheet +import com.mifos.core.objects.db.OfflineCenter +import com.mifos.core.objects.group.Center +import com.mifos.core.objects.group.CenterWithAssociations +import com.mifos.core.objects.response.SaveResponse import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST diff --git a/mifosng-android/src/main/java/com/mifos/api/services/ChargeService.kt b/core/network/src/main/java/com/mifos/core/network/services/ChargeService.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/api/services/ChargeService.kt rename to core/network/src/main/java/com/mifos/core/network/services/ChargeService.kt index 226645f711f..c9fcbcfa4fc 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/ChargeService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/ChargeService.kt @@ -2,14 +2,14 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services - -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.client.ChargeCreationResponse -import com.mifos.objects.client.Charges -import com.mifos.objects.client.Page -import com.mifos.objects.templates.clients.ChargeTemplate -import com.mifos.services.data.ChargesPayload +package com.mifos.core.network.services + +import com.mifos.core.data.ChargesPayload +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.client.ChargeCreationResponse +import com.mifos.core.objects.client.Charges +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.templates.clients.ChargeTemplate import okhttp3.ResponseBody import retrofit2.http.Body import retrofit2.http.GET diff --git a/mifosng-android/src/main/java/com/mifos/api/services/CheckerInboxService.kt b/core/network/src/main/java/com/mifos/core/network/services/CheckerInboxService.kt similarity index 51% rename from mifosng-android/src/main/java/com/mifos/api/services/CheckerInboxService.kt rename to core/network/src/main/java/com/mifos/core/network/services/CheckerInboxService.kt index fa1ab0fb529..837110789ba 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/CheckerInboxService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/CheckerInboxService.kt @@ -1,20 +1,21 @@ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.CheckerTask -import com.mifos.objects.checkerinboxandtasks.CheckerInboxSearchTemplate -import com.mifos.objects.checkerinboxandtasks.RescheduleLoansTask +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.checkerinboxandtasks.CheckerInboxSearchTemplate +import com.mifos.core.objects.checkerinboxandtasks.CheckerTask +import com.mifos.core.objects.checkerinboxandtasks.RescheduleLoansTask import retrofit2.http.* import rx.Observable interface CheckerInboxService { @GET(APIEndPoint.MAKER_CHECKER) - fun getCheckerList(@Query("actionName") actionName: String? = null, - @Query("entityName") entityName: String? = null, - @Query("resourceId") resourceId: Int? = null) - : Observable> + fun getCheckerList( + @Query("actionName") actionName: String? = null, + @Query("entityName") entityName: String? = null, + @Query("resourceId") resourceId: Int? = null + ): Observable> @POST(APIEndPoint.MAKER_CHECKER + "/{auditId}?command=approve") fun approveCheckerEntry(@Path("auditId") auditId: Int): Observable @@ -32,9 +33,10 @@ interface CheckerInboxService { fun getCheckerInboxSearchTempalate(): Observable @GET(APIEndPoint.MAKER_CHECKER) - fun getCheckerTasksFromResourceId(@Query("actionName") actionName: String? = null, - @Query("entityName") entityName: String? = null, - @Query("resourceId") resourceId: Int? = null) - : Observable> + fun getCheckerTasksFromResourceId( + @Query("actionName") actionName: String? = null, + @Query("entityName") entityName: String? = null, + @Query("resourceId") resourceId: Int? = null + ): Observable> } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/services/ClientAccountsService.kt b/core/network/src/main/java/com/mifos/core/network/services/ClientAccountsService.kt similarity index 75% rename from mifosng-android/src/main/java/com/mifos/api/services/ClientAccountsService.kt rename to core/network/src/main/java/com/mifos/core/network/services/ClientAccountsService.kt index 8d091d967a3..1b782aa7780 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/ClientAccountsService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/ClientAccountsService.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.accounts.ClientAccounts +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.accounts.ClientAccounts import retrofit2.http.GET import retrofit2.http.Path import rx.Observable diff --git a/mifosng-android/src/main/java/com/mifos/api/services/ClientService.kt b/core/network/src/main/java/com/mifos/core/network/services/ClientService.kt similarity index 90% rename from mifosng-android/src/main/java/com/mifos/api/services/ClientService.kt rename to core/network/src/main/java/com/mifos/core/network/services/ClientService.kt index 5ae6eff17c1..88fc8eafc5b 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/ClientService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/ClientService.kt @@ -2,22 +2,22 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services - -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.accounts.ClientAccounts -import com.mifos.objects.client.ActivatePayload -import com.mifos.objects.client.Client -import com.mifos.objects.client.ClientAddressRequest -import com.mifos.objects.client.ClientAddressResponse -import com.mifos.objects.client.ClientPayload -import com.mifos.objects.client.Page -import com.mifos.objects.noncore.Identifier -import com.mifos.objects.noncore.IdentifierCreationResponse -import com.mifos.objects.noncore.IdentifierPayload -import com.mifos.objects.noncore.IdentifierTemplate -import com.mifos.objects.templates.clients.ClientsTemplate +package com.mifos.core.network.services + +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.accounts.ClientAccounts +import com.mifos.core.objects.client.ActivatePayload +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.ClientAddressRequest +import com.mifos.core.objects.client.ClientAddressResponse +import com.mifos.core.objects.client.ClientPayload +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.noncore.Identifier +import com.mifos.core.objects.noncore.IdentifierCreationResponse +import com.mifos.core.objects.noncore.IdentifierPayload +import com.mifos.core.objects.noncore.IdentifierTemplate +import com.mifos.core.objects.templates.clients.ClientsTemplate import okhttp3.MultipartBody import okhttp3.ResponseBody import retrofit2.http.Body diff --git a/mifosng-android/src/main/java/com/mifos/api/services/CollectionSheetService.kt b/core/network/src/main/java/com/mifos/core/network/services/CollectionSheetService.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/api/services/CollectionSheetService.kt rename to core/network/src/main/java/com/mifos/core/network/services/CollectionSheetService.kt index fbc39ad75da..02277cfb5cb 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/CollectionSheetService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/CollectionSheetService.kt @@ -1,16 +1,16 @@ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.api.model.IndividualCollectionSheetPayload -import com.mifos.api.model.RequestCollectionSheetPayload -import com.mifos.objects.collectionsheet.CenterDetail -import com.mifos.objects.collectionsheet.CollectionSheetPayload -import com.mifos.objects.collectionsheet.CollectionSheetRequestPayload -import com.mifos.objects.collectionsheet.CollectionSheetResponse -import com.mifos.objects.collectionsheet.IndividualCollectionSheet -import com.mifos.objects.collectionsheet.ProductiveCollectionSheetPayload -import com.mifos.objects.group.CenterWithAssociations +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.network.model.IndividualCollectionSheetPayload +import com.mifos.core.network.model.RequestCollectionSheetPayload +import com.mifos.core.objects.collectionsheet.CenterDetail +import com.mifos.core.objects.collectionsheet.CollectionSheetPayload +import com.mifos.core.objects.collectionsheet.CollectionSheetRequestPayload +import com.mifos.core.objects.collectionsheet.CollectionSheetResponse +import com.mifos.core.objects.collectionsheet.IndividualCollectionSheet +import com.mifos.core.objects.collectionsheet.ProductiveCollectionSheetPayload +import com.mifos.core.objects.group.CenterWithAssociations import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST diff --git a/mifosng-android/src/main/java/com/mifos/api/services/DataTableService.kt b/core/network/src/main/java/com/mifos/core/network/services/DataTableService.kt similarity index 88% rename from mifosng-android/src/main/java/com/mifos/api/services/DataTableService.kt rename to core/network/src/main/java/com/mifos/core/network/services/DataTableService.kt index a76856c9268..f921f274f4b 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/DataTableService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/DataTableService.kt @@ -2,13 +2,13 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services import com.google.gson.JsonArray -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.noncore.DataTable -import com.mifos.objects.user.UserLocation +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.noncore.DataTable +import com.mifos.core.objects.user.UserLocation import retrofit2.http.Body import retrofit2.http.DELETE import retrofit2.http.GET diff --git a/mifosng-android/src/main/java/com/mifos/api/services/DocumentService.kt b/core/network/src/main/java/com/mifos/core/network/services/DocumentService.kt similarity index 95% rename from mifosng-android/src/main/java/com/mifos/api/services/DocumentService.kt rename to core/network/src/main/java/com/mifos/core/network/services/DocumentService.kt index 81d63ec6b58..7b93f3a9e41 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/DocumentService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/DocumentService.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.noncore.Document +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.noncore.Document import okhttp3.MultipartBody import okhttp3.ResponseBody import retrofit2.http.DELETE diff --git a/mifosng-android/src/main/java/com/mifos/api/services/GroupService.kt b/core/network/src/main/java/com/mifos/core/network/services/GroupService.kt similarity index 78% rename from mifosng-android/src/main/java/com/mifos/api/services/GroupService.kt rename to core/network/src/main/java/com/mifos/core/network/services/GroupService.kt index 6ddfefa178a..ffab39f5d67 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/GroupService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/GroupService.kt @@ -2,17 +2,17 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.accounts.GroupAccounts -import com.mifos.objects.client.ActivatePayload -import com.mifos.objects.client.Page -import com.mifos.objects.group.Group -import com.mifos.objects.group.GroupPayload -import com.mifos.objects.group.GroupWithAssociations -import com.mifos.objects.response.SaveResponse +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.accounts.GroupAccounts +import com.mifos.core.objects.client.ActivatePayload +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.group.Group +import com.mifos.core.objects.group.GroupPayload +import com.mifos.core.objects.group.GroupWithAssociations +import com.mifos.core.objects.response.SaveResponse import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST diff --git a/mifosng-android/src/main/java/com/mifos/api/services/LoanService.kt b/core/network/src/main/java/com/mifos/core/network/services/LoanService.kt similarity index 77% rename from mifosng-android/src/main/java/com/mifos/api/services/LoanService.kt rename to core/network/src/main/java/com/mifos/core/network/services/LoanService.kt index 2154e844653..4fa91cdcc0d 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/LoanService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/LoanService.kt @@ -2,25 +2,25 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services - -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.accounts.loan.LoanApproval -import com.mifos.objects.accounts.loan.LoanDisbursement -import com.mifos.objects.accounts.loan.LoanRepaymentRequest -import com.mifos.objects.accounts.loan.LoanRepaymentResponse -import com.mifos.objects.accounts.loan.LoanWithAssociations -import com.mifos.objects.accounts.loan.Loans -import com.mifos.objects.client.Charges -import com.mifos.objects.client.Page -import com.mifos.objects.organisation.LoanProducts -import com.mifos.objects.templates.loans.GroupLoanTemplate -import com.mifos.objects.templates.loans.LoanRepaymentTemplate -import com.mifos.objects.templates.loans.LoanTemplate -import com.mifos.objects.templates.loans.LoanTransactionTemplate -import com.mifos.services.data.GroupLoanPayload -import com.mifos.services.data.LoansPayload +package com.mifos.core.network.services + +import com.mifos.core.data.GroupLoanPayload +import com.mifos.core.data.LoansPayload +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.accounts.loan.LoanApproval +import com.mifos.core.objects.accounts.loan.LoanDisbursement +import com.mifos.core.objects.accounts.loan.LoanRepaymentRequest +import com.mifos.core.objects.accounts.loan.LoanRepaymentResponse +import com.mifos.core.objects.accounts.loan.LoanWithAssociations +import com.mifos.core.objects.accounts.loan.Loans +import com.mifos.core.objects.client.Charges +import com.mifos.core.objects.client.Page +import com.mifos.core.objects.organisation.LoanProducts +import com.mifos.core.objects.templates.loans.GroupLoanTemplate +import com.mifos.core.objects.templates.loans.LoanRepaymentTemplate +import com.mifos.core.objects.templates.loans.LoanTemplate +import com.mifos.core.objects.templates.loans.LoanTransactionTemplate import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST diff --git a/mifosng-android/src/main/java/com/mifos/api/services/NoteService.kt b/core/network/src/main/java/com/mifos/core/network/services/NoteService.kt similarity index 82% rename from mifosng-android/src/main/java/com/mifos/api/services/NoteService.kt rename to core/network/src/main/java/com/mifos/core/network/services/NoteService.kt index 4c6c0cdcd0f..ceaf4601594 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/NoteService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/NoteService.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.noncore.Note +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.noncore.Note import retrofit2.http.GET import retrofit2.http.Path import rx.Observable diff --git a/mifosng-android/src/main/java/com/mifos/api/services/OfficeService.kt b/core/network/src/main/java/com/mifos/core/network/services/OfficeService.kt similarity index 76% rename from mifosng-android/src/main/java/com/mifos/api/services/OfficeService.kt rename to core/network/src/main/java/com/mifos/core/network/services/OfficeService.kt index 5edfc1c6ad0..872bb1296d6 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/OfficeService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/OfficeService.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.organisation.Office +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.organisation.Office import retrofit2.http.GET import rx.Observable diff --git a/mifosng-android/src/main/java/com/mifos/api/services/RunReportsService.kt b/core/network/src/main/java/com/mifos/core/network/services/RunReportsService.kt similarity index 91% rename from mifosng-android/src/main/java/com/mifos/api/services/RunReportsService.kt rename to core/network/src/main/java/com/mifos/core/network/services/RunReportsService.kt index 1133cb36f0c..149ec9dc111 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/RunReportsService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/RunReportsService.kt @@ -1,9 +1,9 @@ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.group.CenterInfo -import com.mifos.objects.runreports.FullParameterListResponse -import com.mifos.objects.runreports.client.ClientReportTypeItem +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.group.CenterInfo +import com.mifos.core.objects.runreports.FullParameterListResponse +import com.mifos.core.objects.runreports.client.ClientReportTypeItem import retrofit2.http.GET import retrofit2.http.Path import retrofit2.http.Query diff --git a/mifosng-android/src/main/java/com/mifos/api/services/SavingsAccountService.kt b/core/network/src/main/java/com/mifos/core/network/services/SavingsAccountService.kt similarity index 86% rename from mifosng-android/src/main/java/com/mifos/api/services/SavingsAccountService.kt rename to core/network/src/main/java/com/mifos/core/network/services/SavingsAccountService.kt index 81621b32e67..b3379a49d50 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/SavingsAccountService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/SavingsAccountService.kt @@ -2,19 +2,19 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.GenericResponse -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.accounts.loan.SavingsApproval -import com.mifos.objects.accounts.savings.SavingsAccountTransactionRequest -import com.mifos.objects.accounts.savings.SavingsAccountTransactionResponse -import com.mifos.objects.accounts.savings.SavingsAccountWithAssociations -import com.mifos.objects.client.Savings -import com.mifos.objects.organisation.ProductSavings -import com.mifos.objects.templates.savings.SavingProductsTemplate -import com.mifos.objects.templates.savings.SavingsAccountTransactionTemplate -import com.mifos.services.data.SavingsPayload +import com.mifos.core.data.SavingsPayload +import com.mifos.core.model.APIEndPoint +import com.mifos.core.network.GenericResponse +import com.mifos.core.objects.accounts.loan.SavingsApproval +import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionRequest +import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionResponse +import com.mifos.core.objects.accounts.savings.SavingsAccountWithAssociations +import com.mifos.core.objects.client.Savings +import com.mifos.core.objects.organisation.ProductSavings +import com.mifos.core.objects.templates.savings.SavingProductsTemplate +import com.mifos.core.objects.templates.savings.SavingsAccountTransactionTemplate import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST diff --git a/mifosng-android/src/main/java/com/mifos/api/services/SearchService.kt b/core/network/src/main/java/com/mifos/core/network/services/SearchService.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/api/services/SearchService.kt rename to core/network/src/main/java/com/mifos/core/network/services/SearchService.kt index 32e0ed82456..947e42f0d5c 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/SearchService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/SearchService.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.SearchedEntity +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.SearchedEntity import retrofit2.http.GET import retrofit2.http.Query import rx.Observable diff --git a/mifosng-android/src/main/java/com/mifos/api/services/StaffService.kt b/core/network/src/main/java/com/mifos/core/network/services/StaffService.kt similarity index 81% rename from mifosng-android/src/main/java/com/mifos/api/services/StaffService.kt rename to core/network/src/main/java/com/mifos/core/network/services/StaffService.kt index 06dc1e09987..b040e797118 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/StaffService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/StaffService.kt @@ -2,10 +2,10 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.organisation.Staff +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.organisation.Staff import retrofit2.http.GET import retrofit2.http.Query import rx.Observable diff --git a/mifosng-android/src/main/java/com/mifos/api/services/SurveyService.kt b/core/network/src/main/java/com/mifos/core/network/services/SurveyService.kt similarity index 80% rename from mifosng-android/src/main/java/com/mifos/api/services/SurveyService.kt rename to core/network/src/main/java/com/mifos/core/network/services/SurveyService.kt index 0d4a9039d57..d971251bdd5 100644 --- a/mifosng-android/src/main/java/com/mifos/api/services/SurveyService.kt +++ b/core/network/src/main/java/com/mifos/core/network/services/SurveyService.kt @@ -2,11 +2,11 @@ * This project is licensed under the open source MPL V2. * See https://github.com/openMF/android-client/blob/master/LICENSE.md */ -package com.mifos.api.services +package com.mifos.core.network.services -import com.mifos.api.model.APIEndPoint -import com.mifos.objects.survey.Scorecard -import com.mifos.objects.survey.Survey +import com.mifos.core.model.APIEndPoint +import com.mifos.core.objects.survey.Scorecard +import com.mifos.core.objects.survey.Survey import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST diff --git a/feature/auth/src/main/java/com/mifos/feature/auth/login/presentation/LoginViewModel.kt b/feature/auth/src/main/java/com/mifos/feature/auth/login/presentation/LoginViewModel.kt index 6a84a078f67..00edddfbb49 100644 --- a/feature/auth/src/main/java/com/mifos/feature/auth/login/presentation/LoginViewModel.kt +++ b/feature/auth/src/main/java/com/mifos/feature/auth/login/presentation/LoginViewModel.kt @@ -7,7 +7,6 @@ import com.mifos.core.common.utils.BaseUrl import com.mifos.core.common.utils.Network import com.mifos.core.common.utils.Resource import com.mifos.core.datastore.PrefManager -import com.mifos.core.network.di.BaseApiManagerQualifier import com.mifos.feature.auth.R import com.mifos.feature.auth.login.domain.use_case.LoginUseCase import com.mifos.feature.auth.login.domain.use_case.PasswordValidationUseCase @@ -32,7 +31,7 @@ class LoginViewModel @Inject constructor( private val prefManager: PrefManager, private val usernameValidationUseCase: UsernameValidationUseCase, private val passwordValidationUseCase: PasswordValidationUseCase, - @BaseApiManagerQualifier private val baseApiManager: BaseApiManager, + private val baseApiManager: BaseApiManager, private val loginUseCase: LoginUseCase ) : ViewModel() { diff --git a/feature/client/src/main/java/com/mifos/feature/client/clientList/data/repositoryImp/ClientListRepositoryImp.kt b/feature/client/src/main/java/com/mifos/feature/client/clientList/data/repositoryImp/ClientListRepositoryImp.kt index 0ba3914c7e0..d11d58f5021 100644 --- a/feature/client/src/main/java/com/mifos/feature/client/clientList/data/repositoryImp/ClientListRepositoryImp.kt +++ b/feature/client/src/main/java/com/mifos/feature/client/clientList/data/repositoryImp/ClientListRepositoryImp.kt @@ -3,10 +3,10 @@ package com.mifos.feature.client.clientList.data.repositoryImp import androidx.paging.Pager import androidx.paging.PagingConfig import androidx.paging.PagingData -import com.mifos.core.common.utils.Page -import com.mifos.core.data.model.client.Client import com.mifos.core.model.ClientDb import com.mifos.core.network.datamanger.DataManagerClient +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Page import com.mifos.feature.client.clientList.domain.repository.ClientListRepository import com.mifos.feature.client.clientList.paging.ClientListPagingSource import kotlinx.coroutines.flow.Flow diff --git a/feature/client/src/main/java/com/mifos/feature/client/clientList/domain/repository/ClientListRepository.kt b/feature/client/src/main/java/com/mifos/feature/client/clientList/domain/repository/ClientListRepository.kt index 469d84c8446..fe2e661349e 100644 --- a/feature/client/src/main/java/com/mifos/feature/client/clientList/domain/repository/ClientListRepository.kt +++ b/feature/client/src/main/java/com/mifos/feature/client/clientList/domain/repository/ClientListRepository.kt @@ -1,9 +1,9 @@ package com.mifos.feature.client.clientList.domain.repository import androidx.paging.PagingData -import com.mifos.core.common.utils.Page -import com.mifos.core.data.model.client.Client import com.mifos.core.model.ClientDb +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Page import kotlinx.coroutines.flow.Flow /** diff --git a/feature/client/src/main/java/com/mifos/feature/client/clientList/paging/ClientListPagingSource.kt b/feature/client/src/main/java/com/mifos/feature/client/clientList/paging/ClientListPagingSource.kt index c27200f4793..7d691358c67 100644 --- a/feature/client/src/main/java/com/mifos/feature/client/clientList/paging/ClientListPagingSource.kt +++ b/feature/client/src/main/java/com/mifos/feature/client/clientList/paging/ClientListPagingSource.kt @@ -4,10 +4,10 @@ package com.mifos.feature.client.clientList.paging import androidx.paging.PagingSource import androidx.paging.PagingState -import com.mifos.core.common.utils.Page -import com.mifos.core.data.model.client.Client import com.mifos.core.model.ClientDb import com.mifos.core.network.datamanger.DataManagerClient +import com.mifos.core.objects.client.Client +import com.mifos.core.objects.client.Page import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.first import kotlinx.coroutines.suspendCancellableCoroutine diff --git a/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListScreen.kt b/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListScreen.kt index 36099b88bbb..a43bb9c2f71 100644 --- a/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListScreen.kt +++ b/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListScreen.kt @@ -58,7 +58,6 @@ import androidx.paging.compose.collectAsLazyPagingItems import coil.compose.AsyncImage import com.google.accompanist.swiperefresh.SwipeRefresh import com.google.accompanist.swiperefresh.rememberSwipeRefreshState -import com.mifos.core.data.model.client.Client import com.mifos.core.designsystem.component.MifosCircularProgress import com.mifos.core.designsystem.component.MifosPagingAppendProgress import com.mifos.core.designsystem.theme.Black @@ -67,6 +66,7 @@ import com.mifos.core.designsystem.theme.DarkGray import com.mifos.core.designsystem.theme.LightGray import com.mifos.core.designsystem.theme.White import com.mifos.core.model.ClientDb +import com.mifos.core.objects.client.Client import com.mifos.feature.client.R /** diff --git a/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListUiState.kt b/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListUiState.kt index 88c57cffdd1..03322ff396a 100644 --- a/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListUiState.kt +++ b/feature/client/src/main/java/com/mifos/feature/client/clientList/presentation/ClientListUiState.kt @@ -1,8 +1,8 @@ package com.mifos.feature.client.clientList.presentation import androidx.paging.PagingData -import com.mifos.core.data.model.client.Client import com.mifos.core.model.ClientDb +import com.mifos.core.objects.client.Client import kotlinx.coroutines.flow.Flow /** diff --git a/mifosng-android/build.gradle.kts b/mifosng-android/build.gradle.kts index af1d9202eda..87a2ffef27d 100644 --- a/mifosng-android/build.gradle.kts +++ b/mifosng-android/build.gradle.kts @@ -123,6 +123,9 @@ dependencies { implementation(project(":feature:auth")) implementation(project(":feature:client")) implementation(project(":core:data")) + implementation(project(":core:datastore")) + implementation(project(":core:network")) + implementation(project(":core:common")) // Multidex dependency implementation("androidx.multidex:multidex:2.0.1") diff --git a/mifosng-android/proguard-rules.pro b/mifosng-android/proguard-rules.pro index 46fcbc5e843..f6aa4e23e13 100755 --- a/mifosng-android/proguard-rules.pro +++ b/mifosng-android/proguard-rules.pro @@ -112,7 +112,7 @@ **[] $VALUES; public *; } --keepresourcexmlelements manifest/application/meta-data@value=GlideModule +#-keepresourcexmlelements manifest/application/meta-data@value=GlideModule # Iconify -keep class com.joanzapata.iconify.** { *; } \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/model/BulkRepaymentTransactions.kt b/mifosng-android/src/main/java/com/mifos/api/model/BulkRepaymentTransactions.kt deleted file mode 100644 index c7fa8e6d7c2..00000000000 --- a/mifosng-android/src/main/java/com/mifos/api/model/BulkRepaymentTransactions.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This project is licensed under the open source MPL V2. - * See https://github.com/openMF/android-client/blob/master/LICENSE.md - */ -package com.mifos.api.model - -import android.os.Parcel -import android.os.Parcelable -import android.os.Parcelable.Creator -import com.google.gson.Gson - -data class BulkRepaymentTransactions( - var loanId: Int = 0, - var transactionAmount: Double= 0.0, - // Optional fields - var accountNumber: String? = null, - var bankNumber: String? = null, - var checkNumber: String? = null, - var paymentTypeId: Int? = null, - var receiptNumber: String? = null, - var routingCode: String? = null -) : Parcelable { - constructor(parcel: Parcel) : this( - parcel.readInt(), - parcel.readDouble(), - parcel.readString(), - parcel.readString(), - parcel.readString(), - parcel.readValue(Int::class.java.classLoader) as? Int, - parcel.readString(), - parcel.readString() - ) - - override fun toString(): String { - return Gson().toJson(this) - } - - override fun describeContents(): Int { - return 0 - } - - override fun writeToParcel(dest: Parcel, flags: Int) { - dest.writeInt(loanId) - dest.writeDouble(transactionAmount) - dest.writeString(accountNumber) - dest.writeString(bankNumber) - dest.writeString(checkNumber) - dest.writeValue(paymentTypeId) - dest.writeString(receiptNumber) - dest.writeString(routingCode) - } - - companion object CREATOR : Parcelable.Creator { - override fun createFromParcel(parcel: Parcel): BulkRepaymentTransactions { - return BulkRepaymentTransactions(parcel) - } - - override fun newArray(size: Int): Array { - return arrayOfNulls(size) - } - } -} \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/model/ClientsAttendance.kt b/mifosng-android/src/main/java/com/mifos/api/model/ClientsAttendance.kt deleted file mode 100644 index 9aa1d80d1dc..00000000000 --- a/mifosng-android/src/main/java/com/mifos/api/model/ClientsAttendance.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This project is licensed under the open source MPL V2. - * See https://github.com/openMF/android-client/blob/master/LICENSE.md - */ -package com.mifos.api.model - -import android.os.Parcel -import android.os.Parcelable -import android.os.Parcelable.Creator -import com.google.gson.Gson - -data class ClientsAttendance( - var attendanceType: Int, - var clientId: Int -) : Parcelable { - constructor(parcel: Parcel) : this( - parcel.readInt(), - parcel.readInt() - ) - - override fun describeContents(): Int { - return 0 - } - - override fun writeToParcel(dest: Parcel, flags: Int) { - dest.writeInt(attendanceType) - dest.writeInt(clientId) - } - - override fun toString(): String { - return Gson().toJson(this) - } - - companion object CREATOR : Parcelable.Creator { - override fun createFromParcel(parcel: Parcel): ClientsAttendance { - return ClientsAttendance(parcel) - } - - override fun newArray(size: Int): Array { - return arrayOfNulls(size) - } - } -} \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/api/model/IndividualCollectionSheetPayload.kt b/mifosng-android/src/main/java/com/mifos/api/model/IndividualCollectionSheetPayload.kt deleted file mode 100644 index d578823dc57..00000000000 --- a/mifosng-android/src/main/java/com/mifos/api/model/IndividualCollectionSheetPayload.kt +++ /dev/null @@ -1,53 +0,0 @@ -package com.mifos.api.model - -import android.os.Parcel -import android.os.Parcelable -import android.os.Parcelable.Creator - -/** - * Created by Tarun on 11-07-2017. - */ - -data class IndividualCollectionSheetPayload( - var bulkRepaymentTransactions: ArrayList = ArrayList(), - var actualDisbursementDate: String? = null, - var bulkDisbursementTransactions: List = ArrayList(), - var bulkSavingsDueTransactions: List = ArrayList(), - var dateFormat: String = "dd MMMM YYYY", - var locale: String = "en", - var transactionDate: String? = null -) : Parcelable { - constructor(parcel: Parcel) : this( - parcel.createTypedArrayList(BulkRepaymentTransactions.CREATOR) ?: ArrayList(), - parcel.readString(), - parcel.createTypedArrayList(BulkRepaymentTransactions.CREATOR) ?: ArrayList(), - parcel.createTypedArrayList(BulkRepaymentTransactions.CREATOR) ?: ArrayList(), - parcel.readString() ?: "dd MMMM YYYY", - parcel.readString() ?: "en", - parcel.readString() - ) - - override fun describeContents(): Int { - return 0 - } - - override fun writeToParcel(dest: Parcel, flags: Int) { - dest.writeTypedList(bulkRepaymentTransactions) - dest.writeString(actualDisbursementDate) - dest.writeTypedList(bulkDisbursementTransactions) - dest.writeTypedList(bulkSavingsDueTransactions) - dest.writeString(dateFormat) - dest.writeString(locale) - dest.writeString(transactionDate) - } - - companion object CREATOR : Parcelable.Creator { - override fun createFromParcel(parcel: Parcel): IndividualCollectionSheetPayload { - return IndividualCollectionSheetPayload(parcel) - } - - override fun newArray(size: Int): Array { - return arrayOfNulls(size) - } - } -} \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/mappers/clients/ClientMapper.kt b/mifosng-android/src/main/java/com/mifos/mappers/clients/ClientMapper.kt deleted file mode 100644 index ffc50b489de..00000000000 --- a/mifosng-android/src/main/java/com/mifos/mappers/clients/ClientMapper.kt +++ /dev/null @@ -1,47 +0,0 @@ -package com.mifos.mappers.clients - -import com.mifos.objects.client.Client -import com.mifos.objects.client.Status -import org.apache.fineract.client.models.GetClientStatus -import org.apache.fineract.client.models.GetClientsPageItemsResponse -import org.mifos.core.data.AbstractMapper - -object ClientMapper : AbstractMapper() { - - override fun mapFromEntity(entity: GetClientsPageItemsResponse): Client { - return Client().apply { - id = entity.id!! - accountNo = entity.accountNo - fullname = entity.fullname - firstname = entity.displayName!!.split(" ")[0] - lastname = - if (entity.displayName!!.split(" ").size >= 2) entity.displayName!!.split(" ")[1] else "" - displayName = entity.displayName - officeId = entity.officeId!! - officeName = entity.officeName - active = entity.active!! - status = Status().apply { - id = entity.status?.id!! - code = entity.status?.code - value = entity.status?.description - } - } - } - - override fun mapToEntity(domainModel: Client): GetClientsPageItemsResponse { - return GetClientsPageItemsResponse().apply { - id = domainModel.id - accountNo = domainModel.accountNo - fullname = domainModel.fullname - displayName = domainModel.displayName - officeId = domainModel.officeId - officeName = domainModel.officeName - active = domainModel.active - status = GetClientStatus().apply { - id = domainModel.status?.id - code = domainModel.status?.code - description = domainModel.status?.value - } - } - } -} \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/mappers/clients/GetClientResponseMapper.kt b/mifosng-android/src/main/java/com/mifos/mappers/clients/GetClientResponseMapper.kt deleted file mode 100644 index 5a999038981..00000000000 --- a/mifosng-android/src/main/java/com/mifos/mappers/clients/GetClientResponseMapper.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.mifos.mappers.clients - -import com.mifos.objects.client.Client -import com.mifos.objects.client.Page -import org.apache.fineract.client.models.GetClientsResponse -import org.mifos.core.data.AbstractMapper - -object GetClientResponseMapper : AbstractMapper>() { - - override fun mapFromEntity(entity: GetClientsResponse): Page { - return Page().apply { - totalFilteredRecords = entity.totalFilteredRecords!! - pageItems = ClientMapper.mapFromEntityList(entity.pageItems!!) - } - } - - override fun mapToEntity(domainModel: Page): GetClientsResponse { - return GetClientsResponse().apply { - totalFilteredRecords = domainModel.totalFilteredRecords - pageItems = ClientMapper.mapToEntityList(domainModel.pageItems) - } - } -} \ No newline at end of file diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/home/HomeActivity.kt b/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/home/HomeActivity.kt index ba167a85296..ef12fb559ec 100644 --- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/home/HomeActivity.kt +++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/home/HomeActivity.kt @@ -97,7 +97,10 @@ open class HomeActivity : MifosBaseActivity(), NavigationView.OnNavigationItemSe R.id.collection_sheet -> { val bundle = Bundle() - bundle.putString(Constants.COLLECTION_TYPE, Constants.EXTRA_COLLECTION_COLLECTION) + bundle.putString( + Constants.COLLECTION_TYPE, + Constants.EXTRA_COLLECTION_COLLECTION + ) findNavController(R.id.nav_host_fragment).navigate( R.id.generateCollectionSheetActivity, bundle diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/login/LoginRepositoryImp.kt b/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/login/LoginRepositoryImp.kt index 9927b2fc0df..52bbe84e9b5 100644 --- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/login/LoginRepositoryImp.kt +++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/login/LoginRepositoryImp.kt @@ -1,6 +1,6 @@ package com.mifos.mifosxdroid.activity.login -import com.mifos.api.datamanager.DataManagerAuth +import com.mifos.core.network.datamanager.DataManagerAuth import org.apache.fineract.client.models.PostAuthenticationResponse import rx.Observable import javax.inject.Inject diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/pathtracking/PathTrackingActivity.kt b/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/pathtracking/PathTrackingActivity.kt index 0a0e367ec11..976b6dc4e10 100644 --- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/pathtracking/PathTrackingActivity.kt +++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/activity/pathtracking/PathTrackingActivity.kt @@ -5,14 +5,12 @@ package com.mifos.mifosxdroid.activity.pathtracking import android.Manifest -import android.annotation.TargetApi import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.content.IntentFilter import android.content.pm.PackageManager import android.net.Uri -import android.os.Build import android.os.Bundle import android.view.Menu import android.view.MenuItem @@ -23,11 +21,11 @@ import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.LinearLayoutManager import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener import com.github.therajanmaurya.sweeterror.SweetUIErrorHandler +import com.mifos.core.objects.user.UserLocation import com.mifos.mifosxdroid.R import com.mifos.mifosxdroid.adapters.PathTrackingAdapter import com.mifos.mifosxdroid.core.MifosBaseActivity import com.mifos.mifosxdroid.databinding.ActivityPathTrackerBinding -import com.mifos.objects.user.UserLocation import com.mifos.utils.CheckSelfPermissionAndRequest import com.mifos.utils.Constants import com.mifos.utils.PrefManager @@ -41,7 +39,7 @@ class PathTrackingActivity : MifosBaseActivity(), OnRefreshListener { private lateinit var binding: ActivityPathTrackerBinding - private lateinit var viewModel : PathTrackingViewModel + private lateinit var viewModel: PathTrackingViewModel private var pathTrackingAdapter: PathTrackingAdapter? = null private var intentLocationService: Intent? = null @@ -58,20 +56,23 @@ class PathTrackingActivity : MifosBaseActivity(), OnRefreshListener { createNotificationReceiver() showUserInterface() viewModel.loadPathTracking(PrefManager.getUserId()) - binding.layoutError.findViewById