org.pentaho.di.trans
Class Trans

java.lang.Object
  extended by org.pentaho.di.trans.Trans
All Implemented Interfaces:
HasLogChannelInterface, LoggingObjectInterface, NamedParams, VariableSpace

public class Trans
extends Object
implements VariableSpace, NamedParams, HasLogChannelInterface, LoggingObjectInterface

This class is responsible for the execution of Transformations. It loads, instantiates, initializes, runs, monitors the execution of the transformation contained in the TransInfo object you feed it.

Since:
07-04-2003
Author:
Matt

Field Summary
 int class_nr
           
static String CONFIGURATION_IN_EXPORT_FILENAME
           
static String REPLAY_DATE_FORMAT
           
static String STRING_FINISHED
           
static String STRING_HALTING
           
static String STRING_INITIALIZING
           
static String STRING_PAUSED
           
static String STRING_PREPARING
           
static String STRING_RUNNING
           
static String STRING_STOPPED
           
static String STRING_WAITING
           
static int TYPE_DISP_1_1
           
static int TYPE_DISP_1_N
           
static int TYPE_DISP_N_1
           
static int TYPE_DISP_N_M
           
static int TYPE_DISP_N_N
           
 
Constructor Summary
Trans()
           
Trans(TransMeta transMeta)
          Initialize a transformation from transformation meta-data defined in memory
Trans(TransMeta transMeta, LoggingObjectInterface parent)
          Initialize a transformation from transformation meta-data defined in memory.
Trans(VariableSpace parentVariableSpace, Repository rep, String name, String dirname, String filename)
           
 
Method Summary
 void activateParameters()
          Activate the currently set parameters
 void addParameterDefinition(String key, String defValue, String description)
          Add a parameter definition to this set.
 RowProducer addRowProducer(String stepname, int copynr)
          This adds a row producer to the transformation that just got set up.
 void addTransListener(TransListener transListener)
           
 void addTransStoppedListener(TransStoppedListener transStoppedListener)
           
 void beginProcessing()
           
 void calculateBatchIdAndDateRange()
           
 void cleanup()
          Call this method after the transformation has finished.
static int cleanupCluster(LogChannelInterface log, TransSplitter transSplitter)
           
static void cleanupSlaveServer(TransSplitter transSplitter, SlaveServer slaveServer, TransMeta slaveTransMeta)
           
 void clearParameters()
          Clear all parameters
 void copyParametersFrom(NamedParams params)
          Copy params to these named parameters (clearing out first).
 void copyVariablesFrom(VariableSpace space)
          Copy the variables from another space, without initializing with the defaults.
 String environmentSubstitute(String aString)
          Substitute the string using the current variable space.
 String[] environmentSubstitute(String[] aString)
          Replaces environment variables in an array of strings.
 void eraseParameters()
          Clear the values.
 void execute(String[] arguments)
          Execute this transformation.
static TransSplitter executeClustered(TransMeta transMeta, TransExecutionConfiguration executionConfiguration)
           
static void executeClustered(TransSplitter transSplitter, TransExecutionConfiguration executionConfiguration)
          executes an existing transSplitter, with transformation already split.
 List<StepInterface> findBaseSteps(String stepname)
           
 StepDataInterface findDataInterface(String name)
           
 MappingInput[] findMappingInput()
           
 MappingOutput[] findMappingOutput()
           
 RowSet findRowSet(String rowsetname)
           
 RowSet findRowSet(String from, int fromcopy, String to, int tocopy)
           
 StepInterface findRunThread(String stepname)
           
 Map<String,Trans> getActiveSubtransformations()
           
 long getBatchId()
           
 boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
          This method returns a boolean for the new variable check boxes.
