private boolean connect() { boolean connexion = false; if ( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_FTP ) ) { connexion = connectToFTP(); } else if ( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_FTPS ) ) { connexion = connectToFTPS(); } else if ( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_SFTP ) ) { connexion = connectToSFTP(); } else if ( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_SSH ) ) { connexion = connectToSSH(); } return connexion; }
/** * Allows for magnifying to any percentage entered by the user... */ private void readMagnification() { String possibleText = zoomLabel.getText(); possibleText = possibleText.replace( "%", "" ); float possibleFloatMagnification; try { possibleFloatMagnification = Float.parseFloat( possibleText ) / 100; magnification = possibleFloatMagnification; if ( zoomLabel.getText().indexOf( '%' ) < 0 ) { zoomLabel.setText( zoomLabel.getText().concat( "%" ) ); } } catch ( Exception e ) { modalMessageDialog( getString( "TransGraph.Dialog.InvalidZoomMeasurement.Title" ), getString( "TransGraph.Dialog.InvalidZoomMeasurement.Message", zoomLabel.getText() ), SWT.YES | SWT.ICON_ERROR ); } redraw(); }
private void activeFTPProtocol() { wlConnectionType.setEnabled( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_FTPS ) ); wConnectionType.setEnabled( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_FTPS ) ); if ( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_SSH ) ) { wlusePublicKey.setEnabled( true ); wusePublicKey.setEnabled( true ); wSocksProxyHost.setEnabled( false ); } else if ( wProtocol.getText().equals( JobEntryFTPDelete.PROTOCOL_FTP ) ) { wSocksProxy.setEnabled( true ); } else { wusePublicKey.setSelection( false ); activeUsePublicKey(); wlusePublicKey.setEnabled( false ); wusePublicKey.setEnabled( false ); wSocksProxy.setEnabled( false ); } }
/** * Allows for magnifying to any percentage entered by the user... */ private void readMagnification() { String possibleText = zoomLabel.getText(); possibleText = possibleText.replace( "%", "" ); float possibleFloatMagnification; try { possibleFloatMagnification = Float.parseFloat( possibleText ) / 100; magnification = possibleFloatMagnification; if ( zoomLabel.getText().indexOf( '%' ) < 0 ) { zoomLabel.setText( zoomLabel.getText().concat( "%" ) ); } } catch ( Exception e ) { MessageBox mb = new MessageBox( shell, SWT.YES | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "TransGraph.Dialog.InvalidZoomMeasurement.Message", zoomLabel .getText() ) ); mb.setText( BaseMessages.getString( PKG, "TransGraph.Dialog.InvalidZoomMeasurement.Title" ) ); mb.open(); } redraw(); }
private void getInfo( PaloCellInputMeta myMeta ) throws KettleException { stepname = textStepName.getText(); List<DimensionField> fields = new ArrayList<DimensionField>(); for ( int i = 0; i < tableViewFields.table.getItemCount(); i++ ) { DimensionField field = new DimensionField( tableViewFields.table.getItem( i ).getText( 1 ), tableViewFields.table.getItem( i ) .getText( 2 ), tableViewFields.table.getItem( i ).getText( 3 ) ); fields.add( field ); } myMeta.setDatabaseMeta( transMeta.findDatabase( addConnectionLine.getText() ) ); myMeta.setCubeMeasureName( new DimensionField( "Measure", textMeasureName.getText(), comboMeasureType.getText() ) ); myMeta.setLevels( fields ); myMeta.setCube( comboCube.getText() ); myMeta.setChanged( true ); }
private void ok() { stepname = wStepname.getText(); // return value input.getParameterFieldMap().clear(); for ( int i = 0; i < wFields.nrNonEmpty(); i++ ) { TableItem item = wFields.getNonEmpty( i ); String name = item.getText( 1 ); String field = item.getText( 2 ); if ( !Utils.isEmpty( name ) && !Utils.isEmpty( field ) ) { input.getParameterFieldMap().put( name, field ); } } input.setInputFileField( wInput.getText() ); input.setOutputFileField( wOutput.getText() ); input.setOutputProcessorType( ProcessorType.values()[wProcessor.getSelectionIndex()] ); input.setCreateParentfolder( wParentFolder.getSelection() ); dispose(); }
List<DimensionField> fields = new ArrayList<DimensionField>(); if ( this.updateOptions.getCode( comboUpdateMode.getText() ) == "ADD" && this.splashOptions.getCode( comboSplashMode.getText() ) == "SET" ) { throw new KettleException( BaseMessages.getString( PKG, "PaloCellOutputDialog.UpdateSplashError", BaseMessages.getString( PKG, "PaloCellOutputDialog.UpdateMode" ), comboUpdateMode.getText(), BaseMessages.getString( PKG, "PaloCellOutputDialog.SplashMode" ), comboSplashMode.getText() myMeta.setCube( this.comboCube.getText() ); myMeta.setMeasureType( this.comboMeasureType.getText() ); myMeta.setUpdateMode( this.updateOptions.getCode( comboUpdateMode.getText() ) ); myMeta.setSplashMode( this.splashOptions.getCode( comboSplashMode.getText() ) ); myMeta.setLevels( fields ); myMeta.setClearCube( this.buttonClearCube.getSelection() );
private void getSteps() { Cursor busy = new Cursor( shell.getDisplay(), SWT.CURSOR_WAIT ); shell.setCursor( busy ); String fieldStep = wSourceStep.getText(); wSourceStep.removeAll(); wSourceStep.setItems( transMeta.getPrevStepNames( stepMeta ) ); wSourceStep.setText( fieldStep ); shell.setCursor( null ); busy.dispose(); }
tableViewFields.table.removeAll(); tableViewFields.add( BaseMessages.getString( PKG, "PaloDimInputDialog.BaseElementName" ), "0", comboDimension .getText(), "String" ); } else if ( comboDimension.getText() != null && comboDimension.getText() != "" ) { try { if ( addConnectionLine.getText() != null ) { tableViewFields.table.removeAll(); data.helper.connect(); List<PaloDimensionLevel> levels = data.helper.getDimensionLevels( comboDimension.getText() ); for ( int i = 0; i < levels.size(); i++ ) { PaloDimensionLevel level = levels.get( i );
private void getInfo( PaloDimInputMeta myMeta ) throws KettleException { stepname = textStepName.getText(); List<PaloDimensionLevel> levels = new ArrayList<PaloDimensionLevel>(); for ( int i = 0; i < tableViewFields.table.getItemCount(); i++ ) { PaloDimensionLevel level = new PaloDimensionLevel( tableViewFields.table.getItem( i ).getText( 1 ), Integer .parseInt( tableViewFields.table.getItem( i ).getText( 2 ) ), tableViewFields.table.getItem( i ).getText( 3 ), tableViewFields.table.getItem( i ).getText( 4 ) ); levels.add( level ); } myMeta.setDatabaseMeta( transMeta.findDatabase( addConnectionLine.getText() ) ); myMeta.setLevels( levels ); myMeta.setDimension( comboDimension.getText() ); myMeta.setBaseElementsOnly( buttonBaseElementsOnly.getSelection() ); myMeta.setChanged( true ); }
private void doGetDimensions() { try { if ( comboCube.getText() != null && comboCube.getText() != "" ) { if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = transMeta.findDatabase( addConnectionLine.getText() ); PaloCellInputData data = new PaloCellInputData( dbMeta ); data.helper.connect(); List<String> cubeDimensions = data.helper.getCubeDimensions( comboCube.getText() ); tableViewFields.table.removeAll(); for ( int i = 0; i < cubeDimensions.size(); i++ ) {
private void getFields() { Cursor busy = new Cursor( shell.getDisplay(), SWT.CURSOR_WAIT ); shell.setCursor( busy ); try { String sourceStepName = wSourceStep.getText(); if ( !Utils.isEmpty( sourceStepName ) ) { String fieldName = wSourceField.getText(); RowMetaInterface r = transMeta.getStepFields( sourceStepName ); if ( r != null ) { wSourceField.setItems( r.getFieldNames() ); } wSourceField.setText( fieldName ); } shell.setCursor( null ); busy.dispose(); } catch ( KettleException ke ) { shell.setCursor( null ); busy.dispose(); new ErrorDialog( shell, BaseMessages.getString( PKG, "ValidatorDialog.FailedToGetFields.DialogTitle" ), BaseMessages .getString( PKG, "ValidatorDialog.FailedToGetFields.DialogMessage" ), ke ); } } }
protected void getInfo( MonetDBBulkLoaderMeta inf ) { int nrfields = wReturn.nrNonEmpty(); inf.allocate( nrfields ); if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.Log.FoundFields", "" + nrfields ) ); } //CHECKSTYLE:Indentation:OFF for ( int i = 0; i < nrfields; i++ ) { TableItem item = wReturn.getNonEmpty( i ); inf.getFieldTable()[i] = item.getText( 1 ); inf.getFieldStream()[i] = item.getText( 2 ); inf.getFieldFormatOk()[i] = "Y".equalsIgnoreCase( item.getText( 3 ) ); } // General Settings Tab values from step meta-data configuration. inf.setDbConnectionName( wConnection.getText() ); inf.setSchemaName( wSchema.getText() ); inf.setTableName( wTable.getText() ); inf.setDatabaseMeta( transMeta.findDatabase( wConnection.getText() ) ); inf.setBufferSize( wBufferSize.getText() ); inf.setLogFile( wLogFile.getText() ); inf.setTruncate( wTruncate.getSelection() ); inf.setFullyQuoteSQL( wFullyQuoteSQL.getSelection() ); // MonetDB API Settings tab inf.setFieldSeparator( wFieldSeparator.getText() ); inf.setFieldEnclosure( wFieldEnclosure.getText() ); inf.setNULLrepresentation( wNULLrepresentation.getText() ); inf.setEncoding( wEncoding.getText() ); stepname = wStepname.getText(); // return value }
private void doGetFields() { try { List<String> cubeDimensions = null; if ( comboCube.getText() != null && comboCube.getText() != "" ) { if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = transMeta.findDatabase( addConnectionLine.getText() ); PaloCellOutputData data = new PaloCellOutputData( dbMeta ); data.helper.connect(); cubeDimensions = data.helper.getCubeDimensions( comboCube.getText() ); data.helper.disconnect();
public void activate() { try { getVfsFileChooserDialog().setRootFile( null ); getVfsFileChooserDialog().setInitialFile( null ); getVfsFileChooserDialog().openFileCombo.setText( GoogleDriveFileProvider.SCHEME + "://" ); getVfsFileChooserDialog().vfsBrowser.fileSystemTree.removeAll(); super.activate(); FileObject newRoot = resolveFile( getVfsFileChooserDialog().openFileCombo.getText() ); getVfsFileChooserDialog().vfsBrowser.resetVfsRoot( newRoot ); } catch ( FileSystemException e ) { System.out.println( e ); } }
private void doGetFields() { try { if ( comboDimension.getText() != null ) { if ( addConnectionLine.getText() != null ) { DatabaseMeta dbMeta = transMeta.findDatabase( addConnectionLine.getText() ); tableViewFields.table.removeAll(); data.helper.connect(); List<PaloDimensionLevel> levels = data.helper.getDimensionLevels( comboDimension.getText() ); for ( PaloDimensionLevel level : levels ) { tableViewFields
selectedField.setDataType( ValueMetaFactory.getIdForValueMeta( wDataType.getText() ) ); selectedField.setConversionMask( wConversionMask.getText() ); selectedField.setDecimalSymbol( wDecimalSymbol.getText() ); selectedField.setSourcingField( wSourceField.getText() ); selectedField.setSourcingStep( transMeta.findStep( wSourceStep.getText() ) );
jobEntry.setOnlyPuttingNewFiles( wOnlyNew.getSelection() ); jobEntry.setActiveConnection( wActive.getSelection() ); jobEntry.setControlEncoding( wControlEncoding.getText() );
jobEntry.setProtocol( wProtocol.getText() ); jobEntry.setPort( wPort.getText() ); jobEntry.setServerName( wServerName.getText() );