protected List<VFSScheme> getAvailableVFSSchemes() { VfsFileChooserDialog fileChooserDialog = getVfsFileChooserDialog( null, null ); List<CustomVfsUiPanel> customVfsUiPanels = fileChooserDialog.getCustomVfsUiPanels(); List<VFSScheme> vfsSchemes = new ArrayList<>(); customVfsUiPanels.forEach( vfsPanel -> { VFSScheme scheme = new VFSScheme( vfsPanel.getVfsScheme(), vfsPanel.getVfsSchemeDisplayText() ); vfsSchemes.add( scheme ); } ); return vfsSchemes; }
protected List<VFSScheme> getAvailableVFSSchemes() throws KettleFileException, FileSystemException { VfsFileChooserDialog fileChooserDialog = getVfsFileChooserDialog( null, null ); List<CustomVfsUiPanel> customVfsUiPanels = fileChooserDialog.getCustomVfsUiPanels(); List<VFSScheme> vfsSchemes = new ArrayList<>(); customVfsUiPanels.forEach( vfsPanel -> { VFSScheme scheme = new VFSScheme( vfsPanel.getVfsScheme(), vfsPanel.getVfsSchemeDisplayText() ); vfsSchemes.add( scheme ); } ); return vfsSchemes; }
protected List<VFSScheme> getAvailableVFSSchemes() throws KettleFileException, FileSystemException { VfsFileChooserDialog fileChooserDialog = getVfsFileChooserDialog( null, null ); List<CustomVfsUiPanel> customVfsUiPanels = fileChooserDialog.getCustomVfsUiPanels(); List<VFSScheme> vfsSchemes = new ArrayList<>(); customVfsUiPanels.forEach( vfsPanel -> { VFSScheme scheme = new VFSScheme( vfsPanel.getVfsScheme(), vfsPanel.getVfsSchemeDisplayText() ); vfsSchemes.add( scheme ); } ); return vfsSchemes; }
protected List<VFSScheme> getAvailableVFSSchemes() throws KettleFileException, FileSystemException { VfsFileChooserDialog fileChooserDialog = getVfsFileChooserDialog( null, null ); List<CustomVfsUiPanel> customVfsUiPanels = fileChooserDialog.getCustomVfsUiPanels(); List<VFSScheme> vfsSchemes = new ArrayList<>(); customVfsUiPanels.forEach( vfsPanel -> { if ( !MAPRFS_SCHEME.equals( vfsPanel.getVfsScheme() ) ) { VFSScheme scheme = new VFSScheme( vfsPanel.getVfsScheme(), vfsPanel.getVfsSchemeDisplayText() ); vfsSchemes.add( scheme ); } } ); return vfsSchemes; }
public void setNamedCluster( NamedCluster namedCluster ) { VfsFileChooserDialog dialog = Spoon.getInstance().getVfsFileChooserDialog( null, null ); for ( CustomVfsUiPanel currentPanel : dialog.getCustomVfsUiPanels() ) { if ( currentPanel != null ) { try { Method setNamedCluster = currentPanel.getClass().getMethod( "setNamedCluster", new Class[] { String.class } ); setNamedCluster.invoke( currentPanel, namedCluster.getName() ); } catch ( NoSuchMethodException e ) { if ( logger.isDebugEnabled() ) { logger.debug( "Couldn't set named cluster " + namedCluster.getName() + " on " + currentPanel + " because it doesn't have setNamedCluster method.", e ); } } catch ( InvocationTargetException e ) { if ( logger.isDebugEnabled() ) { logger.debug( "Couldn't set named cluster " + namedCluster.getName() + " on " + currentPanel + " because of exception.", e.getCause() ); } } catch ( IllegalAccessException e ) { if ( logger.isDebugEnabled() ) { logger.debug( "Couldn't set named cluster " + namedCluster.getName() + " on " + currentPanel + " because setNamedCluster method isn't accessible.", e ); } } } } }
public void setNamedCluster( NamedCluster namedCluster ) { VfsFileChooserDialog dialog = Spoon.getInstance().getVfsFileChooserDialog( null, null ); for ( CustomVfsUiPanel currentPanel : dialog.getCustomVfsUiPanels() ) { if ( currentPanel != null ) { try { Method setNamedCluster = currentPanel.getClass().getMethod( "setNamedCluster", new Class[] { String.class } ); setNamedCluster.invoke( currentPanel, namedCluster.getName() ); } catch ( NoSuchMethodException e ) { if ( logger.isDebugEnabled() ) { logger.debug( "Couldn't set named cluster " + namedCluster.getName() + " on " + currentPanel + " because it doesn't have setNamedCluster method.", e ); } } catch ( InvocationTargetException e ) { if ( logger.isDebugEnabled() ) { logger.debug( "Couldn't set named cluster " + namedCluster.getName() + " on " + currentPanel + " because of exception.", e.getCause() ); } } catch ( IllegalAccessException e ) { if ( logger.isDebugEnabled() ) { logger.debug( "Couldn't set named cluster " + namedCluster.getName() + " on " + currentPanel + " because setNamedCluster method isn't accessible.", e ); } } } } }
VfsFileChooserDialog.VFS_DIALOG_OPEN_FILE_OR_DIRECTORY, false, false ); } else { List<CustomVfsUiPanel> customPanels = fileChooserDialog.getCustomVfsUiPanels(); String ncName = null; HadoopVfsFileChooserDialog hadoopDialog = null;
VfsFileChooserDialog.VFS_DIALOG_OPEN_FILE_OR_DIRECTORY, false, false ); } else { List<CustomVfsUiPanel> customPanels = fileChooserDialog.getCustomVfsUiPanels(); for ( CustomVfsUiPanel panel : customPanels ) { if ( panel instanceof HadoopVfsFileChooserDialog ) {
VfsFileChooserDialog.VFS_DIALOG_OPEN_FILE_OR_DIRECTORY, false, false ); } else { List<CustomVfsUiPanel> customPanels = fileChooserDialog.getCustomVfsUiPanels(); for ( CustomVfsUiPanel panel : customPanels ) { if ( panel instanceof HadoopVfsFileChooserDialog ) {