本文整理汇总了Java中org.pentaho.di.core.encryption.Encr.decryptPassword方法的典型用法代码示例。如果您正苦于以下问题:Java Encr.decryptPassword方法的具体用法?Java Encr.decryptPassword怎么用?Java Encr.decryptPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.encryption.Encr
的用法示例。
在下文中一共展示了Encr.decryptPassword方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readData
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
targeturl = XMLHandler.getTagValue(stepnode, "targeturl");
username = XMLHandler.getTagValue(stepnode, "username");
password = XMLHandler.getTagValue(stepnode, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
module = XMLHandler.getTagValue(stepnode, "module");
DeleteField= XMLHandler.getTagValue(stepnode, "DeleteField");
batchSize = XMLHandler.getTagValue(stepnode, "batchSize");
useCompression = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "useCompression"));
timeout = XMLHandler.getTagValue(stepnode, "timeout");
rollbackAllChangesOnError = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rollbackAllChangesOnError"));
}
catch(Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}
示例2: UserInfo
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
public UserInfo(Repository rep, String login)
throws KettleException
{
try
{
long id_profile;
setID( rep.getUserID(login) );
if (getID()>0)
{
RowMetaAndData r = rep.getUser(getID());
if (r!=null)
{
this.login = r.getString("LOGIN", null);
password = Encr.decryptPassword( r.getString("PASSWORD", null) );
name = r.getString("NAME", null);
description = r.getString("DESCRIPTION", null);
enabled = r.getBoolean("ENABLED", false);
id_profile = r.getInteger("ID_PROFILE", 0);
profile = new ProfileMeta(rep, id_profile);
}
else
{
setID(-1L);
throw new KettleDatabaseException(Messages.getString("UserInfo.Error.UserNotFound", login));
}
}
else
{
setID(-1L);
throw new KettleDatabaseException(Messages.getString("UserInfo.Error.UserNotFound", login));
}
}
catch(KettleDatabaseException dbe)
{
rep.log.logError(toString(), Messages.getString("UserInfo.Error.UserNotLoaded", login, dbe.getMessage()));
throw new KettleException(Messages.getString("UserInfo.Error.UserNotLoaded", login, ""), dbe);
}
}
示例3: readData
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
targeturl = XMLHandler.getTagValue(stepnode, "targeturl");
username = XMLHandler.getTagValue(stepnode, "username");
password = XMLHandler.getTagValue(stepnode, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
module = XMLHandler.getTagValue(stepnode, "module");
condition = XMLHandler.getTagValue(stepnode, "condition");
includeTargetURL = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_targeturl"));
targetURLField = XMLHandler.getTagValue(stepnode, "targeturl_field");
includeModule = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_module"));
moduleField = XMLHandler.getTagValue(stepnode, "module_field");
includeRowNumber = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_rownum"));
rowNumberField = XMLHandler.getTagValue(stepnode, "rownum_field");
includeSQL = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_sql"));
sqlField = XMLHandler.getTagValue(stepnode, "targetsql_field");
includeTimestamp = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_Timestamp"));
timestampField = XMLHandler.getTagValue(stepnode, "timestamp_field");
Node fields = XMLHandler.getSubNode(stepnode, "fields");
int nrFields = XMLHandler.countNodes(fields, "field");
allocate( nrFields);
for (int i=0;i<nrFields;i++)
{
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
SalesforceInputField field = new SalesforceInputField(fnode);
inputFields[i] = field;
}
timeout = XMLHandler.getTagValue(stepnode, "timeout");
// Is there a limit on the number of rows we process?
rowLimit = XMLHandler.getTagValue(stepnode, "limit");
}
catch(Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}
示例4: readRep
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
public void readRep(Repository rep, long id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleException
{
try
{
targeturl = rep.getStepAttributeString (id_step, "targeturl");
// H.kawaguchi Add 19-01-2009
username = rep.getStepAttributeString (id_step, "username");
password = rep.getStepAttributeString (id_step, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
// H.kawaguchi Add 19-01-2009
module = rep.getStepAttributeString (id_step, "module");
// H.kawaguchi Add 19-01-2009
condition = rep.getStepAttributeString (id_step, "condition");
// H.kawaguchi Add 19-01-2009
includeTargetURL = rep.getStepAttributeBoolean(id_step, "include_targeturl");
targetURLField = rep.getStepAttributeString (id_step, "targeturl_field");
includeModule = rep.getStepAttributeBoolean(id_step, "include_module");
moduleField = rep.getStepAttributeString (id_step, "module_field");
includeRowNumber = rep.getStepAttributeBoolean(id_step, "include_rownum");
rowNumberField = rep.getStepAttributeString (id_step, "rownum_field");
includeSQL = rep.getStepAttributeBoolean(id_step, "include_sql");
sqlField = rep.getStepAttributeString (id_step, "sql_field");
includeTimestamp = rep.getStepAttributeBoolean(id_step, "include_Timestamp");
timestampField = rep.getStepAttributeString (id_step, "timestamp_field");
rowLimit = rep.getStepAttributeString(id_step, "limit");
timeout = rep.getStepAttributeString(id_step, "timeout");
int nrFields = rep.countNrStepAttributes(id_step, "field_name");
allocate(nrFields);
for (int i=0;i<nrFields;i++)
{
SalesforceInputField field = new SalesforceInputField();
field.setName( rep.getStepAttributeString (id_step, i, "field_name") );
field.setField( rep.getStepAttributeString (id_step, i, "field_attribut") );
field.setType( ValueMeta.getType( rep.getStepAttributeString (id_step, i, "field_type") ) );
field.setFormat( rep.getStepAttributeString (id_step, i, "field_format") );
field.setCurrencySymbol( rep.getStepAttributeString (id_step, i, "field_currency") );
field.setDecimalSymbol( rep.getStepAttributeString (id_step, i, "field_decimal") );
field.setGroupSymbol( rep.getStepAttributeString (id_step, i, "field_group") );
field.setLength( (int)rep.getStepAttributeInteger(id_step, i, "field_length") );
field.setPrecision( (int)rep.getStepAttributeInteger(id_step, i, "field_precision") );
field.setTrimType( SalesforceInputField.getTrimTypeByCode( rep.getStepAttributeString (id_step, i, "field_trim_type") ));
field.setRepeated( rep.getStepAttributeBoolean(id_step, i, "field_repeat") );
inputFields[i] = field;
}
}
catch(Exception e)
{
throw new KettleException(Messages.getString("SalesforceInputMeta.Exception.ErrorReadingRepository"), e);
}
}
示例5: readData
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
targeturl = XMLHandler.getTagValue(stepnode, "targeturl");
username = XMLHandler.getTagValue(stepnode, "username");
password = XMLHandler.getTagValue(stepnode, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
module = XMLHandler.getTagValue(stepnode, "module");
batchSize = XMLHandler.getTagValue(stepnode, "batchSize");
Node fields = XMLHandler.getSubNode(stepnode, "fields");
int nrFields = XMLHandler.countNodes(fields, "field");
allocate( nrFields);
for (int i=0;i<nrFields;i++)
{
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
updateLookup[i] = XMLHandler.getTagValue(fnode, "name"); //$NON-NLS-1$
updateStream[i] = XMLHandler.getTagValue(fnode, "field"); //$NON-NLS-1$
if (updateStream[i]==null) updateStream[i]=updateLookup[i]; // default: the same name!
String updateValue = XMLHandler.getTagValue(fnode, "useExternalId"); //$NON-NLS-1$
if(updateValue==null) {
//default FALSE
useExternalId[i] = Boolean.FALSE;
} else
{
if (updateValue.equalsIgnoreCase("Y"))
useExternalId[i] = Boolean.TRUE;
else
useExternalId[i] = Boolean.FALSE;
}
}
useCompression = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "useCompression"));
rollbackAllChangesOnError = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rollbackAllChangesOnError"));
timeout = XMLHandler.getTagValue(stepnode, "timeout");
}
catch(Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}
示例6: readData
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
targeturl = XMLHandler.getTagValue(stepnode, "targeturl");
username = XMLHandler.getTagValue(stepnode, "username");
password = XMLHandler.getTagValue(stepnode, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
module = XMLHandler.getTagValue(stepnode, "module");
UpsertField = XMLHandler.getTagValue(stepnode, "upsertfield");
batchSize = XMLHandler.getTagValue(stepnode, "batchSize");
salesforceIDFieldName = XMLHandler.getTagValue(stepnode, "salesforceIDFieldName");
Node fields = XMLHandler.getSubNode(stepnode, "fields");
int nrFields = XMLHandler.countNodes(fields, "field");
allocate( nrFields);
for (int i=0;i<nrFields;i++)
{
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
updateLookup[i] = XMLHandler.getTagValue(fnode, "name"); //$NON-NLS-1$
updateStream[i] = XMLHandler.getTagValue(fnode, "field"); //$NON-NLS-1$
if (updateStream[i]==null) updateStream[i]=updateLookup[i]; // default: the same name!
String updateValue = XMLHandler.getTagValue(fnode, "useExternalId"); //$NON-NLS-1$
if(updateValue==null) {
//default FALSE
useExternalId[i] = Boolean.FALSE;
} else
{
if (updateValue.equalsIgnoreCase("Y"))
useExternalId[i] = Boolean.TRUE;
else
useExternalId[i] = Boolean.FALSE;
}
}
useCompression = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "useCompression"));
timeout = XMLHandler.getTagValue(stepnode, "timeout");
rollbackAllChangesOnError = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rollbackAllChangesOnError"));
}
catch(Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}
示例7: readData
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
targeturl = XMLHandler.getTagValue(stepnode, "targeturl");
username = XMLHandler.getTagValue(stepnode, "username");
password = XMLHandler.getTagValue(stepnode, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
module = XMLHandler.getTagValue(stepnode, "module");
condition = XMLHandler.getTagValue(stepnode, "condition");
query = XMLHandler.getTagValue(stepnode, "query");
specifyQuery = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "specifyQuery"));
includeTargetURL = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_targeturl"));
targetURLField = XMLHandler.getTagValue(stepnode, "targeturl_field");
includeModule = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_module"));
moduleField = XMLHandler.getTagValue(stepnode, "module_field");
includeRowNumber = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_rownum"));
includeDeletionDate = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_deletion_date"));
rowNumberField = XMLHandler.getTagValue(stepnode, "rownum_field");
deletionDateField = XMLHandler.getTagValue(stepnode, "deletion_date_field");
includeSQL = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_sql"));
sqlField = XMLHandler.getTagValue(stepnode, "targetsql_field");
includeTimestamp = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "include_Timestamp"));
timestampField = XMLHandler.getTagValue(stepnode, "timestamp_field");
readFrom = XMLHandler.getTagValue(stepnode, "read_from");
readTo = XMLHandler.getTagValue(stepnode, "read_to");
recordsFilter = SalesforceConnectionUtils.getRecordsFilterByCode(Const.NVL(XMLHandler.getTagValue(stepnode, "records_filter"), ""));
useCompression = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "useCompression"));
queryAll = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "queryAll"));
Node fields = XMLHandler.getSubNode(stepnode, "fields");
int nrFields = XMLHandler.countNodes(fields, "field");
allocate( nrFields);
for (int i=0;i<nrFields;i++)
{
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
SalesforceInputField field = new SalesforceInputField(fnode);
inputFields[i] = field;
}
timeout = XMLHandler.getTagValue(stepnode, "timeout");
// Is there a limit on the number of rows we process?
rowLimit = XMLHandler.getTagValue(stepnode, "limit");
}
catch(Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}
示例8: readRep
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters)
throws KettleException
{
try
{
targeturl = rep.getStepAttributeString (id_step, "targeturl");
// H.kawaguchi Add 19-01-2009
username = rep.getStepAttributeString (id_step, "username");
password = rep.getStepAttributeString (id_step, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
// H.kawaguchi Add 19-01-2009
module = rep.getStepAttributeString (id_step, "module");
// H.kawaguchi Add 19-01-2009
condition = rep.getStepAttributeString (id_step, "condition");
// H.kawaguchi Add 19-01-2009
query = rep.getStepAttributeString (id_step, "query");
specifyQuery = rep.getStepAttributeBoolean(id_step, "specifyQuery");
includeTargetURL = rep.getStepAttributeBoolean(id_step, "include_targeturl");
targetURLField = rep.getStepAttributeString (id_step, "targeturl_field");
includeModule = rep.getStepAttributeBoolean(id_step, "include_module");
moduleField = rep.getStepAttributeString (id_step, "module_field");
includeRowNumber = rep.getStepAttributeBoolean(id_step, "include_rownum");
includeDeletionDate = rep.getStepAttributeBoolean(id_step, "include_deletion_date");
rowNumberField = rep.getStepAttributeString (id_step, "rownum_field");
deletionDateField = rep.getStepAttributeString (id_step, "deletion_date_field");
includeSQL = rep.getStepAttributeBoolean(id_step, "include_sql");
sqlField = rep.getStepAttributeString (id_step, "sql_field");
includeTimestamp = rep.getStepAttributeBoolean(id_step, "include_Timestamp");
timestampField = rep.getStepAttributeString (id_step, "timestamp_field");
rowLimit = rep.getStepAttributeString(id_step, "limit");
timeout = rep.getStepAttributeString(id_step, "timeout");
readFrom = rep.getStepAttributeString(id_step, "read_from");
readTo = rep.getStepAttributeString(id_step, "read_to");
recordsFilter = SalesforceConnectionUtils.getRecordsFilterByCode(Const.NVL(rep.getStepAttributeString(id_step, "records_filter"), ""));
useCompression = rep.getStepAttributeBoolean(id_step, "useCompression");
queryAll = rep.getStepAttributeBoolean(id_step, "queryAll");
int nrFields = rep.countNrStepAttributes(id_step, "field_name");
allocate(nrFields);
for (int i=0;i<nrFields;i++)
{
SalesforceInputField field = new SalesforceInputField();
field.setName( rep.getStepAttributeString (id_step, i, "field_name") );
field.setField( rep.getStepAttributeString (id_step, i, "field_attribut") );
field.setIdLookup(rep.getStepAttributeBoolean(id_step, i, "field_idlookup") );
field.setType( ValueMeta.getType( rep.getStepAttributeString (id_step, i, "field_type") ) );
field.setFormat( rep.getStepAttributeString (id_step, i, "field_format") );
field.setCurrencySymbol( rep.getStepAttributeString (id_step, i, "field_currency") );
field.setDecimalSymbol( rep.getStepAttributeString (id_step, i, "field_decimal") );
field.setGroupSymbol( rep.getStepAttributeString (id_step, i, "field_group") );
field.setLength( (int)rep.getStepAttributeInteger(id_step, i, "field_length") );
field.setPrecision( (int)rep.getStepAttributeInteger(id_step, i, "field_precision") );
field.setTrimType( SalesforceInputField.getTrimTypeByCode( rep.getStepAttributeString (id_step, i, "field_trim_type") ));
field.setRepeated( rep.getStepAttributeBoolean(id_step, i, "field_repeat") );
inputFields[i] = field;
}
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "SalesforceInputMeta.Exception.ErrorReadingRepository"), e);
}
}
示例9: readData
import org.pentaho.di.core.encryption.Encr; //导入方法依赖的package包/类
private void readData(Node stepnode) throws KettleXMLException
{
try
{
targeturl = XMLHandler.getTagValue(stepnode, "targeturl");
username = XMLHandler.getTagValue(stepnode, "username");
password = XMLHandler.getTagValue(stepnode, "password");
if (password != null && password.startsWith("Encrypted")){
password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", ""));
}
module = XMLHandler.getTagValue(stepnode, "module");
batchSize = XMLHandler.getTagValue(stepnode, "batchSize");
salesforceIDFieldName = XMLHandler.getTagValue(stepnode, "salesforceIDFieldName");
Node fields = XMLHandler.getSubNode(stepnode, "fields");
int nrFields = XMLHandler.countNodes(fields, "field");
allocate( nrFields);
for (int i=0;i<nrFields;i++)
{
Node fnode = XMLHandler.getSubNodeByNr(fields, "field", i);
updateLookup[i] = XMLHandler.getTagValue(fnode, "name"); //$NON-NLS-1$
updateStream[i] = XMLHandler.getTagValue(fnode, "field"); //$NON-NLS-1$
if (updateStream[i]==null) updateStream[i]=updateLookup[i]; // default: the same name!
String updateValue = XMLHandler.getTagValue(fnode, "useExternalId"); //$NON-NLS-1$
if(updateValue==null) {
//default FALSE
useExternalId[i] = Boolean.FALSE;
} else
{
if (updateValue.equalsIgnoreCase("Y"))
useExternalId[i] = Boolean.TRUE;
else
useExternalId[i] = Boolean.FALSE;
}
}
useCompression = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "useCompression"));
timeout = XMLHandler.getTagValue(stepnode, "timeout");
rollbackAllChangesOnError = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rollbackAllChangesOnError"));
}
catch(Exception e)
{
throw new KettleXMLException("Unable to load step info from XML", e);
}
}