ppazos / cabolabs-ehrserver

Open platform to manage and share standardized clinical data, designed by @ppazos at CaboLabs Health Informatics.
https://cabolabs.com
Apache License 2.0
173 stars 110 forks source link

S3: Refactor OptRepo interfaces, merging with the Opt access services #1069

Open ppazos opened 4 years ago

ppazos commented 4 years ago
  1. Make the services implement the Opt repo interface (this is to merge all the methods from OptRepositoryS3Impl and OptRepositoryFSImpl into the OptS3Service and OptFSService)
  2. Move the correspondent methods from the current repo impl
  3. Delete the repo impls
  4. Test everything works OK
ppazos commented 4 years ago

The issue with this is: services are injected so the config changes the services and we don't need to do anything extra, but we have a factory for OptRepositoryS3Impl and OptRepositoryFSImpl, so moving the methods to the services needs to remove the factory. Another issue is we are passing those repos as parameters to some functions, if we move everything to the services, we need to inject the services in the correspondent classes and avoid passing any parameters.