Search in sources :

Example 6 with IDataTransferConsumer

use of org.jkiss.dbeaver.tools.transfer.IDataTransferConsumer in project dbeaver by dbeaver.

the class DataTransferJob method transferData.

private boolean transferData(DBRProgressMonitor monitor, DataTransferPipe transferPipe) {
    IDataTransferProducer producer = transferPipe.getProducer();
    IDataTransferConsumer consumer = transferPipe.getConsumer();
    IDataTransferSettings consumerSettings = settings.getNodeSettings(consumer);
    setName(NLS.bind(CoreMessages.data_transfer_wizard_job_container_name, CommonUtils.truncateString(producer.getSourceObject().getName(), 200)));
    IDataTransferSettings nodeSettings = settings.getNodeSettings(producer);
    try {
        // consumer.initTransfer(producer.getSourceObject(), consumerSettings, );
        producer.transferData(monitor, consumer, nodeSettings);
        consumer.finishTransfer(monitor, false);
        return true;
    } catch (Exception e) {
        new DataTransferErrorJob(e).schedule();
        return false;
    }
}
Also used : IDataTransferSettings(org.jkiss.dbeaver.tools.transfer.IDataTransferSettings) IDataTransferConsumer(org.jkiss.dbeaver.tools.transfer.IDataTransferConsumer) IDataTransferProducer(org.jkiss.dbeaver.tools.transfer.IDataTransferProducer)

Aggregations

IDataTransferConsumer (org.jkiss.dbeaver.tools.transfer.IDataTransferConsumer)6 IDataTransferProducer (org.jkiss.dbeaver.tools.transfer.IDataTransferProducer)6 ArrayList (java.util.ArrayList)4 ISelection (org.eclipse.jface.viewers.ISelection)4 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)4 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)4 IDataTransferNode (org.jkiss.dbeaver.tools.transfer.IDataTransferNode)4 ExecutionException (org.eclipse.core.commands.ExecutionException)2 IDataTransferSettings (org.jkiss.dbeaver.tools.transfer.IDataTransferSettings)2 DataTransferWizard (org.jkiss.dbeaver.tools.transfer.wizard.DataTransferWizard)2 ActiveWizardDialog (org.jkiss.dbeaver.ui.dialogs.ActiveWizardDialog)2