Uploaded image for project: 'mod-source-record-manager'
  1. mod-source-record-manager
  2. MODSOURMAN-411

Dynamicaly define the payload of Data Import events depending on MARC Record type (Bib, Authority, Holding)

    XMLWordPrintable

Details

    • eHoldings Sprint 110
    • 5
    • Spitfire

    Description

      Purpose/Overview:

      SRM contains class which is used by service to publish record events: RecordsPublishingServiceImpl. This class prepares event payload in the following way:

      HashMap<String, String> dataImportEventPayloadContext = new HashMap<>();
      dataImportEventPayloadContext.put(MARC_BIBLIOGRAPHIC.value(), Json.encode(record));
      dataImportEventPayloadContext.put("MAPPING_RULES", mappingRules.encode());
      dataImportEventPayloadContext.put("MAPPING_PARAMS", Json.encode(mappingParameters));
      

      The above has to be refactored to hide the details of context population behind a general interface. Each implementation of the interface should customize the content of the context depending on the MARC type (Bib, Authority, Holdings)

      Requirements/Scope:

      1. Data import event payload populated depending on MARC type of the record
      2. For MARC Authority records the content should only contain the record itself mapped to "MARC_AUTHORITY" key. No mapping rules / parameters required

      Acceptance criteria:

      • MARC Bib record's payload is not changed
      • MARC Auth record's payload contains only the record
      • The content is validated with tests

      Related Spike's page: Spike: MODDATAIMP-361 Investigation: Import MARC Authority records

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                dmtkachenko Dmytro Tkachenko
                dmtkachenko Dmytro Tkachenko
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases