Package com.ibm.fhir.persistence.blob
Class BlobName
- java.lang.Object
-
- com.ibm.fhir.persistence.blob.BlobName
-
public class BlobName extends java.lang.ObjectRepresentation 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 classBlobName.BuilderBuilder for creatingBlobNameinstances
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlobName.Builderbuilder()Factory method to create a newBlobName.Builderinstancestatic BlobNamecreate(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 namestatic BlobNamecreate(java.lang.String blobPath)Create a BlobName but without any mapping between resourceTypeId and resourceTypeNameintgetResourceTypeId()Getter for the resourceTypeIdbooleanisPartial()Is this a partial name? Partial names do not have a resourcePayloadKey and represent only a prefix of the path in the blob storejava.lang.StringtoBlobPath()Return the path using the resourceTypeId value.java.lang.StringtoString()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:
toStringin classjava.lang.Object
-
isPartial
public boolean isPartial()
Is this a partial name? Partial names do not have a 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.Builderinstance- 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:
-
-