generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call the history API for inbound orders (#746)
* Changed OrderSender.sendOrder to return the sent submissionId (as optional) * Added sentSubmissionId to PartnerMetadata record, and renamed uniqueId to receivedSubmissionId. Also, overloaded record constructor to only take receivedSubmissionId * Updated tests * Added missed import and fixed more tests * Fixed test * Fixed e2e test * Refactored to split RS endpoint logic to its own ReportStreamEndpointClient class * Added custom exception for ReportStreamEndpointClient * Refactored for separation of concerns and clarity * Further refactoring in preparation to call the history API * Added implementation for http get method * Added call to history API to update receiver metadata * Added missing application context registration for ReportStreamEndpointClient * Removed unused line * Import missing class * Added some comments * Added methods to partially update PartnerMetadata and making sure to read existing metadata before updating * Added tests for PartnerMetadataOrchestrator * Some code cleaning * Fixed test * Added tests for PartnerMetadata changes * Added tests for requestHistoryEndpoint + some cleanup * Cleaned up naming and add logging * Implemented updateMetadataForReceivedOrder and getMetadata * Refactored PartnerMetadata.withSentSubmissionFields to split into separate methods for each parameter * Changed logic to make sure to save sentSubmissionId into metadata file even if not able to retrieve receiver * Fixed tests * Added tests for updateMetadataForReceivedOrder + validation logic * Added test to cover logic for missing receiver in getMetadata * Added todo comment * Added logging * Refactored string comparison * Made improvements based on Jeff's feedback * Simplified logic by using try/catch instead of checking for expected format * Added null check * Simplified logic by catching exception instead of checking for expected format * Return if sentSubmissionId is null given we can't update the metadata * Fixed wrong commit * Fixed failing tests * Update etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/metadata/PartnerMetadataOrchestrator.java Co-authored-by: halprin <[email protected]> * Fixed exception * test case for single param constructor * single param contructor for PartnerMetadataException * super with sigle param * Added missing mock return value for requestHistoryEndpoint * Fixed failing test * Refactored to pass order hash as a parameter * PartnerMetadataOrchestrator unit test for updateMetadataForSentOrder when sentSubmissionId is null --------- Co-authored-by: halprin <[email protected]> Co-authored-by: jorge Lopez <[email protected]>
- Loading branch information
1 parent
e485ad4
commit a9944e3
Showing
7 changed files
with
243 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.