本文整理匯總了Java中org.pentaho.di.core.CheckResult類的典型用法代碼示例。如果您正苦於以下問題:Java CheckResult類的具體用法?Java CheckResult怎麽用?Java CheckResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CheckResult類屬於org.pentaho.di.core包,在下文中一共展示了CheckResult類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
Repository repository, IMetaStore metaStore ) {
// see if we have fields from setTop steps
if ( prev == null || prev.size() == 0 ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING,
BaseMessages.getString( PKG, "SetSessionVariable.CheckResult.NotReceivingFieldsFromPreviousSteps" ),
stepMeta ) );
} else {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages
.getString( PKG, "SetSessionVariable.CheckResult.ReceivingFieldsFromPreviousSteps", "" + prev.size() ),
stepMeta ) );
}
// see if we have input streams leading to this step
if ( input.length > 0 ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK,
BaseMessages.getString( PKG, "SetSessionVariable.CheckResult.ReceivingInfoFromOtherSteps" ), stepMeta ) );
} else {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "SetSessionVariable.CheckResult.NotReceivingInfoFromOtherSteps" ),
stepMeta ) );
}
}
示例2: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
Repository repository, IMetaStore metaStore ) {
// see if we have fields from previous steps
if ( prev == null || prev.size() == 0 ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING,
BaseMessages.getString( PKG, "BAServerUtils.CheckResult.NotReceivingFieldsFromPreviousSteps" ),
stepMeta ) );
} else {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages
.getString( PKG, "BAServerUtils.CheckResult.ReceivingFieldsFromPreviousSteps", "" + prev.size() ),
stepMeta ) );
}
// see if we have input streams leading to this step
if ( input.length > 0 ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK,
BaseMessages.getString( PKG, "BAServerUtils.CheckResult.ReceivingInfoFromOtherSteps" ), stepMeta ) );
} else {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "BAServerUtils.CheckResult.NotReceivingInfoFromOtherSteps" ),
stepMeta ) );
}
}
示例3: addOkRemark
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public static void addOkRemark(CheckResultSourceInterface source, String propertyName,
List<CheckResultInterface> remarks)
{
final int SUBSTRING_LENGTH = 20;
LogWriter log = LogWriter.getInstance();
log.logBasic(JobEntryValidatorUtils.class.getSimpleName(), "attempting to fetch property named '" + propertyName
+ "'");
String value = ValidatorUtils.getValueAsString(source, propertyName);
log.logBasic(JobEntryValidatorUtils.class.getSimpleName(), "fetched value [" + value + "]");
String substr = null;
if (value != null)
{
substr = value.substring(0, Math.min(SUBSTRING_LENGTH, value.length()));
if (value.length() > SUBSTRING_LENGTH)
{
substr += "..."; //$NON-NLS-1$
}
}
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_OK, ValidatorMessages.getString("messages.passed", //$NON-NLS-1$
propertyName, substr), source));
}
示例4: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
String input[], String output[], RowMetaInterface info) {
if (isEmpty(topic)) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR,
Messages.getString("KafkaProducerMeta.Check.InvalidTopic"), stepMeta));
}
if (isEmpty(messageField)) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR,
Messages.getString("KafkaProducerMeta.Check.InvalidMessageField"), stepMeta));
}
try {
new ProducerConfig(kafkaProperties);
} catch (IllegalArgumentException e) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, e.getMessage(), stepMeta));
}
}
示例5: addOkRemark
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public static void addOkRemark(CheckResultSourceInterface source, String propertyName, List<CheckResultInterface> remarks)
{
final int SUBSTRING_LENGTH = 20;
String value = ValidatorUtils.getValueAsString(source, propertyName);
String substr = null;
if (value != null)
{
substr = value.substring(0, Math.min(SUBSTRING_LENGTH, value.length()));
if (value.length() > SUBSTRING_LENGTH)
{
substr += "..."; //$NON-NLS-1$
}
}
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_OK, ValidatorMessages.getString("messages.passed", //$NON-NLS-1$
propertyName, substr), source));
}
示例6: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
IMetaStore metaStore) {
if (topic == null) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR,
Messages.getString("KafkaConsumerMeta.Check.InvalidTopic"), stepMeta));
}
if (field == null) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR,
Messages.getString("KafkaConsumerMeta.Check.InvalidField"), stepMeta));
}
if (keyField == null) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR,
Messages.getString("KafkaConsumerMeta.Check.InvalidKeyField"), stepMeta));
}
try {
new ConsumerConfig(kafkaProperties);
} catch (IllegalArgumentException e) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, e.getMessage(), stepMeta));
}
}
示例7: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
@Override
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
IMetaStore metaStore ) {
if ( broker == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidBroker" ), stepMeta ) );
}
if ( topic == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidTopic" ), stepMeta ) );
}
if ( field == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidField" ), stepMeta ) );
}
if ( clientId == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidClientID" ), stepMeta ) );
}
if ( timeout == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidConnectionTimeout" ), stepMeta ) );
}
if ( qos == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidQOS" ), stepMeta ) );
}
if ( requiresAuth ) {
if ( username == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidUsername" ), stepMeta ) );
}
if ( password == null ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidPassword" ), stepMeta ) );
}
}
}
示例8: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
@Override
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
IMetaStore metaStore ) {
super.check( remarks, transMeta, stepMeta, prev, input, output, info, space, repository, metaStore );
if ( Const.isEmpty( getTicketFieldName() ) ) {
remarks.add(
new CheckResult( CheckResult.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorNoTicketField" ),
stepMeta ) );
} else if ( prev.indexOfValue( getTicketFieldName() ) >= 0 ) {
if ( ValueMetaInterface.TYPE_INTEGER == prev.getValueMeta(
prev.indexOfValue( getTicketFieldName() ) ).getType() ) {
remarks.add(
new CheckResult( CheckResult.TYPE_RESULT_OK,
BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.OkTicketField" ),
stepMeta ) );
} else {
remarks.add(
new CheckResult( CheckResult.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorTicketFieldWrongType" ),
stepMeta ) );
}
} else {
remarks.add(
new CheckResult( CheckResult.TYPE_RESULT_ERROR,
BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorTicketFieldNotInRow" ),
stepMeta ) );
}
if ( Const.isEmpty( getResultFieldName() ) ) {
remarks.add(
new CheckResult( CheckResult.TYPE_RESULT_WARNING,
BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorNoResultField" ),
stepMeta ) );
}
}
示例9: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
Repository repository, IMetaStore metaStore ) {
// see if we have all variables specified
int nrRemarks = remarks.size();
for ( int i = 0; i < fieldName.length; i++ ) {
if ( Const.isEmpty( variableName[ i ] ) ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString( PKG, "GetSessionVariable.CheckResult.VariableNotSpecified", fieldName[ i ] ), stepMeta ) );
}
}
if ( remarks.size() == nrRemarks ) {
remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString( PKG, "GetSessionVariable.CheckResult.AllVariablesSpecified" ), stepMeta ) );
}
}
示例10: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
@Override
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) {
if (prev == null || prev.size() == 0) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepMeta));
} else {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_OK, String.format("Step is connected to previous one, receiving %1$d fields", prev.size()), stepMeta));
}
if (input.length > 0) {
remarks.add( new CheckResult(CheckResultInterface.TYPE_RESULT_OK, "Step is receiving info from other steps", stepMeta) );
} else {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, "No input received from other steps!", stepMeta));
}
}
開發者ID:GlobalTechnology,項目名稱:pdi-google-spreadsheet-plugin,代碼行數:15,代碼來源:GoogleSpreadsheetOutputMeta.java
示例11: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
@Override
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) {
if (prev == null || prev.size() == 0) {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_OK, "Not receiving any fields from previous steps.", stepMeta));
} else {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, String.format("Step is connected to previous one, receiving %1$d fields", prev.size()), stepMeta));
}
if (input.length > 0) {
remarks.add( new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, "Step is receiving info from other steps!", stepMeta) );
} else {
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_OK, "No input received from other steps.", stepMeta));
}
}
開發者ID:GlobalTechnology,項目名稱:pdi-google-spreadsheet-plugin,代碼行數:15,代碼來源:GoogleSpreadsheetInputMeta.java
示例12: addExceptionRemark
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public static void addExceptionRemark(CheckResultSourceInterface source, String propertyName, String validatorName,
List<CheckResultInterface> remarks, Exception e)
{
String key = "messages.failed.unableToValidate"; //$NON-NLS-1$
remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, ValidatorMessages.getString(key, propertyName,
e.getClass().getSimpleName() + ": " + e.getLocalizedMessage()), source)); //$NON-NLS-1$
}
示例13: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev, String input[], String output[], RowMetaInterface info)
{
/*
* @todo Need to check for the following:
* 1) Join type must be one of INNER / LEFT OUTER / RIGHT OUTER / FULL OUTER
* 2) Number of input streams must be two (for now at least)
* 3) The field names of input streams must be unique
*/
CheckResult cr = new CheckResult(CheckResultInterface.TYPE_RESULT_WARNING, Messages.getString("MergeJoinMeta.CheckResult.StepNotVerified"), stepinfo); //$NON-NLS-1$
remarks.add(cr);
}
示例14: init
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
{
meta=(RowGeneratorMeta)smi;
data=(RowGeneratorData)sdi;
if (super.init(smi, sdi))
{
// Determine the number of rows to generate...
data.rowLimit = Const.toLong(environmentSubstitute(meta.getRowLimit()), -1L);
data.rowsWritten = 0L;
if (data.rowLimit<0L) // Unable to parse
{
logError(Messages.getString("RowGenerator.Wrong.RowLimit.Number"));
return false; // fail
}
// Create a row (constants) with all the values in it...
List<CheckResultInterface> remarks = new ArrayList<CheckResultInterface>(); // stores the errors...
RowMetaAndData outputRow = buildRow(meta, remarks, getStepname());
if (!remarks.isEmpty())
{
for (int i=0;i<remarks.size();i++)
{
CheckResult cr = (CheckResult) remarks.get(i);
logError(cr.getText());
}
return false;
}
data.outputRowData = outputRow.getData();
data.outputRowMeta = outputRow.getRowMeta();
return true;
}
return false;
}
示例15: check
import org.pentaho.di.core.CheckResult; //導入依賴的package包/類
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev, String input[], String output[], RowMetaInterface info)
{
// See if we have input streams leading to this step!
if (input.length == 0) {
CheckResult cr = new CheckResult(CheckResultInterface.TYPE_RESULT_WARNING, Messages.getString("AbortMeta.CheckResult.NoInputReceivedError"), stepinfo); //$NON-NLS-1$
remarks.add(cr);
}
}