Search in sources :

Example 6 with WSTransformerProcessStep

use of com.amalto.workbench.webservices.WSTransformerProcessStep in project tmdm-studio-se by Talend.

the class TransformerMainPage method performAdd.

protected void performAdd() {
    try {
        if (stepText.getText().trim().length() == 0) {
            return;
        }
        TransformerMainPage.this.comitting = true;
        TransformerMainPage.this.stepsList.add(TransformerMainPage.this.stepText.getText());
        // 
        WSTransformerV2 wsTransformer = transformer;
        wsTransformer.getProcessSteps().add(new WSTransformerProcessStep(TransformerMainPage.this.stepText.getText(), false, new ArrayList(), new ArrayList(), "", ""));
        TransformerMainPage.this.comitting = false;
        int index = TransformerMainPage.this.stepsList.getItemCount() - 1;
        TransformerMainPage.this.stepsList.select(index);
        refreshStep(index);
        TransformerMainPage.this.stepsList.forceFocus();
        refreshOpenXSLTBtnState();
        markDirtyWithoutCommit();
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
}
Also used : WSTransformerV2(com.amalto.workbench.webservices.WSTransformerV2) WSTransformerProcessStep(com.amalto.workbench.webservices.WSTransformerProcessStep) ArrayList(java.util.ArrayList) PartInitException(org.eclipse.ui.PartInitException) InvocationTargetException(java.lang.reflect.InvocationTargetException) XtentisException(com.amalto.workbench.utils.XtentisException)

Example 7 with WSTransformerProcessStep

use of com.amalto.workbench.webservices.WSTransformerProcessStep in project tmdm-studio-se by Talend.

the class TransformerMainPage method beforeDoSave.

@Override
public boolean beforeDoSave() {
    String processName = getXObject().getName();
    if (processName.startsWith("beforeSaving_")) {
        // $NON-NLS-1$
        boolean has = false;
        WSTransformerProcessStep processStep = stepWidget.getProcessStep();
        for (WSTransformerVariablesMapping map : processStep.getOutputMappings()) {
            if ("output_report".equals(map.getPipelineVariable())) {
                // $NON-NLS-1$
                has = true;
                break;
            }
        }
        if (!has) {
            MessageDialog.openWarning(getSite().getShell(), Messages.Warning, Messages.bind(Messages.TransformerMainPage_OutputReportMissing, processName));
        }
    }
    return super.beforeDoSave();
}
Also used : WSTransformerVariablesMapping(com.amalto.workbench.webservices.WSTransformerVariablesMapping) WSTransformerProcessStep(com.amalto.workbench.webservices.WSTransformerProcessStep)

Aggregations

WSTransformerProcessStep (com.amalto.workbench.webservices.WSTransformerProcessStep)7 XtentisException (com.amalto.workbench.utils.XtentisException)4 InvocationTargetException (java.lang.reflect.InvocationTargetException)4 PartInitException (org.eclipse.ui.PartInitException)4 WSTransformerV2 (com.amalto.workbench.webservices.WSTransformerV2)3 WSTransformerVariablesMapping (com.amalto.workbench.webservices.WSTransformerVariablesMapping)3 ArrayList (java.util.ArrayList)3 HashSet (java.util.HashSet)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 SelectionListener (org.eclipse.swt.events.SelectionListener)2 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 Group (org.eclipse.swt.widgets.Group)2 SetupTransformerInputVariablesDialog (com.amalto.workbench.dialogs.SetupTransformerInputVariablesDialog)1 XSLTFileEditorInput (com.amalto.workbench.editors.xslteditor.XSLTFileEditorInput)1 Line (com.amalto.workbench.models.Line)1 WSGetTransformerPluginV2SList (com.amalto.workbench.webservices.WSGetTransformerPluginV2SList)1 WSTransformerPluginV2SList (com.amalto.workbench.webservices.WSTransformerPluginV2SList)1 ComplexTableViewerColumn (com.amalto.workbench.widgets.ComplexTableViewerColumn)1 ComplexTableViewerR (com.amalto.workbench.widgets.ComplexTableViewerR)1