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


Java Encr类代码示例

本文整理汇总了Java中org.pentaho.di.core.encryption.Encr的典型用法代码示例。如果您正苦于以下问题:Java Encr类的具体用法?Java Encr怎么用?Java Encr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Encr类属于org.pentaho.di.core.encryption包,在下文中一共展示了Encr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
@Override
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
  if ( !super.init( smi, sdi ) ) {
    return false;
  }
  meta = (ZendeskInputMeta) smi;
  data = (ZendeskInputData) sdi;

  String subDomain = environmentSubstitute( meta.getSubDomain() );
  String username = environmentSubstitute( meta.getUsername() );
  String password = Encr.decryptPasswordOptionallyEncrypted( environmentSubstitute( meta.getPassword() ) );

  if ( Const.isEmpty( subDomain ) || Const.isEmpty( username ) || Const.isEmpty( password ) ) {
    logError( BaseMessages.getString( PKG, "ZendeskInput.Error.MissingCredentials" ) );
    return false;
  }

  data.conn = createConnection( subDomain, username, password, meta.isToken() );
  if ( data.conn == null || data.conn.isClosed() ) {
    return false;
  }
  return true;
}
 
开发者ID:matthewtckr,项目名称:pdi-zendesk-plugin,代码行数:24,代码来源:ZendeskInput.java

示例2: getPartitioningInformation

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
/**
 * @return the available partition/host/databases/port combinations in the cluster
 */
public PartitionDatabaseMeta[] getPartitioningInformation()
{
    // find the maximum number of attributes starting with ATTRIBUTE_CLUSTER_HOSTNAME_PREFIX 
    
    int nr = 0;
    while ( (attributes.getProperty(ATTRIBUTE_CLUSTER_HOSTNAME_PREFIX+nr))!=null ) nr++;
    
    PartitionDatabaseMeta[] clusterInfo = new PartitionDatabaseMeta[nr];
    
    for (nr=0;nr<clusterInfo.length;nr++)
    {
        String partitionId = attributes.getProperty(ATTRIBUTE_CLUSTER_PARTITION_PREFIX+nr);
        String hostname    = attributes.getProperty(ATTRIBUTE_CLUSTER_HOSTNAME_PREFIX+nr);
        String port        = attributes.getProperty(ATTRIBUTE_CLUSTER_PORT_PREFIX+nr);
        String dbName      = attributes.getProperty(ATTRIBUTE_CLUSTER_DBNAME_PREFIX+nr);
        String username    = attributes.getProperty(ATTRIBUTE_CLUSTER_USERNAME_PREFIX+nr);
        String password    = attributes.getProperty(ATTRIBUTE_CLUSTER_PASSWORD_PREFIX+nr);
        clusterInfo[nr] = new PartitionDatabaseMeta(partitionId, hostname, port, dbName);
        clusterInfo[nr].setUsername(username);
        clusterInfo[nr].setPassword( Encr.decryptPasswordOptionallyEncrypted(password) );
    }
    
    return clusterInfo;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:28,代码来源:BaseDatabaseMeta.java

示例3: getXML

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public String getXML()
{
  StringBuffer retval = new StringBuffer(200);

  retval.append(super.getXML());
  retval.append("      ").append(XMLHandler.addTagValue("servername", servername)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("username", username)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("password", Encr.encryptPasswordIfNotUsingVariables(password))); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("usessl", usessl)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("sslport", sslport)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("outputdirectory", outputdirectory)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("filenamepattern", filenamepattern)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("retrievemails", retrievemails)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("firstmails", firstmails)); //$NON-NLS-1$ //$NON-NLS-2$
  retval.append("      ").append(XMLHandler.addTagValue("delete", delete)); //$NON-NLS-1$ //$NON-NLS-2$

  return retval.toString();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:19,代码来源:JobEntryGetPOP.java

示例4: loadXML

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public void loadXML(Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers, Repository rep) throws KettleXMLException
{
  try
  {
    super.loadXML(entrynode, databases, slaveServers);
    servername = XMLHandler.getTagValue(entrynode, "servername"); //$NON-NLS-1$
    username = XMLHandler.getTagValue(entrynode, "username"); //$NON-NLS-1$
    password = Encr.decryptPasswordOptionallyEncrypted(XMLHandler.getTagValue(entrynode, "password"));
    usessl = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "usessl")); //$NON-NLS-1$ //$NON-NLS-2$
    sslport = XMLHandler.getTagValue(entrynode, "sslport"); //$NON-NLS-1$
    outputdirectory = XMLHandler.getTagValue(entrynode, "outputdirectory"); //$NON-NLS-1$
    filenamepattern = XMLHandler.getTagValue(entrynode, "filenamepattern"); //$NON-NLS-1$
    retrievemails = Const.toInt(XMLHandler.getTagValue(entrynode, "retrievemails"), -1); //$NON-NLS-1$
    firstmails = XMLHandler.getTagValue(entrynode, "firstmails"); //$NON-NLS-1$
    delete = "Y".equalsIgnoreCase(XMLHandler.getTagValue(entrynode, "delete")); //$NON-NLS-1$ //$NON-NLS-2$
  } catch (KettleXMLException xe)
  {
    throw new KettleXMLException(Messages.getString("JobEntryGetPOP.UnableToLoadFromXml"), xe); //$NON-NLS-1$
  }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:JobEntryGetPOP.java

