Class FHIRRestBundleHelper


  • public class FHIRRestBundleHelper
    extends java.lang.Object
    Helper for processing bundle entries. Does not perform any persistence operations, but instead helps to translate the request into a FHIRRestInteraction implementation which can be executed at a later time.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkResourceType​(java.lang.String type)
      Check that the resource type is a valid type
      java.util.List<FHIRRestInteraction> translateBundleEntries​(Bundle requestBundle, java.util.Map<java.lang.Integer,​Bundle.Entry> validationResponseEntries, boolean failFast, java.lang.String bundleRequestCorrelationId, boolean skippableUpdates)
      Translate each bundle entry into a FHIRRestOperation implementation which can then be executed in a particular order.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PARSER_FORMATTER

        public static final java.time.format.DateTimeFormatter PARSER_FORMATTER
    • Constructor Detail

      • FHIRRestBundleHelper

        public FHIRRestBundleHelper​(FHIRResourceHelpers helpers)
        Public constructor
        Parameters:
        helpers -
    • Method Detail

      • translateBundleEntries

        public java.util.List<FHIRRestInteraction> translateBundleEntries​(Bundle requestBundle,
                                                                          java.util.Map<java.lang.Integer,​Bundle.Entry> validationResponseEntries,
                                                                          boolean failFast,
                                                                          java.lang.String bundleRequestCorrelationId,
                                                                          boolean skippableUpdates)
                                                                   throws java.lang.Exception
        Translate each bundle entry into a FHIRRestOperation implementation which can then be executed in a particular order. No persistance operations are performed at this stage.
        Parameters:
        requestBundle - the bundle containing the request entries
        validationResponseEntries - the response entries with errors/warnings constructed during validation
        failFast - a boolean value indicating if processing should stop on first failure
        bundleRequestCorrelationId - the bundle request correlation ID
        skippableUpdates - if true, and the bundle contains an update for which the resource content in the update matches the existing resource on the server, then skip the update; if false, then always attempt the updates specified in the bundle
        Returns:
        a list of FHIRRestInteraction objects to be processed in order
        Throws:
        java.lang.Exception
      • checkResourceType

        public void checkResourceType​(java.lang.String type)
                               throws FHIROperationException
        Check that the resource type is a valid type
        Parameters:
        type - the resource type name
        Throws:
        FHIROperationException