本文整理了Java中org.pentaho.di.core.util.Utils
类的一些代码示例,展示了Utils
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils
类的具体详情如下:
包路径:org.pentaho.di.core.util.Utils
类名称:Utils
暂无
代码示例来源:origin: pentaho/pentaho-kettle
public TextFileSelector( String sourcefolderin, String filewildcard ) {
if ( !Utils.isEmpty( sourcefolderin ) ) {
sourceFolder = sourcefolderin;
}
if ( !Utils.isEmpty( filewildcard ) ) {
fileWildcard = filewildcard;
}
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
* @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 );
}
代码示例来源:origin: pentaho/pentaho-kettle
public String getDescription() {
String description = "Mod partitioner";
if ( !Utils.isEmpty( fieldName ) ) {
description += "(" + fieldName + ")";
}
return description;
}
代码示例来源:origin: pentaho/pentaho-kettle
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;
}
代码示例来源:origin: pentaho/pentaho-kettle
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;
}
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Checks if is rep reference.
*
* @param fileName the file name
* @param transName the trans name
* @return true, if is rep reference
*/
public static boolean isRepReference( String fileName, String transName ) {
return Utils.isEmpty( fileName ) && !Utils.isEmpty( transName );
}
代码示例来源:origin: pentaho/pentaho-kettle
String getTimestampFormatMask() {
String mask = conversionMask;
if ( Utils.isEmpty( mask ) ) {
mask = DEFAULT_TIMESTAMP_FORMAT_MASK;
}
return mask;
}
代码示例来源:origin: pentaho/pentaho-kettle
public TextFileSelector( String sourcefolderin, String filewildcard ) {
if ( !Utils.isEmpty( sourcefolderin ) ) {
sourceFolder = sourcefolderin;
}
if ( !Utils.isEmpty( filewildcard ) ) {
fileWildcard = filewildcard;
}
}
代码示例来源:origin: pentaho/pentaho-kettle
public TextFileSelector( String sourcefolderin ) {
if ( !Utils.isEmpty( sourcefolderin ) ) {
source_folder = sourcefolderin;
}
}
代码示例来源:origin: pentaho/pentaho-kettle
public TextFileSelector( String sourcefolderin, String filewildcard ) {
if ( !Utils.isEmpty( sourcefolderin ) ) {
sourceFolder = sourcefolderin;
}
if ( !Utils.isEmpty( filewildcard ) ) {
fileWildcard = filewildcard;
}
}
代码示例来源:origin: pentaho/pentaho-kettle
public String loadURL( String url, String ncName, IMetaStore metastore, Map<String, String> mappings ) {
if ( !Utils.isEmpty( ncName ) && !Utils.isEmpty( url ) ) {
mappings.put( url, ncName );
}
return url;
}
代码示例来源:origin: pentaho/pentaho-kettle
private Integer getInteger( String toParse ) {
if ( Utils.isEmpty( toParse ) ) {
return null;
}
try {
return new Integer( toParse );
} catch ( NumberFormatException e ) {
return null;
}
}
代码示例来源:origin: pentaho/pentaho-kettle
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];
}
}
代码示例来源:origin: pentaho/pentaho-kettle
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];
}
}
代码示例来源:origin: pentaho/pentaho-kettle
public String getRequiredFilesDesc( String tt ) {
if ( Utils.isEmpty( tt ) ) {
return RequiredFilesDesc[0];
}
if ( tt.equalsIgnoreCase( RequiredFilesCode[1] ) ) {
return RequiredFilesDesc[1];
} else {
return RequiredFilesDesc[0];
}
}
代码示例来源:origin: pentaho/pentaho-kettle
@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 );
}
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public void write( byte[] b ) throws IOException {
if ( Utils.isEmpty( encoding ) ) {
writer.append( new String( b ) );
} else {
writer.append( new String( b, encoding ) );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
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() );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
@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;
}
}
代码示例来源:origin: pentaho/pentaho-kettle
private void ok() {
if ( Utils.isEmpty( wStepname.getText() ) ) {
return;
}
stepname = wStepname.getText(); // return value
dispose();
}
}
内容来源于网络,如有侵权,请联系作者删除!