-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
95 changed files
with
6,801 additions
and
1,739 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule gn_mobile_core
updated
53 files
Submodule gn_mobile_maps
updated
4 files
+3 −3 | maps/build.gradle | |
+51 −43 | maps/src/main/java/fr/geonature/maps/ui/MapFragment.kt | |
+17 −7 | maps/src/main/java/fr/geonature/maps/ui/widget/EditFeatureButton.kt | |
+2 −2 | maps/version.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
occtax/src/main/java/fr/geonature/occtax/features/nomenclature/NomenclatureModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package fr.geonature.occtax.features.nomenclature | ||
|
||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import fr.geonature.commons.data.GeoNatureModuleName | ||
import fr.geonature.commons.data.dao.NomenclatureDao | ||
import fr.geonature.commons.data.dao.NomenclatureTypeDao | ||
import fr.geonature.occtax.features.nomenclature.data.INomenclatureLocalDataSource | ||
import fr.geonature.occtax.features.nomenclature.data.INomenclatureSettingsLocalDataSource | ||
import fr.geonature.occtax.features.nomenclature.data.IPropertyValueLocalDataSource | ||
import fr.geonature.occtax.features.nomenclature.data.InMemoryPropertyValueLocalDataSourceImpl | ||
import fr.geonature.occtax.features.nomenclature.data.NomenclatureLocalDataSourceImpl | ||
import fr.geonature.occtax.features.nomenclature.data.NomenclatureSettingsLocalDataSourceImpl | ||
import fr.geonature.occtax.features.nomenclature.repository.DefaultPropertyValueRepositoryImpl | ||
import fr.geonature.occtax.features.nomenclature.repository.IDefaultPropertyValueRepository | ||
import fr.geonature.occtax.features.nomenclature.repository.INomenclatureRepository | ||
import fr.geonature.occtax.features.nomenclature.repository.NomenclatureRepositoryImpl | ||
import javax.inject.Singleton | ||
|
||
/** | ||
* Nomenclature module. | ||
* | ||
* @author S. Grimault | ||
*/ | ||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object NomenclatureModule { | ||
|
||
@Singleton | ||
@Provides | ||
fun provideNomenclatureLocalDataSource( | ||
@GeoNatureModuleName moduleName: String, | ||
nomenclatureTypeDao: NomenclatureTypeDao, | ||
nomenclatureDao: NomenclatureDao | ||
): INomenclatureLocalDataSource { | ||
return NomenclatureLocalDataSourceImpl( | ||
moduleName, | ||
nomenclatureTypeDao, | ||
nomenclatureDao | ||
) | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
fun provideNomenclatureSettingsLocalDataSource(): INomenclatureSettingsLocalDataSource { | ||
return NomenclatureSettingsLocalDataSourceImpl() | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
fun providePropertyValueLocalDataSource(): IPropertyValueLocalDataSource { | ||
return InMemoryPropertyValueLocalDataSourceImpl() | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
fun provideNomenclatureRepository( | ||
nomenclatureLocalDataSource: INomenclatureLocalDataSource, | ||
nomenclatureSettingsLocalDataSource: INomenclatureSettingsLocalDataSource | ||
): INomenclatureRepository { | ||
return NomenclatureRepositoryImpl( | ||
nomenclatureLocalDataSource, | ||
nomenclatureSettingsLocalDataSource | ||
) | ||
} | ||
|
||
@Singleton | ||
@Provides | ||
fun provideDefaultPropertyValueRepository( | ||
propertyValueLocalDataSource: IPropertyValueLocalDataSource, | ||
nomenclatureLocalDataSource: INomenclatureLocalDataSource, | ||
): IDefaultPropertyValueRepository { | ||
return DefaultPropertyValueRepositoryImpl( | ||
propertyValueLocalDataSource, | ||
nomenclatureLocalDataSource | ||
) | ||
} | ||
} |
Oops, something went wrong.