public class AzureStorageHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
FAIL_TO_DELETE_BLOB |
private static String |
FAIL_TO_GENERATE_BLOB_SAS_TOKEN |
private static String |
FAIL_TO_UPLOAD_BLOB |
private static int |
SAS_START_RESERVE_MINUTE |
| Constructor and Description |
|---|
AzureStorageHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteBlob(com.microsoft.azure.storage.CloudStorageAccount storageAccount,
String containerName,
String blobName) |
protected static com.microsoft.azure.storage.blob.CloudBlobContainer |
getBlobContainer(com.microsoft.azure.storage.CloudStorageAccount storageAccount,
String containerName) |
static String |
getSASToken(com.microsoft.azure.storage.blob.CloudBlob blob,
java.time.Period period) |
static com.microsoft.azure.storage.blob.CloudBlockBlob |
uploadFileAsBlob(File fileToUpload,
com.microsoft.azure.storage.CloudStorageAccount storageAccount,
String containerName,
String blobName) |
private static final int SAS_START_RESERVE_MINUTE
private static final String FAIL_TO_DELETE_BLOB
private static final String FAIL_TO_UPLOAD_BLOB
private static final String FAIL_TO_GENERATE_BLOB_SAS_TOKEN
public static com.microsoft.azure.storage.blob.CloudBlockBlob uploadFileAsBlob(File fileToUpload, com.microsoft.azure.storage.CloudStorageAccount storageAccount, String containerName, String blobName) throws AzureExecutionException
AzureExecutionExceptionpublic static void deleteBlob(com.microsoft.azure.storage.CloudStorageAccount storageAccount,
String containerName,
String blobName)
throws AzureExecutionException
AzureExecutionExceptionpublic static String getSASToken(com.microsoft.azure.storage.blob.CloudBlob blob, java.time.Period period) throws AzureExecutionException
AzureExecutionExceptionprotected static com.microsoft.azure.storage.blob.CloudBlobContainer getBlobContainer(com.microsoft.azure.storage.CloudStorageAccount storageAccount,
String containerName)
throws URISyntaxException,
com.microsoft.azure.storage.StorageException
URISyntaxExceptioncom.microsoft.azure.storage.StorageExceptionCopyright © 2020. All rights reserved.