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;
}
Aggregations