use of org.talend.components.azurestorage.blob.tazurestoragecontainercreate.TAzureStorageContainerCreateProperties in project components by Talend.
the class AzureStorageBaseBlobTestIT method doContainerCreate.
/**
* doContainerCreate.
*
* @param container {@link String} container
* @param access {@link AccessControl} access
* @return <code>Boolean</code> {@link Boolean} boolean
* @throws Exception the exception
*/
@SuppressWarnings("rawtypes")
public Boolean doContainerCreate(String container, TAzureStorageContainerCreateProperties.AccessControl access) throws Exception {
TAzureStorageContainerCreateProperties properties = new TAzureStorageContainerCreateProperties("tests");
setupConnectionProperties(properties);
properties.container.setValue(container);
properties.accessControl.setValue(access);
BoundedReader reader = createBoundedReader(properties);
return reader.start();
}
use of org.talend.components.azurestorage.blob.tazurestoragecontainercreate.TAzureStorageContainerCreateProperties in project components by Talend.
the class AzureStorageContainerCreateRuntime method initialize.
@Override
public ValidationResult initialize(RuntimeContainer runtimeContainer, ComponentProperties properties) {
ValidationResult validationResult = super.initialize(runtimeContainer, properties);
if (validationResult.getStatus() == ValidationResult.Result.ERROR) {
return validationResult;
}
TAzureStorageContainerCreateProperties componentProperties = (TAzureStorageContainerCreateProperties) properties;
this.access = componentProperties.accessControl.getValue();
this.dieOnError = componentProperties.dieOnError.getValue();
this.blobService = new AzureStorageBlobService(getAzureConnection(runtimeContainer));
return ValidationResult.OK;
}
use of org.talend.components.azurestorage.blob.tazurestoragecontainercreate.TAzureStorageContainerCreateProperties in project components by Talend.
the class AzureStorageContainerCreateRuntimeTest method setup.
@Before
public void setup() {
properties = new TAzureStorageContainerCreateProperties(PROP_ + "CreateContainer");
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");
properties.accessControl.setValue(AccessControl.Public);
runtimeContainer = new RuntimeContainerMock();
this.containerCreate = new AzureStorageContainerCreateRuntime();
}
Aggregations