static Result getClusteredTransformationResult(LogChannelInterface log, TransSplitter transSplitter, Job parentJob)
           
 String getContainerObjectId()
           
 Date getCurrentDate()
           
 Date getDepDate()
           
 Date getEndDate()
           
 int getEnded()
           
 int getErrors()
           
 String getFilename()
           
 Date getJobEndDate()
           
 Date getJobStartDate()
           
 long getLastProcessed()
           
 LogChannelInterface getLogChannel()
           
 String getLogChannelId()
           
 Date getLogDate()
           
 List<LoggingHierarchy> getLoggingHierarchy()
           
 LogLevel getLogLevel()
           
 String getMappingStepName()
           
 String getName()
           
 String getObjectCopy()
           
 ObjectId getObjectId()
           
 String getObjectName()
           
 ObjectRevision getObjectRevision()
           
 LoggingObjectType getObjectType()
           
 String getParameterDefault(String key)
          Get the default value of a parameter.
 String getParameterDescription(String key)
          Get the description of a parameter.
 String getParameterValue(String key)
          Get the value of a parameter.
 LoggingObjectInterface getParent()
           
 Job getParentJob()
           
 Trans getParentTrans()
           
 VariableSpace getParentVariableSpace()
          Get the parent of the variable space.
 long getPassedBatchId()
           
 Date getRegistrationDate()
          Stub
 Date getReplayDate()
           
 Repository getRepository()
           
 RepositoryDirectoryInterface getRepositoryDirectory()
           
 Result getResult()
           
 List<RowSet> getRowsets()
           
 StepInterface getRunThread(int i)
           
 StepInterface getRunThread(String name, int copy)
           
 PrintWriter getServletPrintWriter()
           
 SocketRepository getSocketRepository()
           
 Date getStartDate()
           
 String getStatus()
           
 StepDataInterface getStepDataInterface(String stepname, int stepcopy)
          Finds the StepDataInterface (currently) associated with the specified step
 StepInterface getStepInterface(String stepname, int copy)
          Find the StepInterface (thread) by looking it up using the name
 Map<String,List<StepPerformanceSnapShot>> getStepPerformanceSnapShots()
           
 List<StepMetaDataCombi> getSteps()
           
 String getThreadName()
           
 List<TransListener> getTransListeners()
           
 TransMeta getTransMeta()
           
 BaseStepData.StepExecutionStatus[] getTransStepExecutionStatusLookup()
           
 boolean[] getTransStepIsRunningLookup()
           
 List<TransStoppedListener> getTransStoppedListeners()
           
 String getVariable(String variableName)
          Get the value of a variable.
 String getVariable(String variableName, String defaultValue)
          Get the value of a variable with a default in case the variable is not found.
 boolean hasHaltedSteps()
           
 boolean hasStepStarted(String sname, int copy)
           
 void initializeVariablesFrom(VariableSpace parent)
          Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()), after this the "injected" variables should be inserted (injectVariables()).
 void injectVariables(Map<String,String> prop)
          Inject variables.
 boolean isFinished()
           
 boolean isInitializing()
           
 boolean isMonitored()
           
 boolean isPaused()
           
 boolean isPreparing()
           
 boolean isPreview()
           
 boolean isReadyToStart()
           
 boolean isRunning()
           
 boolean isSafeModeEnabled()
           
 boolean isStopped()
           
 void killAll()
           
 String[] listParameters()
          List the parameters.
 String[] listVariables()
          List the variables (not the values) that are currently in the variable space.
 void logSummary(StepInterface si)
           
static long monitorClusteredTransformation(LogChannelInterface log, TransSplitter transSplitter, Job parentJob)
          Consider that all the transformations in a cluster schema are running now...
Now we should verify that they are all running as they should.
If a transformation has an error, we should kill them all..
This should happen in a separate thread to prevent blocking of the UI.

When the master and slave transformations have all finished, we should also run
a cleanup on those transformations to release sockets, etc.

static long monitorClusteredTransformation(LogChannelInterface log, TransSplitter transSplitter, Job parentJob, int sleepTimeSeconds)
          Consider that all the transformations in a cluster schema are running now...
Now we should verify that they are all running as they should.
If a transformation has an error, we should kill them all..
This should happen in a separate thread to prevent blocking of the UI.

When the master and slave transformations have all finished, we should also run
a cleanup on those transformations to release sockets, etc.

static void monitorRemoteTransformation(LogChannelInterface log, String carteObjectId, String transName, SlaveServer remoteSlaveServer)
           
static void monitorRemoteTransformation(LogChannelInterface log, String carteObjectId, String transName, SlaveServer remoteSlaveServer, int sleepTimeSeconds)
           
 int nrActiveSteps()
           
 int nrSteps()
           
 void pauseRunning()
          Pause the transformation (pause all steps)
 void prepareExecution(String[] arguments)
          Prepare the execution of the transformation.
 void printStats(int seconds)
           
 void resumeRunning()
          Resume running the transformation after a pause (resume all steps)
