Class Utils
- java.lang.Object
-
- com.microsoft.jenkins.artifactmanager.Utils
-
public final class Utils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
containTokens(String text)
static com.azure.storage.blob.sas.BlobServiceSasSignatureValues
generateBlobPolicy()
static String
generateBlobSASURL(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount, String containerName, String blobName)
static OffsetDateTime
generateExpiryDate()
static AzureArtifactConfig
getArtifactConfig()
static com.azure.storage.blob.BlobContainerClient
getBlobContainerReference(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount, String containerName, boolean createIfNotExist)
static String
getBlobUrl(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount, String containerName, String blobName)
static com.azure.storage.blob.BlobServiceClient
getCloudStorageAccount(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount)
static com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo
getStorageAccount(Item item)
static boolean
isPrefixValid(String prefix)
static String
replaceMacro(String s, Map<String,String> props, Locale locale)
static boolean
validateContainerName(String containerName)
-
-
-
Method Detail
-
getArtifactConfig
public static AzureArtifactConfig getArtifactConfig()
-
validateContainerName
public static boolean validateContainerName(String containerName)
-
isPrefixValid
public static boolean isPrefixValid(String prefix)
-
containTokens
public static boolean containTokens(String text)
-
getStorageAccount
public static com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo getStorageAccount(Item item)
-
getBlobUrl
public static String getBlobUrl(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount, String containerName, String blobName)
-
generateBlobSASURL
public static String generateBlobSASURL(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount, String containerName, String blobName)
-
generateBlobPolicy
public static com.azure.storage.blob.sas.BlobServiceSasSignatureValues generateBlobPolicy()
-
generateExpiryDate
public static OffsetDateTime generateExpiryDate()
-
getBlobContainerReference
public static com.azure.storage.blob.BlobContainerClient getBlobContainerReference(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount, String containerName, boolean createIfNotExist) throws URISyntaxException
- Throws:
URISyntaxException
-
getCloudStorageAccount
public static com.azure.storage.blob.BlobServiceClient getCloudStorageAccount(com.microsoftopentechnologies.windowsazurestorage.beans.StorageAccountInfo storageAccount)
-
-