Class BlobPayloadSupport
- java.lang.Object
 - 
- org.linuxforhealth.fhir.persistence.blob.BlobPayloadSupport
 
 
- 
public class BlobPayloadSupport extends java.lang.ObjectUtility methods supporting the creation and parsing of blob paths used for payload offload 
- 
- 
Constructor Summary
Constructors Constructor Description BlobPayloadSupport() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceRecordbuildResourceRecordFromPath(java.lang.String path)Construct aResourceRecordfrom the path name used to store the payload blobstatic java.lang.StringdecodeLogicalId(java.lang.String encodedLogicalId)Reverse ofencodeLogicalId(String).static java.lang.StringencodeLogicalId(java.lang.String logicalId)The FHIR id value is defined as [A-Za-z0-9\-\.]{1,64} However, Azure Blob paths have specific requirements around the use of '.' so we simply encode it to '*' which is valid for blob paths, but will not be found in a FHIR logical id.static java.lang.StringgetPayloadPath(int resourceTypeId, java.lang.String logicalId, int version, java.lang.String resourcePayloadKey)Get the path string (blob key) for the given resource parameters 
 - 
 
- 
- 
Method Detail
- 
getPayloadPath
public static java.lang.String getPayloadPath(int resourceTypeId, java.lang.String logicalId, int version, java.lang.String resourcePayloadKey)Get the path string (blob key) for the given resource parameters- Parameters:
 resourceTypeId-logicalId-version-resourcePayloadKey-- Returns:
 
 
- 
encodeLogicalId
public static java.lang.String encodeLogicalId(java.lang.String logicalId)
The FHIR id value is defined as [A-Za-z0-9\-\.]{1,64} However, Azure Blob paths have specific requirements around the use of '.' so we simply encode it to '*' which is valid for blob paths, but will not be found in a FHIR logical id. See https://www.ietf.org/rfc/rfc2396.txt- Parameters:
 logicalId-- Returns:
 
 
- 
decodeLogicalId
public static java.lang.String decodeLogicalId(java.lang.String encodedLogicalId)
Reverse ofencodeLogicalId(String).- Parameters:
 encodedLogicalId-- Returns:
 
 
- 
buildResourceRecordFromPath
public static ResourceRecord buildResourceRecordFromPath(java.lang.String path)
Construct aResourceRecordfrom the path name used to store the payload blob- Parameters:
 path-- Returns:
 - a ResourceRecord built from the 4 path elements, null if less than 4 elements are included
 - Throws:
 java.lang.IllegalArgumentException- if path contains more than 4 elementsjava.lang.NumberFormatException- if an integer element in the path is not an integer
 
 - 
 
 -