static String sendToSlaveServer(TransMeta transMeta, TransExecutionConfiguration executionConfiguration, Repository repository)
          Send the transformation for execution to a carte slave server
 void setBatchId(long batchId)
           
 void setContainerObjectId(String containerObjectId)
           
 void setInitializing(boolean initializing)
           
 void setInternalKettleVariables(VariableSpace var)
           
 void setJobEndDate(Date jobEndDate)
           
 void setJobStartDate(Date jobStartDate)
           
 void setLog(LogChannelInterface log)
           
 void setLogLevel(LogLevel logLevel)
           
 void setMappingStepName(String mappingStepName)
           
 void setMonitored(boolean monitored)
           
 void setParameterValue(String key, String value)
          Set the value of a parameter.
 void setParent(LoggingObjectInterface parent)
           
 void setParentJob(Job parentJob)
           
 void setParentTrans(Trans parentTrans)
           
 void setParentVariableSpace(VariableSpace parent)
          Set the parent variable space
 void setPassedBatchId(long jobBatchId)
           
 void setPreparing(boolean preparing)
           
 void setPreview(boolean preview)
           
 void setReplayDate(Date replayDate)
           
 void setRepository(Repository repository)
           
 void setRunning(boolean running)
           
 void setSafeModeEnabled(boolean safeModeEnabled)
          Turn on safe mode during running: the transformation will run slower but with more checking enabled.
 void setServletPrintWriter(PrintWriter servletPrintWriter)
           
 void setSocketRepository(SocketRepository socketRepository)
           
 void setStepPerformanceSnapShots(Map<String,List<StepPerformanceSnapShot>> stepPerformanceSnapShots)
           
 void setThreadName(String threadName)
           
 void setTransListeners(List<TransListener> transListeners)
           
 void setTransMeta(TransMeta transMeta)
           
 void setTransStoppedListeners(List<TransStoppedListener> transStoppedListeners)
           
 void setVariable(String variableName, String variableValue)
          Sets a variable in the Kettle Variables list.
 void shareVariablesWith(VariableSpace space)
          Share a variable space from another variable space.
 void startThreads()
          Start the threads prepared by prepareThreads(); Before you start the threads, you can add RowListeners to them.
 void stopAll()
           
 String toString()
           
 void waitUntilFinished()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REPLAY_DATE_FORMAT

public static final String REPLAY_DATE_FORMAT
See Also:
Constant Field Values

class_nr

public int class_nr

TYPE_DISP_1_1

public static final int TYPE_DISP_1_1
See Also:
Constant Field Values

TYPE_DISP_1_N

public static final int TYPE_DISP_1_N
See Also:
Constant Field Values

TYPE_DISP_N_1

public static final int TYPE_DISP_N_1
See Also:
Constant Field Values

TYPE_DISP_N_N

public static final int TYPE_DISP_N_N
See Also:
Constant Field Values

TYPE_DISP_N_M

public static final int TYPE_DISP_N_M
See Also:
Constant Field Values

STRING_FINISHED

public static final String STRING_FINISHED
See Also:
Constant Field Values

STRING_RUNNING

public static final String STRING_RUNNING
See Also:
Constant Field Values

STRING_PAUSED

public static final String STRING_PAUSED
See Also:
Constant Field Values

STRING_PREPARING

public static final String STRING_PREPARING
See Also:
Constant Field Values

STRING_INITIALIZING

public static final String STRING_INITIALIZING
See Also:
Constant Field Values

STRING_WAITING

public static final String STRING_WAITING
See Also:
Constant Field Values

STRING_STOPPED

public static final String STRING_STOPPED
See Also:
Constant Field Values

STRING_HALTING

public static final String STRING_HALTING
See Also:
Constant Field Values

CONFIGURATION_IN_EXPORT_FILENAME

public static final String CONFIGURATION_IN_EXPORT_FILENAME
See Also:
Constant Field Values
Constructor Detail

Trans

public Trans()

Trans

public Trans(TransMeta transMeta)
Initialize a transformation from transformation meta-data defined in memory

Parameters:
transMeta - the transformation meta-data to use.

Trans

public Trans(TransMeta transMeta,
             LoggingObjectInterface parent)
Initialize a transformation from transformation meta-data defined in memory. Also take into account the parent log channel interface (job or transformation) for logging lineage purposes.

Parameters:
transMeta - the transformation meta-data to use.
parent - the parent job that is executing this transformation

Trans

