Class BlobPayloadSupport


  • public class BlobPayloadSupport
    extends java.lang.Object
    Utility methods supporting the creation and parsing of blob paths used for payload offload
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ResourceRecord buildResourceRecordFromPath​(java.lang.String path)
      Construct a ResourceRecord from the path name used to store the payload blob
      static java.lang.String decodeLogicalId​(java.lang.String encodedLogicalId)
      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.
      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
      • Methods inherited from class java.lang.Object

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

      • BlobPayloadSupport

        public BlobPayloadSupport()
    • 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)
        Parameters:
        encodedLogicalId -
        Returns:
      • buildResourceRecordFromPath

        public static ResourceRecord buildResourceRecordFromPath​(java.lang.String path)
        Construct a ResourceRecord from 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 elements
        java.lang.NumberFormatException - if an integer element in the path is not an integer