use of org.pentaho.di.core.CheckResult in project pentaho-kettle by pentaho.
the class AccessInputMeta method check.
@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) {
CheckResult cr;
// See if we get input...
if (input.length > 0) {
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "AccessInputMeta.CheckResult.NoInputExpected"), stepMeta);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "AccessInputMeta.CheckResult.NoInput"), stepMeta);
remarks.add(cr);
}
FileInputList fileInputList = getFiles(transMeta);
// String files[] = getFiles();
if (fileInputList == null || fileInputList.getFiles().size() == 0) {
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "AccessInputMeta.CheckResult.NoFiles"), stepMeta);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "AccessInputMeta.CheckResult.FilesOk", "" + fileInputList.getFiles().size()), stepMeta);
remarks.add(cr);
}
// Check table
if (Utils.isEmpty(getTableName())) {
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "AccessInputMeta.CheckResult.NoFiles"), stepMeta);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "AccessInputMeta.CheckResult.FilesOk", "" + fileInputList.getFiles().size()), stepMeta);
remarks.add(cr);
}
}
use of org.pentaho.di.core.CheckResult in project pentaho-kettle by pentaho.
the class AbortMeta method check.
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) {
// See if we have input streams leading to this step!
if (input.length == 0) {
CheckResult cr = new CheckResult(CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(PKG, "AbortMeta.CheckResult.NoInputReceivedError"), stepinfo);
remarks.add(cr);
}
}
use of org.pentaho.di.core.CheckResult in project pentaho-kettle by pentaho.
the class ColumnExistsMeta method check.
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) {
CheckResult cr;
String error_message = "";
if (database == null) {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.InvalidConnection");
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta);
remarks.add(cr);
}
if (Utils.isEmpty(resultfieldname)) {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.ResultFieldMissing");
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta);
} else {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.ResultFieldOK");
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, error_message, stepMeta);
}
remarks.add(cr);
if (istablenameInfield) {
if (Utils.isEmpty(tablenamefield)) {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.TableFieldMissing");
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta);
} else {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.TableFieldOK");
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, error_message, stepMeta);
}
remarks.add(cr);
} else {
if (Utils.isEmpty(tablename)) {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.TablenameMissing");
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta);
} else {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.TablenameOK");
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, error_message, stepMeta);
}
remarks.add(cr);
}
if (Utils.isEmpty(columnnamefield)) {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.ColumnNameFieldMissing");
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, error_message, stepMeta);
} else {
error_message = BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.ColumnNameFieldOK");
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, error_message, stepMeta);
}
remarks.add(cr);
// See if we have input streams leading to this step!
if (input.length > 0) {
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.ReceivingInfoFromOtherSteps"), stepMeta);
} else {
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "ColumnExistsMeta.CheckResult.NoInpuReceived"), stepMeta);
}
remarks.add(cr);
}
use of org.pentaho.di.core.CheckResult in project pentaho-kettle by pentaho.
the class NullIfMeta method check.
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) {
CheckResult cr;
if (prev == null || prev.size() == 0) {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(PKG, "NullIfMeta.CheckResult.NoReceivingFieldsError"), stepMeta);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(PKG, "NullIfMeta.CheckResult.StepReceivingFieldsOK", prev.size() + ""), stepMeta);
remarks.add(cr);
}
// See if we have input streams leading to this step!
if (input.length > 0) {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(PKG, "NullIfMeta.CheckResult.StepRecevingInfoFromOtherSteps"), stepMeta);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "NullIfMeta.CheckResult.NoInputReceivedError"), stepMeta);
remarks.add(cr);
}
}
use of org.pentaho.di.core.CheckResult in project pentaho-kettle by pentaho.
the class NumberRangeMeta method check.
@Override
public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore) {
CheckResult cr;
if (prev == null || prev.size() == 0) {
cr = new CheckResult(CheckResult.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepinfo);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, "Step is connected to previous one, receiving " + prev.size() + " fields", stepinfo);
remarks.add(cr);
}
// See if we have input streams leading to this step!
if (input.length > 0) {
cr = new CheckResult(CheckResult.TYPE_RESULT_OK, "Step is receiving info from other steps.", stepinfo);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, "No input received from other steps!", stepinfo);
remarks.add(cr);
}
}
Aggregations