public Trans(VariableSpace parentVariableSpace,
             Repository rep,
             String name,
             String dirname,
             String filename)
      throws KettleException
Throws:
KettleException
Method Detail

setParent

public void setParent(LoggingObjectInterface parent)

getLogChannel

public LogChannelInterface getLogChannel()
Specified by:
getLogChannel in interface HasLogChannelInterface

setLog

public void setLog(LogChannelInterface log)

getName

public String getName()

execute

public void execute(String[] arguments)
             throws KettleException
Execute this transformation.

Throws:
KettleException - in case the transformation could not be prepared (initialized)

prepareExecution

public void prepareExecution(String[] arguments)
                      throws KettleException
Prepare the execution of the transformation.

Parameters:
arguments - the arguments to use for this transformation
Throws:
KettleException - in case the transformation could not be prepared (initialized)

startThreads

public void startThreads()
                  throws KettleException
Start the threads prepared by prepareThreads(); Before you start the threads, you can add RowListeners to them.

Throws:
KettleException - in case there is a communication error with a remote output socket.

cleanup

public void cleanup()
Call this method after the transformation has finished. Typically, after ALL the slave transformations in a clustered run have finished.


logSummary

public void logSummary(StepInterface si)

waitUntilFinished

public void waitUntilFinished()

getErrors

public int getErrors()

getEnded

public int getEnded()

isFinished

public boolean isFinished()

killAll

public void killAll()

printStats

public void printStats(int seconds)

getLastProcessed

public long getLastProcessed()

findRowSet

public RowSet findRowSet(String rowsetname)

findRowSet

public RowSet findRowSet(String from,
                         int fromcopy,
                         String to,
                         int tocopy)

hasStepStarted

public boolean hasStepStarted(String sname,
                              int copy)

stopAll

public void stopAll()

nrSteps

public int nrSteps()

nrActiveSteps

public int nrActiveSteps()

getTransStepIsRunningLookup

public boolean[] getTransStepIsRunningLookup()

getTransStepExecutionStatusLookup

public BaseStepData.StepExecutionStatus[] getTransStepExecutionStatusLookup()

getRunThread

public StepInterface getRunThread(int i)

getRunThread

public StepInterface getRunThread(String name,
                                  int copy)

calculateBatchIdAndDateRange

public void calculateBatchIdAndDateRange()
                                  throws KettleTransException
Throws:
KettleTransException

beginProcessing

public void beginProcessing()
                     throws KettleTransException
Throws:
KettleTransException

getResult

public Result getResult()

findRunThread

public StepInterface findRunThread(String stepname)

findBaseSteps

public List<StepInterface> findBaseSteps(String stepname)

findDataInterface

public StepDataInterface findDataInterface(String name)

getStartDate

public Date getStartDate()
Returns:
Returns the startDate.

getEndDate

public Date getEndDate()
Returns:
Returns the endDate.

isMonitored

public boolean isMonitored()
Returns:
See if the running transformation is monitored.

setMonitored

public void setMonitored(boolean monitored)
Parameters:
monitored - Indicate we want to monitor the running transformation

getTransMeta

public TransMeta getTransMeta()
Returns:
Returns the transMeta.

setTransMeta

public void setTransMeta(TransMeta transMeta)
Parameters:
transMeta - The transMeta to set.

getCurrentDate

public Date getCurrentDate()
Returns:
Returns the currentDate.

getDepDate

public Date getDepDate()
Returns:
Returns the depDate.

getLogDate

public Date getLogDate()
Returns:
Returns the logDate.

getRowsets

public List<RowSet> getRowsets()
Returns:
Returns the rowsets.

getSteps

public List<StepMetaDataCombi> getSteps()
Returns:
Returns the steps.

toString

public String toString()
Overrides:
toString in class Object

findMappingInput

public MappingInput[] findMappingInput()

findMappingOutput

public MappingOutput[] findMappingOutput()

getStepInterface

public StepInterface getStepInterface(String stepname,
                                      int copy)
Find the StepInterface (thread) by looking it up using the name

Parameters:
stepname - The name of the step to look for
copy - the copy number of the step to look for
Returns:
the StepInterface or null if nothing was found.

getReplayDate

public Date getReplayDate()

setReplayDate

public void setReplayDate(Date replayDate)

setSafeModeEnabled

public void setSafeModeEnabled(boolean safeModeEnabled)
Turn on safe mode during running: the transformation will run slower but with more checking enabled.

Parameters:
safeModeEnabled - true for safe mode

isSafeModeEnabled

public boolean isSafeModeEnabled()
Returns:
Returns true if the safe mode is enabled: the transformation will run slower but with more checking enabled

addRowProducer

public RowProducer addRowProducer(String stepname,
                                  int copynr)
                           throws KettleException
This adds a row producer to the transformation that just got set up. Preferable run this BEFORE execute() but after prepareExcution()

Parameters:
stepname - The step to produce rows for
copynr - The copynr of the step to produce row for (normally 0 unless you have multiple copies running)
Throws:
KettleException - in case the thread/step to produce rows for could not be found.

getParentJob

public Job getParentJob()
Returns:
Returns the parentJob.

setParentJob

public void setParentJob(Job parentJob)
Parameters:
parentJob - The parentJob to set.

getStepDataInterface

public StepDataInterface getStepDataInterface(String stepname,
                                              int stepcopy)
Finds the StepDataInterface (currently) associated with the specified step

Parameters:
stepname - The name of the step to look for
stepcopy - The copy number (0 based) of the step
Returns:
The StepDataInterface or null if non found.

hasHaltedSteps

public boolean hasHaltedSteps()
Returns:
true if one or more steps are halted

getJobStartDate

public Date getJobStartDate()

getJobEndDate

public Date getJobEndDate()

setJobEndDate

public void setJobEndDate(Date jobEndDate)
Parameters:
jobEndDate - the jobEndDate to set

setJobStartDate

public void setJobStartDate(Date jobStartDate)
Parameters:
jobStartDate - the jobStartDate to set

getPassedBatchId

public long getPassedBatchId()
Returns:
the jobBatchId

setPassedBatchId

public void setPassedBatchId(long jobBatchId)
Parameters:
jobBatchId - the jobBatchId to set

getBatchId

public long getBatchId()
Returns:
the batchId

setBatchId

public void setBatchId(long batchId)
Parameters:
batchId - the batchId to set

getThreadName

public String getThreadName()
Returns:
the threadName

setThreadName

public void setThreadName(String threadName)
Parameters:
threadName - the threadName to set

getStatus

public String getStatus()

isInitializing

public boolean isInitializing()
Returns:
the initializing

setInitializing

public void setInitializing(boolean initializing)
Parameters:
initializing - the initializing to set

isPreparing

public boolean isPreparing()
Returns:
the preparing

setPreparing

public void setPreparing(boolean preparing)
Parameters:
preparing - the preparing to set

isRunning

public boolean isRunning()
Returns:
the running

setRunning

public void setRunning(boolean running)
Parameters:
running - the running to set

executeClustered

public static final TransSplitter executeClustered(TransMeta transMeta,
                                                   TransExecutionConfiguration executionConfiguration)
                                            throws KettleException
Throws:
KettleException

executeClustered

public static final void executeClustered(TransSplitter transSplitter,
                                          TransExecutionConfiguration executionConfiguration)
                                   throws KettleException
executes an existing transSplitter, with transformation already split. See also : org.pentaho.di.ui.spoon.delegates.SpoonTransformationDelegate

Parameters:
transSplitter -
executionConfiguration -
Throws:
KettleException

monitorClusteredTransformation

public static final long monitorClusteredTransformation(LogChannelInterface log,
                                                        TransSplitter transSplitter,
                                                        Job parentJob)
Consider that all the transformations in a cluster schema are running now...
Now we should verify that they are all running as they should.
If a transformation has an error, we should kill them all..
This should happen in a separate thread to prevent blocking of the UI.

When the master and slave transformations have all finished, we should also run
a cleanup on those transformations to release sockets, etc.

Parameters:
logSubject - the subject to use for logging
transSplitter - the transformation splitter object
parentJob - the parent job when executed in a job, otherwise just set to null
sleepTimeSeconds - the sleep time in seconds in between slave transformation status polling
Returns:
the number of errors encountered

monitorClusteredTransformation

public static final long monitorClusteredTransformation(LogChannelInterface log,
                                                        TransSplitter transSplitter,
                                                        Job parentJob,
                                                        int sleepTimeSeconds)
Consider that all the transformations in a cluster schema are running now...
Now we should verify that they are all running as they should.
If a transformation has an error, we should kill them all..
This should happen in a separate thread to prevent blocking of the UI.

When the master and slave transformations have all finished, we should also run
a cleanup on those transformations to release sockets, etc.