示例5: getXML

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public String getXML()
{
       StringBuffer retval = new StringBuffer(200);

	retval.append(super.getXML());

	retval.append("      ").append(XMLHandler.addTagValue("servername",   serverName));
	retval.append("      ").append(XMLHandler.addTagValue("serverport",   serverPort));
	retval.append("      ").append(XMLHandler.addTagValue("username",     userName));
       retval.append("      ").append(XMLHandler.addTagValue("password",     Encr.encryptPasswordIfNotUsingVariables(getPassword())));
	retval.append("      ").append(XMLHandler.addTagValue("sftpdirectory", sftpDirectory));
	retval.append("      ").append(XMLHandler.addTagValue("targetdirectory", targetDirectory));
	retval.append("      ").append(XMLHandler.addTagValue("wildcard",     wildcard));
	retval.append("      ").append(XMLHandler.addTagValue("remove",       remove));
	retval.append("      ").append(XMLHandler.addTagValue("isaddresult",       isaddresult));
	retval.append("      ").append(XMLHandler.addTagValue("createtargetfolder",       createtargetfolder));
	retval.append("      ").append(XMLHandler.addTagValue("copyprevious",       copyprevious));
	
	
	

	return retval.toString();
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:JobEntrySFTP.java

示例6: updateDatabase

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public synchronized void updateDatabase(long id_database, String name, String type, String access, String host, String dbname,
		String port, String user, String pass, String servername, String data_tablespace, String index_tablespace)
		throws KettleException
{
	long id_database_type = getDatabaseTypeID(type);
	long id_database_contype = getDatabaseConTypeID(access);

	RowMetaAndData table = new RowMetaAndData();
	table.addValue(new ValueMeta(FIELD_DATABASE_NAME, ValueMetaInterface.TYPE_STRING), name);
	table.addValue(new ValueMeta(FIELD_DATABASE_ID_DATABASE_TYPE, ValueMetaInterface.TYPE_INTEGER), new Long(id_database_type));
	table.addValue(new ValueMeta(FIELD_DATABASE_ID_DATABASE_CONTYPE, ValueMetaInterface.TYPE_INTEGER), new Long(id_database_contype));
	table.addValue(new ValueMeta(FIELD_DATABASE_HOST_NAME, ValueMetaInterface.TYPE_STRING), host);
	table.addValue(new ValueMeta(FIELD_DATABASE_DATABASE_NAME, ValueMetaInterface.TYPE_STRING), dbname);
	table.addValue(new ValueMeta(FIELD_DATABASE_PORT, ValueMetaInterface.TYPE_INTEGER), new Long(Const.toInt(port, -1)));
	table.addValue(new ValueMeta(FIELD_DATABASE_USERNAME, ValueMetaInterface.TYPE_STRING), user);
	table.addValue(new ValueMeta(FIELD_DATABASE_PASSWORD, ValueMetaInterface.TYPE_STRING), Encr.encryptPasswordIfNotUsingVariables(pass));
	table.addValue(new ValueMeta(FIELD_DATABASE_SERVERNAME, ValueMetaInterface.TYPE_STRING), servername);
	table.addValue(new ValueMeta(FIELD_DATABASE_DATA_TBS, ValueMetaInterface.TYPE_STRING), data_tablespace);
	table.addValue(new ValueMeta(FIELD_DATABASE_INDEX_TBS, ValueMetaInterface.TYPE_STRING), index_tablespace);

	updateTableRow(TABLE_R_DATABASE, FIELD_DATABASE_ID_DATABASE, table, id_database);
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:23,代码来源:Repository.java

示例7: SlaveServer

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public SlaveServer(Node slaveNode)
{
    this();
    this.name       = XMLHandler.getTagValue(slaveNode, "name"); //$NON-NLS-1$
    this.hostname   = XMLHandler.getTagValue(slaveNode, "hostname"); //$NON-NLS-1$
    this.port       = XMLHandler.getTagValue(slaveNode, "port"); //$NON-NLS-1$
    this.webAppName = XMLHandler.getTagValue(slaveNode, "webAppName"); //$NON-NLS-1$
    this.username   = XMLHandler.getTagValue(slaveNode, "username"); //$NON-NLS-1$
    this.password   = Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue(slaveNode, "password") ); //$NON-NLS-1$
    this.proxyHostname = XMLHandler.getTagValue(slaveNode, "proxy_hostname"); //$NON-NLS-1$
    this.proxyPort     = XMLHandler.getTagValue(slaveNode, "proxy_port"); //$NON-NLS-1$
    this.nonProxyHosts = XMLHandler.getTagValue(slaveNode, "non_proxy_hosts"); //$NON-NLS-1$
    this.master = "Y".equalsIgnoreCase( XMLHandler.getTagValue(slaveNode, "master") ); //$NON-NLS-1$ //$NON-NLS-2$
    initializeVariablesFrom(null);
    this.log = new LogChannel(this);

}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:SlaveServer.java

示例8: updateDatabase

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public synchronized void updateDatabase(ObjectId id_database, String name, String type, String access, String host, String dbname,
		String port, String user, String pass, String servername, String data_tablespace, String index_tablespace)
		throws KettleException
{
	ObjectId id_database_type = getDatabaseTypeID(type);
	ObjectId id_database_contype = getDatabaseConTypeID(access);

	RowMetaAndData table = new RowMetaAndData();
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_NAME, ValueMetaInterface.TYPE_STRING), name);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_ID_DATABASE_TYPE, ValueMetaInterface.TYPE_INTEGER), id_database_type);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_ID_DATABASE_CONTYPE, ValueMetaInterface.TYPE_INTEGER), id_database_contype);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_HOST_NAME, ValueMetaInterface.TYPE_STRING), host);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_DATABASE_NAME, ValueMetaInterface.TYPE_STRING), dbname);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_PORT, ValueMetaInterface.TYPE_INTEGER), new Long(Const.toInt(port, -1)));
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_USERNAME, ValueMetaInterface.TYPE_STRING), user);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_PASSWORD, ValueMetaInterface.TYPE_STRING), Encr.encryptPasswordIfNotUsingVariables(pass));
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_SERVERNAME, ValueMetaInterface.TYPE_STRING), servername);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_DATA_TBS, ValueMetaInterface.TYPE_STRING), data_tablespace);
	table.addValue(new ValueMeta(KettleDatabaseRepository.FIELD_DATABASE_INDEX_TBS, ValueMetaInterface.TYPE_STRING), index_tablespace);

	repository.connectionDelegate.updateTableRow(KettleDatabaseRepository.TABLE_R_DATABASE, KettleDatabaseRepository.FIELD_DATABASE_ID_DATABASE, table, id_database);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:KettleDatabaseRepositoryDatabaseDelegate.java

