Search in sources :

Example 86 with StreamInterface

use of org.pentaho.di.trans.step.errorhandling.StreamInterface in project pentaho-kettle by pentaho.

the class JobExecutorMeta method handleStreamSelection.

/**
 * When an optional stream is selected, this method is called to handled the ETL metadata implications of that.
 *
 * @param stream
 *          The optional stream to handle.
 */
@Override
public void handleStreamSelection(StreamInterface stream) {
    // This step targets another step.
    // Make sure that we don't specify the same step for more than 1 target...
    // 
    List<StreamInterface> targets = getStepIOMeta().getTargetStreams();
    int index = targets.indexOf(stream);
    StepMeta step = targets.get(index).getStepMeta();
    switch(index) {
        case 0:
            setExecutionResultTargetStepMeta(step);
            break;
        case 1:
            setResultRowsTargetStepMeta(step);
            break;
        case 2:
            setResultFilesTargetStepMeta(step);
            break;
        default:
            break;
    }
}
Also used : StepMeta(org.pentaho.di.trans.step.StepMeta) BaseStepMeta(org.pentaho.di.trans.step.BaseStepMeta) StreamInterface(org.pentaho.di.trans.step.errorhandling.StreamInterface)

Aggregations

StreamInterface (org.pentaho.di.trans.step.errorhandling.StreamInterface)86 KettleException (org.pentaho.di.core.exception.KettleException)31 KettleStepException (org.pentaho.di.core.exception.KettleStepException)26 StepIOMetaInterface (org.pentaho.di.trans.step.StepIOMetaInterface)26 KettleXMLException (org.pentaho.di.core.exception.KettleXMLException)19 StepMeta (org.pentaho.di.trans.step.StepMeta)19 Stream (org.pentaho.di.trans.step.errorhandling.Stream)10 TableItem (org.eclipse.swt.widgets.TableItem)8 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)8 Test (org.junit.Test)7 CheckResult (org.pentaho.di.core.CheckResult)7 KettleRowException (org.pentaho.di.core.exception.KettleRowException)7 BaseStepMeta (org.pentaho.di.trans.step.BaseStepMeta)7 ArrayList (java.util.ArrayList)6 TransHopMeta (org.pentaho.di.trans.TransHopMeta)6 StepIOMeta (org.pentaho.di.trans.step.StepIOMeta)6 KettleDatabaseException (org.pentaho.di.core.exception.KettleDatabaseException)5 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)5 Point (org.pentaho.di.core.gui.Point)5 RowMeta (org.pentaho.di.core.row.RowMeta)5