Parameters:
logSubject - the subject to use for logging
transSplitter - the transformation splitter object
parentJob - the parent job when executed in a job, otherwise just set to null
sleepTimeSeconds - the sleep time in seconds in between slave transformation status polling
Returns:
the number of errors encountered

cleanupCluster

public static int cleanupCluster(LogChannelInterface log,
                                 TransSplitter transSplitter)

cleanupSlaveServer

public static void cleanupSlaveServer(TransSplitter transSplitter,
                                      SlaveServer slaveServer,
                                      TransMeta slaveTransMeta)
                               throws KettleException
Throws:
KettleException

getClusteredTransformationResult

public static final Result getClusteredTransformationResult(LogChannelInterface log,
                                                            TransSplitter transSplitter,
                                                            Job parentJob)

sendToSlaveServer

public static String sendToSlaveServer(TransMeta transMeta,
                                       TransExecutionConfiguration executionConfiguration,
                                       Repository repository)
                                throws KettleException
Send the transformation for execution to a carte slave server

Parameters:
transMeta -
executionConfiguration -
repository -
Returns:
The carte object ID on the server.
Throws:
KettleException

isReadyToStart

public boolean isReadyToStart()
Returns:
true if the transformation was prepared for execution successfully.
See Also:
prepareExecution(String[])

setInternalKettleVariables

public void setInternalKettleVariables(VariableSpace var)

copyVariablesFrom

public void copyVariablesFrom(VariableSpace space)
Description copied from interface: VariableSpace
Copy the variables from another space, without initializing with the defaults. This does not affect any parent relationship.

Specified by:
copyVariablesFrom in interface VariableSpace
Parameters:
space - the space to copy the variables from.

environmentSubstitute

public String environmentSubstitute(String aString)
Description copied from interface: VariableSpace
Substitute the string using the current variable space.

Specified by:
environmentSubstitute in interface VariableSpace
Parameters:
aString - The string to substitute.
Returns:
The substituted string.

environmentSubstitute

public String[] environmentSubstitute(String[] aString)
Description copied from interface: VariableSpace
Replaces environment variables in an array of strings. See also: environmentSubstitute(String string)

Specified by:
environmentSubstitute in interface VariableSpace
Parameters:
aString - The array of strings that wants its variables to be replaced.
Returns:
the array with the environment variables replaced.

getParentVariableSpace

public VariableSpace getParentVariableSpace()
Description copied from interface: VariableSpace
Get the parent of the variable space.

Specified by:
getParentVariableSpace in interface VariableSpace
Returns:
the parent.

setParentVariableSpace

public void setParentVariableSpace(VariableSpace parent)
Description copied from interface: VariableSpace
Set the parent variable space

Specified by:
setParentVariableSpace in interface VariableSpace
Parameters:
parent - The parent variable space to set

getVariable

public String getVariable(String variableName,
                          String defaultValue)
Description copied from interface: VariableSpace
Get the value of a variable with a default in case the variable is not found.

Specified by:
getVariable in interface VariableSpace
Parameters:
variableName - The name of the variable
defaultValue - The default value in case the variable could not be found
Returns:
the String value of a variable

getVariable

public String getVariable(String variableName)
Description copied from interface: VariableSpace
Get the value of a variable.

Specified by:
getVariable in interface VariableSpace
Parameters:
variableName - The name of the variable
Returns:
the String value of a variable or null in case the variable could not be found.

getBooleanValueOfVariable

public boolean getBooleanValueOfVariable(String variableName,
                                         boolean defaultValue)
Description copied from interface: VariableSpace
This method returns a boolean for the new variable check boxes. If the variable name is not set or the variable name is not specified, this method simply returns the default value. If not, it convert the variable value to a boolean. "Y", "YES" and "TRUE" all convert to true. (case insensitive)

Specified by:
getBooleanValueOfVariable in interface VariableSpace
Parameters:
variableName - The variable to look up.
defaultValue - The default value to return.
Returns:
See Also:
static method ValueMeta.convertStringToBoolean()

initializeVariablesFrom

public void initializeVariablesFrom(VariableSpace parent)
Description copied from interface: VariableSpace
Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()), after this the "injected" variables should be inserted (injectVariables()). The parent is set as parent variable space.

Specified by:
initializeVariablesFrom in interface VariableSpace
Parameters:
parent - the parent to start from, or null if root.

listVariables

