/** * Enables or disables the mapping button. We can only enable it if the target steps allows a mapping to be made * against it. * * @param button The button to disable or enable * @param input input or output. If it's true, we keep the button enabled all the time. * @param sourceStepname The mapping output step * @param targetStepname The target step to verify * @throws KettleException */ private void enableMappingButton( final Button button, boolean input, String sourceStepname, String targetStepname ) throws KettleException { if ( input ) { return; // nothing to do } boolean enabled = false; if ( mappingTransMeta != null ) { StepMeta mappingInputStep = mappingTransMeta.findMappingInputStep( sourceStepname ); if ( mappingInputStep != null ) { StepMeta mappingOutputStep = transMeta.findMappingOutputStep( targetStepname ); RowMetaInterface requiredFields = mappingOutputStep.getStepMetaInterface().getRequiredFields( transMeta ); if ( requiredFields != null && requiredFields.size() > 0 ) { enabled = true; } } } button.setEnabled( enabled ); }
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "GPLoadDialog.DoMapping.UnableToFindTargetFields.Title" ),
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell, BaseMessages.getString(
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell, BaseMessages.getString(
StepMetaInterface stepMetaInterface = stepMeta.getStepMetaInterface(); try { targetFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { new ErrorDialog( shell,
StepMetaInterface stepMetaInterface = outputStepMeta.getStepMetaInterface(); try { nextStepRequiredFields = stepMetaInterface.getRequiredFields( transMeta ); } catch ( KettleException e ) { logError( BaseMessages.getString( PKG, "SelectValuesDialog.DoMapping.UnableToFindOutput" ) );
String[] fieldsNamesOfTbl = null; try { tblMeta = stepMetaInterface.getRequiredFields( transMeta ); fieldsNamesOfTbl = tblMeta.getFieldNames(); } catch ( KettleException ke ) {
if ( stepMeta != null ) { StepMetaInterface smi = stepMeta.getStepMetaInterface(); RowMetaInterface targetFields = smi.getRequiredFields( transMeta ); RowMetaInterface sourceFields = transMeta.getPrevStepFields( stepMeta );