Done
Details
Details
Assignee
Andrii Paias
Andrii Paias(Deactivated)Reporter
Andrii Paias
Andrii Paias(Deactivated)Fix versions
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created January 9, 2020 at 3:17 PM
Updated February 28, 2020 at 12:47 PM
Resolved January 27, 2020 at 10:17 AM
Add ability to use new HoldingsIQ endpoints when loading holdings (on POST /loadHoldings endpoint).
The process that needs to be implemented is described in https://folio-org.atlassian.net/wiki/display/FOLIJET/Spike%3A+MODKBEKBJ-267+-+Use+new+HoldingsIQ+endpoints+with+multiple+staging+areas+and+Delta+Reports
New process should create a snapshot of holdings by calling "POST /reports/holdings",
When running the process for the first time holdings should be downloaded by using "GET /reports/holdings/transactions/{transactionId}" endpoint,
On all subsequent runs holdings should be downloaded by using Delta Reports API - https://developer.ebsco.com/interactive/holdingsiqbeta#/ (i.e. we should create delta by sending new transactionId and previous transactionId to "POST /reports/holdings/deltas" and then loading changes from GET /reports/holdings/deltas/{id})
Proposed implementation:
1) Add implementation for all new endpoints from https://developer.ebsco.com/interactive/holdingsiqbeta#/ to folio-holdingsiq-service
2) Add second implementation for LoadServiceFacade that will load data from new API.
3) Add table for storing previously downloaded transaction ids
4) Implement a Repository class to access this table
5) Modify messages that are sent between HoldingsService and loading LoadServiceFacade to include transactionId (e.g. add fields "currentTransactionId", "previousTransactionId" to class LoadHoldingsMessage).
current implementation will ignore those fields.
6) Add ability to process changes from Report Delta API to HoldingsService (i.e. add method HoldingsService#processChanges), this method will be similar to saveHolding, but it will either save, update or delete holdings, depending on the type of the change.
7) Implement "updateHoldings" and "deleteHoldings" batch methods for HoldingsRepository
8) Add ability to switch between implementations of LoadServiceFacade
Acceptance criteria:
Unit tests