Class BlobName
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.blob.BlobName
-
public class BlobName extends java.lang.Object
Representation of a blob name broken down into its individual elements but with slightly more sophisticated handling so that we can use either the real resource name or the resource type id when creating a path. Note that the resource-name version of the path is only used for log/user messages. The real blob path used as the key for the blob service always uses resource type id as the first field.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlobName.Builder
Builder for creatingBlobName
instances
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlobName.Builder
builder()
Factory method to create a newBlobName.Builder
instancestatic BlobName
create(java.lang.String blobPath)
Create a BlobName but without any mapping between resourceTypeId and resourceTypeNamestatic BlobName
create(IResourceTypeMaps resourceTypeMaps, java.lang.String blobPath)
Build a blob name by parsing components of the blob path and interpreting the resource type as either an id or nameint
getResourceTypeId()
Getter for the resourceTypeIdboolean
isPartial()
Is this a partial name? Partial names do not have a version or resourcePayloadKey and represent only a prefix of the path in the blob storejava.lang.String
toBlobPath()
Return the path using the resourceTypeId value.java.lang.String
toString()
Return the path using the resourceTypeName value if it is available, otherwise use resourceTypeId.
-
-
-
Method Detail
-
getResourceTypeId
public int getResourceTypeId()
Getter for the resourceTypeId- Returns:
-
toBlobPath
public java.lang.String toBlobPath()
Return the path using the resourceTypeId value. This can be used to retrieve the blob, or list blobs if the resourcePayloadKey is not set.- Returns:
-
toString
public java.lang.String toString()
Return the path using the resourceTypeName value if it is available, otherwise use resourceTypeId. This is only used for informational/debug messages, not for interacting with the Azure Blob service.- Overrides:
toString
in classjava.lang.Object
-
isPartial
public boolean isPartial()
Is this a partial name? Partial names do not have a version or resourcePayloadKey and represent only a prefix of the path in the blob store- Returns:
-
builder
public static BlobName.Builder builder()
Factory method to create a newBlobName.Builder
instance- Parameters:
resourceTypeMaps
-- Returns:
-
create
public static BlobName create(IResourceTypeMaps resourceTypeMaps, java.lang.String blobPath)
Build a blob name by parsing components of the blob path and interpreting the resource type as either an id or name- Parameters:
blobPath
-- Returns:
-
create
public static BlobName create(java.lang.String blobPath)
Create a BlobName but without any mapping between resourceTypeId and resourceTypeName- Parameters:
blobPath
-- Returns:
-
-