Search in sources :

Example 11 with StepIOMeta

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

the class MergeRowsMeta method getStepIOMeta.

/**
 * Returns the Input/Output metadata for this step.
 */
@Override
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, true, false, false, false, false);
        ioMeta.addStream(new Stream(StreamType.INFO, null, BaseMessages.getString(PKG, "MergeRowsMeta.InfoStream.FirstStream.Description"), StreamIcon.INFO, null));
        ioMeta.addStream(new Stream(StreamType.INFO, null, BaseMessages.getString(PKG, "MergeRowsMeta.InfoStream.SecondStream.Description"), StreamIcon.INFO, null));
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream)

Example 12 with StepIOMeta

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

the class FuzzyMatchMeta method getStepIOMeta.

/**
 * Returns the Input/Output metadata for this step. The generator step only produces output, does not accept input!
 */
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, true, false, false, false, false);
        StreamInterface stream = new Stream(StreamType.INFO, null, BaseMessages.getString(PKG, "FuzzyMatchMeta.InfoStream.Description"), StreamIcon.INFO, null);
        ioMeta.addStream(stream);
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream) StreamInterface(org.pentaho.di.trans.step.errorhandling.StreamInterface)

Example 13 with StepIOMeta

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

the class JavaFilterMeta method getStepIOMeta.

/**
 * Returns the Input/Output metadata for this step.
 */
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, true, false, false, false, false);
        ioMeta.addStream(new Stream(StreamType.TARGET, null, BaseMessages.getString(PKG, "JavaFilterMeta.InfoStream.True.Description"), StreamIcon.TRUE, null));
        ioMeta.addStream(new Stream(StreamType.TARGET, null, BaseMessages.getString(PKG, "JavaFilterMeta.InfoStream.False.Description"), StreamIcon.FALSE, null));
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream)

Example 14 with StepIOMeta

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

the class JobExecutorMeta method getStepIOMeta.

@Override
public StepIOMetaInterface getStepIOMeta() {
    if (ioMeta == null) {
        ioMeta = new StepIOMeta(true, true, true, false, true, false);
        ioMeta.addStream(new Stream(StreamType.TARGET, executionResultTargetStepMeta, BaseMessages.getString(PKG, "JobExecutorMeta.ResultStream.Description"), StreamIcon.TARGET, null));
        ioMeta.addStream(new Stream(StreamType.TARGET, resultRowsTargetStepMeta, BaseMessages.getString(PKG, "JobExecutorMeta.ResultRowsStream.Description"), StreamIcon.TARGET, null));
        ioMeta.addStream(new Stream(StreamType.TARGET, resultFilesTargetStepMeta, BaseMessages.getString(PKG, "JobExecutorMeta.ResultFilesStream.Description"), StreamIcon.TARGET, null));
    }
    return ioMeta;
}
Also used : StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) Stream(org.pentaho.di.trans.step.errorhandling.Stream)

Example 15 with StepIOMeta

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

the class TransMetaTest method getThisStepFieldsPassesCloneRowMeta.

@Test
public void getThisStepFieldsPassesCloneRowMeta() throws Exception {
    final String overriddenValue = "overridden";
    StepMeta nextStep = mockStepMeta("nextStep");
    StepMetaInterface smi = mock(StepMetaInterface.class);
    StepIOMeta ioMeta = mock(StepIOMeta.class);
    when(smi.getStepIOMeta()).thenReturn(ioMeta);
    doAnswer(new Answer<Object>() {

        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            RowMetaInterface rmi = (RowMetaInterface) invocation.getArguments()[0];
            rmi.clear();
            rmi.addValueMeta(new ValueMetaString(overriddenValue));
            return null;
        }
    }).when(smi).getFields(any(RowMetaInterface.class), anyString(), any(RowMetaInterface[].class), eq(nextStep), any(VariableSpace.class), any(Repository.class), any(IMetaStore.class));
    StepMeta thisStep = mockStepMeta("thisStep");
    when(thisStep.getStepMetaInterface()).thenReturn(smi);
    RowMeta rowMeta = new RowMeta();
    rowMeta.addValueMeta(new ValueMetaString("value"));
    RowMetaInterface thisStepsFields = transMeta.getThisStepFields(thisStep, nextStep, rowMeta);
    assertEquals(1, thisStepsFields.size());
    assertEquals(overriddenValue, thisStepsFields.getValueMeta(0).getName());
}
Also used : ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) StepIOMeta(org.pentaho.di.trans.step.StepIOMeta) RowMeta(org.pentaho.di.core.row.RowMeta) VariableSpace(org.pentaho.di.core.variables.VariableSpace) StepMetaInterface(org.pentaho.di.trans.step.StepMetaInterface) RowMetaInterface(org.pentaho.di.core.row.RowMetaInterface) ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) StepMeta(org.pentaho.di.trans.step.StepMeta) IMetaStore(org.pentaho.metastore.api.IMetaStore) Repository(org.pentaho.di.repository.Repository) InvocationOnMock(org.mockito.invocation.InvocationOnMock) Test(org.junit.Test)

Aggregations

StepIOMeta (org.pentaho.di.trans.step.StepIOMeta)16 Stream (org.pentaho.di.trans.step.errorhandling.Stream)15 StreamInterface (org.pentaho.di.trans.step.errorhandling.StreamInterface)6 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)2 VariableSpace (org.pentaho.di.core.variables.VariableSpace)2 Repository (org.pentaho.di.repository.Repository)2 StepMeta (org.pentaho.di.trans.step.StepMeta)2 IMetaStore (org.pentaho.metastore.api.IMetaStore)2 Test (org.junit.Test)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1 RowMeta (org.pentaho.di.core.row.RowMeta)1 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)1 StepIOMetaInterface (org.pentaho.di.trans.step.StepIOMetaInterface)1 StepMetaInterface (org.pentaho.di.trans.step.StepMetaInterface)1