MOD-DATA-EXPORT migration process to Spring - user stories
Story 1
Summary
Replace io.vertx.core.json.JsonObject and io.vertx.core.json.JsonArray with another classes
Purpose/Overview:
Since Vert.x library should be removed from the project, then JsonObject and JsonArray based on the Vert.x library are no longer needed as well.
Requirements/Scope:
Find io.vertx.core.json.JsonObject and io.vertx.core.json.JsonArray throughout the project and replace them with another classes
Approach:
Possible solutions:
https://github.com/stleary/JSON-java
https://github.com/google/gson
https://github.com/FasterXML/jackson
Acceptance criteria:
Io.vertx.core.json.JsonObject and io.vertx.core.json.JsonArray are not used in the project
Story 2
Summary
Replace org.folio.rest.persist.PostgresClient from domain-models-runtime library with the client from https://github.com/folio-org/folio-spring-base
Purpose/Overview:
Since Vert.x library should be removed from the project, then PostgresClient based on the Vert.x library is no longer needed as well.
Requirements/Scope:
Replace org.folio.rest.persist.PostgresClient from domain-models-runtime library with the client from the https://github.com/folio-org/folio-spring-base, and make appropriate changes to the classes in the org.folio.dao.impl package
Create appropriate JPA repositories
Approach:
Remove io.vertx.core.Future from the org.folio.dao.ErrorLogDao interface.
Remove io.vertx.core.Future from the org.folio.dao.FileDefinitionDao interface.
Remove io.vertx.core.Future from the org.folio.dao.JobExecutionDao interface.
Remove io.vertx.core.Future from the org.folio.dao.JobProfileDao interface.
Remove io.vertx.core.Future from the org.folio.dao.MappingProfileDao interface.
Modify org.folio.dao.impl package
Acceptance criteria:
org.folio.rest.persist.PostgresClient from domain-models-runtime library is not used in the project
Story 3
Summary
Remove proxy services based on the Vert.x library
Purpose/Overview:
Since Vert.x library should be removed from the project, then proxy services based on the Vert.x are no longer needed as well.
Requirements/Scope:
Approach:
Remove org.folio.rest.impl.InitAPIImpl class
Remove org.folio.service.manager.export.ExportManager#create method
Remove org.folio.service.manager.export.ExportManager#createProxy method
Remove org.folio.service.manager.export.ExportManager#EXPORT_MANAGER_ADDRESS field
Acceptance criteria:
Proxy services based on the Vert.x library are removed from the project
Story 4
Summary
Change org.folio.service.manager.export.strategy.ExportStrategy interface and remove blockingPromise parameter from the method.
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Promise is no longer needed as well.
Requirements/Scope:
Remove blockingPromise parameter from the org.folio.service.manager.export.strategy.ExportStrategy#export method
Modify org.folio.service.manager.export.strategy.InstanceExportStrategyImpl appropriately
Approach:
Use Optional#isPresent instead of onSuccess, onFailure.
Acceptance criteria:
Parameter blockingPromise is removed from org.folio.service.manager.export.strategy.ExportStrategy interface
Story 5
Remove or replace io.vertx.core.Future in the org.folio.service.profiles.jobprofile.JobProfileService interface.
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Future is no longer needed as well.
Requirements/Scope:
Change org.folio.service.profiles.jobprofile.JobProfileService interface and remove/replace io.vertx.core.Future from return value in all methods.
Make appropriate changes in org.folio.service.profiles.jobprofile.JobProfileServiceImpl.
Approach:
Possible solution: use java.util.concurrent.Future instead of io.vertx.core.Future
Acceptance criteria:
Io.vertx.core.Future is removed from the org.folio.service.profiles.jobprofile.JobProfileService interface
Story 6
Remove or replace io.vertx.core.Future in the org.folio.service.profiles.mappingprofile.MappingProfileService interface.
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Future is no longer needed as well.
Requirements/Scope:
Change org.folio.service.profiles.mappingprofile.MappingProfileService interface and remove io.vertx.core.Future from return value in all methods.
Make appropriate changes in org.folio.service.profiles. mappingprofile. MappingProfileServiceImpl.
Approach:
Possible solution: use java.util.concurrent.Future instead of io.vertx.core.Future
Acceptance criteria:
Io.vertx.core.Future is removed from the org.folio.service.profiles. mappingprofile.MappingProfileService interface
Story 7
Remove io.vertx.core.Future in the org.folio.service.transformationfields.TransformationFieldsService interface.
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Future is no longer needed as well.
Requirements/Scope:
Change org.folio.service.transformationfields.TransformationFieldsService interface and remove io.vertx.core.Future from return value in all methods.
Make appropriate changes in org.folio.service.transformationfields.TransformationFieldsServiceImpl class
Approach:
Possible solution: use java.util.concurrent.Future instead of io.vertx.core.Future
Acceptance criteria:
Io.vertx.core.Future is removed from the org.folio.service.transformationfields.TransformationFieldsService interface
Story 8
Remove io.vertx.core and proxy methods from the org.folio.service.manager.input package.
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core is no longer needed as well.
Requirements/Scope:
Remove io.vertx.core.shareddata.Shareable interface implementation from the org.folio.service.manager.input.InputDataContext class
Remove @ProxyGen annotation from the org.folio.service.manager.input.InputDataManager interface
Remove create and createProxy methods, as well as INPUT_DATA_MANAGER_ADDRESS field from the org.folio.service.manager.input.InputDataManager interface
Remove org.folio.service.manager.input.package-info.java
Make appropriate changes in org.folio.service.manager.input.InputDataManagerImpl class
Approach:
Possible solution:
use java.util.concurrent.Future instead of io.vertx.core.Future
use org.springframework.scheduling.annotation.AsyncResult instead of io.vertx.core.AsyncResult
Acceptance criteria:
Vert.x library and proxy methods are not present in the org.folio.service.manager.input package
Story 9
Remove io.vertx.core and proxy methods from the org.folio.service.manager.input package.
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core is no longer needed as well.
Requirements/Scope:
Remove io.vertx.core.shareddata.Shareable interface implementation from the org.folio.service.manager.input.InputDataContext class
Remove @ProxyGen annotation from the org.folio.service.manager.input.InputDataManager interface
Remove create and createProxy methods, as well as INPUT_DATA_MANAGER_ADDRESS field from the org.folio.service.manager.input.InputDataManager interface
Remove org.folio.service.manager.input.package-info.java
Make appropriate changes in org.folio.service.manager.input.InputDataManagerImpl class
Approach:
Possible solution:
use java.util.concurrent.Future instead of io.vertx.core.Future
use org.springframework.scheduling.annotation.AsyncResult instead of io.vertx.core.AsyncResult
Acceptance criteria:
Vert.x library and proxy methods are not present in the org.folio.service.manager.input package
Story 10
Implement Swagger API and create required schemas and examples
Purpose/Overview:
Since domain-models-runtime library is based on the Vert.x, it should be removed from the project, however API and controllers are still needed.
Requirements/Scope:
Create package swagger.api in resources
Implement schemas
Implement examples
Approach:
Acceptance criteria:
Swagger API is implemented, schemas and examples are created
Story 11
Create application.yaml and setup hibernate
Purpose/Overview:
Since domain-models-runtime library is removed from the project, it needs to introduce another method in order to interact with database
Requirements/Scope:
Create application.yaml
Create hibernate.properties
Approach:
Acceptance criteria:
application.yaml is created
hibernate is setup
Story 12
Modify unit tests
Purpose/Overview:
Since Vert.x library is removed from the project, it needs to modify all unit tests
Requirements/Scope:
Remove Vert.x library from all tests
Modify tests appropriately
Approach:
Acceptance criteria:
Vert.x library is not used in the unit tests
Story 13
Replace constants from org.folio.rest.RestVerticle.* (domain-models-runtime library) with constants from another class (or create such constants)
Purpose/Overview:
Since domain-models-runtime library is removed from the project, all constants from org.folio.rest.RestVerticle.* should be replaced
Requirements/Scope:
Remove Vert.x library from all tests
Modify tests appropriately
Approach:
Create new class with required constants
Add constants to existing class (alternative)
Acceptance criteria:
Constants from org.folio.rest.RestVerticle.* (domain-models-runtime library) is not used in the project
Story 14
Create Spring controllers including Tenant controller
Purpose/Overview:
Since domain-models-runtime library is removed from the project, all business logic inside org.folio.rest.* package should be changed according to the spring-folio-base library
Requirements/Scope:
Create controller package
Add required Spring controllers
Modify org.folio.rest.* package
Approach:
Create separate package with controllers and remove org.folio.rest.*
Preserve org.folio.rest.*, however modify business logic according to the spring-folio-base library (alternative)
Create system user permissions
Create DTO
Acceptance criteria:
Spring controllers are created
Story 15
Remove io.vertx.core.Future from the org.folio.service.export.storage.ExportStorageService interface
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Future is no longer needed as well.
Requirements/Scope:
Remove io.vertx.core.Future from the org.folio.service.export.storage.ExportStorageService interface
Replace io.vertx.core.Future with java.util.concurrent.Future from the org.folio.service.export.storage.ExportStorageService interface
Approach:
Possible solution: use java.util.concurrent.Future instead of io.vertx.core.Future
Acceptance criteria:
Io.vertx.core.Future is removed from the org.folio.service.export.storage.ExportStorageService interface
Story 16
Remove io.vertx.core.Future from the org.folio.service.file.* package
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Future is no longer needed as well
Requirements/Scope:
Remove io.vertx.core.Future from the org.folio.service.file.cleanup.StorageCleanupService interface
Remove io.vertx.core.Future from the org.folio.service.file.definition.FileDefinitionService interface
Remove io.vertx.core.Future from the org.folio.service.file.storage.FileStorage interface
Remove io.vertx.core.Future from the org.folio.service.file.upload.FileUploadService interface
Make appropriate changes to the classes if needed
Approach:
Possible solution: use java.util.concurrent.Future instead of io.vertx.core.Future
Acceptance criteria:
Io.vertx.core.Future is removed from the org.folio.service.file.* package
Story 17
Remove io.vertx.core.Future from the org.folio.service.job.JobExecutionService interface
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Future is no longer needed as well
Requirements/Scope:
Remove io.vertx.core.Future from the org.folio.service.job.JobExecutionService interface
Use java.util.concurrent.Future (alternative)
Make appropriate changes to the classes if needed
Approach:
Possible solution: use java.util.concurrent.Future instead of io.vertx.core.Future
Acceptance criteria:
Io.vertx.core.Future is removed from the org.folio.service.job.JobExecutionService interface
Story 18
Remove io.vertx.core.Future from the org.folio.service.logs.ErrorLogService interface
Purpose/Overview:
Since Vert.x library should be removed from the project, then io.vertx.core.Future is no longer needed as well
Requirements/Scope:
Remove io.vertx.core.Future from the org.folio.service.logs.ErrorLogService interface
Use java.util.concurrent.Future (alternative)
Make appropriate changes to the classes if needed
Approach:
Possible solution: use java.util.concurrent.Future instead of io.vertx.core.Future
Acceptance criteria:
Io.vertx.core.Future is removed from the org.folio.service.logs.ErrorLogService interface