Class 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 creating BlobName 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 new BlobName.Builder instance
      static BlobName create​(java.lang.String blobPath)
      Create a BlobName but without any mapping between resourceTypeId and resourceTypeName
      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
      int getResourceTypeId()
      Getter for the resourceTypeId
      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
      java.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.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 class java.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:
      • 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: