Search in sources :

Example 6 with StepMetaChangeListenerInterface

use of org.pentaho.di.trans.step.StepMetaChangeListenerInterface in project pentaho-kettle by pentaho.

the class TransMeta method removeStepChangeListener.

public void removeStepChangeListener(StepMetaChangeListenerInterface list) {
    int indexListener = -1;
    int indexListenerRemove = -1;
    for (StepMetaChangeListenerInterface listener : stepChangeListeners) {
        indexListener++;
        if (listener.equals(list)) {
            indexListenerRemove = indexListener;
        }
    }
    if (indexListenerRemove >= 0) {
        stepChangeListeners.remove(indexListenerRemove);
    }
}
Also used : StepMetaChangeListenerInterface(org.pentaho.di.trans.step.StepMetaChangeListenerInterface) Point(org.pentaho.di.core.gui.Point) KettleExtensionPoint(org.pentaho.di.core.extension.KettleExtensionPoint)

Example 7 with StepMetaChangeListenerInterface

use of org.pentaho.di.trans.step.StepMetaChangeListenerInterface in project pentaho-kettle by pentaho.

the class TransMeta method addStep.

/**
 * Add a new step to the transformation at the specified index. This method sets the step's parent transformation to
 * the this transformation, and marks that the transformations' steps have changed.
 *
 * @param p
 *          The index into the step list
 * @param stepMeta
 *          The step to be added.
 */
public void addStep(int p, StepMeta stepMeta) {
    steps.add(p, stepMeta);
    stepMeta.setParentTransMeta(this);
    changed_steps = true;
    StepMetaInterface iface = stepMeta.getStepMetaInterface();
    if (iface instanceof StepMetaChangeListenerInterface) {
        addStepChangeListener(p, (StepMetaChangeListenerInterface) stepMeta.getStepMetaInterface());
    }
    clearCaches();
}
Also used : StepMetaChangeListenerInterface(org.pentaho.di.trans.step.StepMetaChangeListenerInterface) StepMetaInterface(org.pentaho.di.trans.step.StepMetaInterface)

Aggregations

StepMetaChangeListenerInterface (org.pentaho.di.trans.step.StepMetaChangeListenerInterface)7 StepMetaInterface (org.pentaho.di.trans.step.StepMetaInterface)6 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)3 Point (org.pentaho.di.core.gui.Point)3 StepMeta (org.pentaho.di.trans.step.StepMeta)3 MissingTrans (org.pentaho.di.trans.steps.missing.MissingTrans)1