示例9: loadUserInfo

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
/** Load user with login from repository and verify the password... 
 * 
 * @param rep
 * @param login
 * @param passwd
 * @throws KettleException
 */
public IUser loadUserInfo(IUser userInfo, String login, String passwd) throws KettleException
{
  if(userInfo == null || login == null || login.length() <= 0) {
     throw new KettleDatabaseException(BaseMessages.getString(PKG, "UserInfo.Error.IncorrectPasswortLogin"));
  }
  
  try {
	loadUserInfo(userInfo, login);
  } 
  catch (KettleException ke) {
     throw new KettleAuthException(BaseMessages.getString(PKG, "UserInfo.Error.IncorrectPasswortLogin"));
  }
	// Verify the password:
	// decrypt password if needed and compare with the one
	String userPass=Encr.decryptPasswordOptionallyEncrypted(passwd);
	
	if ( userInfo.getObjectId()==null || !userInfo.getPassword().equals(userPass))
	{
           throw new KettleAuthException(BaseMessages.getString(PKG, "UserInfo.Error.IncorrectPasswortLogin"));
	}
	return userInfo;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:30,代码来源:KettleDatabaseRepositoryUserDelegate.java

示例10: getXML

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public String getXML()
{
    StringBuffer xml = new StringBuffer();
    
    xml.append("<").append(XML_TAG).append(">"); //$NON-NLS-1$  //$NON-NLS-2$
    
    xml.append(XMLHandler.addTagValue("name", name, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("hostname", hostname, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("port",     port, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("webAppName", webAppName, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("username", username, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("password", Encr.encryptPasswordIfNotUsingVariables(password), false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("proxy_hostname", proxyHostname, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("proxy_port", proxyPort, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("non_proxy_hosts", nonProxyHosts, false)); //$NON-NLS-1$
    xml.append(XMLHandler.addTagValue("master", master, false)); //$NON-NLS-1$

    xml.append("</").append(XML_TAG).append(">"); //$NON-NLS-1$  //$NON-NLS-2$
    
    return xml.toString();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:SlaveServer.java

示例11: getXML

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public String getXML()
{
	StringBuffer retval=new StringBuffer();
	retval.append("    "+XMLHandler.addTagValue("targeturl",   targeturl));
	retval.append("    "+XMLHandler.addTagValue("username",   username));
	retval.append("    "+XMLHandler.addTagValue("password",   Encr.encryptPasswordIfNotUsingVariables(password), false));
	retval.append("    "+XMLHandler.addTagValue("module",   module));
	retval.append("    "+XMLHandler.addTagValue("batchSize",   batchSize));
	
	retval.append("    <fields>"+Const.CR);
	
	for (int i=0;i<updateLookup.length;i++)
	{
		retval.append("      <field>").append(Const.CR); //$NON-NLS-1$
		retval.append("        ").append(XMLHandler.addTagValue("name", updateLookup[i])); //$NON-NLS-1$ //$NON-NLS-2$
		retval.append("        ").append(XMLHandler.addTagValue("field", updateStream[i])); //$NON-NLS-1$ //$NON-NLS-2$
		retval.append("        ").append(XMLHandler.addTagValue("useExternalId", useExternalId[i].booleanValue()));
		retval.append("      </field>").append(Const.CR); //$NON-NLS-1$
	}
	
	retval.append("      </fields>"+Const.CR);
	retval.append("    "+XMLHandler.addTagValue("timeout", timeout));
	retval.append("    "+XMLHandler.addTagValue("useCompression",   useCompression));
	retval.append("    "+XMLHandler.addTagValue("rollbackAllChangesOnError",   rollbackAllChangesOnError));
	return retval.toString();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:SalesforceUpdateMeta.java

示例12: main

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
public static void main(String[] args) {
	try {
		KettleClientEnvironment.init();
	} catch (KettleException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	String obfuscated = Encr.encryptPasswordIfNotUsingVariables( "root" );
    System.out.println( obfuscated );
}
 
开发者ID:jiangzongyao,项目名称:kettle_support_kettle8.0,代码行数:11,代码来源:KettleReposServiceImpl.java

示例13: readRep

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
@Override
public void readRep(Repository rep, IMetaStore metastore, ObjectId id_step, List<DatabaseMeta> databases)
        throws KettleException {
    this.cassandraNodes = rep.getStepAttributeString(id_step, 0, CASSANDRA_NODES);
    this.cassandraPort = rep.getStepAttributeString(id_step, 0, CASSANDRA_PORT);
    this.username = rep.getStepAttributeString(id_step, 0, USERNAME);
    this.password = rep.getStepAttributeString(id_step, 0, PASSWORD);
    if (!Const.isEmpty(this.password)) {
        this.password = Encr.decryptPasswordOptionallyEncrypted(this.password);
    }
    this.keyspace = rep.getStepAttributeString(id_step, 0, CASSANDRA_KEYSPACE);
    this.SslEnabled = rep.getStepAttributeBoolean(id_step, 0, CASSANDRA_WITH_SSL);
    this.trustStoreFilePath = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_FILE_PATH);
    this.trustStorePass = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_PASS);
    if (!Const.isEmpty(this.trustStorePass)) {
        this.trustStorePass = Encr.decryptPasswordOptionallyEncrypted(this.trustStorePass);
    }
    this.columnfamily = rep.getStepAttributeString(id_step, 0, CASSANDRA_COLUMN_FAMILY);
    this.syncMode = rep.getStepAttributeBoolean(id_step, 0, SYNC_ENABLED);

    String batchSize = rep.getStepAttributeString(id_step, 0, BATCH_SIZE);
    this.batchSize = (Const.isEmpty(batchSize) ? 1000 : Integer.valueOf(batchSize));

    String sCompression = rep.getStepAttributeString(id_step, 0, QUERY_COMPRESSION);
    this.compression = (Const.isEmpty(sCompression) ? ConnectionCompression.SNAPPY : ConnectionCompression.fromString(sCompression));

    this.specifyFields = rep.getStepAttributeBoolean(id_step, 0, SPECIFY_FIELDS);

    int nrCols = rep.countNrStepAttributes(id_step, COLUMN_NAME);
    int nrStreams = rep.countNrStepAttributes(id_step, STREAM_NAME);
    int nrRows = nrCols < nrStreams ? nrStreams : nrCols;

    allocate(nrRows);
    for (int idx = 0; idx < nrRows; idx++) {
        this.cassandraFields[idx] = Const.NVL(rep.getStepAttributeString(id_step, idx, COLUMN_NAME), "");
        this.streamFields[idx] = Const.NVL(rep.getStepAttributeString(id_step, idx, STREAM_NAME), "");
    }

    this.ttl = Const.toInt(rep.getStepAttributeString(id_step, 0, TTL), 0);
}
 
开发者ID:bcolas,项目名称:pentaho-cassandra-plugin,代码行数:41,代码来源:CassandraOutputMeta.java

示例14: loadXML

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
@Override
public void loadXML(Node stepnode, List<DatabaseMeta> databases, IMetaStore metastore) throws KettleXMLException {
    this.cassandraNodes = XMLHandler.getTagValue(stepnode, CASSANDRA_NODES);
    this.cassandraPort = XMLHandler.getTagValue(stepnode, CASSANDRA_PORT);
    this.username = XMLHandler.getTagValue(stepnode, USERNAME);
    this.password = XMLHandler.getTagValue(stepnode, PASSWORD);
    if (!Const.isEmpty(this.password)) {
        this.password = Encr.decryptPasswordOptionallyEncrypted(this.password);
    }
    this.keyspace = XMLHandler.getTagValue(stepnode, CASSANDRA_KEYSPACE);
    this.SslEnabled = "Y".equals(XMLHandler.getTagValue(stepnode, CASSANDRA_WITH_SSL));
    this.trustStoreFilePath = XMLHandler.getTagValue(stepnode, CASSANDRA_TRUSTSTORE_FILE_PATH);
    this.trustStorePass = XMLHandler.getTagValue(stepnode, CASSANDRA_TRUSTSTORE_PASS);
    String sCompression = XMLHandler.getTagValue(stepnode, COMPRESSION);
    this.cqlStatement = XMLHandler.getTagValue(stepnode, CQL);
    this.executeForEachInputRow = "Y".equals(XMLHandler.getTagValue(stepnode, EXECUTE_FOR_EACH_INPUT));
    String sRowLimit = XMLHandler.getTagValue(stepnode, ROW_LIMIT);

    checkNulls();

    if (this.cqlStatement == null) {
        this.cqlStatement = "";
    }
    if (!Const.isEmpty(sRowLimit)) {
        this.rowLimit = Integer.parseInt(sRowLimit);
    }
    this.compression = (Const.isEmpty(sCompression) ? ConnectionCompression.SNAPPY : ConnectionCompression.fromString(sCompression));
}
 
开发者ID:bcolas,项目名称:pentaho-cassandra-plugin,代码行数:29,代码来源:CassandraInputMeta.java

示例15: readRep

import org.pentaho.di.core.encryption.Encr; //导入依赖的package包/类
@Override
public void readRep(Repository rep, IMetaStore metastore, ObjectId id_step, List<DatabaseMeta> databases)
        throws KettleException {
    this.cassandraNodes = rep.getStepAttributeString(id_step, 0, CASSANDRA_NODES);
    this.cassandraPort = rep.getStepAttributeString(id_step, 0, CASSANDRA_PORT);
    this.username = rep.getStepAttributeString(id_step, 0, USERNAME);
    this.password = rep.getStepAttributeString(id_step, 0, PASSWORD);
    if (!Const.isEmpty(this.password)) {
        this.password = Encr.decryptPasswordOptionallyEncrypted(this.password);
    }
    this.keyspace = rep.getStepAttributeString(id_step, 0, CASSANDRA_KEYSPACE);
    this.SslEnabled = rep.getStepAttributeBoolean(id_step, CASSANDRA_WITH_SSL);
    this.trustStoreFilePath = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_FILE_PATH);
    this.trustStorePass = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_PASS);
    String sCompression = rep.getStepAttributeString(id_step, 0, COMPRESSION);
    this.cqlStatement = rep.getStepAttributeString(id_step, 0, CQL);
    this.executeForEachInputRow = rep.getStepAttributeBoolean(id_step, EXECUTE_FOR_EACH_INPUT);
    this.rowLimit = ((int) rep.getStepAttributeInteger(id_step, ROW_LIMIT));

    if (!Const.isEmpty(this.trustStorePass)) {
        this.trustStorePass = Encr.decryptPasswordOptionallyEncrypted(this.trustStorePass);
    }

    checkNulls();

    if (this.cqlStatement == null) {
        this.cqlStatement = "";
    }
    this.compression = (Const.isEmpty(sCompression) ? ConnectionCompression.SNAPPY : ConnectionCompression.fromString(sCompression));
}
 
开发者ID:bcolas,项目名称:pentaho-cassandra-plugin,代码行数:31,代码来源:CassandraInputMeta.java


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