Class FHIRRestBundleHelper
- java.lang.Object
 - 
- org.linuxforhealth.fhir.server.util.FHIRRestBundleHelper
 
 
- 
public class FHIRRestBundleHelper extends java.lang.ObjectHelper for processing bundle entries. Does not perform any persistence operations, but instead helps to translate the request into aFHIRRestInteractionimplementation which can be executed at a later time. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static booleanDO_VALIDATIONstatic java.time.format.DateTimeFormatterPARSER_FORMATTERstatic booleanSKIPPABLE_UPDATE 
- 
Constructor Summary
Constructors Constructor Description FHIRRestBundleHelper(FHIRResourceHelpers helpers)Public constructor 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckResourceType(java.lang.String type)Check that the resource type is a valid typejava.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. 
 - 
 
- 
- 
Field Detail
- 
DO_VALIDATION
public static final boolean DO_VALIDATION
- See Also:
 - Constant Field Values
 
 
- 
SKIPPABLE_UPDATE
public static final boolean SKIPPABLE_UPDATE
- See Also:
 - Constant Field Values
 
 
- 
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 entriesvalidationResponseEntries- the response entries with errors/warnings constructed during validationfailFast- a boolean value indicating if processing should stop on first failurebundleRequestCorrelationId- the bundle request correlation IDskippableUpdates- 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 FHIROperationExceptionCheck that the resource type is a valid type- Parameters:
 type- the resource type name- Throws:
 FHIROperationException
 
 - 
 
 -