use of org.pentaho.di.trans.step.errorhandling.StreamInterface in project pentaho-kettle by pentaho.
the class ValidatorMeta method searchInfoAndTargetSteps.
@Override
public void searchInfoAndTargetSteps(List<StepMeta> steps) {
for (StreamInterface stream : getStepIOMeta().getInfoStreams()) {
Validation validation = (Validation) stream.getSubject();
StepMeta stepMeta = StepMeta.findStep(steps, validation.getSourcingStepName());
validation.setSourcingStep(stepMeta);
}
resetStepIoMeta();
}
use of org.pentaho.di.trans.step.errorhandling.StreamInterface in project pentaho-kettle by pentaho.
the class ValidatorMeta method getStepIOMeta.
/**
* Returns the Input/Output metadata for this step.
*/
public StepIOMetaInterface getStepIOMeta() {
if (ioMeta == null) {
ioMeta = new StepIOMeta(true, true, false, false, true, false);
//
for (Validation validation : validations) {
StreamInterface stream = new Stream(StreamType.INFO, validation.getSourcingStep(), BaseMessages.getString(PKG, "ValidatorMeta.InfoStream.ValidationInput.Description", Const.NVL(validation.getName(), "")), StreamIcon.INFO, validation);
ioMeta.addStream(stream);
}
}
return ioMeta;
}
use of org.pentaho.di.trans.step.errorhandling.StreamInterface in project pentaho-kettle by pentaho.
the class StreamLookupMeta method getStepIOMeta.
/**
* Returns the Input/Output metadata for this step. The generator step only produces output, does not accept input!
*/
@Override
public StepIOMetaInterface getStepIOMeta() {
if (ioMeta == null) {
ioMeta = new StepIOMeta(true, true, false, false, false, false);
StreamInterface stream = new Stream(StreamType.INFO, null, BaseMessages.getString(PKG, "StreamLookupMeta.InfoStream.Description"), StreamIcon.INFO, null);
ioMeta.addStream(stream);
}
return ioMeta;
}
use of org.pentaho.di.trans.step.errorhandling.StreamInterface in project pentaho-kettle by pentaho.
the class SwitchCaseMeta 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;
StepIOMetaInterface ioMeta = getStepIOMeta();
for (StreamInterface stream : ioMeta.getTargetStreams()) {
SwitchCaseTarget target = (SwitchCaseTarget) stream.getSubject();
if (target != null && target.caseTargetStep == null) {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "SwitchCaseMeta.CheckResult.TargetStepInvalid", "false", target.caseTargetStepname), stepMeta);
remarks.add(cr);
}
}
if (Utils.isEmpty(fieldname)) {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "SwitchCaseMeta.CheckResult.NoFieldSpecified"), stepMeta);
} else {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(PKG, "SwitchCaseMeta.CheckResult.FieldSpecified"), 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, "SwitchCaseMeta.CheckResult.StepReceivingInfoFromOtherSteps"), stepMeta);
remarks.add(cr);
} else {
cr = new CheckResult(CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "SwitchCaseMeta.CheckResult.NoInputReceivedFromOtherSteps"), stepMeta);
remarks.add(cr);
}
}
use of org.pentaho.di.trans.step.errorhandling.StreamInterface in project pentaho-kettle by pentaho.
the class SwitchCaseMeta method searchInfoAndTargetSteps.
@Override
public void searchInfoAndTargetSteps(List<StepMeta> steps) {
for (StreamInterface stream : getStepIOMeta().getTargetStreams()) {
SwitchCaseTarget target = (SwitchCaseTarget) stream.getSubject();
if (target != null) {
StepMeta stepMeta = StepMeta.findStep(steps, target.caseTargetStepname);
target.caseTargetStep = stepMeta;
}
}
defaultTargetStep = StepMeta.findStep(steps, defaultTargetStepname);
resetStepIoMeta();
}
Aggregations