use of org.pentaho.di.trans.steps.singlethreader.SingleThreaderMeta in project pentaho-kettle by pentaho.
the class TransMeta method setRepositoryOnMappingSteps.
/**
* Set the Repository object on the Mapping step That way the mapping step can determine the output fields for
* repository hosted mappings... This is the exception to the rule so we don't pass this through the getFields()
* method. TODO: figure out a way to make this more generic.
*/
private void setRepositoryOnMappingSteps() {
for (StepMeta step : steps) {
if (step.getStepMetaInterface() instanceof MappingMeta) {
((MappingMeta) step.getStepMetaInterface()).setRepository(repository);
((MappingMeta) step.getStepMetaInterface()).setMetaStore(metaStore);
}
if (step.getStepMetaInterface() instanceof SingleThreaderMeta) {
((SingleThreaderMeta) step.getStepMetaInterface()).setRepository(repository);
((SingleThreaderMeta) step.getStepMetaInterface()).setMetaStore(metaStore);
}
if (step.getStepMetaInterface() instanceof JobExecutorMeta) {
((JobExecutorMeta) step.getStepMetaInterface()).setRepository(repository);
((JobExecutorMeta) step.getStepMetaInterface()).setMetaStore(metaStore);
}
if (step.getStepMetaInterface() instanceof TransExecutorMeta) {
((TransExecutorMeta) step.getStepMetaInterface()).setRepository(repository);
((TransExecutorMeta) step.getStepMetaInterface()).setMetaStore(metaStore);
}
}
}
use of org.pentaho.di.trans.steps.singlethreader.SingleThreaderMeta in project pentaho-kettle by pentaho.
the class SingleThreaderDialog method getParameters.
protected void getParameters(TransMeta mappingTransMeta) {
try {
if (mappingTransMeta == null) {
SingleThreaderMeta jet = new SingleThreaderMeta();
getInfo(jet);
mappingTransMeta = SingleThreaderMeta.loadSingleThreadedTransMeta(jet, repository, transMeta);
}
String[] parameters = mappingTransMeta.listParameters();
String[] existing = wParameters.getItems(1);
for (int i = 0; i < parameters.length; i++) {
if (Const.indexOfString(parameters[i], existing) < 0) {
TableItem item = new TableItem(wParameters.table, SWT.NONE);
item.setText(1, parameters[i]);
}
}
wParameters.removeEmptyRows();
wParameters.setRowNums();
wParameters.optWidth(true);
} catch (Exception e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "SingleThreaderDialog.Exception.UnableToLoadTransformation.Title"), BaseMessages.getString(PKG, "SingleThreaderDialog.Exception.UnableToLoadTransformation.Message"), e);
}
}
Aggregations