Spike: CIRC-441 - Delivery requests: support tokens for delivery slip

CIRC-441 - Getting issue details... STATUS

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:

 "staffSlipContext": {
    "item": {
      "title": "Bridget Jones's Baby: the diaries",
      "barcode": "453987605438",
      "status": "In transit",
      "primaryContributor": null,
      "allContributors": "Fielding, Helen",
      "callNumber": "PR6056.I4588 B749 2016",
      "callNumberPrefix": null,
      "callNumberSuffix": null,
      "enumeration": null,
      "volume": null,
      "chronology": null,
      "yearCaption": "",
      "materialType": "book",
      "loanType": "Course reserves",
      "copy": "Copy 1",
      "numberOfPieces": "1",
      "descriptionOfPieces": null,
      "effectiveLocationSpecific": "Main Library",
      "effectiveLocationLibrary": "Datalogisk Institut",
      "effectiveLocationCampus": "City Campus",
      "effectiveLocationInstitution": "Københavns Universitet",
      "fromServicePoint": "Online",
      "toServicePoint": "Circ Desk 1"
    "request": {
      "requestID": "be0355f5-6920-4065-8e4f-619c54de6891",
      "servicePointPickup": "Circ Desk 1"
    "requester": {
      "firstName": "Penelope",
      "lastName": "Feil",
      "middleName": "Myrna",
      "barcode": "109322966933845"

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