Interface ScriptInterface

  • All Superinterfaces:
    HasLogChannelInterface, StepInterface, org.pentaho.di.core.variables.VariableSpace

    public interface ScriptInterface
    extends StepInterface
    Interface to make the real ScriptValueMod and ScriptValueModDummy similar.
    Author:
    Sven Boden
    • Method Detail

      • processRow

        boolean processRow​(StepMetaInterface smi,
                           StepDataInterface sdi)
                    throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Perform the equivalent of processing one row. Typically this means reading a row from input (getRow()) and passing a row to output (putRow)).
        Specified by:
        processRow in interface StepInterface
        Parameters:
        smi - The steps metadata to work with
        sdi - The steps temporary working data to work with (database connections, result sets, caches, temporary variables, etc.)
        Returns:
        false if no more rows can be processed or an error occurred.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • addRowListener

        void addRowListener​(RowListener rowListener)
        Description copied from interface: StepInterface
        Add a rowlistener to the step allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the step.
        Specified by:
        addRowListener in interface StepInterface
        Parameters:
        rowListener - the rowlistener to add
      • getErrors

        long getErrors()
        Description copied from interface: StepInterface
        Get the number of errors
        Specified by:
        getErrors in interface StepInterface
        Returns:
        the number of errors
      • getInputRowSets

        List<org.pentaho.di.core.RowSet> getInputRowSets()
        Specified by:
        getInputRowSets in interface StepInterface
        Returns:
        The list of active input rowsets for the step
      • getLinesRejected

        long getLinesRejected()
        Specified by:
        getLinesRejected in interface StepInterface
        Returns:
        Returns the lines rejected by error handling.
      • getOutputRowSets

        List<org.pentaho.di.core.RowSet> getOutputRowSets()
        Specified by:
        getOutputRowSets in interface StepInterface
        Returns:
        The list of active output rowsets for the step
      • getRow

        Object[] getRow()
                 throws org.pentaho.di.core.exception.KettleException
        Specified by:
        getRow in interface StepInterface
        Returns:
        a row from the source step(s).
        Throws:
        org.pentaho.di.core.exception.KettleException
      • init

        boolean init​(StepMetaInterface stepMetaInterface,
                     StepDataInterface stepDataInterface)
        Description copied from interface: StepInterface
        Initialize and do work where other steps need to wait for...
        Specified by:
        init in interface StepInterface
        Parameters:
        stepMetaInterface - The metadata to work with
        stepDataInterface - The data to initialize
      • isAlive

        boolean isAlive()
      • isPartitioned

        boolean isPartitioned()
        Specified by:
        isPartitioned in interface StepInterface
        Returns:
        true if the step is running partitioned
      • isStopped

        boolean isStopped()
        Specified by:
        isStopped in interface StepInterface
        Returns:
        True if the step is marked as stopped. Execution should stop immediate.
      • putRow

        void putRow​(org.pentaho.di.core.row.RowMetaInterface rowMeta,
                    Object[] row)
             throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Put a row on the destination rowsets.
        Specified by:
        putRow in interface StepInterface
        Parameters:
        rowMeta - The row to send to the destinations steps
        Throws:
        org.pentaho.di.core.exception.KettleException
      • removeRowListener

        void removeRowListener​(RowListener rowListener)
        Description copied from interface: StepInterface
        Remove a rowlistener from this step.
        Specified by:
        removeRowListener in interface StepInterface
        Parameters:
        rowListener - the rowlistener to remove
      • run

        void run()
      • setErrors

        void setErrors​(long errors)
        Description copied from interface: StepInterface
        Sets the number of errors
        Specified by:
        setErrors in interface StepInterface
        Parameters:
        errors - the number of errors to set
      • setPartitionID

        void setPartitionID​(String partitionID)
        Specified by:
        setPartitionID in interface StepInterface
        Parameters:
        partitionID - the partitionID to set
      • start

        void start()
      • stopAll

        void stopAll()
        Description copied from interface: StepInterface
        Flags all rowsets as stopped/completed/finished.
        Specified by:
        stopAll in interface StepInterface
      • stopRunning

        void stopRunning​(StepMetaInterface stepMetaInterface,
                         StepDataInterface stepDataInterface)
                  throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Stop running operations...
        Specified by:
        stopRunning in interface StepInterface
        Parameters:
        stepMetaInterface - The metadata that might be needed by the step to stop running.
        stepDataInterface - The interface to the step data containing the connections, resultsets, open files, etc.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • cleanup

        void cleanup()
        Description copied from interface: StepInterface
        Call this method typically, after ALL the slave transformations in a clustered run have finished.
        Specified by:
        cleanup in interface StepInterface