Class AzureStorageHelper


  • public class AzureStorageHelper
    extends Object
    • Constructor Detail

      • AzureStorageHelper

        public AzureStorageHelper()
    • Method Detail

      • uploadFileAsBlob

        public static com.microsoft.azure.storage.blob.CloudBlockBlob uploadFileAsBlob​(File fileToUpload,
                                                                                       com.microsoft.azure.storage.CloudStorageAccount storageAccount,
                                                                                       String containerName,
                                                                                       String blobName,
                                                                                       com.microsoft.azure.storage.blob.BlobContainerPublicAccessType accessType)
                                                                                throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
        Throws:
        com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
      • deleteBlob

        public static void deleteBlob​(com.microsoft.azure.storage.CloudStorageAccount storageAccount,
                                      String containerName,
                                      String blobName)
                               throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
        Throws:
        com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
      • getSASToken

        public static String getSASToken​(com.microsoft.azure.storage.blob.CloudBlob blob,
                                         java.time.Period period)
                                  throws com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
        Throws:
        com.microsoft.azure.toolkit.lib.common.exception.AzureExecutionException
      • getBlobContainer

        protected static com.microsoft.azure.storage.blob.CloudBlobContainer getBlobContainer​(com.microsoft.azure.storage.CloudStorageAccount storageAccount,
                                                                                              String containerName)
                                                                                       throws URISyntaxException,
                                                                                              com.microsoft.azure.storage.StorageException
        Throws:
        URISyntaxException
        com.microsoft.azure.storage.StorageException