Search in sources :

Example 1 with BlobModule

use of com.microsoft.tooling.msservices.serviceexplorer.azure.storage.BlobModule in project azure-tools-for-java by Microsoft.

the class CreateBlobContainer method actionPerformed.

@Override
public void actionPerformed(NodeActionEvent e) {
    CreateBlobContainerForm form = new CreateBlobContainerForm((Project) parent.getProject());
    if (parent instanceof BlobModule) {
        form.setConnectionString(StorageClientSDKManager.getConnectionString(((BlobModule) parent).getStorageAccount()));
    } else if (parent instanceof StorageNode) {
        form.setConnectionString(StorageClientSDKManager.getConnectionString(((StorageNode) parent).getStorageAccount()));
        form.setSubscription(new SubscriptionDetail(((StorageNode) parent).getSubscriptionId(), null, null, true));
    }
    form.setOnCreate(new Runnable() {

        @Override
        public void run() {
            parent.removeAllChildNodes();
            parent.load(false);
        }
    });
    form.show();
}
Also used : CreateBlobContainerForm(com.microsoft.intellij.forms.CreateBlobContainerForm) SubscriptionDetail(com.microsoft.azuretools.authmanage.models.SubscriptionDetail) BlobModule(com.microsoft.tooling.msservices.serviceexplorer.azure.storage.BlobModule) StorageNode(com.microsoft.tooling.msservices.serviceexplorer.azure.storage.StorageNode)

Example 2 with BlobModule

use of com.microsoft.tooling.msservices.serviceexplorer.azure.storage.BlobModule in project azure-tools-for-java by Microsoft.

the class CreateBlobContainer method actionPerformed.

@Override
public void actionPerformed(NodeActionEvent e) {
    String connectionString;
    if (parent instanceof BlobModule) {
        connectionString = StorageClientSDKManager.getConnectionString(((BlobModule) parent).getStorageAccount());
    } else {
        connectionString = StorageClientSDKManager.getConnectionString(((StorageNode) parent).getStorageAccount());
    }
    CreateBlobContainerForm form = new CreateBlobContainerForm(PluginUtil.getParentShell(), connectionString);
    if (parent instanceof StorageNode) {
        form.setSubscription(new SubscriptionDetail(((StorageNode) parent).getSubscriptionId(), null, null, true));
    }
    form.setOnCreate(new Runnable() {

        @Override
        public void run() {
            parent.removeAllChildNodes();
            parent.load(false);
        }
    });
    form.open();
}
Also used : CreateBlobContainerForm(com.microsoft.azuretools.azureexplorer.forms.CreateBlobContainerForm) SubscriptionDetail(com.microsoft.azuretools.authmanage.models.SubscriptionDetail) BlobModule(com.microsoft.tooling.msservices.serviceexplorer.azure.storage.BlobModule) StorageNode(com.microsoft.tooling.msservices.serviceexplorer.azure.storage.StorageNode)

Aggregations

SubscriptionDetail (com.microsoft.azuretools.authmanage.models.SubscriptionDetail)2 BlobModule (com.microsoft.tooling.msservices.serviceexplorer.azure.storage.BlobModule)2 StorageNode (com.microsoft.tooling.msservices.serviceexplorer.azure.storage.StorageNode)2 CreateBlobContainerForm (com.microsoft.azuretools.azureexplorer.forms.CreateBlobContainerForm)1 CreateBlobContainerForm (com.microsoft.intellij.forms.CreateBlobContainerForm)1