Search in sources :

Example 6 with ArchiveFileExportOperationFullPath

use of org.talend.core.ui.export.ArchiveFileExportOperationFullPath in project tmdm-studio-se by Talend.

the class DeployOnMDMExportWizardPage method exportJob.

private boolean exportJob(ExportFileResource p, boolean needContextScript, IProgressMonitor monitor) {
    String label = getProcessName(p);
    monitor.setTaskName(Messages.bind(Messages.DeployOnMDMExportWizardPage_exporting, label));
    if (!ensureTargetIsValid(p)) {
        setDeploySucceed(false);
        return false;
    }
    List<ExportFileResource> resourcesToExport = null;
    try {
        resourcesToExport = getExportResources(p);
    } catch (ProcessorException e) {
        MessageBoxExceptionHandler.process(e);
        setDeploySucceed(false);
        return false;
    }
    String topFolder = getRootFolderName(p);
    setTopFolder(resourcesToExport, topFolder);
    ArchiveFileExportOperationFullPath exporterOperation = getExporterOperation(p, resourcesToExport);
    boolean ok = executeExportOperation(exporterOperation);
    // TODO What if not ok ????
    // path can like name/name
    manager.deleteTempFiles();
    ProcessorUtilities.resetExportConfig();
    monitor.worked(W_EXPORT_PROCESS);
    return true;
}
Also used : ProcessorException(org.talend.designer.runprocess.ProcessorException) ExportFileResource(org.talend.repository.documentation.ExportFileResource) ArchiveFileExportOperationFullPath(org.talend.core.ui.export.ArchiveFileExportOperationFullPath)

Aggregations

ArchiveFileExportOperationFullPath (org.talend.core.ui.export.ArchiveFileExportOperationFullPath)6 ExportFileResource (org.talend.repository.documentation.ExportFileResource)5 File (java.io.File)3 ProcessorException (org.talend.designer.runprocess.ProcessorException)3 ProcessItem (org.talend.core.model.properties.ProcessItem)2 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)2 ExportChoice (org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice)2 ISpagoBITalendEngineClient (it.eng.spagobi.engines.talend.client.ISpagoBITalendEngineClient)1 JobDeploymentDescriptor (it.eng.spagobi.engines.talend.client.JobDeploymentDescriptor)1 SpagoBITalendEngineClient (it.eng.spagobi.engines.talend.client.SpagoBITalendEngineClient)1 AuthenticationFailedException (it.eng.spagobi.engines.talend.client.exception.AuthenticationFailedException)1 EngineUnavailableException (it.eng.spagobi.engines.talend.client.exception.EngineUnavailableException)1 ServiceInvocationFailedException (it.eng.spagobi.engines.talend.client.exception.ServiceInvocationFailedException)1 UnsupportedEngineVersionException (it.eng.spagobi.engines.talend.client.exception.UnsupportedEngineVersionException)1 ArrayList (java.util.ArrayList)1 IFile (org.eclipse.core.resources.IFile)1 PersistenceException (org.talend.commons.exception.PersistenceException)1 RepositoryContext (org.talend.core.context.RepositoryContext)1 Project (org.talend.core.model.general.Project)1 JobInfo (org.talend.core.model.process.JobInfo)1