本文整理匯總了Java中org.pentaho.di.trans.step.StepMeta.setAttribute方法的典型用法代碼示例。如果您正苦於以下問題:Java StepMeta.setAttribute方法的具體用法?Java StepMeta.setAttribute怎麽用?Java StepMeta.setAttribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.trans.step.StepMeta
的用法示例。
在下文中一共展示了StepMeta.setAttribute方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: clearInputDataSet
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
public void clearInputDataSet() {
Spoon spoon = ( (Spoon) SpoonFactory.getInstance() );
TransGraph transGraph = spoon.getActiveTransGraph();
TransMeta transMeta = spoon.getActiveTransformation();
StepMeta stepMeta = transGraph.getCurrentStep();
if ( transGraph == null || transMeta == null || stepMeta == null ) {
return;
}
stepMeta.setAttribute( DataSetConst.ATTR_GROUP_DATASET, DataSetConst.ATTR_STEP_DATASET_INPUT, null );
transGraph.redraw();
}
示例2: clearGoldenDataSet
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
public void clearGoldenDataSet() {
Spoon spoon = ( (Spoon) SpoonFactory.getInstance() );
TransGraph transGraph = spoon.getActiveTransGraph();
TransMeta transMeta = spoon.getActiveTransformation();
StepMeta stepMeta = transGraph.getCurrentStep();
if ( transGraph == null || transMeta == null || stepMeta == null ) {
return;
}
stepMeta.setAttribute( DataSetConst.ATTR_GROUP_DATASET, DataSetConst.ATTR_STEP_DATASET_GOLDEN, null );
transGraph.redraw();
}
示例3: tweakUnitTestStep
import org.pentaho.di.trans.step.StepMeta; //導入方法依賴的package包/類
private void tweakUnitTestStep(TransTweak stepTweak, boolean enable) {
Spoon spoon = ( (Spoon) SpoonFactory.getInstance() );
TransGraph transGraph = spoon.getActiveTransGraph();
IMetaStore metaStore = spoon.getMetaStore();
if ( transGraph == null ) {
return;
}
StepMeta stepMeta = transGraph.getCurrentStep();
TransMeta transMeta = spoon.getActiveTransformation();
if ( stepMeta == null || transMeta == null ) {
return;
}
try {
TransUnitTest unitTest = getCurrentUnitTest(transMeta);
if (unitTest==null) {
return;
}
TransUnitTestTweak unitTestTweak = unitTest.findTweak(stepMeta.getName());
if (unitTestTweak!=null) {
unitTest.getTweaks().remove(unitTestTweak);
stepMeta.setAttribute(DataSetConst.ATTR_GROUP_DATASET, DataSetConst.ATTR_STEP_TWEAK, null);
}
if (enable) {
unitTest.getTweaks().add(new TransUnitTestTweak(stepTweak, stepMeta.getName()));
stepMeta.setAttribute(DataSetConst.ATTR_GROUP_DATASET, DataSetConst.ATTR_STEP_TWEAK, stepTweak.name());
}
new MetaStoreFactory<TransUnitTest>(TransUnitTest.class, metaStore, PentahoDefaults.NAMESPACE)
.saveElement(unitTest);
spoon.refreshGraph();
} catch(Exception exception) {
new ErrorDialog( spoon.getShell(), "Error", "Error tweaking transformation unit test on step '"+stepMeta.getName()+"' with operation "+stepTweak.name(), exception );
}
}