use of org.talend.dataprofiler.core.ui.imex.model.IExportWriter in project tdq-studio-se by Talend.
the class ExportForExchangeWizard method performFinish.
@Override
public boolean performFinish() {
// alwayse use ZipFileExportWriter instead of the writer from the page
final IExportWriter writer = ExportWriterFactory.create(EImexType.ZIP_FILE);
final IPath writerBashPath = exportPage.getWriter().getBasePath();
final Map<String, ItemRecord[]> recordsList = buildItemRecordList(exportPage.getElements());
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
// $NON-NLS-1$
monitor.beginTask("Export Item", recordsList.size());
for (String zipFileName : recordsList.keySet()) {
writer.setBasePath(writerBashPath.append(zipFileName));
writer.write(recordsList.get(zipFileName), monitor);
}
monitor.done();
}
};
try {
ProgressUI.popProgressDialog(op);
} catch (Exception e) {
log.error(e, e);
}
return true;
}
use of org.talend.dataprofiler.core.ui.imex.model.IExportWriter in project tdq-studio-se by Talend.
the class ExportWizard method performFinish.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
public boolean performFinish() {
if (!exportPage.canFinish()) {
return false;
}
final IExportWriter writer = exportPage.getWriter();
final ItemRecord[] records = exportPage.getElements();
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
// $NON-NLS-1$
monitor.beginTask("Export Item", records.length);
writer.write(records, monitor);
monitor.done();
}
};
try {
ProgressUI.popProgressDialog(op);
} catch (Exception e) {
log.error(e, e);
}
return true;
}
Aggregations