use of org.talend.components.simplefileio.s3.runtime.IS3DatasetRuntime in project components by Talend.
the class S3DatasetProperties method afterRegion.
public void afterRegion() {
refreshLayout(getForm(Form.MAIN));
S3DatasetDefinition definition = new S3DatasetDefinition();
RuntimeInfo runtimeInfo = definition.getRuntimeInfo(this);
try (SandboxedInstance sandboxedInstance = RuntimeUtil.createRuntimeClass(runtimeInfo, getClass().getClassLoader())) {
IS3DatasetRuntime runtime = (IS3DatasetRuntime) sandboxedInstance.getInstance();
runtime.initialize(null, this);
this.bucket.setPossibleValues(new ArrayList<String>(runtime.listBuckets()));
} catch (Exception e) {
TalendRuntimeException.build(ComponentsErrorCode.IO_EXCEPTION, e).throwIt();
}
}
Aggregations