public String[] listVariables()
Description copied from interface: VariableSpace
List the variables (not the values) that are currently in the variable space.

Specified by:
listVariables in interface VariableSpace
Returns:
Array of String variable names.

setVariable

public void setVariable(String variableName,
                        String variableValue)
Description copied from interface: VariableSpace
Sets a variable in the Kettle Variables list.

Specified by:
setVariable in interface VariableSpace
Parameters:
variableName - The name of the variable to set
variableValue - The value of the variable to set. If the variableValue is null, the variable is cleared from the list.

shareVariablesWith

public void shareVariablesWith(VariableSpace space)
Description copied from interface: VariableSpace
Share a variable space from another variable space. This means that the object should take over the space used as argument.

Specified by:
shareVariablesWith in interface VariableSpace
Parameters:
space - Variable space to be shared.

injectVariables

public void injectVariables(Map<String,String> prop)
Description copied from interface: VariableSpace
Inject variables. The behaviour should be that the properties object will be stored and at the time the VariableSpace is initialized (or upon calling this method if the space is already initialized). After injecting the link of the properties object should be removed.

Specified by:
injectVariables in interface VariableSpace
Parameters:
prop - Properties object containing key-value pairs.

pauseRunning

public void pauseRunning()
Pause the transformation (pause all steps)


resumeRunning

public void resumeRunning()
Resume running the transformation after a pause (resume all steps)


isPreview

public boolean isPreview()
Returns:
the preview

setPreview

public void setPreview(boolean preview)
Parameters:
preview - the preview to set

getRepository

public Repository getRepository()
Returns:
the repository

setRepository

public void setRepository(Repository repository)
Parameters:
repository - the repository to set

getStepPerformanceSnapShots

public Map<String,List<StepPerformanceSnapShot>> getStepPerformanceSnapShots()
Returns:
the stepPerformanceSnapShots

setStepPerformanceSnapShots

public void setStepPerformanceSnapShots(Map<String,List<StepPerformanceSnapShot>> stepPerformanceSnapShots)
Parameters:
stepPerformanceSnapShots - the stepPerformanceSnapShots to set

getTransListeners

public List<TransListener> getTransListeners()
Returns:
the transListeners

setTransListeners

public void setTransListeners(List<TransListener> transListeners)
Parameters:
transListeners - the transListeners to set

addTransListener

public void addTransListener(TransListener transListener)

setTransStoppedListeners

public void setTransStoppedListeners(List<TransStoppedListener> transStoppedListeners)

getTransStoppedListeners

public List<TransStoppedListener> getTransStoppedListeners()

addTransStoppedListener

public void addTransStoppedListener(TransStoppedListener transStoppedListener)

isPaused

public boolean isPaused()

isStopped

public boolean isStopped()

monitorRemoteTransformation

public static void monitorRemoteTransformation(LogChannelInterface log,
                                               String carteObjectId,
                                               String transName,
                                               SlaveServer remoteSlaveServer)

monitorRemoteTransformation

public static void monitorRemoteTransformation(LogChannelInterface log,
                                               String carteObjectId,
                                               String transName,
                                               SlaveServer remoteSlaveServer,
                                               int sleepTimeSeconds)

addParameterDefinition

public void addParameterDefinition(String key,
                                   String defValue,
                                   String description)
                            throws DuplicateParamException
Description copied from interface: NamedParams
Add a parameter definition to this set. TODO: default, throw exception

Specified by:
addParameterDefinition in interface NamedParams
Parameters:
key - Name of the parameter.
defValue - default value.
description - Description of the parameter.
Throws:
DuplicateParamException - Upon duplicate parameter definitions

getParameterDefault

public String getParameterDefault(String key)
                           throws UnknownParamException
Description copied from interface: NamedParams
Get the default value of a parameter.

Specified by:
getParameterDefault in interface NamedParams
Parameters:
key - Key to get value for.
Returns:
default value for parameter key.
Throws:
UnknownParamException - Parameter 'key' is unknown.

getParameterDescription

public String getParameterDescription(String key)
                               throws UnknownParamException
Description copied from interface: NamedParams
Get the description of a parameter.

Specified by:
getParameterDescription in interface NamedParams
Parameters:
key - Key to get value for.
Returns:
description of parameter key.
Throws:
UnknownParamException - Parameter 'key' is unknown.

getParameterValue

public String getParameterValue(String key)
                         throws UnknownParamException
