com.microsoftopentechnologies.windowsazurestorage
Class WAStorageClient

java.lang.Object
  extended by com.microsoftopentechnologies.windowsazurestorage.WAStorageClient

public class WAStorageClient
extends Object


Constructor Summary
WAStorageClient()
           
 
Method Summary
static com.microsoft.windowsazure.services.blob.client.CloudBlobContainer getBlobContainerReference(String accName, String key, String blobURL, String containerName, boolean createCnt, boolean allowRetry, Boolean cntPubAccess)
          Returns reference of Windows Azure cloud blob container.
static int upload(hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener, StorageAccountInfo strAcc, String expContainerName, boolean cntPubAccess, String expFP, String expVP)
          Uploads files to Windows Azure Storage.
static boolean validateStorageAccount(String storageAccountName, String storageAccountKey, String blobEndPointURL)
          This method validates Storage Account credentials by checking for a dummy conatiner existence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WAStorageClient

public WAStorageClient()
Method Detail

validateStorageAccount

public static boolean validateStorageAccount(String storageAccountName,
                                             String storageAccountKey,
                                             String blobEndPointURL)
                                      throws WAStorageException
This method validates Storage Account credentials by checking for a dummy conatiner existence.

Parameters:
storageAccountName -
storageAccountKey -
blobEndPointURL -
Returns:
true if valid
Throws:
WAStorageException

getBlobContainerReference

public static com.microsoft.windowsazure.services.blob.client.CloudBlobContainer getBlobContainerReference(String accName,
                                                                                                           String key,
                                                                                                           String blobURL,
                                                                                                           String containerName,
                                                                                                           boolean createCnt,
                                                                                                           boolean allowRetry,
                                                                                                           Boolean cntPubAccess)
                                                                                                    throws URISyntaxException,
                                                                                                           com.microsoft.windowsazure.services.core.storage.StorageException
Returns reference of Windows Azure cloud blob container.

Parameters:
accName - storage account name
key - storage account primary access key
blobURL - blob service endpoint url
containerName - name of the container
createCnt - Indicates if container needs to be created
allowRetry - sets retry policy
cntPubAccess - Permissions for container
Returns:
reference of CloudBlobContainer
Throws:
URISyntaxException
com.microsoft.windowsazure.services.core.storage.StorageException

upload

public static int upload(hudson.model.AbstractBuild<?,?> build,
                         hudson.model.BuildListener listener,
                         StorageAccountInfo strAcc,
                         String expContainerName,
                         boolean cntPubAccess,
                         String expFP,
                         String expVP)
                  throws WAStorageException
Uploads files to Windows Azure Storage.

Parameters:
listener -
build -
StorageAccountInfo - storage account information.
expContainerName - container name.
cntPubAccess - denotes if container is publicly accessible.
expFP - File Path in ant glob syntax relative to CI tool workspace.
expVP - Virtual Path of blob container.
Returns:
filesUploaded number of files that are uploaded.
Throws:
WAStorageException
Exception


Copyright © 2004-2014. All Rights Reserved.