From 26a575b6146abc15dcdf62b29b76b1e0cec1d778 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 5 Sep 2018 20:04:46 +0800 Subject: [PATCH] rename CalculatePsychomatrixByDate -> CalculatePsychomatrixByDateUseCase --- .../repository/realisations/HistoryDatesRepositoryImpl.kt | 6 +++--- .../insanusmokrassar/PsychomatrixBase/di/UseCasesDI.kt | 4 ++-- .../di/realisations/PresentationLayerDIImpl.kt | 2 +- .../PsychomatrixBase/di/realisations/UseCasesDIImpl.kt | 8 ++++---- .../DefaultRealisations/DatePickerPresenterImpl.kt | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/data/repository/realisations/HistoryDatesRepositoryImpl.kt b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/data/repository/realisations/HistoryDatesRepositoryImpl.kt index 755d68f..cc78482 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/data/repository/realisations/HistoryDatesRepositoryImpl.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/data/repository/realisations/HistoryDatesRepositoryImpl.kt @@ -1,7 +1,7 @@ package com.github.insanusmokrassar.PsychomatrixBase.data.repository.realisations import com.github.insanusmokrassar.PsychomatrixBase.data.repository.HistoryDatesRepository -import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDate +import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDateUseCase import com.github.insanusmokrassar.PsychomatrixBase.utils.extensions.SUBSCRIPTIONS_EXTRA_SMALL import com.github.insanusmokrassar.PsychomatrixBase.utils.extensions.subscribe import kotlinx.coroutines.experimental.* @@ -10,14 +10,14 @@ import kotlinx.coroutines.experimental.channels.ReceiveChannel import org.joda.time.DateTime abstract class HistoryDatesRepositoryImpl( - calculatePsychomatrixByDate: CalculatePsychomatrixByDate + calculatePsychomatrixByDateUseCase: CalculatePsychomatrixByDateUseCase ) : HistoryDatesRepository { private val dateAddedBroadcast = BroadcastChannel(SUBSCRIPTIONS_EXTRA_SMALL) private val dateRemovedBroadcast = BroadcastChannel(SUBSCRIPTIONS_EXTRA_SMALL) init { launch { - calculatePsychomatrixByDate.openPsychomatrixCreatedSubscription().subscribe { + calculatePsychomatrixByDateUseCase.openPsychomatrixCreatedSubscription().subscribe { it.date.also { date -> onDateCalculated(date) diff --git a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/UseCasesDI.kt b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/UseCasesDI.kt index 169b94a..9e9daf6 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/UseCasesDI.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/UseCasesDI.kt @@ -1,7 +1,7 @@ package com.github.insanusmokrassar.PsychomatrixBase.di -import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDate +import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDateUseCase interface UseCasesDI : EntitiesDI { - val calculatePsychomatrixByDate: CalculatePsychomatrixByDate + val calculatePsychomatrixByDateUseCase: CalculatePsychomatrixByDateUseCase } \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/PresentationLayerDIImpl.kt b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/PresentationLayerDIImpl.kt index 4cf19d6..cf98e02 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/PresentationLayerDIImpl.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/PresentationLayerDIImpl.kt @@ -11,7 +11,7 @@ abstract class PresentationLayerDIImpl( override val datePickerPresenter: DatePickerPresenter by lazy { DatePickerPresenterImpl( - calculatePsychomatrixByDate + calculatePsychomatrixByDateUseCase ) } diff --git a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/UseCasesDIImpl.kt b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/UseCasesDIImpl.kt index e269595..4e9ebde 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/UseCasesDIImpl.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/di/realisations/UseCasesDIImpl.kt @@ -2,15 +2,15 @@ package com.github.insanusmokrassar.PsychomatrixBase.di.realisations import com.github.insanusmokrassar.PsychomatrixBase.di.EntitiesDI import com.github.insanusmokrassar.PsychomatrixBase.di.UseCasesDI -import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDate -import com.github.insanusmokrassar.PsychomatrixBase.domain.interactors.CalculatePsychomatrixByDateInteractor +import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDateUseCase +import com.github.insanusmokrassar.PsychomatrixBase.domain.interactors.CalculatePsychomatrixByDateUseCaseInteractor open class UseCasesDIImpl( entitiesDI: EntitiesDI ) : UseCasesDI, EntitiesDI by entitiesDI { - override val calculatePsychomatrixByDate: CalculatePsychomatrixByDate by lazy { - CalculatePsychomatrixByDateInteractor() + val calculatePsychomatrixByDateUseCase: CalculatePsychomatrixByDateUseCase by lazy { + CalculatePsychomatrixByDateUseCaseInteractor() } } diff --git a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/presentation/presenters/DefaultRealisations/DatePickerPresenterImpl.kt b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/presentation/presenters/DefaultRealisations/DatePickerPresenterImpl.kt index a3d3543..e564115 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/presentation/presenters/DefaultRealisations/DatePickerPresenterImpl.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/presentation/presenters/DefaultRealisations/DatePickerPresenterImpl.kt @@ -1,6 +1,6 @@ package com.github.insanusmokrassar.PsychomatrixBase.presentation.presenters.DefaultRealisations -import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDate +import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDateUseCase import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.Psychomatrix import com.github.insanusmokrassar.PsychomatrixBase.presentation.presenters.DatePickerPresenter import com.github.insanusmokrassar.PsychomatrixBase.utils.extensions.SUBSCRIPTIONS_MEDIUM @@ -10,7 +10,7 @@ import kotlinx.coroutines.experimental.launch import org.joda.time.DateTime class DatePickerPresenterImpl( - private val CalculatePsychomatrixByDate: CalculatePsychomatrixByDate + private val CalculatePsychomatrixByDateUseCase: CalculatePsychomatrixByDateUseCase ) : DatePickerPresenter { private val psychomatrixCreateBroadcastChannel = BroadcastChannel(SUBSCRIPTIONS_MEDIUM) @@ -24,7 +24,7 @@ class DatePickerPresenterImpl( override fun userPickDate(date: DateTime) { launch { - CalculatePsychomatrixByDate.calculate(date).await().also { + CalculatePsychomatrixByDateUseCase.calculate(date).await().also { psychomatrixCreateBroadcastChannel.send(it) } }