当前位置: 首页>>代码示例>>Java>>正文


Java StringUtil.getUsedVariables方法代码示例

本文整理汇总了Java中org.pentaho.di.core.util.StringUtil.getUsedVariables方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtil.getUsedVariables方法的具体用法?Java StringUtil.getUsedVariables怎么用?Java StringUtil.getUsedVariables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.util.StringUtil的用法示例。


在下文中一共展示了StringUtil.getUsedVariables方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: encryptPasswordIfNotUsingVariables

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
/**
 * Encrypt the password, but only if the password doesn't contain any variables.
 * @param password The password to encrypt
 * @return The encrypted password or the  
 */
public static final String encryptPasswordIfNotUsingVariables(String password)
{
    String encrPassword = "";
    List<String> varList = new ArrayList<String>();
    StringUtil.getUsedVariables(password, varList, true);
    if (varList.isEmpty())
    {
        encrPassword = PASSWORD_ENCRYPTED_PREFIX+Encr.encryptPassword(password);
    }
    else
    {
        encrPassword = password;
    }
    
    return encrPassword;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:Encr.java

示例2: checkPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
private void checkPasswordVisible() {
  String password = m_passText.getText();
  ArrayList<String> list = new ArrayList<String>();
  StringUtil.getUsedVariables(password, list, true);
  if (list.size() == 0) {
    m_passText.setEchoChar('*');
  } else {
    m_passText.setEchoChar('\0'); // show everything
  }
}
 
开发者ID:javachen,项目名称:learning-hadoop,代码行数:11,代码来源:CassandraOutputDialog.java

示例3: getUsedVariables

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
public List<String> getUsedVariables() {
	// Get the list of Strings.
	List<StringSearchResult> stringList = getStringList(true, true, false);

	List<String> varList = new ArrayList<String>();

	// Look around in the strings, see what we find...
	for (StringSearchResult result : stringList) {
		StringUtil.getUsedVariables(result.getString(), varList, false);
	}

	return varList;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:14,代码来源:JobMeta.java

示例4: checkPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
public void checkPasswordVisible()
{
    String password = wPassword.getText();
    List<String> list = new ArrayList<String>();
    StringUtil.getUsedVariables(password, list, true);
    if (list.size() == 0)
        wPassword.setEchoChar('*');
    else
        wPassword.setEchoChar('\0'); // Show it all...
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:SalesforceUpsertDialog.java

示例5: checkPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
public void checkPasswordVisible()
{
	String password = wPassword.getText();
	java.util.List<String> list = new ArrayList<String>();
	StringUtil.getUsedVariables(password, list, true);
	if (list.isEmpty())
	{
		wPassword.setEchoChar('*');
	}
	else
	{
		wPassword.setEchoChar('\0'); // Show it all...
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:JobEntryGetPOPDialog.java

示例6: checkPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
public void checkPasswordVisible()
{
    String password = wPassword.getText();
    List<String> list = new ArrayList<String>();
    StringUtil.getUsedVariables(password, list, true);
    if (list.size() == 0)
    {
        wPassword.setEchoChar('*');
    }
    else
    {
        wPassword.setEchoChar('\0'); // Show it all...
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:JobEntryFTPDialog.java

示例7: checkProxyPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
public void checkProxyPasswordVisible()
{
    String password = wProxyPassword.getText();
    List<String> list = new ArrayList<String>();
    StringUtil.getUsedVariables(password, list, true);
    if (list.size() == 0)
    {
        wProxyPassword.setEchoChar('*');
    }
    else
    {
        wProxyPassword.setEchoChar('\0'); // Show it all...
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:15,代码来源:JobEntrySFTPDialog.java

示例8: checkSocksProxyPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
public void checkSocksProxyPasswordVisible()
{
    String password = wSocksProxyPassword.getText();
    List<String> list = new ArrayList<String>();
    StringUtil.getUsedVariables(password, list, true);
    if (list.size() == 0)
    {
        wSocksProxyPassword.setEchoChar('*');
    }
    else
    {
        wSocksProxyPassword.setEchoChar('\0'); // Show it all...
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:15,代码来源:JobEntryFTPDeleteDialog.java

示例9: checkPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
/**
 * Checks the password visible.
 */
private void checkPasswordVisible() {
  final String password = wPasswordField.getText();
  final List<String> list = new ArrayList<String>();
  StringUtil.getUsedVariables(password, list, true);
  if (list.size() == 0) {
    wPasswordField.setEchoChar('*');
  } else {
    String variableName = null;
    if (password.startsWith(StringUtil.UNIX_OPEN)
        && password.endsWith(StringUtil.UNIX_CLOSE)) {
      variableName = password.substring(
          StringUtil.UNIX_OPEN.length(), password.length()
              - StringUtil.UNIX_CLOSE.length());
    }
    if (password.startsWith(StringUtil.WINDOWS_OPEN)
        && password.endsWith(StringUtil.WINDOWS_CLOSE)) {
      variableName = password.substring(
          StringUtil.WINDOWS_OPEN.length(), password.length()
              - StringUtil.WINDOWS_CLOSE.length());
    }
    if (variableName != null
        && System.getProperty(variableName) != null) {
      wPasswordField.setEchoChar('\0');
    } else {
      wPasswordField.setEchoChar('*');
    }
  }
}
 
开发者ID:ivylabs,项目名称:ivy-pdi-git-steps,代码行数:32,代码来源:GitInfoStepDialog.java

示例10: getUsedVariables

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
/**
 * Gets the used variables.
 *
 * @return the used variables
 */
public List<String> getUsedVariables() {
	// Get the list of Strings.
	List<StringSearchResult> stringList = getStringList(true, true, false);

	List<String> varList = new ArrayList<String>();

	// Look around in the strings, see what we find...
	for (StringSearchResult result : stringList) {
		StringUtil.getUsedVariables(result.getString(), varList, false);
	}

	return varList;
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:19,代码来源:JobMeta.java

示例11: checkPasswordVisible

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
public static final void checkPasswordVisible( Text wPassword ) {
  String password = wPassword.getText();
  java.util.List<String> list = new ArrayList<String>();
  StringUtil.getUsedVariables( password, list, true );
  // ONLY show the variable in clear text if there is ONE variable used
  // Also, it has to be the only string in the field.
  //

  if ( list.size() != 1 ) {
    wPassword.setEchoChar( '*' );
  } else {
    String variableName = null;
    if ( ( password.startsWith( StringUtil.UNIX_OPEN ) && password.endsWith( StringUtil.UNIX_CLOSE ) ) ) {
      // ${VAR}
      // 012345
      //
      variableName =
        password.substring( StringUtil.UNIX_OPEN.length(), password.length() - StringUtil.UNIX_CLOSE.length() );
    }
    if ( ( password.startsWith( StringUtil.WINDOWS_OPEN ) && password.endsWith( StringUtil.WINDOWS_CLOSE ) ) ) {
      // %VAR%
      // 01234
      //
      variableName =
        password.substring( StringUtil.WINDOWS_OPEN.length(), password.length()
          - StringUtil.WINDOWS_CLOSE.length() );
    }

    // If there is a variable name in there AND if it's defined in the system properties...
    // Otherwise, we'll leave it alone.
    //
    if ( variableName != null && System.getProperty( variableName ) != null ) {
      wPassword.setEchoChar( '\0' ); // Show it all...
    } else {
      wPassword.setEchoChar( '*' );
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:39,代码来源:DatabaseDialog.java

示例12: containsVariables

import org.pentaho.di.core.util.StringUtil; //导入方法依赖的package包/类
private static boolean containsVariables( String entryPath ) {
  List<String> variablesList = new ArrayList<String>();
  StringUtil.getUsedVariables( entryPath, variablesList, true );
  return !variablesList.isEmpty();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:6,代码来源:RepositoryImporterExtension.java


注:本文中的org.pentaho.di.core.util.StringUtil.getUsedVariables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。