@Test public void getUnavailableTargetSteps() { TargetStepAttribute unavailableTargetStep = new TargetStepAttribute( UNAVAILABLE_STEP, TEST_ATTR_VALUE, false ); SourceStepField sourceStep = new SourceStepField( TEST_SOURCE_STEP_NAME, TEST_FIELD ); Map<TargetStepAttribute, SourceStepField> targetMap = Collections.singletonMap( unavailableTargetStep, sourceStep ); TransMeta injectedTransMeta = mock( TransMeta.class ); doReturn( Collections.emptyList() ).when( injectedTransMeta ).getUsedSteps(); Set<TargetStepAttribute> actualSet = MetaInject.getUnavailableTargetSteps( targetMap, injectedTransMeta ); assertTrue( actualSet.contains( unavailableTargetStep ) ); }
public static Set<TargetStepAttribute> getUnavailableTargetSteps( Map<TargetStepAttribute, SourceStepField> targetMap, TransMeta injectedTransMeta ) { Set<String> usedStepNames = getUsedStepsForReferencendTransformation( injectedTransMeta ); Set<TargetStepAttribute> unavailableTargetSteps = new HashSet<TargetStepAttribute>(); for ( TargetStepAttribute currentTarget : targetMap.keySet() ) { if ( !usedStepNames.contains( currentTarget.getStepname().toUpperCase() ) ) { unavailableTargetSteps.add( currentTarget ); } } return Collections.unmodifiableSet( unavailableTargetSteps ); }
MetaInject extends BaseStep implements StepInterface { public static Set<TargetStepAttribute> getUnavailableTargetSteps( Map<TargetStepAttribute, SourceStepField> targetMap, TransMeta injectedTransMeta ) { Set<String> usedStepNames = getUsedStepsForReferencendTransformation( injectedTransMeta ); Set<TargetStepAttribute> unavailableTargetSteps = new HashSet<TargetStepAttribute>(); for ( TargetStepAttribute currentTarget : targetMap.keySet() ) { if ( !usedStepNames.contains( currentTarget.getStepname().toUpperCase() ) ) { unavailableTargetSteps.add( currentTarget ); } } return Collections.unmodifiableSet( unavailableTargetSteps ); } }
MetaInject extends BaseStep implements StepInterface { public static Set<TargetStepAttribute> getUnavailableTargetSteps( Map<TargetStepAttribute, SourceStepField> targetMap, TransMeta injectedTransMeta ) { Set<String> usedStepNames = getUsedStepsForReferencendTransformation( injectedTransMeta ); Set<TargetStepAttribute> unavailableTargetSteps = new HashSet<TargetStepAttribute>(); for ( TargetStepAttribute currentTarget : targetMap.keySet() ) { if ( !usedStepNames.contains( currentTarget.getStepname().toUpperCase() ) ) { unavailableTargetSteps.add( currentTarget ); } } return Collections.unmodifiableSet( unavailableTargetSteps ); } MetaInject( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
      Trans trans ); }
MetaInject extends BaseStep implements StepInterface { public static Set<TargetStepAttribute> getUnavailableTargetSteps( Map<TargetStepAttribute, SourceStepField> targetMap, TransMeta injectedTransMeta ) { Set<String> usedStepNames = getUsedStepsForReferencendTransformation( injectedTransMeta ); Set<TargetStepAttribute> unavailableTargetSteps = new HashSet<TargetStepAttribute>(); for ( TargetStepAttribute currentTarget : targetMap.keySet() ) { if ( !usedStepNames.contains( currentTarget.getStepname().toUpperCase() ) ) { unavailableTargetSteps.add( currentTarget ); } } return Collections.unmodifiableSet( unavailableTargetSteps ); } MetaInject( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
      Trans trans ); boolean processRow( StepMetaInterface smi, StepDataInterface sdi ); boolean init( StepMetaInterface smi, StepDataInterface sdi ); static void removeUnavailableStepsFromMapping( Map<TargetStepAttribute, SourceStepField> targetMap,
      Set<SourceStepField> unavailableSourceSteps, Set<TargetStepAttribute> unavailableTargetSteps ); static Set<TargetStepAttribute> getUnavailableTargetSteps( Map<TargetStepAttribute, SourceStepField> targetMap,
      TransMeta injectedTransMeta ); static Set<TargetStepAttribute> getUnavailableTargetKeys( Map<TargetStepAttribute, SourceStepField> targetMap,
      TransMeta injectedTransMeta, Set<TargetStepAttribute> unavailableTargetSteps ); static Set<SourceStepField> getUnavailableSourceSteps( Map<TargetStepAttribute, SourceStepField> targetMap,
      TransMeta sourceTransMeta, StepMeta stepMeta ); }
MetaInject extends BaseStep implements StepInterface { public static Set<TargetStepAttribute> getUnavailableTargetSteps( Map<TargetStepAttribute, SourceStepField> targetMap, TransMeta injectedTransMeta ) { Set<String> usedStepNames = getUsedStepsForReferencendTransformation( injectedTransMeta ); Set<TargetStepAttribute> unavailableTargetSteps = new HashSet<TargetStepAttribute>(); for ( TargetStepAttribute currentTarget : targetMap.keySet() ) { if ( !usedStepNames.contains( currentTarget.getStepname().toUpperCase() ) ) { unavailableTargetSteps.add( currentTarget ); } } return Collections.unmodifiableSet( unavailableTargetSteps ); } MetaInject( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
      Trans trans ); boolean processRow( StepMetaInterface smi, StepDataInterface sdi ); boolean init( StepMetaInterface smi, StepDataInterface sdi ); static void removeUnavailableStepsFromMapping( Map<TargetStepAttribute, SourceStepField> targetMap,
      Set<SourceStepField> unavailableSourceSteps, Set<TargetStepAttribute> unavailableTargetSteps ); static Set<TargetStepAttribute> getUnavailableTargetSteps( Map<TargetStepAttribute, SourceStepField> targetMap,
      TransMeta injectedTransMeta ); static Set<TargetStepAttribute> getUnavailableTargetKeys( Map<TargetStepAttribute, SourceStepField> targetMap,
      TransMeta injectedTransMeta, Set<TargetStepAttribute> unavailableTargetSteps ); static Set<SourceStepField> getUnavailableSourceSteps( Map<TargetStepAttribute, SourceStepField> targetMap,
      TransMeta sourceTransMeta, StepMeta stepMeta );  }