Search in sources :

Example 1 with AzureStorageProvideConnectionProperties

use of org.talend.components.azurestorage.AzureStorageProvideConnectionProperties in project components by Talend.

the class AzureStorageRuntime method getUsedConnection.

public TAzureStorageConnectionProperties getUsedConnection(RuntimeContainer runtimeContainer) {
    TAzureStorageConnectionProperties connectionProperties = ((AzureStorageProvideConnectionProperties) properties).getConnectionProperties();
    String refComponentId = connectionProperties.getReferencedComponentId();
    // Using another component's connection
    if (refComponentId != null) {
        // In a runtime container
        if (runtimeContainer != null) {
            TAzureStorageConnectionProperties sharedConn = (TAzureStorageConnectionProperties) runtimeContainer.getComponentData(refComponentId, KEY_CONNECTION_PROPERTIES);
            if (sharedConn != null) {
                return sharedConn;
            }
        }
        // Design time
        connectionProperties = connectionProperties.getReferencedConnectionProperties();
    }
    if (runtimeContainer != null) {
        runtimeContainer.setComponentData(runtimeContainer.getCurrentComponentId(), KEY_CONNECTION_PROPERTIES, connectionProperties);
    }
    return connectionProperties;
}
Also used : AzureStorageProvideConnectionProperties(org.talend.components.azurestorage.AzureStorageProvideConnectionProperties) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)

Aggregations

AzureStorageProvideConnectionProperties (org.talend.components.azurestorage.AzureStorageProvideConnectionProperties)1 TAzureStorageConnectionProperties (org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)1