diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 9cb6f973927..437a985f291 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -186,7 +186,7 @@ complexity: ignoreArgumentsMatchingNames: false NestedBlockDepth: active: true - threshold: 4 + threshold: 5 NestedScopeFunctions: active: false threshold: 1 @@ -230,7 +230,7 @@ complexity: ] # Modifying default values 11 to 20 thresholdInFiles: 20 - thresholdInClasses: 30 + thresholdInClasses: 45 thresholdInInterfaces: 20 thresholdInObjects: 20 thresholdInEnums: 20 @@ -323,7 +323,7 @@ exceptions: PrintStackTrace: active: true RethrowCaughtException: - active: true + active: false ReturnFromFinally: active: true ignoreLabeled: false diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts index 2bf04a4aa01..ccc0e9b01f7 100644 --- a/core/data/build.gradle.kts +++ b/core/data/build.gradle.kts @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ plugins { alias(libs.plugins.mifos.android.library) alias(libs.plugins.mifos.android.hilt) diff --git a/core/data/src/main/AndroidManifest.xml b/core/data/src/main/AndroidManifest.xml index a5918e68abc..1dc76da0f7e 100644 --- a/core/data/src/main/AndroidManifest.xml +++ b/core/data/src/main/AndroidManifest.xml @@ -1,4 +1,13 @@ + \ No newline at end of file diff --git a/core/data/src/main/java/com/mifos/core/data/di/DataModule.kt b/core/data/src/main/java/com/mifos/core/data/di/DataModule.kt index 09ea33be4d3..a8b95ee8562 100644 --- a/core/data/src/main/java/com/mifos/core/data/di/DataModule.kt +++ b/core/data/src/main/java/com/mifos/core/data/di/DataModule.kt @@ -1,6 +1,14 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.di - import com.mifos.core.data.repository.ActivateRepository import com.mifos.core.data.repository.CenterDetailsRepository import com.mifos.core.data.repository.CenterListRepository @@ -41,46 +49,46 @@ import com.mifos.core.data.repository.SearchRepository import com.mifos.core.data.repository.SignatureRepository import com.mifos.core.data.repository.SurveyListRepository import com.mifos.core.data.repository.SurveySubmitRepository -import com.mifos.core.data.repository_imp.ActivateRepositoryImp -import com.mifos.core.data.repository_imp.CenterDetailsRepositoryImp -import com.mifos.core.data.repository_imp.CenterListRepositoryImp -import com.mifos.core.data.repository_imp.ChargeDialogRepositoryImp -import com.mifos.core.data.repository_imp.CheckerInboxRepositoryImp -import com.mifos.core.data.repository_imp.CheckerInboxTasksRepositoryImp -import com.mifos.core.data.repository_imp.ClientChargeRepositoryImp -import com.mifos.core.data.repository_imp.ClientIdentifierDialogRepositoryImp -import com.mifos.core.data.repository_imp.ClientIdentifiersRepositoryImp -import com.mifos.core.data.repository_imp.CreateNewCenterRepositoryImp -import com.mifos.core.data.repository_imp.CreateNewGroupRepositoryImp -import com.mifos.core.data.repository_imp.DataTableDataRepositoryImp -import com.mifos.core.data.repository_imp.DataTableListRepositoryImp -import com.mifos.core.data.repository_imp.DataTableRepositoryImp -import com.mifos.core.data.repository_imp.DataTableRowDialogRepositoryImp -import com.mifos.core.data.repository_imp.DocumentListRepositoryImp -import com.mifos.core.data.repository_imp.GenerateCollectionSheetRepositoryImp -import com.mifos.core.data.repository_imp.GroupDetailsRepositoryImp -import com.mifos.core.data.repository_imp.GroupListRepositoryImp -import com.mifos.core.data.repository_imp.GroupLoanAccountRepositoryImp -import com.mifos.core.data.repository_imp.GroupsListRepositoryImpl -import com.mifos.core.data.repository_imp.IndividualCollectionSheetDetailsRepositoryImp -import com.mifos.core.data.repository_imp.LoanAccountApprovalRepositoryImp -import com.mifos.core.data.repository_imp.LoanAccountDisbursementRepositoryImp -import com.mifos.core.data.repository_imp.LoanAccountRepositoryImp -import com.mifos.core.data.repository_imp.LoanAccountSummaryRepositoryImp -import com.mifos.core.data.repository_imp.LoanChargeDialogRepositoryImp -import com.mifos.core.data.repository_imp.LoanChargeRepositoryImp -import com.mifos.core.data.repository_imp.LoanRepaymentRepositoryImp -import com.mifos.core.data.repository_imp.LoanRepaymentScheduleRepositoryImp -import com.mifos.core.data.repository_imp.LoanTransactionsRepositoryImp -import com.mifos.core.data.repository_imp.NewIndividualCollectionSheetRepositoryImp -import com.mifos.core.data.repository_imp.PathTrackingRepositoryImp -import com.mifos.core.data.repository_imp.PinPointClientRepositoryImp -import com.mifos.core.data.repository_imp.ReportCategoryRepositoryImp -import com.mifos.core.data.repository_imp.ReportDetailRepositoryImp -import com.mifos.core.data.repository_imp.SearchRepositoryImp -import com.mifos.core.data.repository_imp.SignatureRepositoryImp -import com.mifos.core.data.repository_imp.SurveyListRepositoryImp -import com.mifos.core.data.repository_imp.SurveySubmitRepositoryImp +import com.mifos.core.data.repositoryImp.ActivateRepositoryImp +import com.mifos.core.data.repositoryImp.CenterDetailsRepositoryImp +import com.mifos.core.data.repositoryImp.CenterListRepositoryImp +import com.mifos.core.data.repositoryImp.ChargeDialogRepositoryImp +import com.mifos.core.data.repositoryImp.CheckerInboxRepositoryImp +import com.mifos.core.data.repositoryImp.CheckerInboxTasksRepositoryImp +import com.mifos.core.data.repositoryImp.ClientChargeRepositoryImp +import com.mifos.core.data.repositoryImp.ClientIdentifierDialogRepositoryImp +import com.mifos.core.data.repositoryImp.ClientIdentifiersRepositoryImp +import com.mifos.core.data.repositoryImp.CreateNewCenterRepositoryImp +import com.mifos.core.data.repositoryImp.CreateNewGroupRepositoryImp +import com.mifos.core.data.repositoryImp.DataTableDataRepositoryImp +import com.mifos.core.data.repositoryImp.DataTableListRepositoryImp +import com.mifos.core.data.repositoryImp.DataTableRepositoryImp +import com.mifos.core.data.repositoryImp.DataTableRowDialogRepositoryImp +import com.mifos.core.data.repositoryImp.DocumentListRepositoryImp +import com.mifos.core.data.repositoryImp.GenerateCollectionSheetRepositoryImp +import com.mifos.core.data.repositoryImp.GroupDetailsRepositoryImp +import com.mifos.core.data.repositoryImp.GroupListRepositoryImp +import com.mifos.core.data.repositoryImp.GroupLoanAccountRepositoryImp +import com.mifos.core.data.repositoryImp.GroupsListRepositoryImpl +import com.mifos.core.data.repositoryImp.IndividualCollectionSheetDetailsRepositoryImp +import com.mifos.core.data.repositoryImp.LoanAccountApprovalRepositoryImp +import com.mifos.core.data.repositoryImp.LoanAccountDisbursementRepositoryImp +import com.mifos.core.data.repositoryImp.LoanAccountRepositoryImp +import com.mifos.core.data.repositoryImp.LoanAccountSummaryRepositoryImp +import com.mifos.core.data.repositoryImp.LoanChargeDialogRepositoryImp +import com.mifos.core.data.repositoryImp.LoanChargeRepositoryImp +import com.mifos.core.data.repositoryImp.LoanRepaymentRepositoryImp +import com.mifos.core.data.repositoryImp.LoanRepaymentScheduleRepositoryImp +import com.mifos.core.data.repositoryImp.LoanTransactionsRepositoryImp +import com.mifos.core.data.repositoryImp.NewIndividualCollectionSheetRepositoryImp +import com.mifos.core.data.repositoryImp.PathTrackingRepositoryImp +import com.mifos.core.data.repositoryImp.PinPointClientRepositoryImp +import com.mifos.core.data.repositoryImp.ReportCategoryRepositoryImp +import com.mifos.core.data.repositoryImp.ReportDetailRepositoryImp +import com.mifos.core.data.repositoryImp.SearchRepositoryImp +import com.mifos.core.data.repositoryImp.SignatureRepositoryImp +import com.mifos.core.data.repositoryImp.SurveyListRepositoryImp +import com.mifos.core.data.repositoryImp.SurveySubmitRepositoryImp import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -209,4 +217,4 @@ abstract class DataModule { @Binds internal abstract fun bindDataTableListRepository(impl: DataTableListRepositoryImp): DataTableListRepository -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/di/RepositoryModule.kt b/core/data/src/main/java/com/mifos/core/data/di/RepositoryModule.kt index 4a6ec0de3e0..7cf6251ce58 100644 --- a/core/data/src/main/java/com/mifos/core/data/di/RepositoryModule.kt +++ b/core/data/src/main/java/com/mifos/core/data/di/RepositoryModule.kt @@ -1,11 +1,20 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.di import com.mifos.core.data.repository.ClientDetailsRepository import com.mifos.core.data.repository.ClientListRepository import com.mifos.core.data.repository.LoginRepository -import com.mifos.core.data.repository_imp.ClientDetailsRepositoryImp -import com.mifos.core.data.repository_imp.ClientListRepositoryImp -import com.mifos.core.data.repository_imp.LoginRepositoryImp +import com.mifos.core.data.repositoryImp.ClientDetailsRepositoryImp +import com.mifos.core.data.repositoryImp.ClientListRepositoryImp +import com.mifos.core.data.repositoryImp.LoginRepositoryImp import com.mifos.core.network.datamanager.DataManagerClient import com.mifos.core.network.datamanger.DataManagerAuth import dagger.Module @@ -30,4 +39,4 @@ object RepositoryModule { @Provides fun providesLoginRepository(dataManagerAuth: DataManagerAuth): LoginRepository = LoginRepositoryImp(dataManagerAuth) -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/paging_source/CenterListPagingSource.kt b/core/data/src/main/java/com/mifos/core/data/pagingSource/CenterListPagingSource.kt similarity index 87% rename from core/data/src/main/java/com/mifos/core/data/paging_source/CenterListPagingSource.kt rename to core/data/src/main/java/com/mifos/core/data/pagingSource/CenterListPagingSource.kt index a358c55f808..69a7209d99f 100644 --- a/core/data/src/main/java/com/mifos/core/data/paging_source/CenterListPagingSource.kt +++ b/core/data/src/main/java/com/mifos/core/data/pagingSource/CenterListPagingSource.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.paging_source +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.pagingSource import androidx.paging.PagingSource import androidx.paging.PagingState @@ -18,7 +27,7 @@ class CenterListPagingSource(private val dataManagerCenter: DataManagerCenter) : override fun getRefreshKey(state: PagingState): Int? { return state.anchorPosition?.let { position -> state.closestPageToPosition(position)?.prevKey?.plus(10) ?: state.closestPageToPosition( - position + position, )?.nextKey?.minus(10) } } @@ -34,7 +43,7 @@ class CenterListPagingSource(private val dataManagerCenter: DataManagerCenter) : LoadResult.Page( data = centerListWithSync, prevKey = if (position <= 0) null else position - 10, - nextKey = if (position >= totalCenters) null else position + 10 + nextKey = if (position >= totalCenters) null else position + 10, ) } catch (e: Exception) { LoadResult.Error(e) @@ -59,8 +68,8 @@ class CenterListPagingSource(private val dataManagerCenter: DataManagerCenter) : continuation.resume( Pair( center.pageItems, - center.totalFilteredRecords - ) + center.totalFilteredRecords, + ), ) } }) @@ -71,7 +80,6 @@ class CenterListPagingSource(private val dataManagerCenter: DataManagerCenter) : private suspend fun getCenterDbList(): List
= suspendCoroutine { continuation -> try { - dataManagerCenter.allDatabaseCenters .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io()) @@ -92,10 +100,9 @@ class CenterListPagingSource(private val dataManagerCenter: DataManagerCenter) : } } - private fun getCenterListWithSync( centerList: List
, - centerDbList: List
+ centerDbList: List
, ): List
{ if (centerDbList.isNotEmpty()) { centerList.forEach { center -> @@ -108,4 +115,4 @@ class CenterListPagingSource(private val dataManagerCenter: DataManagerCenter) : } return centerList } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/paging_source/ClientChargesPagingSource.kt b/core/data/src/main/java/com/mifos/core/data/pagingSource/ClientChargesPagingSource.kt similarity index 82% rename from core/data/src/main/java/com/mifos/core/data/paging_source/ClientChargesPagingSource.kt rename to core/data/src/main/java/com/mifos/core/data/pagingSource/ClientChargesPagingSource.kt index e7c69844c56..c1a64e60b9e 100644 --- a/core/data/src/main/java/com/mifos/core/data/paging_source/ClientChargesPagingSource.kt +++ b/core/data/src/main/java/com/mifos/core/data/pagingSource/ClientChargesPagingSource.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.paging_source +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.pagingSource import androidx.paging.PagingSource import androidx.paging.PagingState @@ -14,14 +23,14 @@ import kotlin.coroutines.resumeWithException class ClientChargesPagingSource( private val clientId: Int, - private val dataManagerCharge: DataManagerCharge + private val dataManagerCharge: DataManagerCharge, ) : PagingSource() { override fun getRefreshKey(state: PagingState): Int? { return state.anchorPosition?.let { position -> state.closestPageToPosition(position)?.prevKey?.plus(10) ?: state.closestPageToPosition( - position + position, )?.nextKey?.minus(10) } } @@ -35,7 +44,7 @@ class ClientChargesPagingSource( LoadResult.Page( data = clientChargesList, prevKey = if (position <= 0) null else position - 10, - nextKey = if (position >= totalCharges) null else position + 10 + nextKey = if (position >= totalCharges) null else position + 10, ) } catch (exception: Exception) { LoadResult.Error(exception) @@ -44,7 +53,7 @@ class ClientChargesPagingSource( private suspend fun getClientChargeList( clientId: Int, - position: Int + position: Int, ): Pair, Int> { return suspendCancellableCoroutine { continuation -> dataManagerCharge.getClientCharges(clientId = clientId, offset = position, 10) @@ -64,4 +73,4 @@ class ClientChargesPagingSource( }) } } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/paging_source/ClientListPagingSource.kt b/core/data/src/main/java/com/mifos/core/data/pagingSource/ClientListPagingSource.kt similarity index 87% rename from core/data/src/main/java/com/mifos/core/data/paging_source/ClientListPagingSource.kt rename to core/data/src/main/java/com/mifos/core/data/pagingSource/ClientListPagingSource.kt index 197b976f2d6..20b86929bf0 100644 --- a/core/data/src/main/java/com/mifos/core/data/paging_source/ClientListPagingSource.kt +++ b/core/data/src/main/java/com/mifos/core/data/pagingSource/ClientListPagingSource.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.paging_source +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.pagingSource import androidx.paging.PagingSource import androidx.paging.PagingState @@ -18,13 +27,13 @@ import kotlin.coroutines.suspendCoroutine */ class ClientListPagingSource( - private val dataManagerClient: DataManagerClient + private val dataManagerClient: DataManagerClient, ) : PagingSource() { override fun getRefreshKey(state: PagingState): Int? { return state.anchorPosition?.let { position -> state.closestPageToPosition(position)?.prevKey?.plus(10) ?: state.closestPageToPosition( - position + position, )?.nextKey?.minus(10) } } @@ -40,7 +49,7 @@ class ClientListPagingSource( LoadResult.Page( data = clientListWithSync, prevKey = if (position <= 0) null else position - 10, - nextKey = if (position >= totalClients) null else position + 10 + nextKey = if (position >= totalClients) null else position + 10, ) } catch (e: Exception) { LoadResult.Error(e) @@ -54,7 +63,6 @@ class ClientListPagingSource( .subscribeOn(Schedulers.io()) .subscribe(object : Subscriber>() { override fun onCompleted() { - } override fun onError(e: Throwable) { @@ -90,7 +98,7 @@ class ClientListPagingSource( private fun getClientListWithSync( clientList: List, - clientDbList: List + clientDbList: List, ): List { if (clientDbList.isNotEmpty()) { clientList.forEach { client -> @@ -103,4 +111,4 @@ class ClientListPagingSource( } return clientList } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ActivateRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ActivateRepository.kt index 8c8ac928ad4..2044609855a 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ActivateRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ActivateRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -14,17 +23,16 @@ interface ActivateRepository { fun activateClient( clientId: Int, - clientActivate: ActivatePayload? + clientActivate: ActivatePayload?, ): Observable fun activateCenter( centerId: Int, - activatePayload: ActivatePayload? + activatePayload: ActivatePayload?, ): Observable fun activateGroup( groupId: Int, - activatePayload: ActivatePayload? + activatePayload: ActivatePayload?, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/CenterDetailsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/CenterDetailsRepository.kt index 8b196b89de0..5b40c70507c 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/CenterDetailsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/CenterDetailsRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.group.CenterInfo @@ -13,6 +22,6 @@ interface CenterDetailsRepository { suspend fun getCenterSummaryInfo( centerId: Int, - genericResultSet: Boolean + genericResultSet: Boolean, ): Flow> -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/CenterListRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/CenterListRepository.kt index 4d1f2f4f894..d927d08f8b4 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/CenterListRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/CenterListRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import androidx.paging.PagingData @@ -17,4 +26,4 @@ interface CenterListRepository { suspend fun getCentersGroupAndMeeting(id: Int): CenterWithAssociations fun allDatabaseCenters(): Observable> -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ChargeDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ChargeDialogRepository.kt index 8bace2f1655..c3c372dfad9 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ChargeDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ChargeDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.ChargesPayload @@ -13,6 +22,6 @@ interface ChargeDialogRepository { suspend fun createCharges( clientId: Int, - payload: ChargesPayload + payload: ChargesPayload, ): ChargeCreationResponse -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxRepository.kt index 3e2b4577f36..953e0bcab70 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxRepository.kt @@ -1,15 +1,24 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse import com.mifos.core.objects.checkerinboxandtasks.CheckerInboxSearchTemplate import com.mifos.core.objects.checkerinboxandtasks.CheckerTask -import kotlinx.coroutines.flow.Flow interface CheckerInboxRepository { suspend fun loadCheckerTasks( - actionName: String? = null, entityName: String? = null, - resourceId: Int? = null + actionName: String? = null, + entityName: String? = null, + resourceId: Int? = null, ): List suspend fun approveCheckerEntry(auditId: Int): GenericResponse @@ -19,5 +28,4 @@ interface CheckerInboxRepository { suspend fun deleteCheckerEntry(auditId: Int): GenericResponse suspend fun loadSearchTemplate(): CheckerInboxSearchTemplate - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxTasksRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxTasksRepository.kt index 74b75797b31..250a5886f55 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxTasksRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/CheckerInboxTasksRepository.kt @@ -1,10 +1,17 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.checkerinboxandtasks.CheckerTask import com.mifos.core.objects.checkerinboxandtasks.RescheduleLoansTask import kotlinx.coroutines.flow.Flow -import rx.Observable - /** * Created by Aditya Gupta on 21/03/24. @@ -15,8 +22,8 @@ interface CheckerInboxTasksRepository { suspend fun getRescheduleLoansTaskList(): Flow> suspend fun getCheckerTaskList( - actionName: String? = null, entityName: String? = null, - resourceId: Int? = null + actionName: String? = null, + entityName: String? = null, + resourceId: Int? = null, ): Flow> - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ClientChargeRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ClientChargeRepository.kt index f294c6769f1..7a1f2a22f69 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ClientChargeRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ClientChargeRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import androidx.paging.PagingData @@ -10,5 +19,4 @@ import kotlinx.coroutines.flow.Flow interface ClientChargeRepository { fun getClientCharges(clientId: Int): Flow> - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ClientDetailsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ClientDetailsRepository.kt index bc579baab5a..a563d6cf4b5 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ClientDetailsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ClientDetailsRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.ClientAccounts @@ -18,5 +27,4 @@ interface ClientDetailsRepository { fun getClientAccounts(clientId: Int): Observable fun getClient(clientId: Int): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifierDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifierDialogRepository.kt index 08cb9956f9b..68e00e2381a 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifierDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifierDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.noncore.IdentifierCreationResponse @@ -13,6 +22,7 @@ interface ClientIdentifierDialogRepository { fun getClientIdentifierTemplate(clientId: Int): Observable suspend fun createClientIdentifier( - clientId: Int, identifierPayload: IdentifierPayload + clientId: Int, + identifierPayload: IdentifierPayload, ): IdentifierCreationResponse -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifiersRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifiersRepository.kt index 02c0e8f1fe3..e467211c763 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifiersRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ClientIdentifiersRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.noncore.Identifier @@ -13,6 +22,6 @@ interface ClientIdentifiersRepository { fun deleteClientIdentifier( clientId: Int, - identifierId: Int + identifierId: Int, ): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ClientListRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ClientListRepository.kt index e86ba8fa9c6..c2e608c9c3b 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ClientListRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ClientListRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import androidx.paging.PagingData @@ -14,5 +23,4 @@ interface ClientListRepository { fun getAllClients(): Flow> fun allDatabaseClients(): Observable> - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/CreateNewCenterRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/CreateNewCenterRepository.kt index 432da65741a..02893acbaab 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/CreateNewCenterRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/CreateNewCenterRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.CenterPayload @@ -9,4 +18,4 @@ import rx.Observable */ interface CreateNewCenterRepository { fun createCenter(centerPayload: CenterPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/CreateNewClientRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/CreateNewClientRepository.kt index a84b29eea64..557df8d0fba 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/CreateNewClientRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/CreateNewClientRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.client.Client @@ -23,4 +32,4 @@ interface CreateNewClientRepository { fun createClient(clientPayload: ClientPayload): Observable fun uploadClientImage(id: Int, file: MultipartBody.Part?): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/CreateNewGroupRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/CreateNewGroupRepository.kt index 20cba4babfa..882f5511575 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/CreateNewGroupRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/CreateNewGroupRepository.kt @@ -1,6 +1,14 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository -import com.mifos.core.datastore.PrefManager import com.mifos.core.objects.group.GroupPayload import com.mifos.core.objects.organisation.Office import com.mifos.core.objects.response.SaveResponse @@ -14,4 +22,4 @@ interface CreateNewGroupRepository { fun offices(): Observable> fun createGroup(groupPayload: GroupPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/DataTableDataRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/DataTableDataRepository.kt index 34298fef0c1..14053d5a2bc 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/DataTableDataRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/DataTableDataRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.google.gson.JsonArray @@ -14,7 +23,6 @@ interface DataTableDataRepository { fun deleteDataTableEntry( table: String?, entity: Int, - rowId: Int + rowId: Int, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/DataTableListRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/DataTableListRepository.kt index e94938bfdc4..cc3a0c4b358 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/DataTableListRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/DataTableListRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.GroupLoanPayload @@ -17,4 +26,4 @@ interface DataTableListRepository { fun createGroupLoansAccount(loansPayload: GroupLoanPayload?): Observable fun createClient(clientPayload: ClientPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/DataTableRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/DataTableRepository.kt index bf33a44a7a2..ebacb26fe63 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/DataTableRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/DataTableRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.noncore.DataTable @@ -9,5 +18,4 @@ import rx.Observable interface DataTableRepository { fun getDataTable(tableName: String?): Observable> - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/DataTableRowDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/DataTableRowDialogRepository.kt index 5c003d31562..992a77691f8 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/DataTableRowDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/DataTableRowDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -8,7 +17,8 @@ import com.mifos.core.network.GenericResponse interface DataTableRowDialogRepository { suspend fun addDataTableEntry( - table: String, entityId: Int, payload: Map + table: String, + entityId: Int, + payload: Map, ): GenericResponse - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/DocumentDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/DocumentDialogRepository.kt index 12a9aa80d99..981434956c7 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/DocumentDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/DocumentDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -10,8 +19,11 @@ import rx.Observable interface DocumentDialogRepository { fun createDocument( - entityType: String?, entityId: Int, name: String?, - desc: String?, file: MultipartBody.Part? + entityType: String?, + entityId: Int, + name: String?, + desc: String?, + file: MultipartBody.Part?, ): Observable fun updateDocument( @@ -20,6 +32,6 @@ interface DocumentDialogRepository { documentId: Int, name: String?, desc: String?, - file: MultipartBody.Part? + file: MultipartBody.Part?, ): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/DocumentListRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/DocumentListRepository.kt index e5f78436ea6..bb44b8ab88f 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/DocumentListRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/DocumentListRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -14,12 +23,12 @@ interface DocumentListRepository { suspend fun downloadDocument( entityType: String, entityId: Int, - documentId: Int + documentId: Int, ): ResponseBody suspend fun removeDocument( entityType: String, entityId: Int, - documentId: Int + documentId: Int, ): GenericResponse -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/GenerateCollectionSheetRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/GenerateCollectionSheetRepository.kt index da77f91a1d5..f4560590997 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/GenerateCollectionSheetRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/GenerateCollectionSheetRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -19,28 +28,36 @@ interface GenerateCollectionSheetRepository { suspend fun getGroupsByOffice( office: Int, - params: Map + params: Map, ): List suspend fun fetchGroupsAssociatedWithCenter(centerId: Int): CenterWithAssociations suspend fun fetchCenterDetails( - format: String?, locale: String?, meetingDate: String?, officeId: Int, staffId: Int + format: String?, + locale: String?, + meetingDate: String?, + officeId: Int, + staffId: Int, ): List suspend fun fetchProductiveCollectionSheet( - centerId: Int, payload: CollectionSheetRequestPayload? + centerId: Int, + payload: CollectionSheetRequestPayload?, ): CollectionSheetResponse suspend fun fetchCollectionSheet( - groupId: Int, payload: CollectionSheetRequestPayload? + groupId: Int, + payload: CollectionSheetRequestPayload?, ): CollectionSheetResponse suspend fun submitProductiveSheet( - centerId: Int, payload: ProductiveCollectionSheetPayload? + centerId: Int, + payload: ProductiveCollectionSheetPayload?, ): GenericResponse suspend fun submitCollectionSheet( - groupId: Int, payload: CollectionSheetPayload? + groupId: Int, + payload: CollectionSheetPayload?, ): GenericResponse -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/GroupDetailsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/GroupDetailsRepository.kt index 8cf69c90d86..a22f652ce60 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/GroupDetailsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/GroupDetailsRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.GroupAccounts @@ -15,5 +24,4 @@ interface GroupDetailsRepository { fun getGroupAccounts(groupId: Int): Observable fun getGroupWithAssociations(groupId: Int): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/GroupListRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/GroupListRepository.kt index 83290394012..231525719f2 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/GroupListRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/GroupListRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.group.CenterWithAssociations @@ -12,5 +21,4 @@ interface GroupListRepository { fun getGroups(groupId: Int): Observable fun getGroupsByCenter(id: Int): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/GroupLoanAccountRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/GroupLoanAccountRepository.kt index b629bf4c806..8265ab04c58 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/GroupLoanAccountRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/GroupLoanAccountRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.GroupLoanPayload @@ -13,4 +22,4 @@ interface GroupLoanAccountRepository { fun getGroupLoansAccountTemplate(groupId: Int, productId: Int): Observable fun createGroupLoansAccount(loansPayload: GroupLoanPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/GroupsListRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/GroupsListRepository.kt index a84a0712527..da870acb234 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/GroupsListRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/GroupsListRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.group.Group @@ -8,4 +17,4 @@ interface GroupsListRepository { suspend fun getAllGroups(paged: Boolean, offset: Int, limit: Int): List fun getAllLocalGroups(): Flow> -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/IndividualCollectionSheetDetailsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/IndividualCollectionSheetDetailsRepository.kt index 0c7fbdd73cc..d5d89bf2c22 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/IndividualCollectionSheetDetailsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/IndividualCollectionSheetDetailsRepository.kt @@ -1,8 +1,16 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse import com.mifos.core.network.model.IndividualCollectionSheetPayload -import rx.Observable /** * Created by Aditya Gupta on 10/08/23. @@ -10,7 +18,6 @@ import rx.Observable interface IndividualCollectionSheetDetailsRepository { suspend fun saveIndividualCollectionSheet( - payload: IndividualCollectionSheetPayload + payload: IndividualCollectionSheetPayload, ): GenericResponse - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountApprovalRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountApprovalRepository.kt index 7d7f91aad5b..30f9bc971a5 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountApprovalRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountApprovalRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -10,5 +19,4 @@ import rx.Observable interface LoanAccountApprovalRepository { fun approveLoan(loanId: Int, loanApproval: LoanApproval?): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountDisbursementRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountDisbursementRepository.kt index b3b2bd5e86d..8f293da27f4 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountDisbursementRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountDisbursementRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -12,12 +21,11 @@ interface LoanAccountDisbursementRepository { fun getLoanTransactionTemplate( loanId: Int, - command: String? + command: String?, ): Observable fun disburseLoan( loanId: Int, - loanDisbursement: LoanDisbursement? + loanDisbursement: LoanDisbursement?, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountRepository.kt index c1ecf66bb27..1fd7b747d5a 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.LoansPayload @@ -16,4 +25,4 @@ interface LoanAccountRepository { suspend fun getLoansAccountTemplate(clientId: Int, productId: Int): Observable suspend fun createLoansAccount(loansPayload: LoansPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountSummaryRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountSummaryRepository.kt index de30dc4f4bd..abf41813605 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountSummaryRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanAccountSummaryRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.loan.LoanWithAssociations @@ -9,5 +18,4 @@ import rx.Observable interface LoanAccountSummaryRepository { fun getLoanById(loanId: Int): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeDialogRepository.kt index 874e3bcaa42..7e77c998805 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.ChargesPayload @@ -13,6 +22,6 @@ interface LoanChargeDialogRepository { suspend fun createLoanCharges( loanId: Int, - chargesPayload: ChargesPayload + chargesPayload: ChargesPayload, ): ChargeCreationResponse -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeRepository.kt index 26196637909..5b75c66accb 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanChargeRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.client.Charges @@ -8,5 +17,4 @@ import com.mifos.core.objects.client.Charges interface LoanChargeRepository { suspend fun getListOfLoanCharges(loanId: Int): List - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentRepository.kt index 1e765a01d7a..d924247b8a1 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.loan.LoanRepaymentRequest @@ -14,9 +23,8 @@ interface LoanRepaymentRepository { fun submitPayment( loanId: Int, - request: LoanRepaymentRequest + request: LoanRepaymentRequest, ): Observable fun getDatabaseLoanRepaymentByLoanId(loanId: Int): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentScheduleRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentScheduleRepository.kt index b0b63700216..8d75356a165 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentScheduleRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanRepaymentScheduleRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.loan.LoanWithAssociations @@ -9,5 +18,4 @@ import rx.Observable interface LoanRepaymentScheduleRepository { fun getLoanRepaySchedule(loanId: Int): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoanTransactionsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoanTransactionsRepository.kt index c588c7c264e..40752ecc3a6 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoanTransactionsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoanTransactionsRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.loan.LoanWithAssociations @@ -9,5 +18,4 @@ import rx.Observable interface LoanTransactionsRepository { fun getLoanTransactions(loan: Int): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/LoginRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/LoginRepository.kt index 33becc2264b..beeed2c5ab3 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/LoginRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/LoginRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import org.apache.fineract.client.models.PostAuthenticationResponse @@ -10,5 +19,4 @@ import rx.Observable interface LoginRepository { fun login(username: String, password: String): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/NewIndividualCollectionSheetRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/NewIndividualCollectionSheetRepository.kt index 87e05469b89..a96965de4ca 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/NewIndividualCollectionSheetRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/NewIndividualCollectionSheetRepository.kt @@ -1,10 +1,18 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.model.RequestCollectionSheetPayload import com.mifos.core.objects.collectionsheet.IndividualCollectionSheet import com.mifos.core.objects.organisation.Office import com.mifos.core.objects.organisation.Staff -import rx.Observable /** * Created by Aditya Gupta on 10/08/23. @@ -12,11 +20,10 @@ import rx.Observable interface NewIndividualCollectionSheetRepository { suspend fun getIndividualCollectionSheet( - payload: RequestCollectionSheetPayload? + payload: RequestCollectionSheetPayload?, ): IndividualCollectionSheet suspend fun offices(): List suspend fun getStaffInOffice(officeId: Int): List - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/NoteRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/NoteRepository.kt index 8b9af0c9168..4cd303bbdcb 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/NoteRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/NoteRepository.kt @@ -1,11 +1,17 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository -import android.database.Observable import com.mifos.core.objects.noncore.Note -import kotlinx.coroutines.flow.StateFlow interface NoteRepository { fun getNotes(entityType: String?, entityId: Int): List - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/OfflineDashboardRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/OfflineDashboardRepository.kt index 80b3b1b2256..98a1466ff7c 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/OfflineDashboardRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/OfflineDashboardRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.CenterPayload diff --git a/core/data/src/main/java/com/mifos/core/data/repository/PathTrackingRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/PathTrackingRepository.kt index 427104fe8d1..8e89dc2121d 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/PathTrackingRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/PathTrackingRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.user.UserLocation @@ -8,5 +17,4 @@ import com.mifos.core.objects.user.UserLocation interface PathTrackingRepository { suspend fun getUserPathTracking(userId: Int): List - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/PinPointClientRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/PinPointClientRepository.kt index 9d87c220f25..31a2c516a90 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/PinPointClientRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/PinPointClientRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -13,17 +22,17 @@ interface PinPointClientRepository { suspend fun addClientPinpointLocation( clientId: Int, - address: ClientAddressRequest + address: ClientAddressRequest, ): GenericResponse suspend fun deleteClientAddressPinpointLocation( apptableId: Int, - datatableId: Int + datatableId: Int, ): GenericResponse suspend fun updateClientPinpointLocation( apptableId: Int, datatableId: Int, - address: ClientAddressRequest + address: ClientAddressRequest, ): GenericResponse -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ReportCategoryRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ReportCategoryRepository.kt index 303d97a91cf..d68577c3601 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ReportCategoryRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ReportCategoryRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.runreports.client.ClientReportTypeItem @@ -10,7 +19,6 @@ interface ReportCategoryRepository { suspend fun getReportCategories( reportCategory: String, genericResultSet: Boolean, - parameterType: Boolean + parameterType: Boolean, ): List - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/ReportDetailRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/ReportDetailRepository.kt index 798718c5ae0..35eed144d34 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/ReportDetailRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/ReportDetailRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.runreports.FullParameterListResponse @@ -8,23 +17,29 @@ import com.mifos.core.objects.runreports.FullParameterListResponse interface ReportDetailRepository { suspend fun getReportFullParameterList( - reportName: String, parameterType: Boolean + reportName: String, + parameterType: Boolean, ): FullParameterListResponse suspend fun getReportParameterDetails( - parameterName: String, parameterType: Boolean + parameterName: String, + parameterType: Boolean, ): FullParameterListResponse suspend fun getRunReportOffices( - parameterName: String, officeId: Int, parameterType: Boolean + parameterName: String, + officeId: Int, + parameterType: Boolean, ): FullParameterListResponse suspend fun getRunReportProduct( - parameterName: String, currency: String, parameterType: Boolean + parameterName: String, + currency: String, + parameterType: Boolean, ): FullParameterListResponse suspend fun getRunReportWithQuery( - reportName: String, options: Map + reportName: String, + options: Map, ): FullParameterListResponse - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountActivateRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountActivateRepository.kt index 4b3263035b7..d00dd68b562 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountActivateRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountActivateRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -10,7 +19,6 @@ interface SavingsAccountActivateRepository { fun activateSavings( savingsAccountId: Int, - request: HashMap + request: HashMap, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountApprovalRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountApprovalRepository.kt index db827722677..76f868855ff 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountApprovalRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountApprovalRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -11,7 +20,6 @@ interface SavingsAccountApprovalRepository { fun approveSavingsApplication( savingsAccountId: Int, - savingsApproval: SavingsApproval? + savingsApproval: SavingsApproval?, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountRepository.kt index 662e1d0c95c..9adb358ebf2 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.SavingsPayload @@ -17,14 +26,13 @@ interface SavingsAccountRepository { fun getClientSavingsAccountTemplateByProduct( clientId: Int, - productId: Int + productId: Int, ): Observable fun getGroupSavingsAccountTemplateByProduct( groupId: Int, - productId: Int + productId: Int, ): Observable fun createSavingsAccount(savingsPayload: SavingsPayload?): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountSummaryRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountSummaryRepository.kt index e4e180c7a67..32a61c551a2 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountSummaryRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountSummaryRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.savings.SavingsAccountWithAssociations @@ -11,6 +20,6 @@ interface SavingsAccountSummaryRepository { fun getSavingsAccount( type: String?, savingsAccountId: Int, - association: String? + association: String?, ): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountTransactionRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountTransactionRepository.kt index 0d6ba075871..c5f8ccba3bf 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountTransactionRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SavingsAccountTransactionRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionRequest @@ -11,17 +20,19 @@ import rx.Observable interface SavingsAccountTransactionRepository { fun getSavingsAccountTransactionTemplate( - type: String?, savingsAccountId: Int, transactionType: String? + type: String?, + savingsAccountId: Int, + transactionType: String?, ): Observable - fun processTransaction( - savingsAccountType: String?, savingsAccountId: Int, transactionType: String?, - request: SavingsAccountTransactionRequest + savingsAccountType: String?, + savingsAccountId: Int, + transactionType: String?, + request: SavingsAccountTransactionRequest, ): Observable fun getSavingsAccountTransaction( - savingAccountId: Int + savingAccountId: Int, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SearchRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SearchRepository.kt index 0a33cfd3bc1..9aad56e95d9 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SearchRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SearchRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.SearchedEntity @@ -11,6 +20,6 @@ interface SearchRepository { suspend fun searchResources( query: String, resources: String?, - exactMatch: Boolean? + exactMatch: Boolean?, ): Flow> -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SignatureRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SignatureRepository.kt index 28bf839326c..d282f859f64 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SignatureRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SignatureRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.network.GenericResponse @@ -10,8 +19,10 @@ import rx.Observable interface SignatureRepository { fun createDocument( - entityType: String?, entityId: Int, name: String?, - desc: String?, file: MultipartBody.Part? + entityType: String?, + entityId: Int, + name: String?, + desc: String?, + file: MultipartBody.Part?, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SurveyListRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SurveyListRepository.kt index 913f66d452d..7501c6c72fb 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SurveyListRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SurveyListRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.survey.QuestionDatas @@ -17,6 +26,4 @@ interface SurveyListRepository { fun getDatabaseQuestionData(surveyId: Int): Observable> fun getDatabaseResponseDatas(questionId: Int): Observable> - - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SurveySubmitRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SurveySubmitRepository.kt index 0dc08c5b3e4..9f8b5a6995b 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SurveySubmitRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SurveySubmitRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.survey.Scorecard @@ -9,4 +18,4 @@ import rx.Observable interface SurveySubmitRepository { fun submitScore(surveyId: Int, scorecardPayload: Scorecard?): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncCenterPayloadsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncCenterPayloadsRepository.kt index b4bf5b45386..4eeeddec8a5 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncCenterPayloadsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncCenterPayloadsRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.data.CenterPayload @@ -16,4 +25,4 @@ interface SyncCenterPayloadsRepository { fun deleteAndUpdateCenterPayloads(id: Int): Observable> fun updateCenterPayload(centerPayload: CenterPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncCentersDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncCentersDialogRepository.kt index cf10eb7f7f9..b1c006dbaed 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncCentersDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncCentersDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.CenterAccounts @@ -40,11 +49,14 @@ interface SyncCentersDialogRepository { fun syncCenterInDatabase(center: Center): Observable
fun syncSavingsAccount( - type: String?, savingsAccountId: Int, association: String? + type: String?, + savingsAccountId: Int, + association: String?, ): Observable fun syncSavingsAccountTransactionTemplate( - savingsAccountType: String?, savingsAccountId: Int, transactionType: String? + savingsAccountType: String?, + savingsAccountId: Int, + transactionType: String?, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncClientPayloadsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncClientPayloadsRepository.kt index 9d817b26641..81b41a5ad17 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncClientPayloadsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncClientPayloadsRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.client.Client @@ -12,8 +21,8 @@ interface SyncClientPayloadsRepository { fun deleteAndUpdatePayloads( id: Int, - clientCreationTIme: Long + clientCreationTIme: Long, ): Observable> fun updateClientPayload(clientPayload: ClientPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncClientsDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncClientsDialogRepository.kt index 7d15a0a0a53..962d75dc6c3 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncClientsDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncClientsDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.ClientAccounts @@ -20,12 +29,16 @@ interface SyncClientsDialogRepository { fun syncLoanRepaymentTemplate(loanId: Int): Observable fun syncSavingsAccount( - type: String?, savingsAccountId: Int, association: String? + type: String?, + savingsAccountId: Int, + association: String?, ): Observable fun syncSavingsAccountTransactionTemplate( - savingsAccountType: String?, savingsAccountId: Int, transactionType: String? + savingsAccountType: String?, + savingsAccountId: Int, + transactionType: String?, ): Observable fun syncClientInDatabase(client: Client): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupPayloadsRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupPayloadsRepository.kt index 914aed6186a..43eff7d122a 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupPayloadsRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupPayloadsRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.group.GroupPayload @@ -13,4 +22,4 @@ interface SyncGroupPayloadsRepository { fun deleteAndUpdateGroupPayloads(id: Int): Observable> fun updateGroupPayload(groupPayload: GroupPayload): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupsDialogRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupsDialogRepository.kt index 315c082e726..aedf27df821 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupsDialogRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncGroupsDialogRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.ClientAccounts @@ -18,17 +27,20 @@ interface SyncGroupsDialogRepository { fun syncGroupAccounts(groupId: Int): Observable - fun syncLoanById(loanId: Int): Observable fun syncLoanRepaymentTemplate(loanId: Int): Observable fun syncSavingsAccount( - type: String?, savingsAccountId: Int, association: String? + type: String?, + savingsAccountId: Int, + association: String?, ): Observable fun syncSavingsAccountTransactionTemplate( - savingsAccountType: String?, savingsAccountId: Int, transactionType: String? + savingsAccountType: String?, + savingsAccountId: Int, + transactionType: String?, ): Observable fun getGroupWithAssociations(groupId: Int): Observable @@ -38,5 +50,4 @@ interface SyncGroupsDialogRepository { fun syncClientAccounts(clientId: Int): Observable fun syncGroupInDatabase(group: Group): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncLoanRepaymentTransactionRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncLoanRepaymentTransactionRepository.kt index 60280075490..c03d325e7a6 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncLoanRepaymentTransactionRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncLoanRepaymentTransactionRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.loan.LoanRepaymentRequest @@ -12,13 +21,12 @@ interface SyncLoanRepaymentTransactionRepository { fun submitPayment( loanId: Int, - request: LoanRepaymentRequest + request: LoanRepaymentRequest, ): Observable fun deleteAndUpdateLoanRepayments(loanId: Int): Observable> fun updateLoanRepaymentTransaction( - loanRepaymentRequest: LoanRepaymentRequest + loanRepaymentRequest: LoanRepaymentRequest, ): Observable - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository/SyncSavingsAccountTransactionRepository.kt b/core/data/src/main/java/com/mifos/core/data/repository/SyncSavingsAccountTransactionRepository.kt index dd7611abe39..20ebbe0496b 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository/SyncSavingsAccountTransactionRepository.kt +++ b/core/data/src/main/java/com/mifos/core/data/repository/SyncSavingsAccountTransactionRepository.kt @@ -1,3 +1,12 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data.repository import com.mifos.core.objects.accounts.savings.SavingsAccountTransactionRequest @@ -14,15 +23,17 @@ interface SyncSavingsAccountTransactionRepository { fun paymentTypeOption(): Observable> fun processTransaction( - savingsAccountType: String?, savingsAccountId: Int, transactionType: String?, - request: SavingsAccountTransactionRequest + savingsAccountType: String?, + savingsAccountId: Int, + transactionType: String?, + request: SavingsAccountTransactionRequest, ): Observable fun deleteAndUpdateTransactions( - savingsAccountId: Int + savingsAccountId: Int, ): Observable> fun updateLoanRepaymentTransaction( - savingsAccountTransactionRequest: SavingsAccountTransactionRequest + savingsAccountTransactionRequest: SavingsAccountTransactionRequest, ): Observable -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ActivateRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ActivateRepositoryImp.kt similarity index 70% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ActivateRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ActivateRepositoryImp.kt index d208a65b3c9..01d6a4df13f 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ActivateRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ActivateRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.ActivateRepository import com.mifos.core.network.GenericResponse @@ -17,27 +26,27 @@ import javax.inject.Inject class ActivateRepositoryImp @Inject constructor( private val dataManagerClient: DataManagerClient, private val dataManagerCenter: DataManagerCenter, - private val dataManagerGroups: DataManagerGroups + private val dataManagerGroups: DataManagerGroups, ) : ActivateRepository { override fun activateClient( clientId: Int, - clientActivate: ActivatePayload? + clientActivate: ActivatePayload?, ): Observable { return dataManagerClient.activateClient(clientId, clientActivate) } override fun activateCenter( centerId: Int, - activatePayload: ActivatePayload? + activatePayload: ActivatePayload?, ): Observable { return dataManagerCenter.activateCenter(centerId, activatePayload) } override fun activateGroup( groupId: Int, - activatePayload: ActivatePayload? + activatePayload: ActivatePayload?, ): Observable { return dataManagerGroups.activateGroup(groupId, activatePayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/CenterDetailsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CenterDetailsRepositoryImp.kt similarity index 67% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/CenterDetailsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/CenterDetailsRepositoryImp.kt index 90ecea748da..a5813df54db 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/CenterDetailsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CenterDetailsRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.CenterDetailsRepository import com.mifos.core.network.datamanager.DataManagerCenter @@ -14,7 +23,7 @@ import javax.inject.Inject */ class CenterDetailsRepositoryImp @Inject constructor( private val dataManagerCenter: DataManagerCenter, - private val dataManagerRunReport: DataManagerRunReport + private val dataManagerRunReport: DataManagerRunReport, ) : CenterDetailsRepository { override suspend fun getCentersGroupAndMeeting(id: Int): Flow { @@ -23,8 +32,8 @@ class CenterDetailsRepositoryImp @Inject constructor( override suspend fun getCenterSummaryInfo( centerId: Int, - genericResultSet: Boolean + genericResultSet: Boolean, ): Flow> { return flow { emit(dataManagerRunReport.getCenterSummaryInfo(centerId, genericResultSet)) } } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/CenterListRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CenterListRepositoryImp.kt similarity index 67% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/CenterListRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/CenterListRepositoryImp.kt index 4e428b7aa10..7b87193d10a 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/CenterListRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CenterListRepositoryImp.kt @@ -1,9 +1,18 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import androidx.paging.Pager import androidx.paging.PagingConfig import androidx.paging.PagingData -import com.mifos.core.data.paging_source.CenterListPagingSource +import com.mifos.core.data.pagingSource.CenterListPagingSource import com.mifos.core.data.repository.CenterListRepository import com.mifos.core.network.datamanager.DataManagerCenter import com.mifos.core.objects.client.Page @@ -22,10 +31,11 @@ class CenterListRepositoryImp @Inject constructor(private val dataManagerCenter: override fun getAllCenters(): Flow> { return Pager( config = PagingConfig( - pageSize = 10 - ), pagingSourceFactory = { + pageSize = 10, + ), + pagingSourceFactory = { CenterListPagingSource(dataManagerCenter) - } + }, ).flow } @@ -36,4 +46,4 @@ class CenterListRepositoryImp @Inject constructor(private val dataManagerCenter: override fun allDatabaseCenters(): Observable> { return dataManagerCenter.allDatabaseCenters } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ChargeDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ChargeDialogRepositoryImp.kt similarity index 65% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ChargeDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ChargeDialogRepositoryImp.kt index 656c63dfcac..279321cf661 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ChargeDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ChargeDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.ChargesPayload import com.mifos.core.data.repository.ChargeDialogRepository @@ -19,8 +28,8 @@ class ChargeDialogRepositoryImp @Inject constructor(private val dataManager: Dat override suspend fun createCharges( clientId: Int, - payload: ChargesPayload + payload: ChargesPayload, ): ChargeCreationResponse { return dataManager.createCharges(clientId, payload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/CheckerInboxRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CheckerInboxRepositoryImp.kt similarity index 76% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/CheckerInboxRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/CheckerInboxRepositoryImp.kt index 60448e214fa..485fd0dede9 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/CheckerInboxRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CheckerInboxRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.CheckerInboxRepository import com.mifos.core.network.GenericResponse @@ -8,13 +17,13 @@ import com.mifos.core.objects.checkerinboxandtasks.CheckerTask import javax.inject.Inject class CheckerInboxRepositoryImp @Inject constructor( - private val dataManagerCheckerInbox: DataManagerCheckerInbox + private val dataManagerCheckerInbox: DataManagerCheckerInbox, ) : CheckerInboxRepository { override suspend fun loadCheckerTasks( actionName: String?, entityName: String?, - resourceId: Int? + resourceId: Int?, ): List { return dataManagerCheckerInbox.getCheckerTaskList() } @@ -34,4 +43,4 @@ class CheckerInboxRepositoryImp @Inject constructor( override suspend fun loadSearchTemplate(): CheckerInboxSearchTemplate { TODO("Not yet implemented") } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/CheckerInboxTasksRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CheckerInboxTasksRepositoryImp.kt similarity index 71% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/CheckerInboxTasksRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/CheckerInboxTasksRepositoryImp.kt index 4a59b169c1a..f38221ec4d1 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/CheckerInboxTasksRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CheckerInboxTasksRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.CheckerInboxTasksRepository import com.mifos.core.network.datamanager.DataManagerCheckerInbox @@ -8,7 +17,6 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow import javax.inject.Inject - /** * Created by Aditya Gupta on 21/03/24. */ @@ -23,8 +31,8 @@ class CheckerInboxTasksRepositoryImp @Inject constructor(private val dataManager override suspend fun getCheckerTaskList( actionName: String?, entityName: String?, - resourceId: Int? + resourceId: Int?, ): Flow> { return flow { emit(dataManagerCheckerInbox.getCheckerTaskList()) } } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientChargeRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientChargeRepositoryImp.kt similarity index 56% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ClientChargeRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientChargeRepositoryImp.kt index 956c53d51b0..60bdd54adf0 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientChargeRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientChargeRepositoryImp.kt @@ -1,9 +1,18 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import androidx.paging.Pager import androidx.paging.PagingConfig import androidx.paging.PagingData -import com.mifos.core.data.paging_source.ClientChargesPagingSource +import com.mifos.core.data.pagingSource.ClientChargesPagingSource import com.mifos.core.data.repository.ClientChargeRepository import com.mifos.core.network.datamanager.DataManagerCharge import com.mifos.core.objects.client.Charges @@ -17,14 +26,15 @@ class ClientChargeRepositoryImp @Inject constructor(private val dataManagerCharg ClientChargeRepository { override fun getClientCharges( - clientId: Int + clientId: Int, ): Flow> { return Pager( config = PagingConfig( - pageSize = 10 - ), pagingSourceFactory = { + pageSize = 10, + ), + pagingSourceFactory = { ClientChargesPagingSource(clientId, dataManagerCharge) - } + }, ).flow } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientDetailsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientDetailsRepositoryImp.kt similarity index 74% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ClientDetailsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientDetailsRepositoryImp.kt index 3de34870fe2..1b4778f38ae 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientDetailsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientDetailsRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.ClientDetailsRepository import com.mifos.core.network.datamanager.DataManagerClient @@ -30,5 +39,4 @@ class ClientDetailsRepositoryImp @Inject constructor(private val dataManagerClie override fun getClient(clientId: Int): Observable { return dataManagerClient.getClient(clientId) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientIdentifierDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientIdentifierDialogRepositoryImp.kt similarity index 69% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ClientIdentifierDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientIdentifierDialogRepositoryImp.kt index efd4e126092..903ec960001 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientIdentifierDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientIdentifierDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.ClientIdentifierDialogRepository import com.mifos.core.network.datamanager.DataManagerClient @@ -20,8 +29,8 @@ class ClientIdentifierDialogRepositoryImp @Inject constructor(private val dataMa override suspend fun createClientIdentifier( clientId: Int, - identifierPayload: IdentifierPayload + identifierPayload: IdentifierPayload, ): IdentifierCreationResponse { return dataManagerClient.createClientIdentifier(clientId, identifierPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientIdentifiersRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientIdentifiersRepositoryImp.kt similarity index 69% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ClientIdentifiersRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientIdentifiersRepositoryImp.kt index 12b7a25fa0c..34c6e29f130 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientIdentifiersRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientIdentifiersRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.ClientIdentifiersRepository import com.mifos.core.network.datamanager.DataManagerClient @@ -19,9 +28,8 @@ class ClientIdentifiersRepositoryImp @Inject constructor(private val dataManager override fun deleteClientIdentifier( clientId: Int, - identifierId: Int + identifierId: Int, ): Observable { return dataManagerClient.deleteClientIdentifier(clientId, identifierId) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientListRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientListRepositoryImp.kt similarity index 59% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ClientListRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientListRepositoryImp.kt index 64bbacf61ce..a89eee4eb64 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ClientListRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ClientListRepositoryImp.kt @@ -1,9 +1,18 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import androidx.paging.Pager import androidx.paging.PagingConfig import androidx.paging.PagingData -import com.mifos.core.data.paging_source.ClientListPagingSource +import com.mifos.core.data.pagingSource.ClientListPagingSource import com.mifos.core.data.repository.ClientListRepository import com.mifos.core.network.datamanager.DataManagerClient import com.mifos.core.objects.client.Client @@ -16,20 +25,21 @@ import javax.inject.Inject * Created by Aditya Gupta on 08/08/23. */ class ClientListRepositoryImp @Inject constructor( - private val dataManagerClient: DataManagerClient + private val dataManagerClient: DataManagerClient, ) : ClientListRepository { override fun getAllClients(): Flow> { return Pager( config = PagingConfig( - pageSize = 10 - ), pagingSourceFactory = { + pageSize = 10, + ), + pagingSourceFactory = { ClientListPagingSource(dataManagerClient) - } + }, ).flow } override fun allDatabaseClients(): Observable> { return dataManagerClient.allDatabaseClients } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewCenterRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewCenterRepositoryImp.kt similarity index 62% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewCenterRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewCenterRepositoryImp.kt index 1b7939bec96..5d7f941a12c 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewCenterRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewCenterRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.CenterPayload import com.mifos.core.data.repository.CreateNewCenterRepository @@ -16,4 +25,4 @@ class CreateNewCenterRepositoryImp @Inject constructor(private val dataManagerCe override fun createCenter(centerPayload: CenterPayload): Observable { return dataManagerCenter.createCenter(centerPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewClientRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewClientRepositoryImp.kt similarity index 78% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewClientRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewClientRepositoryImp.kt index 40c27eea46b..a213dd9cb3a 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewClientRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewClientRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.CreateNewClientRepository import com.mifos.core.network.datamanager.DataManagerClient @@ -20,7 +29,7 @@ import javax.inject.Inject class CreateNewClientRepositoryImp @Inject constructor( private val dataManagerClient: DataManagerClient, private val dataManagerOffices: DataManagerOffices, - private val dataManagerStaff: DataManagerStaff + private val dataManagerStaff: DataManagerStaff, ) : CreateNewClientRepository { override fun clientTemplate(): Observable { @@ -42,5 +51,4 @@ class CreateNewClientRepositoryImp @Inject constructor( override fun uploadClientImage(id: Int, file: MultipartBody.Part?): Observable { return dataManagerClient.uploadClientImage(id, file) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewGroupRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewGroupRepositoryImp.kt similarity index 66% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewGroupRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewGroupRepositoryImp.kt index 26246367e3e..a227acc182f 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/CreateNewGroupRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/CreateNewGroupRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.CreateNewGroupRepository import com.mifos.core.network.datamanager.DataManagerGroups @@ -14,7 +23,7 @@ import javax.inject.Inject */ class CreateNewGroupRepositoryImp @Inject constructor( private val dataManagerOffices: DataManagerOffices, - private val dataManagerGroups: DataManagerGroups + private val dataManagerGroups: DataManagerGroups, ) : CreateNewGroupRepository { override fun offices(): Observable> { @@ -24,4 +33,4 @@ class CreateNewGroupRepositoryImp @Inject constructor( override fun createGroup(groupPayload: GroupPayload): Observable { return dataManagerGroups.createGroup(groupPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableDataRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableDataRepositoryImp.kt similarity index 70% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableDataRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableDataRepositoryImp.kt index d8fa49098d0..c2071d9948e 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableDataRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableDataRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.google.gson.JsonArray import com.mifos.core.data.repository.DataTableDataRepository @@ -20,9 +29,8 @@ class DataTableDataRepositoryImp @Inject constructor(private val dataManagerData override fun deleteDataTableEntry( table: String?, entity: Int, - rowId: Int + rowId: Int, ): Observable { return dataManagerDataTable.deleteDataTableEntry(table, entity, rowId) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableListRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableListRepositoryImp.kt similarity index 74% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableListRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableListRepositoryImp.kt index e667adfa450..9f41329748f 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableListRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableListRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.GroupLoanPayload import com.mifos.core.data.LoansPayload @@ -18,7 +27,7 @@ import javax.inject.Inject class DataTableListRepositoryImp @Inject constructor( private val dataManagerLoan: DataManagerLoan, private val dataManager: DataManager, - private val dataManagerClient: DataManagerClient + private val dataManagerClient: DataManagerClient, ) : DataTableListRepository { override fun createLoansAccount(loansPayload: LoansPayload?): Observable { @@ -32,4 +41,4 @@ class DataTableListRepositoryImp @Inject constructor( override fun createClient(clientPayload: ClientPayload): Observable { return dataManagerClient.createClient(clientPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableRepositoryImp.kt similarity index 59% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableRepositoryImp.kt index f49ef5fd0d0..a0a8b099422 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.DataTableRepository import com.mifos.core.network.datamanager.DataManagerDataTable @@ -15,4 +24,4 @@ class DataTableRepositoryImp @Inject constructor(private val dataManagerDataTabl override fun getDataTable(tableName: String?): Observable> { return dataManagerDataTable.getDataTable(tableName) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableRowDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableRowDialogRepositoryImp.kt similarity index 60% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableRowDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableRowDialogRepositoryImp.kt index a4cab4cf352..01d91a861fc 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/DataTableRowDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DataTableRowDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.DataTableRowDialogRepository import com.mifos.core.network.GenericResponse @@ -14,8 +23,8 @@ class DataTableRowDialogRepositoryImp @Inject constructor(private val dataManage override suspend fun addDataTableEntry( table: String, entityId: Int, - payload: Map + payload: Map, ): GenericResponse { return dataManagerDataTable.addDataTableEntry(table, entityId, payload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/DocumentDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DocumentDialogRepositoryImp.kt similarity index 70% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/DocumentDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/DocumentDialogRepositoryImp.kt index 8709c067178..754fb8a63ab 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/DocumentDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DocumentDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.DocumentDialogRepository import com.mifos.core.network.GenericResponse @@ -18,7 +27,7 @@ class DocumentDialogRepositoryImp @Inject constructor(private val dataManagerDoc entityId: Int, name: String?, desc: String?, - file: MultipartBody.Part? + file: MultipartBody.Part?, ): Observable { return dataManagerDocument.createDocument(entityType, entityId, name, desc, file) } @@ -29,7 +38,7 @@ class DocumentDialogRepositoryImp @Inject constructor(private val dataManagerDoc documentId: Int, name: String?, desc: String?, - file: MultipartBody.Part? + file: MultipartBody.Part?, ): Observable { return dataManagerDocument.updateDocument( entityType, @@ -37,7 +46,7 @@ class DocumentDialogRepositoryImp @Inject constructor(private val dataManagerDoc documentId, name, desc, - file + file, ) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/DocumentListRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DocumentListRepositoryImp.kt similarity index 71% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/DocumentListRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/DocumentListRepositoryImp.kt index 1425ab199ac..ab9872bda67 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/DocumentListRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/DocumentListRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.DocumentListRepository import com.mifos.core.network.GenericResponse @@ -20,7 +29,7 @@ class DocumentListRepositoryImp @Inject constructor(private val dataManagerDocum override suspend fun downloadDocument( entityType: String, entityId: Int, - documentId: Int + documentId: Int, ): ResponseBody { return dataManagerDocument.downloadDocument(entityType, entityId, documentId) } @@ -28,8 +37,8 @@ class DocumentListRepositoryImp @Inject constructor(private val dataManagerDocum override suspend fun removeDocument( entityType: String, entityId: Int, - documentId: Int + documentId: Int, ): GenericResponse { return dataManagerDocument.removeDocument(entityType, entityId, documentId) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/GenerateCollectionSheetRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GenerateCollectionSheetRepositoryImp.kt similarity index 79% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/GenerateCollectionSheetRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/GenerateCollectionSheetRepositoryImp.kt index 87b49077016..9e9289f070c 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/GenerateCollectionSheetRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GenerateCollectionSheetRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.GenerateCollectionSheetRepository import com.mifos.core.network.DataManager @@ -19,19 +28,19 @@ import javax.inject.Inject */ class GenerateCollectionSheetRepositoryImp @Inject constructor( private val dataManager: DataManager, - private val collectionDataManager: DataManagerCollectionSheet + private val collectionDataManager: DataManagerCollectionSheet, ) : GenerateCollectionSheetRepository { override suspend fun getCentersInOffice( id: Int, - params: Map + params: Map, ): List
{ return dataManager.getCentersInOffice(id, params) } override suspend fun getGroupsByOffice( office: Int, - params: Map + params: Map, ): List { return dataManager.getGroupsByOffice(office, params) } @@ -45,42 +54,42 @@ class GenerateCollectionSheetRepositoryImp @Inject constructor( locale: String?, meetingDate: String?, officeId: Int, - staffId: Int + staffId: Int, ): List { return collectionDataManager.fetchCenterDetails( format, locale, meetingDate, officeId, - staffId + staffId, ) } override suspend fun fetchProductiveCollectionSheet( centerId: Int, - payload: CollectionSheetRequestPayload? + payload: CollectionSheetRequestPayload?, ): CollectionSheetResponse { return collectionDataManager.fetchProductiveCollectionSheet(centerId, payload) } override suspend fun fetchCollectionSheet( groupId: Int, - payload: CollectionSheetRequestPayload? + payload: CollectionSheetRequestPayload?, ): CollectionSheetResponse { return collectionDataManager.fetchCollectionSheet(groupId, payload) } override suspend fun submitProductiveSheet( centerId: Int, - payload: ProductiveCollectionSheetPayload? + payload: ProductiveCollectionSheetPayload?, ): GenericResponse { return collectionDataManager.submitProductiveSheet(centerId, payload) } override suspend fun submitCollectionSheet( groupId: Int, - payload: CollectionSheetPayload? + payload: CollectionSheetPayload?, ): GenericResponse { return collectionDataManager.submitCollectionSheet(groupId, payload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupDetailsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupDetailsRepositoryImp.kt similarity index 71% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/GroupDetailsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupDetailsRepositoryImp.kt index 92f9e37fe0c..ce8b0441b33 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupDetailsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupDetailsRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.GroupDetailsRepository import com.mifos.core.network.datamanager.DataManagerGroups @@ -25,4 +34,4 @@ class GroupDetailsRepositoryImp @Inject constructor(private val dataManagerGroup override fun getGroupWithAssociations(groupId: Int): Observable { return dataManagerGroups.getGroupWithAssociations(groupId) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupListRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupListRepositoryImp.kt similarity index 65% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/GroupListRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupListRepositoryImp.kt index 4886df554a6..79947277f03 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupListRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupListRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.GroupListRepository import com.mifos.core.network.DataManager @@ -20,5 +29,4 @@ class GroupListRepositoryImp @Inject constructor(private val dataManager: DataMa override fun getGroupsByCenter(id: Int): Observable { return dataManager.getGroupsByCenter(id) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupLoanAccountRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupLoanAccountRepositoryImp.kt similarity index 68% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/GroupLoanAccountRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupLoanAccountRepositoryImp.kt index 6125203724c..a4266853293 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupLoanAccountRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupLoanAccountRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.GroupLoanPayload import com.mifos.core.data.repository.GroupLoanAccountRepository @@ -16,7 +25,7 @@ class GroupLoanAccountRepositoryImp @Inject constructor(private val dataManager: override fun getGroupLoansAccountTemplate( groupId: Int, - productId: Int + productId: Int, ): Observable { return dataManager.getGroupLoansAccountTemplate(groupId, productId) } @@ -24,4 +33,4 @@ class GroupLoanAccountRepositoryImp @Inject constructor(private val dataManager: override fun createGroupLoansAccount(loansPayload: GroupLoanPayload): Observable { return dataManager.createGroupLoansAccount(loansPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupsListRepositoryImpl.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupsListRepositoryImpl.kt similarity index 86% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/GroupsListRepositoryImpl.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupsListRepositoryImpl.kt index 59f97a39108..d441c7bc407 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/GroupsListRepositoryImpl.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/GroupsListRepositoryImpl.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.GroupsListRepository import com.mifos.core.network.datamanager.DataManagerGroups @@ -62,4 +71,4 @@ class GroupsListRepositoryImpl @Inject constructor( emit(data) } } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/IndividualCollectionSheetDetailsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/IndividualCollectionSheetDetailsRepositoryImp.kt similarity index 66% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/IndividualCollectionSheetDetailsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/IndividualCollectionSheetDetailsRepositoryImp.kt index 8c6ad15bcb3..6141834060f 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/IndividualCollectionSheetDetailsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/IndividualCollectionSheetDetailsRepositoryImp.kt @@ -1,10 +1,18 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.IndividualCollectionSheetDetailsRepository import com.mifos.core.network.GenericResponse import com.mifos.core.network.datamanager.DataManagerCollectionSheet import com.mifos.core.network.model.IndividualCollectionSheetPayload -import rx.Observable import javax.inject.Inject /** @@ -16,4 +24,4 @@ class IndividualCollectionSheetDetailsRepositoryImp @Inject constructor(private override suspend fun saveIndividualCollectionSheet(payload: IndividualCollectionSheetPayload): GenericResponse { return dataManagerCollection.saveIndividualCollectionSheet(payload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountApprovalRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountApprovalRepositoryImp.kt similarity index 59% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountApprovalRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountApprovalRepositoryImp.kt index 328c5774a38..c474b006845 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountApprovalRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountApprovalRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoanAccountApprovalRepository import com.mifos.core.network.DataManager @@ -15,8 +24,8 @@ class LoanAccountApprovalRepositoryImp @Inject constructor(private val dataManag override fun approveLoan( loanId: Int, - loanApproval: LoanApproval? + loanApproval: LoanApproval?, ): Observable { return dataManager.approveLoan(loanId, loanApproval) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountDisbursementRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountDisbursementRepositoryImp.kt similarity index 67% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountDisbursementRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountDisbursementRepositoryImp.kt index 36be53ef129..2f067fa9884 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountDisbursementRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountDisbursementRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoanAccountDisbursementRepository import com.mifos.core.network.GenericResponse @@ -16,17 +25,15 @@ class LoanAccountDisbursementRepositoryImp @Inject constructor(private val dataM override fun getLoanTransactionTemplate( loanId: Int, - command: String? + command: String?, ): Observable { return dataManagerLoan.getLoanTransactionTemplate(loanId, command) } override fun disburseLoan( loanId: Int, - loanDisbursement: LoanDisbursement? + loanDisbursement: LoanDisbursement?, ): Observable { return disburseLoan(loanId, loanDisbursement) } - - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountRepositoryImp.kt similarity index 72% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountRepositoryImp.kt index 224e42b844b..362531fa4af 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.LoansPayload import com.mifos.core.data.repository.LoanAccountRepository @@ -21,7 +30,7 @@ class LoanAccountRepositoryImp @Inject constructor(private val dataManagerLoan: override suspend fun getLoansAccountTemplate( clientId: Int, - productId: Int + productId: Int, ): Observable { return dataManagerLoan.getLoansAccountTemplate(clientId, productId) } @@ -29,4 +38,4 @@ class LoanAccountRepositoryImp @Inject constructor(private val dataManagerLoan: override suspend fun createLoansAccount(loansPayload: LoansPayload): Observable { return dataManagerLoan.createLoansAccount(loansPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountSummaryRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountSummaryRepositoryImp.kt similarity index 60% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountSummaryRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountSummaryRepositoryImp.kt index 0f735e63ce5..cc392adf2c5 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanAccountSummaryRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanAccountSummaryRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoanAccountSummaryRepository import com.mifos.core.network.datamanager.DataManagerLoan @@ -15,4 +24,4 @@ class LoanAccountSummaryRepositoryImp @Inject constructor(private val dataManage override fun getLoanById(loanId: Int): Observable { return dataManagerLoan.getLoanById(loanId) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanChargeDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanChargeDialogRepositoryImp.kt similarity index 64% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanChargeDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanChargeDialogRepositoryImp.kt index 08365d7dd3e..ca9e2c51209 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanChargeDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanChargeDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.ChargesPayload import com.mifos.core.data.repository.LoanChargeDialogRepository @@ -19,8 +28,8 @@ class LoanChargeDialogRepositoryImp @Inject constructor(private val dataManager: override suspend fun createLoanCharges( loanId: Int, - chargesPayload: ChargesPayload + chargesPayload: ChargesPayload, ): ChargeCreationResponse { return dataManager.createLoanCharges(loanId, chargesPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanChargeRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanChargeRepositoryImp.kt similarity index 56% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanChargeRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanChargeRepositoryImp.kt index 4cfbaf2cdb3..a2870a72dd5 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanChargeRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanChargeRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoanChargeRepository import com.mifos.core.network.DataManager @@ -14,4 +23,4 @@ class LoanChargeRepositoryImp @Inject constructor(private val dataManager: DataM override suspend fun getListOfLoanCharges(loanId: Int): List { return dataManager.getListOfLoanCharges(loanId) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanRepaymentRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanRepaymentRepositoryImp.kt similarity index 71% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanRepaymentRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanRepaymentRepositoryImp.kt index 3a3b698c50a..60295a87ee3 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanRepaymentRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanRepaymentRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoanRepaymentRepository import com.mifos.core.network.datamanager.DataManagerLoan @@ -20,7 +29,7 @@ class LoanRepaymentRepositoryImp @Inject constructor(private val dataManagerLoan override fun submitPayment( loanId: Int, - request: LoanRepaymentRequest + request: LoanRepaymentRequest, ): Observable { return submitPayment(loanId, request) } @@ -28,6 +37,4 @@ class LoanRepaymentRepositoryImp @Inject constructor(private val dataManagerLoan override fun getDatabaseLoanRepaymentByLoanId(loanId: Int): Observable { return dataManagerLoan.getDatabaseLoanRepaymentByLoanId(loanId) } - - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanRepaymentScheduleRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanRepaymentScheduleRepositoryImp.kt similarity index 60% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanRepaymentScheduleRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanRepaymentScheduleRepositoryImp.kt index c44c71e7072..99050e51f1d 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanRepaymentScheduleRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanRepaymentScheduleRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoanRepaymentScheduleRepository import com.mifos.core.network.DataManager @@ -15,4 +24,4 @@ class LoanRepaymentScheduleRepositoryImp @Inject constructor(private val dataMan override fun getLoanRepaySchedule(loanId: Int): Observable { return dataManager.getLoanRepaySchedule(loanId) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanTransactionsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanTransactionsRepositoryImp.kt similarity index 59% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoanTransactionsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanTransactionsRepositoryImp.kt index a82184e11fe..6dd34f3ee31 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoanTransactionsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoanTransactionsRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoanTransactionsRepository import com.mifos.core.network.DataManager @@ -15,4 +24,4 @@ class LoanTransactionsRepositoryImp @Inject constructor(private val dataManager: override fun getLoanTransactions(loan: Int): Observable { return dataManager.getLoanTransactions(loan) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoginRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoginRepositoryImp.kt similarity index 60% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/LoginRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/LoginRepositoryImp.kt index 4658c76a5fe..b98da6c315c 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/LoginRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/LoginRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.LoginRepository import com.mifos.core.network.datamanger.DataManagerAuth @@ -16,4 +25,4 @@ class LoginRepositoryImp @Inject constructor(private val dataManagerAuth: DataMa override fun login(username: String, password: String): Observable { return dataManagerAuth.login(username, password) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/NewIndividualCollectionSheetRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/NewIndividualCollectionSheetRepositoryImp.kt similarity index 75% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/NewIndividualCollectionSheetRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/NewIndividualCollectionSheetRepositoryImp.kt index 9729ac94e23..ffe2f7aca65 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/NewIndividualCollectionSheetRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/NewIndividualCollectionSheetRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.NewIndividualCollectionSheetRepository import com.mifos.core.network.DataManager @@ -7,7 +16,6 @@ import com.mifos.core.network.model.RequestCollectionSheetPayload import com.mifos.core.objects.collectionsheet.IndividualCollectionSheet import com.mifos.core.objects.organisation.Office import com.mifos.core.objects.organisation.Staff -import rx.Observable import javax.inject.Inject /** @@ -15,7 +23,7 @@ import javax.inject.Inject */ class NewIndividualCollectionSheetRepositoryImp @Inject constructor( private val dataManager: DataManager, - private val dataManagerCollection: DataManagerCollectionSheet + private val dataManagerCollection: DataManagerCollectionSheet, ) : NewIndividualCollectionSheetRepository { override suspend fun getIndividualCollectionSheet(payload: RequestCollectionSheetPayload?): IndividualCollectionSheet { @@ -29,5 +37,4 @@ class NewIndividualCollectionSheetRepositoryImp @Inject constructor( override suspend fun getStaffInOffice(officeId: Int): List { return dataManager.getStaffInOffice(officeId) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/NoteRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/NoteRepositoryImp.kt similarity index 54% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/NoteRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/NoteRepositoryImp.kt index 512bdc15e10..a2915e88466 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/NoteRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/NoteRepositoryImp.kt @@ -1,10 +1,17 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp -import android.database.Observable import com.mifos.core.data.repository.NoteRepository import com.mifos.core.network.datamanager.DataManagerNote import com.mifos.core.objects.noncore.Note -import kotlinx.coroutines.flow.StateFlow import javax.inject.Inject class NoteRepositoryImp @Inject constructor(private val dataManagerNote: DataManagerNote) : @@ -13,4 +20,4 @@ class NoteRepositoryImp @Inject constructor(private val dataManagerNote: DataMan override fun getNotes(entityType: String?, entityId: Int): List { return dataManagerNote.getNotes(entityType, entityId) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/OfflineDashboardRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/OfflineDashboardRepositoryImp.kt similarity index 80% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/OfflineDashboardRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/OfflineDashboardRepositoryImp.kt index d84aafb285e..79d7452a2e5 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/OfflineDashboardRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/OfflineDashboardRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.CenterPayload import com.mifos.core.data.repository.OfflineDashboardRepository @@ -22,7 +31,7 @@ class OfflineDashboardRepositoryImp @Inject constructor( private val dataManagerGroups: DataManagerGroups, private val dataManagerCenter: DataManagerCenter, private val dataManagerLoan: DataManagerLoan, - private val dataManagerSavings: DataManagerSavings + private val dataManagerSavings: DataManagerSavings, ) : OfflineDashboardRepository { override fun allDatabaseClientPayload(): Observable> { @@ -44,4 +53,4 @@ class OfflineDashboardRepositoryImp @Inject constructor( override fun allSavingsAccountTransactions(): Observable> { return dataManagerSavings.allSavingsAccountTransactions } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/PathTrackingRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/PathTrackingRepositoryImp.kt similarity index 59% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/PathTrackingRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/PathTrackingRepositoryImp.kt index 03aa731377c..5a54a002cfe 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/PathTrackingRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/PathTrackingRepositoryImp.kt @@ -1,9 +1,17 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.PathTrackingRepository import com.mifos.core.network.datamanager.DataManagerDataTable import com.mifos.core.objects.user.UserLocation -import rx.Observable import javax.inject.Inject /** @@ -15,5 +23,4 @@ class PathTrackingRepositoryImp @Inject constructor(private val dataManagerDataT override suspend fun getUserPathTracking(userId: Int): List { return dataManagerDataTable.getUserPathTracking(userId) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/PinPointClientRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/PinPointClientRepositoryImp.kt similarity index 73% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/PinPointClientRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/PinPointClientRepositoryImp.kt index f994112a176..fa1fbaec2ca 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/PinPointClientRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/PinPointClientRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.PinPointClientRepository import com.mifos.core.network.GenericResponse @@ -19,14 +28,14 @@ class PinPointClientRepositoryImp @Inject constructor(private val dataManagerCli override suspend fun addClientPinpointLocation( clientId: Int, - address: ClientAddressRequest + address: ClientAddressRequest, ): GenericResponse { return dataManagerClient.addClientPinpointLocation(clientId, address) } override suspend fun deleteClientAddressPinpointLocation( apptableId: Int, - datatableId: Int + datatableId: Int, ): GenericResponse { return dataManagerClient.deleteClientAddressPinpointLocation(apptableId, datatableId) } @@ -34,8 +43,8 @@ class PinPointClientRepositoryImp @Inject constructor(private val dataManagerCli override suspend fun updateClientPinpointLocation( apptableId: Int, datatableId: Int, - address: ClientAddressRequest + address: ClientAddressRequest, ): GenericResponse { return dataManagerClient.updateClientPinpointLocation(apptableId, datatableId, address) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ReportCategoryRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ReportCategoryRepositoryImp.kt similarity index 62% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ReportCategoryRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ReportCategoryRepositoryImp.kt index 5e020b8050d..ea47eee5136 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ReportCategoryRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ReportCategoryRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.ReportCategoryRepository import com.mifos.core.network.datamanager.DataManagerRunReport @@ -14,8 +23,8 @@ class ReportCategoryRepositoryImp @Inject constructor(private val dataManager: D override suspend fun getReportCategories( reportCategory: String, genericResultSet: Boolean, - parameterType: Boolean + parameterType: Boolean, ): List { return dataManager.getReportCategories(reportCategory, genericResultSet, parameterType) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/ReportDetailRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ReportDetailRepositoryImp.kt similarity index 73% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/ReportDetailRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/ReportDetailRepositoryImp.kt index 910e545ffe2..b1e4942699c 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/ReportDetailRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/ReportDetailRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.ReportDetailRepository import com.mifos.core.network.datamanager.DataManagerRunReport @@ -13,14 +22,14 @@ class ReportDetailRepositoryImp @Inject constructor(private val dataManager: Dat override suspend fun getReportFullParameterList( reportName: String, - parameterType: Boolean + parameterType: Boolean, ): FullParameterListResponse { return dataManager.getReportFullParameterList(reportName, parameterType) } override suspend fun getReportParameterDetails( parameterName: String, - parameterType: Boolean + parameterType: Boolean, ): FullParameterListResponse { return dataManager.getReportParameterDetails(parameterName, parameterType) } @@ -28,7 +37,7 @@ class ReportDetailRepositoryImp @Inject constructor(private val dataManager: Dat override suspend fun getRunReportOffices( parameterName: String, officeId: Int, - parameterType: Boolean + parameterType: Boolean, ): FullParameterListResponse { return dataManager.getRunReportOffices(parameterName, officeId, parameterType) } @@ -36,15 +45,15 @@ class ReportDetailRepositoryImp @Inject constructor(private val dataManager: Dat override suspend fun getRunReportProduct( parameterName: String, currency: String, - parameterType: Boolean + parameterType: Boolean, ): FullParameterListResponse { return dataManager.getRunReportProduct(parameterName, currency, parameterType) } override suspend fun getRunReportWithQuery( reportName: String, - options: Map + options: Map, ): FullParameterListResponse { return dataManager.getRunReportWithQuery(reportName, options) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountActivateRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountActivateRepositoryImp.kt similarity index 60% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountActivateRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountActivateRepositoryImp.kt index 65023cf4ae5..9d0edc8a001 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountActivateRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountActivateRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SavingsAccountActivateRepository import com.mifos.core.network.GenericResponse @@ -14,8 +23,8 @@ class SavingsAccountActivateRepositoryImp @Inject constructor(private val dataMa override fun activateSavings( savingsAccountId: Int, - request: HashMap + request: HashMap, ): Observable { return dataManagerSavings.activateSavings(savingsAccountId, request) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountApprovalRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountApprovalRepositoryImp.kt similarity index 63% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountApprovalRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountApprovalRepositoryImp.kt index 1bad30af7f6..275ffbb1b38 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountApprovalRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountApprovalRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SavingsAccountApprovalRepository import com.mifos.core.network.GenericResponse @@ -15,8 +24,8 @@ class SavingsAccountApprovalRepositoryImp @Inject constructor(private val dataMa override fun approveSavingsApplication( savingsAccountId: Int, - savingsApproval: SavingsApproval? + savingsApproval: SavingsApproval?, ): Observable { return dataManagerSavings.approveSavingsApplication(savingsAccountId, savingsApproval) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountRepositoryImp.kt similarity index 78% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountRepositoryImp.kt index 1842d379d95..d83d00c07c5 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.SavingsPayload import com.mifos.core.data.repository.SavingsAccountRepository @@ -24,14 +33,14 @@ class SavingsAccountRepositoryImp @Inject constructor(private val dataManagerSav override fun getClientSavingsAccountTemplateByProduct( clientId: Int, - productId: Int + productId: Int, ): Observable { return dataManagerSavings.getClientSavingsAccountTemplateByProduct(clientId, productId) } override fun getGroupSavingsAccountTemplateByProduct( groupId: Int, - productId: Int + productId: Int, ): Observable { return dataManagerSavings.getGroupSavingsAccountTemplateByProduct(groupId, productId) } @@ -39,4 +48,4 @@ class SavingsAccountRepositoryImp @Inject constructor(private val dataManagerSav override fun createSavingsAccount(savingsPayload: SavingsPayload?): Observable { return dataManagerSavings.createSavingsAccount(savingsPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountSummaryRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountSummaryRepositoryImp.kt similarity index 63% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountSummaryRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountSummaryRepositoryImp.kt index a41de7fc9f8..ea0b6282478 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountSummaryRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountSummaryRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SavingsAccountSummaryRepository import com.mifos.core.network.datamanager.DataManagerSavings @@ -14,8 +23,8 @@ class SavingsAccountSummaryRepositoryImp @Inject constructor(private val dataMan override fun getSavingsAccount( type: String?, savingsAccountId: Int, - association: String? + association: String?, ): Observable { return dataManagerSavings.getSavingsAccount(type, savingsAccountId, association) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountTransactionRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountTransactionRepositoryImp.kt similarity index 74% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountTransactionRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountTransactionRepositoryImp.kt index fe463437545..9afc79c66dd 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SavingsAccountTransactionRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SavingsAccountTransactionRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SavingsAccountTransactionRepository import com.mifos.core.network.datamanager.DataManagerSavings @@ -17,12 +26,12 @@ class SavingsAccountTransactionRepositoryImp @Inject constructor(private val dat override fun getSavingsAccountTransactionTemplate( type: String?, savingsAccountId: Int, - transactionType: String? + transactionType: String?, ): Observable { return dataManagerSavings.getSavingsAccountTransactionTemplate( type, savingsAccountId, - transactionType + transactionType, ) } @@ -30,19 +39,17 @@ class SavingsAccountTransactionRepositoryImp @Inject constructor(private val dat savingsAccountType: String?, savingsAccountId: Int, transactionType: String?, - request: SavingsAccountTransactionRequest + request: SavingsAccountTransactionRequest, ): Observable { return dataManagerSavings.processTransaction( savingsAccountType, savingsAccountId, transactionType, - request + request, ) } override fun getSavingsAccountTransaction(savingAccountId: Int): Observable { return dataManagerSavings.getSavingsAccountTransaction(savingAccountId) } - - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SearchRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SearchRepositoryImp.kt similarity index 74% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SearchRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SearchRepositoryImp.kt index f9e0700d4e5..db960457a60 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SearchRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SearchRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.common.network.Dispatcher import com.mifos.core.common.network.MifosDispatchers @@ -23,7 +32,7 @@ class SearchRepositoryImp @Inject constructor( override suspend fun searchResources( query: String, resources: String?, - exactMatch: Boolean? + exactMatch: Boolean?, ): Flow> = flow { try { val result = dataManagerSearch.searchResources(query, resources, exactMatch) @@ -32,4 +41,4 @@ class SearchRepositoryImp @Inject constructor( throw e } }.flowOn(ioDispatcher).distinctUntilChanged() -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SignatureRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SignatureRepositoryImp.kt similarity index 63% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SignatureRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SignatureRepositoryImp.kt index ff610a19c7b..a56de1e8085 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SignatureRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SignatureRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SignatureRepository import com.mifos.core.network.GenericResponse @@ -18,9 +27,8 @@ class SignatureRepositoryImp @Inject constructor(private val dataManagerDocument entityId: Int, name: String?, desc: String?, - file: MultipartBody.Part? + file: MultipartBody.Part?, ): Observable { return dataManagerDocument.createDocument(entityType, entityId, name, desc, file) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SurveyListRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SurveyListRepositoryImp.kt similarity index 74% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SurveyListRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SurveyListRepositoryImp.kt index c9995fb0e61..51d996cb617 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SurveyListRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SurveyListRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SurveyListRepository import com.mifos.core.network.datamanager.DataManagerSurveys @@ -29,5 +38,4 @@ class SurveyListRepositoryImp @Inject constructor(private val dataManagerSurveys override fun getDatabaseResponseDatas(questionId: Int): Observable> { return dataManagerSurveys.getDatabaseResponseDatas(questionId) } - -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SurveySubmitRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SurveySubmitRepositoryImp.kt similarity index 61% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SurveySubmitRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SurveySubmitRepositoryImp.kt index d0d2940377d..ef2f5e1762b 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SurveySubmitRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SurveySubmitRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SurveySubmitRepository import com.mifos.core.network.datamanager.DataManagerSurveys @@ -15,4 +24,4 @@ class SurveySubmitRepositoryImp @Inject constructor(private val dataManagerSurve override fun submitScore(surveyId: Int, scorecardPayload: Scorecard?): Observable { return dataManagerSurveys.submitScore(surveyId, scorecardPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncCenterPayloadsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncCenterPayloadsRepositoryImp.kt similarity index 75% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncCenterPayloadsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncCenterPayloadsRepositoryImp.kt index 902c2f9f2d4..41367c6ec04 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncCenterPayloadsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncCenterPayloadsRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.CenterPayload import com.mifos.core.data.repository.SyncCenterPayloadsRepository @@ -28,4 +37,4 @@ class SyncCenterPayloadsRepositoryImp @Inject constructor(private val dataManage override fun updateCenterPayload(centerPayload: CenterPayload): Observable { return dataManagerCenter.updateCenterPayload(centerPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncCentersDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncCentersDialogRepositoryImp.kt similarity index 87% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncCentersDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncCentersDialogRepositoryImp.kt index 06c93f97861..c71a8434805 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncCentersDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncCentersDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SyncCentersDialogRepository import com.mifos.core.network.datamanager.DataManagerCenter @@ -29,7 +38,7 @@ class SyncCentersDialogRepositoryImp @Inject constructor( private val dataManagerLoan: DataManagerLoan, private val dataManagerSavings: DataManagerSavings, private val dataManagerGroups: DataManagerGroups, - private val dataManagerClient: DataManagerClient + private val dataManagerClient: DataManagerClient, ) : SyncCentersDialogRepository { override fun syncCenterAccounts(centerId: Int): Observable { @@ -75,7 +84,7 @@ class SyncCentersDialogRepositoryImp @Inject constructor( override fun syncSavingsAccount( type: String?, savingsAccountId: Int, - association: String? + association: String?, ): Observable { return dataManagerSavings.syncSavingsAccount(type, savingsAccountId, association) } @@ -83,12 +92,12 @@ class SyncCentersDialogRepositoryImp @Inject constructor( override fun syncSavingsAccountTransactionTemplate( savingsAccountType: String?, savingsAccountId: Int, - transactionType: String? + transactionType: String?, ): Observable { return dataManagerSavings.syncSavingsAccountTransactionTemplate( savingsAccountType, savingsAccountId, - transactionType + transactionType, ) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncClientPayloadsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncClientPayloadsRepositoryImp.kt similarity index 72% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncClientPayloadsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncClientPayloadsRepositoryImp.kt index 77127f0e412..c9a862a056a 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncClientPayloadsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncClientPayloadsRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SyncClientPayloadsRepository import com.mifos.core.network.datamanager.DataManagerClient @@ -20,7 +29,7 @@ class SyncClientPayloadsRepositoryImp @Inject constructor(private val dataManage override fun deleteAndUpdatePayloads( id: Int, - clientCreationTIme: Long + clientCreationTIme: Long, ): Observable> { return dataManagerClient.deleteAndUpdatePayloads(id, clientCreationTIme) } @@ -28,4 +37,4 @@ class SyncClientPayloadsRepositoryImp @Inject constructor(private val dataManage override fun updateClientPayload(clientPayload: ClientPayload): Observable { return dataManagerClient.updateClientPayload(clientPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncClientsDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncClientsDialogRepositoryImp.kt similarity index 80% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncClientsDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncClientsDialogRepositoryImp.kt index fddf98aabb1..ff3b9df29e0 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncClientsDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncClientsDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SyncClientsDialogRepository import com.mifos.core.network.datamanager.DataManagerClient @@ -19,7 +28,7 @@ import javax.inject.Inject class SyncClientsDialogRepositoryImp @Inject constructor( private val dataManagerClient: DataManagerClient, private val dataManagerLoan: DataManagerLoan, - private val dataManagerSavings: DataManagerSavings + private val dataManagerSavings: DataManagerSavings, ) : SyncClientsDialogRepository { override fun syncClientAccounts(clientId: Int): Observable { @@ -37,7 +46,7 @@ class SyncClientsDialogRepositoryImp @Inject constructor( override fun syncSavingsAccount( type: String?, savingsAccountId: Int, - association: String? + association: String?, ): Observable { return dataManagerSavings.syncSavingsAccount(type, savingsAccountId, association) } @@ -45,16 +54,16 @@ class SyncClientsDialogRepositoryImp @Inject constructor( override fun syncSavingsAccountTransactionTemplate( savingsAccountType: String?, savingsAccountId: Int, - transactionType: String? + transactionType: String?, ): Observable { return dataManagerSavings.getSavingsAccountTransactionTemplate( savingsAccountType, savingsAccountId, - transactionType + transactionType, ) } override fun syncClientInDatabase(client: Client): Observable { return dataManagerClient.syncClientInDatabase(client) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncGroupPayloadsRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncGroupPayloadsRepositoryImp.kt similarity index 73% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncGroupPayloadsRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncGroupPayloadsRepositoryImp.kt index 787f31eb3d1..f6f09230253 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncGroupPayloadsRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncGroupPayloadsRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SyncGroupPayloadsRepository import com.mifos.core.network.datamanager.DataManagerGroups @@ -25,4 +34,4 @@ class SyncGroupPayloadsRepositoryImp @Inject constructor(private val dataManager override fun updateGroupPayload(groupPayload: GroupPayload): Observable { return dataManagerGroups.updateGroupPayload(groupPayload) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncGroupsDialogRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncGroupsDialogRepositoryImp.kt similarity index 84% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncGroupsDialogRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncGroupsDialogRepositoryImp.kt index b583daf400a..ec3b5e68173 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncGroupsDialogRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncGroupsDialogRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SyncGroupsDialogRepository import com.mifos.core.network.datamanager.DataManagerClient @@ -24,7 +33,7 @@ class SyncGroupsDialogRepositoryImp @Inject constructor( private val dataManagerGroups: DataManagerGroups, private val dataManagerLoan: DataManagerLoan, private val dataManagerSavings: DataManagerSavings, - private val dataManagerClient: DataManagerClient + private val dataManagerClient: DataManagerClient, ) : SyncGroupsDialogRepository { override fun syncGroupAccounts(groupId: Int): Observable { @@ -42,7 +51,7 @@ class SyncGroupsDialogRepositoryImp @Inject constructor( override fun syncSavingsAccount( type: String?, savingsAccountId: Int, - association: String? + association: String?, ): Observable { return dataManagerSavings.syncSavingsAccount(type, savingsAccountId, association) } @@ -50,12 +59,12 @@ class SyncGroupsDialogRepositoryImp @Inject constructor( override fun syncSavingsAccountTransactionTemplate( savingsAccountType: String?, savingsAccountId: Int, - transactionType: String? + transactionType: String?, ): Observable { return dataManagerSavings.getSavingsAccountTransactionTemplate( savingsAccountType, savingsAccountId, - transactionType + transactionType, ) } @@ -74,4 +83,4 @@ class SyncGroupsDialogRepositoryImp @Inject constructor( override fun syncGroupInDatabase(group: Group): Observable { return dataManagerGroups.syncGroupInDatabase(group) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncLoanRepaymentTransactionRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncLoanRepaymentTransactionRepositoryImp.kt similarity index 76% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncLoanRepaymentTransactionRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncLoanRepaymentTransactionRepositoryImp.kt index 930edd4cdc8..4e292311ba2 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncLoanRepaymentTransactionRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncLoanRepaymentTransactionRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SyncLoanRepaymentTransactionRepository import com.mifos.core.network.datamanager.DataManagerLoan @@ -20,7 +29,7 @@ class SyncLoanRepaymentTransactionRepositoryImp @Inject constructor(private val override fun submitPayment( loanId: Int, - request: LoanRepaymentRequest + request: LoanRepaymentRequest, ): Observable { return dataManagerLoan.submitPayment(loanId, request) } @@ -32,4 +41,4 @@ class SyncLoanRepaymentTransactionRepositoryImp @Inject constructor(private val override fun updateLoanRepaymentTransaction(loanRepaymentRequest: LoanRepaymentRequest): Observable { return dataManagerLoan.updateLoanRepaymentTransaction(loanRepaymentRequest) } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncSavingsAccountTransactionRepositoryImp.kt b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncSavingsAccountTransactionRepositoryImp.kt similarity index 78% rename from core/data/src/main/java/com/mifos/core/data/repository_imp/SyncSavingsAccountTransactionRepositoryImp.kt rename to core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncSavingsAccountTransactionRepositoryImp.kt index 209ab38162c..bb4b4f5ec99 100644 --- a/core/data/src/main/java/com/mifos/core/data/repository_imp/SyncSavingsAccountTransactionRepositoryImp.kt +++ b/core/data/src/main/java/com/mifos/core/data/repositoryImp/SyncSavingsAccountTransactionRepositoryImp.kt @@ -1,4 +1,13 @@ -package com.mifos.core.data.repository_imp +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ +package com.mifos.core.data.repositoryImp import com.mifos.core.data.repository.SyncSavingsAccountTransactionRepository import com.mifos.core.network.datamanager.DataManagerLoan @@ -13,7 +22,7 @@ import javax.inject.Inject */ class SyncSavingsAccountTransactionRepositoryImp @Inject constructor( private val dataManagerSavings: DataManagerSavings, - private val dataManagerLoan: DataManagerLoan + private val dataManagerLoan: DataManagerLoan, ) : SyncSavingsAccountTransactionRepository { override fun allSavingsAccountTransactions(): Observable> { @@ -28,13 +37,13 @@ class SyncSavingsAccountTransactionRepositoryImp @Inject constructor( savingsAccountType: String?, savingsAccountId: Int, transactionType: String?, - request: SavingsAccountTransactionRequest + request: SavingsAccountTransactionRequest, ): Observable { return dataManagerSavings.processTransaction( savingsAccountType, savingsAccountId, transactionType, - request + request, ) } @@ -45,4 +54,4 @@ class SyncSavingsAccountTransactionRepositoryImp @Inject constructor( override fun updateLoanRepaymentTransaction(savingsAccountTransactionRequest: SavingsAccountTransactionRequest): Observable { return dataManagerSavings.updateLoanRepaymentTransaction(savingsAccountTransactionRequest) } -} \ No newline at end of file +} diff --git a/core/data/src/test/java/com/mifos/core/data/ExampleUnitTest.kt b/core/data/src/test/java/com/mifos/core/data/ExampleUnitTest.kt index bd60383b85b..e9a2d9e0705 100644 --- a/core/data/src/test/java/com/mifos/core/data/ExampleUnitTest.kt +++ b/core/data/src/test/java/com/mifos/core/data/ExampleUnitTest.kt @@ -1,9 +1,17 @@ +/* + * Copyright 2024 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * See https://github.com/openMF/android-client/blob/master/LICENSE.md + */ package com.mifos.core.data +import junit.framework.TestCase.assertEquals import org.junit.Test -import org.junit.Assert.* - /** * Example local unit test, which will execute on the development machine (host). * @@ -14,4 +22,4 @@ class ExampleUnitTest { fun addition_isCorrect() { assertEquals(4, 2 + 2) } -} \ No newline at end of file +} diff --git a/core/domain/src/main/java/com/mifos/core/domain/use_cases/GetClientSavingsAccountTemplateByProductUseCase.kt b/core/domain/src/main/java/com/mifos/core/domain/use_cases/GetClientSavingsAccountTemplateByProductUseCase.kt index af5c39369a3..2e9b452cb43 100644 --- a/core/domain/src/main/java/com/mifos/core/domain/use_cases/GetClientSavingsAccountTemplateByProductUseCase.kt +++ b/core/domain/src/main/java/com/mifos/core/domain/use_cases/GetClientSavingsAccountTemplateByProductUseCase.kt @@ -1,11 +1,7 @@ package com.mifos.core.domain.use_cases import com.mifos.core.common.utils.Resource -import com.mifos.core.data.repository.DataTableDataRepository -import com.mifos.core.data.repository.SavingsAccountActivateRepository import com.mifos.core.data.repository.SavingsAccountRepository -import com.mifos.core.data.repository_imp.SavingsAccountActivateRepositoryImp -import com.mifos.core.objects.group.CenterWithAssociations import com.mifos.core.objects.templates.savings.SavingProductsTemplate import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow diff --git a/feature/note/src/main/java/com/mifos/feature/note/NoteViewModel.kt b/feature/note/src/main/java/com/mifos/feature/note/NoteViewModel.kt index 2a9de5f7d67..eaad461a146 100644 --- a/feature/note/src/main/java/com/mifos/feature/note/NoteViewModel.kt +++ b/feature/note/src/main/java/com/mifos/feature/note/NoteViewModel.kt @@ -14,7 +14,7 @@ import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.mifos.core.common.utils.Constants -import com.mifos.core.data.repository_imp.NoteRepositoryImp +import com.mifos.core.data.repositoryImp.NoteRepositoryImp import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableStateFlow diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/injection/module/RepositoryModule.kt b/mifosng-android/src/main/java/com/mifos/mifosxdroid/injection/module/RepositoryModule.kt index 63c95e84c40..4e8ecf40e02 100644 --- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/injection/module/RepositoryModule.kt +++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/injection/module/RepositoryModule.kt @@ -17,24 +17,23 @@ import com.mifos.core.data.repository.SyncGroupPayloadsRepository import com.mifos.core.data.repository.SyncGroupsDialogRepository import com.mifos.core.data.repository.SyncLoanRepaymentTransactionRepository import com.mifos.core.data.repository.SyncSavingsAccountTransactionRepository -import com.mifos.core.data.repository_imp.CreateNewClientRepositoryImp -import com.mifos.core.data.repository_imp.DocumentDialogRepositoryImp -import com.mifos.core.data.repository_imp.NoteRepositoryImp -import com.mifos.core.data.repository_imp.OfflineDashboardRepositoryImp -import com.mifos.core.data.repository_imp.SavingsAccountActivateRepositoryImp -import com.mifos.core.data.repository_imp.SavingsAccountApprovalRepositoryImp -import com.mifos.core.data.repository_imp.SavingsAccountRepositoryImp -import com.mifos.core.data.repository_imp.SavingsAccountSummaryRepositoryImp -import com.mifos.core.data.repository_imp.SavingsAccountTransactionRepositoryImp -import com.mifos.core.data.repository_imp.SyncCenterPayloadsRepositoryImp -import com.mifos.core.data.repository_imp.SyncCentersDialogRepositoryImp -import com.mifos.core.data.repository_imp.SyncClientPayloadsRepositoryImp -import com.mifos.core.data.repository_imp.SyncClientsDialogRepositoryImp -import com.mifos.core.data.repository_imp.SyncGroupPayloadsRepositoryImp -import com.mifos.core.data.repository_imp.SyncGroupsDialogRepositoryImp -import com.mifos.core.data.repository_imp.SyncLoanRepaymentTransactionRepositoryImp -import com.mifos.core.data.repository_imp.SyncSavingsAccountTransactionRepositoryImp -import com.mifos.core.network.datamanager.DataManagerAuth +import com.mifos.core.data.repositoryImp.CreateNewClientRepositoryImp +import com.mifos.core.data.repositoryImp.DocumentDialogRepositoryImp +import com.mifos.core.data.repositoryImp.NoteRepositoryImp +import com.mifos.core.data.repositoryImp.OfflineDashboardRepositoryImp +import com.mifos.core.data.repositoryImp.SavingsAccountActivateRepositoryImp +import com.mifos.core.data.repositoryImp.SavingsAccountApprovalRepositoryImp +import com.mifos.core.data.repositoryImp.SavingsAccountRepositoryImp +import com.mifos.core.data.repositoryImp.SavingsAccountSummaryRepositoryImp +import com.mifos.core.data.repositoryImp.SavingsAccountTransactionRepositoryImp +import com.mifos.core.data.repositoryImp.SyncCenterPayloadsRepositoryImp +import com.mifos.core.data.repositoryImp.SyncCentersDialogRepositoryImp +import com.mifos.core.data.repositoryImp.SyncClientPayloadsRepositoryImp +import com.mifos.core.data.repositoryImp.SyncClientsDialogRepositoryImp +import com.mifos.core.data.repositoryImp.SyncGroupPayloadsRepositoryImp +import com.mifos.core.data.repositoryImp.SyncGroupsDialogRepositoryImp +import com.mifos.core.data.repositoryImp.SyncLoanRepaymentTransactionRepositoryImp +import com.mifos.core.data.repositoryImp.SyncSavingsAccountTransactionRepositoryImp import com.mifos.core.network.datamanager.DataManagerCenter import com.mifos.core.network.datamanager.DataManagerClient import com.mifos.core.network.datamanager.DataManagerDocument