/** * @param password string for resolving * @return Returns resolved decrypted password or null * in case of param returns null. */ public String getRealPassword( String password ) { return Utils.resolvePassword( variables, password ); }
public String getDescription() { String description = "Mod partitioner"; if ( !Utils.isEmpty( fieldName ) ) { description += "(" + fieldName + ")"; } return description; }
private SalesforceConnection getConnection() throws KettleException { String url = transMeta.environmentSubstitute( wURL.getText() ); // Define a new Salesforce connection SalesforceConnection connection = new SalesforceConnection( log, url, transMeta.environmentSubstitute( wUserName.getText() ), Utils.resolvePassword( transMeta, wPassword.getText() ) ); int realTimeOut = Const.toInt( transMeta.environmentSubstitute( wTimeOut.getText() ), 0 ); connection.setTimeOut( realTimeOut ); // connect to Salesforce connection.connect(); return connection; }
public TextOneFileSelector( String sourcefolderin, String sourcefilenamein, String destfolderin ) { if ( !Utils.isEmpty( sourcefilenamein ) ) { filename = sourcefilenamein; } if ( !Utils.isEmpty( sourcefolderin ) ) { foldername = sourcefolderin; } if ( !Utils.isEmpty( destfolderin ) ) { destfolder = destfolderin; } }
String getTimestampFormatMask() { String mask = conversionMask; if ( Utils.isEmpty( mask ) ) { mask = DEFAULT_TIMESTAMP_FORMAT_MASK; } return mask; }
public TextFileSelector( String sourcefolderin ) { if ( !Utils.isEmpty( sourcefolderin ) ) { source_folder = sourcefolderin; } }
private Integer getInteger( String toParse ) { if ( Utils.isEmpty( toParse ) ) { return null; } try { return new Integer( toParse ); } catch ( NumberFormatException e ) { return null; } }
public static String getConnectionTypeDesc( String tt ) { if ( Utils.isEmpty( tt ) ) { return connection_type_Desc[0]; } if ( tt.equalsIgnoreCase( connection_type_Code[ 1 ] ) ) { return connection_type_Desc[1]; } else { return connection_type_Desc[0]; } }
public String getTargetTypeDesc( String tt ) { if ( Utils.isEmpty( tt ) ) { return target_type_Desc[0]; } if ( tt.equalsIgnoreCase( target_type_Code[1] ) ) { return target_type_Desc[1]; } else { return target_type_Desc[0]; } }
public String getRequiredFilesDesc( String tt ) { if ( Utils.isEmpty( tt ) ) { return RequiredFilesDesc[0]; } if ( tt.equalsIgnoreCase( RequiredFilesCode[1] ) ) { return RequiredFilesDesc[1]; } else { return RequiredFilesDesc[0]; } }
@Override public BigDecimal getBigNumber() { if ( Utils.isEmpty( string ) ) { return null; } // Localise , to . if ( Const.DEFAULT_DECIMAL_SEPARATOR != '.' ) { string = string.replace( Const.DEFAULT_DECIMAL_SEPARATOR, '.' ); } return new BigDecimal( string ); }
@Override public void write( byte[] b ) throws IOException { if ( Utils.isEmpty( encoding ) ) { writer.append( new String( b ) ); } else { writer.append( new String( b, encoding ) ); } }
protected InputStreamReader openStream( String encoding, HttpResponse httpResponse ) throws Exception { if ( !Utils.isEmpty( encoding ) ) { return new InputStreamReader( httpResponse.getEntity().getContent(), encoding ); } else { return new InputStreamReader( httpResponse.getEntity().getContent() ); } }
@Override public String getURL( String hostname, String port, String databaseName ) { if ( !Utils.isEmpty( port ) && Const.toInt( port, -1 ) > 0 ) { return "jdbc:luciddb:http://" + hostname + ":" + port; } else { return "jdbc:luciddb:http://" + hostname; } }
private void ok() { if ( Utils.isEmpty( wStepname.getText() ) ) { return; } stepname = wStepname.getText(); // return value dispose(); } }