Description copied from interface: NamedParams
Get the value of a parameter.

Specified by:
getParameterValue in interface NamedParams
Parameters:
key - Key to get value for.
Returns:
value of parameter key.
Throws:
UnknownParamException - Parameter 'key' is unknown.

listParameters

public String[] listParameters()
Description copied from interface: NamedParams
List the parameters.

Specified by:
listParameters in interface NamedParams
Returns:
Array of parameters.

setParameterValue

public void setParameterValue(String key,
                              String value)
                       throws UnknownParamException
Description copied from interface: NamedParams
Set the value of a parameter.

Specified by:
setParameterValue in interface NamedParams
Parameters:
key - key to set value of
value - value to set it to.
Throws:
UnknownParamException - Parameter 'key' is unknown.

eraseParameters

public void eraseParameters()
Description copied from interface: NamedParams
Clear the values.

Specified by:
eraseParameters in interface NamedParams

clearParameters

public void clearParameters()
Description copied from interface: NamedParams
Clear all parameters

Specified by:
clearParameters in interface NamedParams

activateParameters

public void activateParameters()
Description copied from interface: NamedParams
Activate the currently set parameters

Specified by:
activateParameters in interface NamedParams

copyParametersFrom

public void copyParametersFrom(NamedParams params)
Description copied from interface: NamedParams
Copy params to these named parameters (clearing out first).

Specified by:
copyParametersFrom in interface NamedParams
Parameters:
params - the parameters to copy from.

getParentTrans

public Trans getParentTrans()
Returns:
the parentTrans

setParentTrans

public void setParentTrans(Trans parentTrans)
Parameters:
parentTrans - the parentTrans to set

getMappingStepName

public String getMappingStepName()
Returns:
the name of the mapping step that created this transformation

setMappingStepName

public void setMappingStepName(String mappingStepName)
Parameters:
mappingStepName - the name of the mapping step that created this transformation

setSocketRepository

public void setSocketRepository(SocketRepository socketRepository)

getSocketRepository

public SocketRepository getSocketRepository()

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface LoggingObjectInterface
Returns:
the name

getObjectCopy

public String getObjectCopy()
Specified by:
getObjectCopy in interface LoggingObjectInterface
Returns:
A string identifying a copy in a series of steps...

getFilename

public String getFilename()
Specified by:
getFilename in interface LoggingObjectInterface
Returns:
the filename

getLogChannelId

public String getLogChannelId()
Specified by:
getLogChannelId in interface LoggingObjectInterface
Returns:
the log channel id

getObjectId

public ObjectId getObjectId()
Specified by:
getObjectId in interface LoggingObjectInterface
Returns:
the objectId in a repository

getObjectRevision

public ObjectRevision getObjectRevision()
Specified by:
getObjectRevision in interface LoggingObjectInterface
Returns:
the object revision in a repository

getObjectType

public LoggingObjectType getObjectType()
Specified by:
getObjectType in interface LoggingObjectInterface
Returns:
the objectType

getParent

public LoggingObjectInterface getParent()
Specified by:
getParent in interface LoggingObjectInterface
Returns:
the parent

getRepositoryDirectory

public RepositoryDirectoryInterface getRepositoryDirectory()
Specified by:
getRepositoryDirectory in interface LoggingObjectInterface
Returns:
the repositoryDirectory

getLogLevel

public LogLevel getLogLevel()
Specified by:
getLogLevel in interface LoggingObjectInterface
Returns:
The logging level of the log channel of this logging object.

setLogLevel

public void setLogLevel(LogLevel logLevel)

getLoggingHierarchy

public List<LoggingHierarchy> getLoggingHierarchy()

getActiveSubtransformations

public Map<String,Trans> getActiveSubtransformations()

getContainerObjectId

public String getContainerObjectId()
Specified by:
getContainerObjectId in interface LoggingObjectInterface
Returns:
the carteObjectId

setContainerObjectId

public void setContainerObjectId(String containerObjectId)
Parameters:
containerObjectId - the carteObjectId to set

getRegistrationDate

public Date getRegistrationDate()
Stub

Specified by:
getRegistrationDate in interface LoggingObjectInterface
Returns:
The registration date of this logging object. Null if it's not registered.

setServletPrintWriter

public void setServletPrintWriter(PrintWriter servletPrintWriter)

getServletPrintWriter

public PrintWriter getServletPrintWriter()