Spike: CIRC-441 - Delivery requests: support tokens for delivery slip
https://folio-org.atlassian.net/browse/CIRC-441
The goal of the spike is to investigate the process of adding new tokens to delivery slips
1. How existing tokens are added to delivery slip:
"POST circulation/check-in-by-barcode" endpoint returns "staffSlipContext" attributes in response:
UI uses this object to replace delivery slip tokens with data when printing delivery slip.
mod-circulation constructs staffSlipContext in method TemplateContextUtil#createCheckInContext by using available data (data is stored in object CheckInProcessRecords).
Before constructing staffSlipContext mod-circulation retrieves all necessary data by making calls to other services in CheckInByBarcodeResource#checkin.
2. How to add new slip tokens
If data for new token is already available in CheckInProcessRecords then we just need to transfer it to staffSlipContext in TemplateContextUtil#createCheckInContext.
If data is not available then we need to retrieve it from corresponding service, store it in CheckInProcessRecords, and then add it to staffSlipContext in TemplateContextUtil#createCheckInContext
Just have a few questions to help with my understanding:
(1)Is there already specific mappings for these fields in CheckInProcessRecords? - https://github.com/folio-org/mod-circulation/blob/c15d65ce3c587f48e39e2d5c32513d5808d974d8/src/main/java/org/folio/circulation/domain/CheckInProcessRecords.java#L18
(2)Is there 1 or more services from which we would retrieve the needed data from? (request or requestor details)