Search in sources :

Example 1 with TAzureStorageContainerDeleteProperties

use of org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties in project components by Talend.

the class AzureStorageContainerDeleteRuntimeTest method setup.

@Before
public void setup() {
    properties = new TAzureStorageContainerDeleteProperties(PROP_ + "DeleteContainer");
    properties.setupProperties();
    // valid connection
    properties.connection = new TAzureStorageConnectionProperties(PROP_ + "Connection");
    properties.connection.protocol.setValue(Protocol.HTTP);
    properties.connection.accountName.setValue("fakeAccountName");
    properties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    runtimeContainer = new RuntimeContainerMock();
    this.deleteContainer = new AzureStorageContainerDeleteRuntime();
}
Also used : TAzureStorageContainerDeleteProperties(org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties) RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 2 with TAzureStorageContainerDeleteProperties

use of org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties in project components by Talend.

the class AzureStorageContainerDeleteRuntime method initialize.

@Override
public ValidationResult initialize(RuntimeContainer runtimeContainer, ComponentProperties properties) {
    ValidationResult validationResult = super.initialize(runtimeContainer, properties);
    if (validationResult.getStatus() == ValidationResult.Result.ERROR) {
        return validationResult;
    }
    TAzureStorageContainerDeleteProperties componentProperties = (TAzureStorageContainerDeleteProperties) properties;
    this.dieOnError = componentProperties.dieOnError.getValue();
    this.blobService = new AzureStorageBlobService(getAzureConnection(runtimeContainer));
    return ValidationResult.OK;
}
Also used : TAzureStorageContainerDeleteProperties(org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties) ValidationResult(org.talend.daikon.properties.ValidationResult) AzureStorageBlobService(org.talend.components.azurestorage.blob.AzureStorageBlobService)

Example 3 with TAzureStorageContainerDeleteProperties

use of org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties in project components by Talend.

the class AzureStorageBaseBlobTestIT method doContainerDelete.

/**
 * doContainerDelete.
 *
 * @param container {@link String} container
 * @return <code>Boolean</code> {@link Boolean} boolean
 * @throws Exception the exception
 */
@SuppressWarnings("rawtypes")
public Boolean doContainerDelete(String container) throws Exception {
    TAzureStorageContainerDeleteProperties properties = new TAzureStorageContainerDeleteProperties("tests");
    setupConnectionProperties(properties);
    properties.container.setValue(container);
    BoundedReader reader = createBoundedReader(properties);
    return reader.start();
}
Also used : TAzureStorageContainerDeleteProperties(org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties) BoundedReader(org.talend.components.api.component.runtime.BoundedReader)

Aggregations

TAzureStorageContainerDeleteProperties (org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties)3 Before (org.junit.Before)1 BoundedReader (org.talend.components.api.component.runtime.BoundedReader)1 RuntimeContainerMock (org.talend.components.azurestorage.RuntimeContainerMock)1 AzureStorageBlobService (org.talend.components.azurestorage.blob.AzureStorageBlobService)1 TAzureStorageConnectionProperties (org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)1 ValidationResult (org.talend.daikon.properties.ValidationResult)1