@Override public String[] getFilePaths( final boolean showSamples ) { final StepMeta parentStepMeta = getParentStepMeta(); if ( parentStepMeta != null ) { final TransMeta parentTransMeta = parentStepMeta.getParentTransMeta(); if ( parentTransMeta != null ) { final FileInputList inputList = getFileInputList( parentTransMeta ); if ( inputList != null ) { return inputList.getFileStrings(); } } } return new String[]{}; } }
public void widgetSelected( SelectionEvent e ) { try { JsonInputMeta tfii = new JsonInputMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files != null && files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "JsonInputDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "JsonInputDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "JsonInputDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( KettleException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "JsonInputDialog.ErrorParsingData.DialogTitle" ), BaseMessages.getString( PKG, "JsonInputDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );
public void widgetSelected( SelectionEvent e ) { try { LoadFileInputMeta tfii = new LoadFileInputMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files != null && files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "LoadFileInputDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "LoadFileInputDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "LoadFileInputDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "LoadFileInputDialog.ErrorParsingData.DialogTitle" ), BaseMessages.getString( PKG, "LoadFileInputDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );
public void widgetSelected( SelectionEvent e ) { try { LDIFInputMeta tfii = new LDIFInputMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files != null && files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "LDIFInputDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "LDIFInputDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "LDIFInputDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( KettleException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "LDIFInputDialog.ErrorParsingData.DialogTitle" ), BaseMessages.getString( PKG, "LDIFInputDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );
public void widgetSelected( SelectionEvent e ) { try { GetXMLDataMeta tfii = new GetXMLDataMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files != null && files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "GetXMLDataDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "GetXMLDataDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "GetXMLDataDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( KettleException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "GetXMLDataDialog.ErrorParsingData.DialogTitle" ), BaseMessages.getString( PKG, "GetXMLDataDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );
public void widgetSelected( SelectionEvent e ) { try { GetFilesRowsCountMeta tfii = new GetFilesRowsCountMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "GetFilesRowsCountDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "GetFilesRowsCountDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "GetFilesRowsCountDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( KettleException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "GetFilesRowsCountDialog.ErrorParsingData.DialogTitle" ), BaseMessages.getString( PKG, "GetFilesRowsCountDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );
@Override public void widgetSelected( SelectionEvent e ) { try { PropertyInputMeta tfii = new PropertyInputMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "PropertyInputDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "PropertyInputDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "PropertyInputDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "PropertyInputDialog.ErrorParsingData.DialogTitle" ), BaseMessages.getString( PKG, "PropertyInputDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );
@Override public void widgetSelected( SelectionEvent e ) { try { AccessInputMeta tfii = new AccessInputMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "AccessInputDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "AccessInputDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "AccessInputDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( KettleException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "AccessInputDialog.ErrorParsingData.DialogTitle" ), BaseMessages .getString( PKG, "AccessInputDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );
public void widgetSelected( SelectionEvent e ) { try { YamlInputMeta tfii = new YamlInputMeta(); getInfo( tfii ); FileInputList fileInputList = tfii.getFiles( transMeta ); String[] files = fileInputList.getFileStrings(); if ( files != null && files.length > 0 ) { EnterSelectionDialog esd = new EnterSelectionDialog( shell, files, BaseMessages.getString( PKG, "YamlInputDialog.FilesReadSelection.DialogTitle" ), BaseMessages.getString( PKG, "YamlInputDialog.FilesReadSelection.DialogMessage" ) ); esd.setViewOnly(); esd.open(); } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "YamlInputDialog.NoFileFound.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } } catch ( KettleException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "YamlInputDialog.ErrorParsingData.DialogTitle" ), BaseMessages .getString( PKG, "YamlInputDialog.ErrorParsingData.DialogMessage" ), ex ); } } } );