org.pentaho.di.trans.steps.script
Interface ScriptInterface

All Superinterfaces:
HasLogChannelInterface, StepInterface, VariableSpace

public interface ScriptInterface
extends StepInterface

Interface to make the real ScriptValueMod and ScriptValueModDummy similar.

Author:
Sven Boden

Method Summary
 void addRowListener(RowListener rowListener)
          Add a rowlistener to the step allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the step.
 void cleanup()
          Call this method typically, after ALL the slave transformations in a clustered run have finished.
 void dispose(StepMetaInterface sii, StepDataInterface sdi)
          Dispose of this step: close files, empty logs, etc.
 long getErrors()
          Get the number of errors
 List<RowSet> getInputRowSets()
           
 long getLinesInput()
           
 long getLinesOutput()
           
 long getLinesRead()
           
 long getLinesRejected()
           
 long getLinesUpdated()
           
 long getLinesWritten()
           
 List<RowSet> getOutputRowSets()
           
 String getPartitionID()
           
 Object[] getRow()
           
 List<RowListener> getRowListeners()
           
 String getStepID()
           
 String getStepname()
          Get the name of the step.
 boolean init(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface)
          Initialize and do work where other steps need to wait for...
 boolean isAlive()
           
 boolean isPartitioned()
           
 boolean isStopped()
           
 void markStart()
          Mark the start time of the step.
 void markStop()
          Mark the end time of the step.
 void pauseRunning()
          Pause a running step
 boolean processRow(StepMetaInterface smi, StepDataInterface sdi)
          Perform the equivalent of processing one row.
 void putRow(RowMetaInterface rowMeta, Object[] row)
          Put a row on the destination rowsets.
 void removeRowListener(RowListener rowListener)
          Remove a rowlistener from this step.
 void resumeRunning()
          Resume a running step
 void run()
           
 void setErrors(long errors)
          Sets the number of errors
 void setOutputDone()
          Signal output done to destination steps
 void setPartitionID(String partitionID)
           
 void start()
           
 void stopAll()
          Flags all rowsets as stopped/completed/finished.
 void stopRunning(StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface)
          Stop running operations...
 
Methods inherited from interface org.pentaho.di.trans.step.StepInterface
addStepListener, batchComplete, canProcessOneRow, getCopy, getLogChannel, getProcessed, getResultFiles, getRuntime, getStatus, getStepMeta, getTrans, identifyErrorOutput, initBeforeStart, isMapping, isPaused, isRunning, isUsingThreadPriorityManagment, rowsetInputSize, rowsetOutputSize, setLinesRejected, setPartitioned, setRepartitioning, setRunning, setStopped, setUsingThreadPriorityManagment
 
Methods inherited from interface org.pentaho.di.core.variables.VariableSpace
copyVariablesFrom, environmentSubstitute, environmentSubstitute, getBooleanValueOfVariable, getParentVariableSpace, getVariable, getVariable, initializeVariablesFrom, injectVariables, listVariables, setParentVariableSpace, setVariable, shareVariablesWith
 

Method Detail

processRow

boolean processRow(StepMetaInterface smi,
                   StepDataInterface sdi)
                   throws 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:
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

dispose

void dispose(StepMetaInterface sii,
             StepDataInterface sdi)
Description copied from interface: StepInterface
Dispose of this step: close files, empty logs, etc.

Specified by:
dispose in interface StepInterface
Parameters:
sii - The metadata to work with
sdi - The data to dispose of

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<RowSet> getInputRowSets()
Specified by:
getInputRowSets in interface StepInterface
Returns:
The list of active input rowsets for the step

getLinesInput

long getLinesInput()
Specified by:
getLinesInput in interface StepInterface
Returns:
Returns the linesInput.

getLinesOutput

long getLinesOutput()
Specified by:
getLinesOutput in interface StepInterface
Returns:
Returns the linesOutput.

getLinesRead

long getLinesRead()
Specified by:
getLinesRead in interface StepInterface
Returns:
Returns the linesRead.

getLinesUpdated

long getLinesUpdated()
Specified by:
getLinesUpdated in interface StepInterface
Returns:
Returns the linesUpdated.

getLinesWritten

long getLinesWritten()
Specified by:
getLinesWritten in interface StepInterface
Returns:
Returns the linesWritten.

getLinesRejected

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

getOutputRowSets

List<RowSet> getOutputRowSets()
Specified by:
getOutputRowSets in interface StepInterface
Returns:
The list of active output rowsets for the step

getPartitionID

String getPartitionID()
Specified by:
getPartitionID in interface StepInterface
Returns:
the steps partition ID

getRow

Object[] getRow()
                throws KettleException
Specified by:
getRow in interface StepInterface
Returns:
a row from the source step(s).
Throws:
KettleException

getRowListeners

List<RowListener> getRowListeners()
Specified by:
getRowListeners in interface StepInterface
Returns:
a list of the installed RowListeners

getStepID

String getStepID()
Specified by:
getStepID in interface StepInterface
Returns:
the type ID of the step...

getStepname

String getStepname()
Description copied from interface: StepInterface
Get the name of the step.

Specified by:
getStepname in interface StepInterface
Returns:
the name of the step

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.

markStart

void markStart()
Description copied from interface: StepInterface
Mark the start time of the step.

Specified by:
markStart in interface StepInterface

markStop

void markStop()
Description copied from interface: StepInterface
Mark the end time of the step.

Specified by:
markStop in interface StepInterface

putRow

void putRow(RowMetaInterface rowMeta,
            Object[] row)
            throws 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:
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

setOutputDone

void setOutputDone()
Description copied from interface: StepInterface
Signal output done to destination steps

Specified by:
setOutputDone in interface StepInterface

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 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:
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

pauseRunning

void pauseRunning()
Description copied from interface: StepInterface
Pause a running step

Specified by:
pauseRunning in interface StepInterface

resumeRunning

void resumeRunning()
Description copied from interface: StepInterface
Resume a running step

Specified by:
resumeRunning in interface StepInterface