class MappingInput extends BaseStep implements StepInterface {

  public void setConnectorSteps( StepInterface[] sourceSteps, List<MappingValueRename> valueRenames,
      String mappingStepname ) {

    if ( sourceSteps == null ) {
      throw new IllegalArgumentException( BaseMessages
          .getString( PKG, "MappingInput.Exception.IllegalArgumentSourceStep" ) );
    }

    if ( valueRenames == null ) {
      throw new IllegalArgumentException( BaseMessages
          .getString( PKG, "MappingInput.Exception.IllegalArgumentValueRename" ) );
    }

    if ( sourceSteps.length != 0 ) {
      if ( mappingStepname == null ) {
        throw new IllegalArgumentException( BaseMessages
          .getString( PKG, "MappingInput.Exception.IllegalArgumentStepName" ) );
      }
    }

    for ( StepInterface sourceStep : sourceSteps ) {

      // We don't want to add the mapping-to-mapping rowset
      //
      if ( !sourceStep.isMapping() ) {
        // OK, before we leave, make sure there is a rowset that covers the path to this target step.
        // We need to create a new RowSet and add it to the Input RowSets of the target step
        //
        BlockingRowSet rowSet = new BlockingRowSet( getTransMeta().getSizeRowset() );

        // This is always a single copy, both for source and target...
        //
        rowSet.setThreadNameFromToCopy( sourceStep.getStepname(), 0, mappingStepname, 0 );

        // Make sure to connect it to both sides...
        //
        sourceStep.addRowSetToOutputRowSets( rowSet );
        sourceStep.identifyErrorOutput();
        addRowSetToInputRowSets( rowSet );
      }
    }
    data.valueRenames = valueRenames;

    data.sourceSteps = sourceSteps;
  }

  public  MappingInput( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
      Trans trans );

}