org.pentaho.di.trans
Class TransMeta

java.lang.Object
  extended by org.pentaho.di.core.changed.ChangedFlag
      extended by org.pentaho.di.trans.TransMeta
All Implemented Interfaces:
Cloneable, Comparable<TransMeta>, Comparator<TransMeta>, ChangedFlagInterface, EngineMetaInterface, UndoInterface, LoggingObjectInterface, NamedParams, VariableSpace, XMLInterface, RepositoryElementInterface, RepositoryObjectInterface, ResourceExportInterface, HasDatabasesInterface, HasSlaveServersInterface

public class TransMeta
extends ChangedFlag
implements XMLInterface, Comparator<TransMeta>, Comparable<TransMeta>, Cloneable, UndoInterface, HasDatabasesInterface, VariableSpace, EngineMetaInterface, ResourceExportInterface, HasSlaveServersInterface, NamedParams, RepositoryElementInterface, LoggingObjectInterface

This class defines a transformation and offers methods to save and load it from XML or a PDI database repository.

Since:
20-jun-2003
Author:
Matt Casters

Nested Class Summary
static class TransMeta.TransformationType
           
 
Field Summary
static String[] desc_type_undo
           
static RepositoryObjectType REPOSITORY_ELEMENT_TYPE
           
static String STRING_TRANSMETA
           
static int TYPE_UNDO_CHANGE
           
static int TYPE_UNDO_DELETE
           
static int TYPE_UNDO_NEW
           
static int TYPE_UNDO_POSITION
           
static String XML_TAG
           
static String XML_TAG_CLUSTERSCHEMAS
           
static String XML_TAG_NOTEPADS
           
static String XML_TAG_PARAMETERS
           
static String XML_TAG_PARTITIONSCHEMAS
           
static String XML_TAG_SLAVESERVERS
           
 
Constructor Summary
TransMeta()
          Builds a new empty transformation.
TransMeta(InputStream xmlStream, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace, OverwritePrompter prompter)
           
TransMeta(Node transnode, Repository rep)
          Parse a file containing the XML that describes the transformation.
TransMeta(String fname)
          Parse a file containing the XML that describes the transformation.
TransMeta(String fname, boolean setInternalVariables)
          Parse a file containing the XML that describes the transformation.
TransMeta(String fname, Repository rep)
          Parse a file containing the XML that describes the transformation.
TransMeta(String fname, Repository rep, boolean setInternalVariables)
          Parse a file containing the XML that describes the transformation.
TransMeta(String fname, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace)
          Parse a file containing the XML that describes the transformation.
TransMeta(String fname, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace, OverwritePrompter prompter)
          Parse a file containing the XML that describes the transformation.
TransMeta(String filename, String name, String[] arguments)
          Constructs a new transformation specifying the filename, name and arguments.
TransMeta(String fname, VariableSpace parentVariableSpace)
          Parse a file containing the XML that describes the transformation.
TransMeta(VariableSpace parent)
          Builds a new empty transformation with a set of variables to inherit from.
 
Method Summary
 void activateParameters()
          Activate the currently set parameters
 void addDatabase(DatabaseMeta databaseMeta)
          Add a database connection to the transformation.
 void addDatabase(int p, DatabaseMeta ci)
          Add a database connection to the transformation on a certain location.
 void addDependency(int p, TransDependency td)
          Add a new dependency to the transformation on a certain location
 void addDependency(TransDependency td)
          Add a new dependency to the transformation.
 void addFilenameChangedListener(FilenameChangedListener listener)
           
 void addNameChangedListener(NameChangedListener listener)
           
 void addNote(int p, NotePadMeta ni)
          Add a new note to the transformation on a certain location.
 void addNote(NotePadMeta ni)
          Add a new note to the transformation.
 void addOrReplaceClusterSchema(ClusterSchema clusterSchema)
          Add a new cluster schema to the transformation if that didn't exist yet.
 void addOrReplaceDatabase(DatabaseMeta databaseMeta)
          Add a database connection to the transformation if that connection didn't exists yet.
 void addOrReplacePartitionSchema(PartitionSchema partitionSchema)
          Add a new partition schema to the transformation if that didn't exist yet.
 void addOrReplaceSlaveServer(SlaveServer slaveServer)
          Add a new slave server to the transformation if that didn't exist yet.
 void addOrReplaceStep(StepMeta stepMeta)
          Add a new step to the transformation if that step didn't exist yet.
 void addParameterDefinition(String key, String defaultValue, String description)
          Add a parameter definition to this set.
 void addStep(int p, StepMeta stepMeta)
          Add a new step to the transformation
 void addStep(StepMeta stepMeta)
          Add a new step to the transformation
 void addTransHop(int p, TransHopMeta hi)
          Add a new hop to the transformation on a certain location.
 void addTransHop(TransHopMeta hi)
          Add a new hop to the transformation.
 void addUndo(Object[] from, Object[] to, int[] pos, Point[] prev, Point[] curr, int type_of_change, boolean nextAlso)
          Add an undo operation to the undo list
 void analyseImpact(List<DatabaseImpact> impact, ProgressMonitorListener monitor)
          This procedure determines the impact of the different steps in a transformation on databases, tables and field.
 void cancelQueries()
          Cancel queries opened for checking & fieldprediction
 boolean canSave()
           
 void checkRowMixingStatically(StepMeta stepMeta, ProgressMonitorListener monitor)
          Check a step to see if there are no multiple steps to read from.
 void checkSteps(List<CheckResultInterface> remarks, boolean only_selected, ProgressMonitorListener monitor)
          Checks all the steps and fills a List of (CheckResult) remarks.
 void clear()
          Clears the transformation.
 void clearCaches()
           
 void clearChanged()
          Clears the different changed flags of the transformation.
 void clearChangedDatabases()
          Clears the different changed flags of the transformation.
 void clearParameters()
          Clear all parameters
 void clearUndo()
           
 Object clone()
           
 int compare(TransMeta t1, TransMeta t2)
          Compares two transformation on name, filename, repository directory, etc.
 int compareTo(TransMeta o)
           
 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.
 boolean equals(Object obj)
           
 void eraseParameters()
          Clear the values.
 String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository)
          Exports the object to a flat-file system, adding content with filename keys to a set of definitions.
 ClusterSchema findClusterSchema(String name)
          Find a clustering schema using its name
 DatabaseMeta findDatabase(String name)
          Searches the list of databases for a database with a certain name
 ClusterSchema findFirstUsedClusterSchema()
           
 StepMeta findMappingInputStep(String stepname)
           
 StepMeta findMappingOutputStep(String stepname)
           
 StepMeta findNextStep(StepMeta stepMeta, int nr)
          Deprecated. just get the next steps as an array
 List<StepMeta> findNextSteps(StepMeta stepMeta)
          Retrieve a list of succeeding steps for a certain originating step.
 int findNrInfoSteps(StepMeta stepMeta)
          Find the the number of informational steps for a certains step.
 int findNrNextSteps(StepMeta stepMeta)
          Deprecated. just get the next steps as an array
 int findNrPrevSteps(StepMeta stepMeta)
          Find the number of steps that precede the indicated step.
 int findNrPrevSteps(StepMeta stepMeta, boolean info)
          Deprecated. please use method findPreviousSteps
 int findNrPrevSteps(String stepname)
          Deprecated.  
 int findNrPrevSteps(String stepname, boolean info)
          Deprecated.  
 PartitionSchema findPartitionSchema(String name)
          Find a partition schema using its name.
 boolean findPrevious(StepMeta startStep, StepMeta stepToFind)
          Look in the transformation and see if we can find a step in a previous location starting somewhere.
 List<StepMeta> findPreviousSteps(StepMeta stepMeta)
          Get the list of previous steps for a certain reference step.
 List<StepMeta> findPreviousSteps(StepMeta stepMeta, boolean info)
          Get the previous steps on a certain location taking into account the steps being informational or not.
 StepMeta findPrevStep(StepMeta stepMeta, int nr)
          Find the previous step on a certain location.
 StepMeta findPrevStep(StepMeta stepMeta, int nr, boolean info)
          Deprecated. please use method findPreviousSteps
 StepMeta findPrevStep(String stepname, int nr)
          Deprecated.  
 StepMeta findPrevStep(String stepname, int nr, boolean info)
          Deprecated.  
 SlaveServer findSlaveServer(String serverString)
           
 StepMeta findStep(String name)
          Searches the list of steps for a step with a certain name
 StepMeta findStep(String name, StepMeta exclude)
          Searches the list of steps for a step with a certain name while excluding one step.
 TransHopMeta findTransHop(StepMeta from, StepMeta to)
          Search all hops for a hop where a certain step is at the start and another is at the end.
 TransHopMeta findTransHop(StepMeta from, StepMeta to, boolean disabledToo)
          Search all hops for a hop where a certain step is at the start and another is at the end.
 TransHopMeta findTransHop(String name)
          Searches the list of hops for a hop with a certain name
 TransHopMeta findTransHop(TransHopMeta hi)
          Find a certain hop in the transformation..
 TransHopMeta findTransHopFrom(StepMeta fromstep)
          Search all hops for a hop where a certain step is at the start.
 TransHopMeta findTransHopTo(StepMeta tostep)
          Search all hops for a hop where a certain step is at the end.
 String getAlternativeStepname(String stepname)
          Proposes an alternative stepname when the original already exists...
 String[] getArguments()
           
 boolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
          This method returns a boolean for the new variable check boxes.
 ChannelLogTable getChannelLogTable()
           
 String[] getClusterSchemaNames()
           
 List<ClusterSchema> getClusterSchemas()
           
 String getContainerObjectId()
           
 Hashtable<String,Counter> getCounters()
           
 Date getCreatedDate()
           
 String getCreatedUser()
           
 DatabaseMeta getDatabase(int i)
          Retrieves a database connection information a a certain location.
 String[] getDatabaseNames()
           
 List<DatabaseMeta> getDatabases()
          Get an ArrayList of defined DatabaseInfo objects.
 DBCache getDbCache()
           
 String getDefaultExtension()
           
 List<TransDependency> getDependencies()
           
 TransDependency getDependency(int i)
          Retrieves a dependency on a certain location.
 String getDescription()
          Get the description of the transformation
 String getExtendedDescription()
          Get the extended description of the transformation
 int getFeedbackSize()
           
 String getFilename()
          Get the filename (if any) of the transformation
 String getFileType()
           
 String[] getFilterExtensions()
           
 String[] getFilterNames()
           
 StepMeta[] getInfoStep(StepMeta stepMeta)
          Get the informational steps for a certain step.
 LogChannelInterface getLogChannel()
           
 String getLogChannelId()
           
 LogLevel getLogLevel()
           
 List<LogTableInterface> getLogTables()
           
 DatabaseMeta getMaxDateConnection()
           
 double getMaxDateDifference()
           
 String getMaxDateField()
           
 double getMaxDateOffset()
           
 String getMaxDateTable()
           
 Point getMaximum()
          Get the maximum size of the canvas by calculating the maximum location of a step
 int getMaxUndo()
          Get the maximum number of undo operations possible
 Point getMinimum()
          Get the minimum point on the canvas of a transformation
 Date getModifiedDate()
           
 String getModifiedUser()
           
 String getName()
          Get the name of the transformation
 String[] getNextStepNames(StepMeta stepMeta)
          Retrieve an array of succeeding step names for a certain originating step.
 StepMeta[] getNextSteps(StepMeta stepMeta)
          Deprecated. use findNextSteps instead
 NotePadMeta getNote(int i)
          Retrieves notepad information on a certain location.
 NotePadMeta getNote(int x, int y)
          Find the note that is located on a certain point on the canvas.
 int[] getNoteIndexes(List<NotePadMeta> notes)
          Get an array of the locations of an array of notes
 String getObjectCopy()
           
 ObjectId getObjectId()
          Get the database ID in the repository for this object.
 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()
           
 VariableSpace getParentVariableSpace()
          Get the parent of the variable space.
 List<PartitionSchema> getPartitionSchemas()
           
 String[] getPartitionSchemasNames()
           
 String getPathAndName()
           
 PerformanceLogTable getPerformanceLogTable()
           
 RowMetaInterface getPrevInfoFields(StepMeta stepMeta)
          Find the informational fields coming from an informational step into the step specified.
 RowMetaInterface getPrevInfoFields(String stepname)
          Find the informational fields coming from an informational step into the step specified.
 Result getPreviousResult()
           
 RowMetaInterface getPrevStepFields(StepMeta stepMeta)
          Find the fields that are entering a certain step.
 RowMetaInterface getPrevStepFields(StepMeta stepMeta, ProgressMonitorListener monitor)
          Find the fields that are entering a certain step.
 RowMetaInterface getPrevStepFields(String stepname)
          Find the fields that are entering a step with a certain name.
 String[] getPrevStepNames(StepMeta stepMeta)
          Retrieve an array of preceding steps for a certain destination step.
 String[] getPrevStepNames(String stepname)
          Retrieve an array of succeeding step names for a certain originating step name.
 StepMeta[] getPrevSteps(StepMeta stepMeta)
          Retrieve an array of preceding steps for a certain destination step.
 Date getRegistrationDate()
          Stub
 Repository getRepository()
           
 RepositoryDirectoryInterface getRepositoryDirectory()
           
 RepositoryObjectType getRepositoryElementType()
           
 List<ResourceReference> getResourceDependencies()
           
 List<ResultFile> getResultFiles()
           
 List<RowMetaAndData> getResultRows()
           
 Point[] getSelectedNoteLocations()
          Get an array of all the selected step and note locations
 List<NotePadMeta> getSelectedNotes()
          Get an array of all the selected notes
 Point[] getSelectedStepLocations()
          Get an array of all the selected step and note locations
 String[] getSelectedStepNames()
          Get an array of all the selected step names
 List<StepMeta> getSelectedSteps()
           
 SharedObjects getSharedObjects()
           
 String getSharedObjectsFile()
           
 int getSizeRowset()
           
 String[] getSlaveServerNames()
           
 List<SlaveServer> getSlaveServers()
           
 SlaveStepCopyPartitionDistribution getSlaveStepCopyPartitionDistribution()
           
 int getSleepTimeEmpty()
           
 int getSleepTimeFull()
           
 List<SQLStatement> getSQLStatements()
          Builds a list of all the SQL statements that this transformation needs in order to work properly.
 List<SQLStatement> getSQLStatements(ProgressMonitorListener monitor)
          Builds a list of all the SQL statements that this transformation needs in order to work properly.
 String getSQLStatementsString()
          Get the SQL statements, needed to run this transformation, as one String.
 StepMeta getStep(int i)
          Retrieves a step on a certain location.
 StepMeta getStep(int x, int y, int iconsize)
          Find the step that is located on a certain point on the canvas, taking into account the icon size.
 RowMetaInterface getStepFields(StepMeta stepMeta)
          Returns the fields that are emitted by a certain step
 RowMetaInterface getStepFields(StepMeta[] stepMeta)
           
 RowMetaInterface getStepFields(StepMeta stepMeta, ProgressMonitorListener monitor)
          Returns the fields that are emitted by a certain step
 RowMetaInterface getStepFields(StepMeta stepMeta, StepMeta targetStep, ProgressMonitorListener monitor)
          Returns the fields that are emitted by a certain step
 RowMetaInterface getStepFields(String stepname)
          Returns the fields that are emitted by a certain step name
 int[] getStepIndexes(List<StepMeta> steps)
          Get an array of the locations of an array of steps
 StepLogTable getStepLogTable()
           
 String[] getStepNames()
          Get the names of all the steps.
 long getStepPerformanceCapturingDelay()
           
 String getStepPerformanceCapturingSizeLimit()
           
 List<StepMeta> getSteps()
          Get an ArrayList of defined steps.
 StepMeta[] getStepsArray()
          Get all the steps in an array.
 List<StringSearchResult> getStringList(boolean searchSteps, boolean searchDatabases, boolean searchNotes)
           
 List<StringSearchResult> getStringList(boolean searchSteps, boolean searchDatabases, boolean searchNotes, boolean includePasswords)
          Get a list of all the strings used in this transformation.
 RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row)
          Returns the fields that are emitted by a step
 RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row, ProgressMonitorListener monitor)
          Returns the fields that are emitted by a step
 RowMetaInterface getThisStepFields(String stepname, RowMetaInterface row)
          Return the fields that are emitted by a step with a certain name
 TransMeta.TransformationType getTransformationType()
           
 TransHopMeta getTransHop(int i)
          Retrieves a hop on a certain location.
 List<StepMeta> getTransHopSteps(boolean all)
          Gives you an List of all the steps that are at least used in one active hop.
 TransLogTable getTransLogTable()
           
 int getTransstatus()
          Get the status of the transformation
 String getTransversion()
          Get the version of the transformation
 Map<String,String> getUsedArguments(String[] arguments)
          Get the arguments used by this transformation.
 List<StepMeta> getUsedSteps()
           
 List<String> getUsedVariables()
           
 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.
 String getXML()
          Describes the Object implementing this interface as XML
 String getXML(boolean includeSteps, boolean includeDatabase, boolean includeSlaves, boolean includeClusters, boolean includePartitions)
           
 boolean hasChanged()
          Checks whether or not the transformation has changed.
 boolean hasLoop(StepMeta stepMeta)
          See if there are any loops in the transformation, starting at the indicated step.
 boolean hasRepositoryReferences()
           
 boolean haveClusterSchemasChanged()
          Checks whether or not any of the clustering schemas have been changed.
 boolean haveConnectionsChanged()
          Checks whether or not the connections have changed.
 boolean haveHopsChanged()
          Checks whether or not any of the hops have been changed.
 boolean haveNotesChanged()
          Checks whether or not any of the notes have been changed.
 boolean havePartitionSchemasChanged()
          Checks whether or not any of the partitioning schemas have been changed.
 boolean haveStepsChanged()
          Checks whether or not the steps have changed.
 int indexOfDatabase(DatabaseMeta ci)
          Find the location of database
 int indexOfNote(NotePadMeta ni)
          Find the location of a note
 int indexOfStep(StepMeta stepMeta)
          Find the location of step
 int indexOfTransHop(TransHopMeta hi)
          Find the location of hop
 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 isCapturingStepPerformanceSnapShots()
           
 boolean isDatabaseConnectionUsed(DatabaseMeta databaseMeta)
          This method asks all steps in the transformation whether or not the specified database connection is used.
 boolean isFeedbackShown()
           
 boolean isFileReference()
           
static boolean isFileReference(String exactFilename, String exactTransname)
           
 boolean isRepReference()
           
static boolean isRepReference(String exactFilename, String exactTransname)
           
 boolean isSlaveTransformation()
           
 boolean isStepInformative(StepMeta this_step, StepMeta prev_step)
          Determines whether or not a certain step is informative.
 boolean isStepUsedInTransHops(StepMeta stepMeta)
          Determines if a step has been used in a hop or not.
 boolean isUsingAClusterSchema()
           
 boolean isUsingClusterSchema(ClusterSchema clusterSchema)
           
 boolean isUsingPartitionSchema(PartitionSchema partitionSchema)
           
 boolean isUsingSlaveServer(SlaveServer slaveServer)
           
 boolean isUsingThreadPriorityManagment()
           
 boolean isUsingUniqueConnections()
           
 String[] listParameters()
          List the parameters.
 String[] listVariables()
          List the variables (not the values) that are currently in the variable space.
 void loadXML(Node transnode, Repository rep, boolean setInternalVariables)
          Parse a file containing the XML that describes the transformation.
 void loadXML(Node transnode, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace)
          Parse a file containing the XML that describes the transformation.
 void loadXML(Node transnode, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace, OverwritePrompter prompter)
          Parse a file containing the XML that describes the transformation.
 void lookupRepositoryReferences(Repository repository)
          Look up the references after import
 void lowerNote(int p)
           
 void nameFromFilename()
          Builds a name - if no name is set, yet - from the filename
 TransAction nextUndo()
          Get the next undo transaction on the list.
 int nrDatabases()
          Count the nr of databases in the transformation.
 int nrDependencies()
          Count the nr of dependencies in the transformation.
 int nrNotes()
          Count the nr of notes in the transformation.
 int nrSteps()
          Count the nr of steps in the transformation.
 int nrTransHops()
          Count the nr of hops in the transformation.
 boolean partOfTransHop(StepMeta stepMeta)
          Determines whether or not a certain step is part of a hop.
 TransAction previousUndo()
          Get the previous undo operation and change the undo pointer
 void raiseNote(int p)
           
 SharedObjects readSharedObjects()
           
 Object realClone(boolean doClear)
           
 void removeAllDependencies()
          Clears all the dependencies from the transformation.
 void removeDatabase(int i)
          Removes a database from the transformation on a certain location.
 void removeDependency(int i)
          Removes a dependency from the transformation on a certain location.
 void removeFilenameChangedListener(FilenameChangedListener listener)
           
 void removeNameChangedListener(NameChangedListener listener)
           
 void removeNote(int i)
          Removes a note from the transformation on a certain location.
 void removeStep(int i)
          Removes a step from the transformation on a certain location.
 void removeTransHop(int i)
          Removes a hop from the transformation on a certain location.
 void saveSharedObjects()
           
 void selectAll()
          Mark all steps in the transformation as selected.
 void setArguments(String[] arguments)
           
 void setCapturingStepPerformanceSnapShots(boolean capturingStepPerformanceSnapShots)
           
 void setCarteObjectId(String containerObjectId)
           
 void setChanged(boolean ch)
          Sets the changed parameter of the transformation.
 void setChannelLogTable(ChannelLogTable channelLogTable)
           
 void setClusterSchemas(List<ClusterSchema> clusterSchemas)
           
 void setCounters(Hashtable<String,Counter> counters)
           
 void setCreatedDate(Date createdDate)
           
 void setCreatedUser(String createdUser)
           
 void setDatabases(List<DatabaseMeta> databases)
           
 void setDbCache(DBCache dbCache)
           
 void setDependencies(List<TransDependency> dependencies)
           
 void setDescription(String n)
          Set the description of the transformation.
 void setExtendedDescription(String n)
          Set the extended description of the transformation.
 void setFeedbackShown(boolean feedbackShown)
           
 void setFeedbackSize(int feedbackSize)
           
 void setFilename(String fname)
          Set the filename of the transformation
 void setInternalKettleVariables()
           
 void setInternalKettleVariables(VariableSpace var)
           
 void setLogLevel(LogLevel logLevel)
           
 void setMaxDateConnection(DatabaseMeta maxDateConnection)
           
 void setMaxDateDifference(double maxDateDifference)
           
 void setMaxDateField(String maxDateField)
           
 void setMaxDateOffset(double maxDateOffset)
           
 void setMaxDateTable(String maxDateTable)
           
 void setMaxUndo(int mu)
          Sets the maximum number of undo operations that are allowed.
 void setModifiedDate(Date modifiedDate)
           
 void setModifiedUser(String modifiedUser)
           
 void setName(String newName)
          Set the name of the transformation.
 void setObjectId(ObjectId id)
          Set the database ID for this object in the repository.
 void setObjectRevision(ObjectRevision objectRevision)
           
 void setParameterValue(String key, String value)
          Set the value of a parameter.
 void setParentVariableSpace(VariableSpace parent)
          Set the parent variable space
 void setPartitionSchemas(List<PartitionSchema> partitionSchemas)
           
 void setPerformanceLogTable(PerformanceLogTable performanceLogTable)
           
 void setPreviousResult(Result previousResult)
           
 void setRepository(Repository repository)
           
 void setRepositoryDirectory(RepositoryDirectoryInterface directory)
           
 void setResultFiles(List<ResultFile> resultFiles)
           
 void setResultRows(List<RowMetaAndData> resultRows)
           
 void setSharedObjects(SharedObjects sharedObjects)
           
 void setSharedObjectsFile(String sharedObjectsFile)
           
 void setSizeRowset(int sizeRowset)
           
 void setSlaveServers(List<SlaveServer> slaveServers)
           
 void setSlaveStepCopyPartitionDistribution(SlaveStepCopyPartitionDistribution slaveStepCopyPartitionDistribution)
           
 void setSlaveTransformation(boolean slaveTransformation)
           
 void setSleepTimeEmpty(int sleepTimeEmpty)
           
 void setSleepTimeFull(int sleepTimeFull)
           
 void setStep(int i, StepMeta stepMeta)
          Changes the content of a step on a certain position
 void setStepLogTable(StepLogTable stepLogTable)
           
 void setStepPerformanceCapturingDelay(long stepPerformanceCapturingDelay)
           
 void setStepPerformanceCapturingSizeLimit(String stepPerformanceCapturingSizeLimit)
           
 void setTransformationType(TransMeta.TransformationType transformationType)
           
 void setTransHop(int i, TransHopMeta hi)
          Changes the content of a hop on a certain position
 void setTransLogTable(TransLogTable transLogTable)
           
 void setTransstatus(int n)
          Set the status of the transformation.
 void setTransversion(String n)
          Set the version of the transformation.
 void setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
           
 void setUsingUniqueConnections(boolean usingUniqueConnections)
           
 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 sortHops()
           
 void sortHopsNatural()
          Sort the hops in a natural way: from beginning to end
 void sortSteps()
          Put the steps in alphabetical order.
 Map<StepMeta,Map<StepMeta,Boolean>> sortStepsNatural()
          Put the steps in a more natural order: from start to finish.
 String toString()
           
 void unselectAll()
          Clear the selection of all steps.
 TransAction viewNextUndo()
          Get the next undo transaction on the list.
 TransAction viewPreviousUndo()
          View previous undo, don't change undo position
 TransAction viewThisUndo()
          View current undo, don't change undo position
 void writeXML(String filename)
          Utility method to write the XML of this transformation to a file, mostly for testing purposes.
 
Methods inherited from class org.pentaho.di.core.changed.ChangedFlag
addObserver, deleteObserver, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_TAG

public static final String XML_TAG
See Also:
Constant Field Values

STRING_TRANSMETA

public static final String STRING_TRANSMETA
See Also:
Constant Field Values

REPOSITORY_ELEMENT_TYPE

public static final RepositoryObjectType REPOSITORY_ELEMENT_TYPE

TYPE_UNDO_CHANGE

public static final int TYPE_UNDO_CHANGE
See Also:
Constant Field Values

TYPE_UNDO_NEW

public static final int TYPE_UNDO_NEW
See Also:
Constant Field Values

TYPE_UNDO_DELETE

public static final int TYPE_UNDO_DELETE
See Also:
Constant Field Values

TYPE_UNDO_POSITION

public static final int TYPE_UNDO_POSITION
See Also:
Constant Field Values

desc_type_undo

public static final String[] desc_type_undo

XML_TAG_NOTEPADS

public static final String XML_TAG_NOTEPADS
See Also:
Constant Field Values

XML_TAG_PARAMETERS

public static final String XML_TAG_PARAMETERS
See Also:
Constant Field Values

XML_TAG_PARTITIONSCHEMAS

public static final String XML_TAG_PARTITIONSCHEMAS
See Also:
Constant Field Values

XML_TAG_SLAVESERVERS

public static final String XML_TAG_SLAVESERVERS
See Also:
Constant Field Values

XML_TAG_CLUSTERSCHEMAS

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

TransMeta

public TransMeta()
Builds a new empty transformation.


TransMeta

public TransMeta(VariableSpace parent)
Builds a new empty transformation with a set of variables to inherit from.

Parameters:
parent - the variable space to inherit from

TransMeta

public TransMeta(String filename,
                 String name,
                 String[] arguments)
Constructs a new transformation specifying the filename, name and arguments.

Parameters:
filename - The filename of the transformation
name - The name of the transformation
arguments - The arguments as Strings

TransMeta

public TransMeta(String fname)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation. No default connections are loaded since no repository is available at this time. Since the filename is set, internal variables are being set that relate to this.

Parameters:
fname - The filename
Throws:
KettleXMLException

TransMeta

public TransMeta(String fname,
                 VariableSpace parentVariableSpace)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation. No default connections are loaded since no repository is available at this time. Since the filename is set, internal variables are being set that relate to this.

Parameters:
fname - The filename
parentVariableSpace -
Throws:
KettleXMLException

TransMeta

public TransMeta(String fname,
                 boolean setInternalVariables)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation. No default connections are loaded since no repository is available at this time.

Parameters:
fname - The filename
setInternalVariables - true if you want to set the internal variables based on this transformation information
Throws:
KettleXMLException

TransMeta

public TransMeta(String fname,
                 Repository rep)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation.

Parameters:
fname - The filename
rep - The repository to load the default set of connections from, null if no repository is available
Throws:
KettleXMLException

TransMeta

public TransMeta(String fname,
                 Repository rep,
                 boolean setInternalVariables)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation.

Parameters:
fname - The filename
rep - The repository to load the default set of connections from, null if no repository is available
setInternalVariables - true if you want to set the internal variables based on this transformation information
Throws:
KettleXMLException

TransMeta

public TransMeta(String fname,
                 Repository rep,
                 boolean setInternalVariables,
                 VariableSpace parentVariableSpace)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation.

Parameters:
fname - The filename
rep - The repository to load the default set of connections from, null if no repository is available
setInternalVariables - true if you want to set the internal variables based on this transformation information
parentVariableSpace - the parent variable space to use during TransMeta construction
Throws:
KettleXMLException

TransMeta

public TransMeta(String fname,
                 Repository rep,
                 boolean setInternalVariables,
                 VariableSpace parentVariableSpace,
                 OverwritePrompter prompter)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation.

Parameters:
fname - The filename
rep - The repository to load the default set of connections from, null if no repository is available
setInternalVariables - true if you want to set the internal variables based on this transformation information
parentVariableSpace - the parent variable space to use during TransMeta construction
prompter - the changed/replace listener or null if there is none
Throws:
KettleXMLException

TransMeta

public TransMeta(InputStream xmlStream,
                 Repository rep,
                 boolean setInternalVariables,
                 VariableSpace parentVariableSpace,
                 OverwritePrompter prompter)
          throws KettleXMLException
Throws:
KettleXMLException

TransMeta

public TransMeta(Node transnode,
                 Repository rep)
          throws KettleXMLException
Parse a file containing the XML that describes the transformation. Specify a repository to load default list of database connections from and to reference in mappings etc.

Parameters:
transnode - The XML node to load from
rep - the repository to reference.
Throws:
KettleXMLException
Method Detail

compare

public int compare(TransMeta t1,
                   TransMeta t2)
Compares two transformation on name, filename, repository directory, etc.

Specified by:
compare in interface Comparator<TransMeta>

compareTo

public int compareTo(TransMeta o)
Specified by:
compareTo in interface Comparable<TransMeta>

equals

public boolean equals(Object obj)
Specified by:
equals in interface Comparator<TransMeta>
Overrides:
equals in class Object

clone

public Object clone()
Overrides:
clone in class Object

realClone

public Object realClone(boolean doClear)

getObjectId

public ObjectId getObjectId()
Get the database ID in the repository for this object.

Specified by:
getObjectId in interface LoggingObjectInterface
Specified by:
getObjectId in interface RepositoryElementInterface
Specified by:
getObjectId in interface RepositoryObjectInterface
Returns:
the database ID in the repository for this object.

setObjectId

public void setObjectId(ObjectId id)
Set the database ID for this object in the repository.

Specified by:
setObjectId in interface EngineMetaInterface
Specified by:
setObjectId in interface RepositoryElementInterface
Parameters:
id - the database ID for this object in the repository.

clear

public void clear()
Clears the transformation.


clearUndo

public void clearUndo()

getDatabases

public List<DatabaseMeta> getDatabases()
Description copied from interface: HasDatabasesInterface
Get an ArrayList of defined DatabaseInfo objects.

Specified by:
getDatabases in interface HasDatabasesInterface
Returns:
an ArrayList of defined DatabaseInfo objects.

setDatabases

public void setDatabases(List<DatabaseMeta> databases)
Specified by:
setDatabases in interface HasDatabasesInterface
Parameters:
databases - The databases to set.

addDatabase

public void addDatabase(DatabaseMeta databaseMeta)
Description copied from interface: HasDatabasesInterface
Add a database connection to the transformation.

Specified by:
addDatabase in interface HasDatabasesInterface
Parameters:
databaseMeta - The database connection information.

addOrReplaceDatabase

public void addOrReplaceDatabase(DatabaseMeta databaseMeta)
Description copied from interface: HasDatabasesInterface
Add a database connection to the transformation if that connection didn't exists yet. Otherwise, replace the connection in the transformation

Specified by:
addOrReplaceDatabase in interface HasDatabasesInterface
Parameters:
databaseMeta - The database connection information.

addStep

public void addStep(StepMeta stepMeta)
Add a new step to the transformation

Parameters:
stepMeta - The step to be added.

addOrReplaceStep

public void addOrReplaceStep(StepMeta stepMeta)
Add a new step to the transformation if that step didn't exist yet. Otherwise, replace the step.

Parameters:
stepMeta - The step to be added.

addTransHop

public void addTransHop(TransHopMeta hi)
Add a new hop to the transformation.

Parameters:
hi - The hop to be added.

addNote

public void addNote(NotePadMeta ni)
Add a new note to the transformation.

Parameters:
ni - The note to be added.

addDependency

public void addDependency(TransDependency td)
Add a new dependency to the transformation.

Parameters:
td - The transformation dependency to be added.

addDatabase

public void addDatabase(int p,
                        DatabaseMeta ci)
Description copied from interface: HasDatabasesInterface
Add a database connection to the transformation on a certain location.

Specified by:
addDatabase in interface HasDatabasesInterface
Parameters:
p - The location
ci - The database connection information.

addStep

public void addStep(int p,
                    StepMeta stepMeta)
Add a new step to the transformation

Parameters:
p - The location
stepMeta - The step to be added.

addTransHop

public void addTransHop(int p,
                        TransHopMeta hi)
Add a new hop to the transformation on a certain location.

Parameters:
p - the location
hi - The hop to be added.

addNote

public void addNote(int p,
                    NotePadMeta ni)
Add a new note to the transformation on a certain location.

Parameters:
p - The location
ni - The note to be added.

addDependency

public void addDependency(int p,
                          TransDependency td)
Add a new dependency to the transformation on a certain location

Parameters:
p - The location.
td - The transformation dependency to be added.

getDatabase

public DatabaseMeta getDatabase(int i)
Description copied from interface: HasDatabasesInterface
Retrieves a database connection information a a certain location.

Specified by:
getDatabase in interface HasDatabasesInterface
Parameters:
i - The database number.
Returns:
The database connection information.

getSteps

public List<StepMeta> getSteps()
Get an ArrayList of defined steps.

Returns:
an ArrayList of defined steps.

getStep

public StepMeta getStep(int i)
Retrieves a step on a certain location.

Parameters:
i - The location.
Returns:
The step information.

getTransHop

public TransHopMeta getTransHop(int i)
Retrieves a hop on a certain location.

Parameters:
i - The location.
Returns:
The hop information.

getNote

public NotePadMeta getNote(int i)
Retrieves notepad information on a certain location.

Parameters:
i - The location
Returns:
The notepad information.

getDependency

public TransDependency getDependency(int i)
Retrieves a dependency on a certain location.

Parameters:
i - The location.
Returns:
The dependency.

removeDatabase

public void removeDatabase(int i)
Description copied from interface: HasDatabasesInterface
Removes a database from the transformation on a certain location.

Specified by:
removeDatabase in interface HasDatabasesInterface
Parameters:
i - The location

removeStep

public void removeStep(int i)
Removes a step from the transformation on a certain location.

Parameters:
i - The location

removeTransHop

public void removeTransHop(int i)
Removes a hop from the transformation on a certain location.

Parameters:
i - The location

removeNote

public void removeNote(int i)
Removes a note from the transformation on a certain location.

Parameters:
i - The location

raiseNote

public void raiseNote(int p)

lowerNote

public void lowerNote(int p)

removeDependency

public void removeDependency(int i)
Removes a dependency from the transformation on a certain location.

Parameters:
i - The location

removeAllDependencies

public void removeAllDependencies()
Clears all the dependencies from the transformation.


nrDatabases

public int nrDatabases()
Description copied from interface: HasDatabasesInterface
Count the nr of databases in the transformation.

Specified by:
nrDatabases in interface HasDatabasesInterface
Returns:
The nr of databases

nrSteps

public int nrSteps()
Count the nr of steps in the transformation.

Returns:
The nr of steps

nrTransHops

public int nrTransHops()
Count the nr of hops in the transformation.

Returns:
The nr of hops

nrNotes

public int nrNotes()
Count the nr of notes in the transformation.

Returns:
The nr of notes

nrDependencies

public int nrDependencies()
Count the nr of dependencies in the transformation.

Returns:
The nr of dependencies

setStep

public void setStep(int i,
                    StepMeta stepMeta)
Changes the content of a step on a certain position

Parameters:
i - The position
stepMeta - The Step

setTransHop

public void setTransHop(int i,
                        TransHopMeta hi)
Changes the content of a hop on a certain position

Parameters:
i - The position
hi - The hop

getUsedSteps

public List<StepMeta> getUsedSteps()
Returns:
a list with all the used steps

findDatabase

public DatabaseMeta findDatabase(String name)
Description copied from interface: HasDatabasesInterface
Searches the list of databases for a database with a certain name

Specified by:
findDatabase in interface HasDatabasesInterface
Parameters:
name - The name of the database connection
Returns:
The database connection information or null if nothing was found.

findStep

public StepMeta findStep(String name)
Searches the list of steps for a step with a certain name

Parameters:
name - The name of the step to look for
Returns:
The step information or null if no nothing was found.

findStep

public StepMeta findStep(String name,
                         StepMeta exclude)
Searches the list of steps for a step with a certain name while excluding one step.

Parameters:
name - The name of the step to look for
exclude - The step information to exclude.
Returns:
The step information or null if nothing was found.

findTransHop

public TransHopMeta findTransHop(String name)
Searches the list of hops for a hop with a certain name

Parameters:
name - The name of the hop to look for
Returns:
The hop information or null if nothing was found.

findTransHopFrom

public TransHopMeta findTransHopFrom(StepMeta fromstep)
Search all hops for a hop where a certain step is at the start.

Parameters:
fromstep - The step at the start of the hop.
Returns:
The hop or null if no hop was found.

findTransHop

public TransHopMeta findTransHop(TransHopMeta hi)
Find a certain hop in the transformation..

Parameters:
hi - The hop information to look for.
Returns:
The hop or null if no hop was found.

findTransHop

public TransHopMeta findTransHop(StepMeta from,
                                 StepMeta to)
Search all hops for a hop where a certain step is at the start and another is at the end.

Parameters:
from - The step at the start of the hop.
to - The step at the end of the hop.
Returns:
The hop or null if no hop was found.

findTransHop

public TransHopMeta findTransHop(StepMeta from,
                                 StepMeta to,
                                 boolean disabledToo)
Search all hops for a hop where a certain step is at the start and another is at the end.

Parameters:
from - The step at the start of the hop.
to - The step at the end of the hop.
Returns:
The hop or null if no hop was found.

findTransHopTo

public TransHopMeta findTransHopTo(StepMeta tostep)
Search all hops for a hop where a certain step is at the end.

Parameters:
tostep - The step at the end of the hop.
Returns:
The hop or null if no hop was found.

isStepInformative

public boolean isStepInformative(StepMeta this_step,
                                 StepMeta prev_step)
Determines whether or not a certain step is informative. This means that the previous step is sending information to this step, but only informative. This means that this step is using the information to process the actual stream of data. We use this in StreamLookup, TableInput and other types of steps.

Parameters:
this_step - The step that is receiving information.
prev_step - The step that is sending information
Returns:
true if prev_step if informative for this_step.

findNrPrevSteps

public int findNrPrevSteps(String stepname)
Deprecated. 

Counts the number of previous steps for a step name.

Parameters:
stepname - The name of the step to start from
Returns:
The number of preceding steps.

findNrPrevSteps

public int findNrPrevSteps(String stepname,
                           boolean info)
Deprecated. 

Counts the number of previous steps for a step name taking into account whether or not they are informational.

Parameters:
stepname - The name of the step to start from
Returns:
The number of preceding steps.

findNrPrevSteps

public int findNrPrevSteps(StepMeta stepMeta)
Find the number of steps that precede the indicated step.

Parameters:
stepMeta - The source step
Returns:
The number of preceding steps found.

findPrevStep

public StepMeta findPrevStep(String stepname,
                             int nr)
Deprecated. 

Find the previous step on a certain location.

Parameters:
stepname - The source step name
nr - the location
Returns:
The preceding step found.

findPrevStep

public StepMeta findPrevStep(String stepname,
                             int nr,
                             boolean info)
Deprecated. 

Find the previous step on a certain location taking into account the steps being informational or not.

Parameters:
stepname - The name of the step
nr - The location
info - true if we only want the informational steps.
Returns:
The step information

findPrevStep

public StepMeta findPrevStep(StepMeta stepMeta,
                             int nr)
Find the previous step on a certain location.

Parameters:
stepMeta - The source step information
nr - the location
Returns:
The preceding step found.

findNrPrevSteps

public int findNrPrevSteps(StepMeta stepMeta,
                           boolean info)
Deprecated. please use method findPreviousSteps

Count the number of previous steps on a certain location taking into account the steps being informational or not.

Parameters:
stepMeta - The name of the step
info - true if we only want the informational steps.
Returns:
The number of preceding steps

findPrevStep

public StepMeta findPrevStep(StepMeta stepMeta,
                             int nr,
                             boolean info)
Deprecated. please use method findPreviousSteps

Find the previous step on a certain location taking into account the steps being informational or not.

Parameters:
stepMeta - The step
nr - The location
info - true if we only want the informational steps.
Returns:
The preceding step information

findPreviousSteps

public List<StepMeta> findPreviousSteps(StepMeta stepMeta)
Get the list of previous steps for a certain reference step. This includes the info steps.

Parameters:
stepMeta - The reference step
Returns:
The list of the preceding steps, including the info steps.

findPreviousSteps

public List<StepMeta> findPreviousSteps(StepMeta stepMeta,
                                        boolean info)
Get the previous steps on a certain location taking into account the steps being informational or not.

Parameters:
stepMeta - The name of the step
info - true if we only want the informational steps.
Returns:
The list of the preceding steps

getInfoStep

public StepMeta[] getInfoStep(StepMeta stepMeta)
Get the informational steps for a certain step. An informational step is a step that provides information for lookups etc.

Parameters:
stepMeta - The name of the step
Returns:
The informational steps found

findNrInfoSteps

public int findNrInfoSteps(StepMeta stepMeta)
Find the the number of informational steps for a certains step.

Parameters:
stepMeta - The step
Returns:
The number of informational steps found.

getPrevInfoFields

public RowMetaInterface getPrevInfoFields(String stepname)
                                   throws KettleStepException
Find the informational fields coming from an informational step into the step specified.

Parameters:
stepname - The name of the step
Returns:
A row containing fields with origin.
Throws:
KettleStepException

getPrevInfoFields

public RowMetaInterface getPrevInfoFields(StepMeta stepMeta)
                                   throws KettleStepException
Find the informational fields coming from an informational step into the step specified.

Parameters:
stepMeta - The receiving step
Returns:
A row containing fields with origin.
Throws:
KettleStepException

findNrNextSteps

public int findNrNextSteps(StepMeta stepMeta)
Deprecated. just get the next steps as an array

Find the number of succeeding steps for a certain originating step.

Parameters:
stepMeta - The originating step
Returns:
The number of succeeding steps.

findNextStep

public StepMeta findNextStep(StepMeta stepMeta,
                             int nr)
Deprecated. just get the next steps as an array

Find the succeeding step at a location for an originating step.

Parameters:
stepMeta - The originating step
nr - The location
Returns:
The step found.

getPrevSteps

public StepMeta[] getPrevSteps(StepMeta stepMeta)
Retrieve an array of preceding steps for a certain destination step. This includes the info steps.

Parameters:
stepMeta - The destination step
Returns:
An array containing the preceding steps.

getPrevStepNames

public String[] getPrevStepNames(String stepname)
Retrieve an array of succeeding step names for a certain originating step name.

Parameters:
stepname - The originating step name
Returns:
An array of succeeding step names

getPrevStepNames

public String[] getPrevStepNames(StepMeta stepMeta)
Retrieve an array of preceding steps for a certain destination step.

Parameters:
stepMeta - The destination step
Returns:
an array of preceding step names.

getNextSteps

public StepMeta[] getNextSteps(StepMeta stepMeta)
Deprecated. use findNextSteps instead

Retrieve an array of succeeding steps for a certain originating step.

Parameters:
stepMeta - The originating step
Returns:
an array of succeeding steps.

findNextSteps

public List<StepMeta> findNextSteps(StepMeta stepMeta)
Retrieve a list of succeeding steps for a certain originating step.

Parameters:
stepMeta - The originating step
Returns:
an array of succeeding steps.

getNextStepNames

public String[] getNextStepNames(StepMeta stepMeta)
Retrieve an array of succeeding step names for a certain originating step.

Parameters:
stepMeta - The originating step
Returns:
an array of succeeding step names.

getStep

public StepMeta getStep(int x,
                        int y,
                        int iconsize)
Find the step that is located on a certain point on the canvas, taking into account the icon size.

Parameters:
x - the x-coordinate of the point queried
y - the y-coordinate of the point queried
Returns:
The step information if a step is located at the point. Otherwise, if no step was found: null.

getNote

public NotePadMeta getNote(int x,
                           int y)
Find the note that is located on a certain point on the canvas.

Parameters:
x - the x-coordinate of the point queried
y - the y-coordinate of the point queried
Returns:
The note information if a note is located at the point. Otherwise, if nothing was found: null.

partOfTransHop

public boolean partOfTransHop(StepMeta stepMeta)
Determines whether or not a certain step is part of a hop.

Parameters:
stepMeta - The step queried
Returns:
true if the step is part of a hop.

getStepFields

public RowMetaInterface getStepFields(String stepname)
                               throws KettleStepException
Returns the fields that are emitted by a certain step name

Parameters:
stepname - The stepname of the step to be queried.
Returns:
A row containing the fields emitted.
Throws:
KettleStepException

getStepFields

public RowMetaInterface getStepFields(StepMeta stepMeta)
                               throws KettleStepException
Returns the fields that are emitted by a certain step

Parameters:
stepMeta - The step to be queried.
Returns:
A row containing the fields emitted.
Throws:
KettleStepException

getStepFields

public RowMetaInterface getStepFields(StepMeta[] stepMeta)
                               throws KettleStepException
Throws:
KettleStepException

getStepFields

public RowMetaInterface getStepFields(StepMeta stepMeta,
                                      ProgressMonitorListener monitor)
                               throws KettleStepException
Returns the fields that are emitted by a certain step

Parameters:
stepMeta - The step to be queried.
monitor - The progress monitor for progress dialog. (null if not used!)
Returns:
A row containing the fields emitted.
Throws:
KettleStepException

getStepFields

public RowMetaInterface getStepFields(StepMeta stepMeta,
                                      StepMeta targetStep,
                                      ProgressMonitorListener monitor)
                               throws KettleStepException
Returns the fields that are emitted by a certain step

Parameters:
stepMeta - The step to be queried.
targetStep - the target step
monitor - The progress monitor for progress dialog. (null if not used!)
Returns:
A row containing the fields emitted.
Throws:
KettleStepException

getPrevStepFields

public RowMetaInterface getPrevStepFields(String stepname)
                                   throws KettleStepException
Find the fields that are entering a step with a certain name.

Parameters:
stepname - The name of the step queried
Returns:
A row containing the fields (w/ origin) entering the step
Throws:
KettleStepException

getPrevStepFields

public RowMetaInterface getPrevStepFields(StepMeta stepMeta)
                                   throws KettleStepException
Find the fields that are entering a certain step.

Parameters:
stepMeta - The step queried
Returns:
A row containing the fields (w/ origin) entering the step
Throws:
KettleStepException

getPrevStepFields

public RowMetaInterface getPrevStepFields(StepMeta stepMeta,
                                          ProgressMonitorListener monitor)
                                   throws KettleStepException
Find the fields that are entering a certain step.

Parameters:
stepMeta - The step queried
monitor - The progress monitor for progress dialog. (null if not used!)
Returns:
A row containing the fields (w/ origin) entering the step
Throws:
KettleStepException

getThisStepFields

public RowMetaInterface getThisStepFields(String stepname,
                                          RowMetaInterface row)
                                   throws KettleStepException
Return the fields that are emitted by a step with a certain name

Parameters:
stepname - The name of the step that's being queried.
row - A row containing the input fields or an empty row if no input is required.
Returns:
A Row containing the output fields.
Throws:
KettleStepException

getThisStepFields

public RowMetaInterface getThisStepFields(StepMeta stepMeta,
                                          StepMeta nextStep,
                                          RowMetaInterface row)
                                   throws KettleStepException
Returns the fields that are emitted by a step

Parameters:
stepMeta - : The StepMeta object that's being queried
nextStep - : if non-null this is the next step that's call back to ask what's being sent
row - : A row containing the input fields or an empty row if no input is required.
Returns:
A Row containing the output fields.
Throws:
KettleStepException

getThisStepFields

public RowMetaInterface getThisStepFields(StepMeta stepMeta,
                                          StepMeta nextStep,
                                          RowMetaInterface row,
                                          ProgressMonitorListener monitor)
                                   throws KettleStepException
Returns the fields that are emitted by a step

Parameters:
stepMeta - : The StepMeta object that's being queried
nextStep - : if non-null this is the next step that's call back to ask what's being sent
row - : A row containing the input fields or an empty row if no input is required.
Returns:
A Row containing the output fields.
Throws:
KettleStepException

isUsingPartitionSchema

public boolean isUsingPartitionSchema(PartitionSchema partitionSchema)

isUsingAClusterSchema

public boolean isUsingAClusterSchema()
Returns:
true if a cluster schema is used on one or more steps in this transformation

isUsingClusterSchema

public boolean isUsingClusterSchema(ClusterSchema clusterSchema)
Parameters:
clusterSchema - the cluster schema to check
Returns:
true if the specified cluster schema is used on one or more steps in this transformation

isUsingSlaveServer

public boolean isUsingSlaveServer(SlaveServer slaveServer)
                           throws KettleException
Throws:
KettleException

isRepReference

public boolean isRepReference()

isFileReference

public boolean isFileReference()

isRepReference

public static boolean isRepReference(String exactFilename,
                                     String exactTransname)

isFileReference

public static boolean isFileReference(String exactFilename,
                                      String exactTransname)

indexOfTransHop

public int indexOfTransHop(TransHopMeta hi)
Find the location of hop

Parameters:
hi - The hop queried
Returns:
The location of the hop, -1 if nothing was found.

indexOfStep

public int indexOfStep(StepMeta stepMeta)
Find the location of step

Parameters:
stepMeta - The step queried
Returns:
The location of the step, -1 if nothing was found.

indexOfDatabase

public int indexOfDatabase(DatabaseMeta ci)
Description copied from interface: HasDatabasesInterface
Find the location of database

Specified by:
indexOfDatabase in interface HasDatabasesInterface
Parameters:
ci - The database queried
Returns:
The location of the database, -1 if nothing was found.

indexOfNote

public int indexOfNote(NotePadMeta ni)
Find the location of a note

Parameters:
ni - The note queried
Returns:
The location of the note, -1 if nothing was found.

getFileType

public String getFileType()
Specified by:
getFileType in interface EngineMetaInterface

getFilterNames

public String[] getFilterNames()
Specified by:
getFilterNames in interface EngineMetaInterface

getFilterExtensions

public String[] getFilterExtensions()
Specified by:
getFilterExtensions in interface EngineMetaInterface

getDefaultExtension

public String getDefaultExtension()
Specified by:
getDefaultExtension in interface EngineMetaInterface

getXML

public String getXML()
              throws KettleException
Description copied from interface: XMLInterface
Describes the Object implementing this interface as XML

Specified by:
getXML in interface EngineMetaInterface
Specified by:
getXML in interface XMLInterface
Returns:
the XML string for this object
Throws:
KettleException - in case there is an encoding problem.

getXML

public String getXML(boolean includeSteps,
                     boolean includeDatabase,
                     boolean includeSlaves,
                     boolean includeClusters,
                     boolean includePartitions)
              throws KettleException
Throws:
KettleException

loadXML

public void loadXML(Node transnode,
                    Repository rep,
                    boolean setInternalVariables)
             throws KettleXMLException
Parse a file containing the XML that describes the transformation.

Parameters:
transnode - The XML node to load from
rep - The repository to load the default list of database connections from (null if no repository is available)
setInternalVariables - true if you want to set the internal variables based on this transformation information
Throws:
KettleXMLException

loadXML

public void loadXML(Node transnode,
                    Repository rep,
                    boolean setInternalVariables,
                    VariableSpace parentVariableSpace)
             throws KettleXMLException
Parse a file containing the XML that describes the transformation.

Parameters:
transnode - The XML node to load from
rep - The repository to load the default list of database connections from (null if no repository is available)
setInternalVariables - true if you want to set the internal variables based on this transformation information
parentVariableSpace - the parent variable space to use during TransMeta construction
Throws:
KettleXMLException

loadXML

public void loadXML(Node transnode,
                    Repository rep,
                    boolean setInternalVariables,
                    VariableSpace parentVariableSpace,
                    OverwritePrompter prompter)
             throws KettleXMLException
Parse a file containing the XML that describes the transformation.

Parameters:
transnode - The XML node to load from
rep - The repository to load the default list of database connections from (null if no repository is available)
setInternalVariables - true if you want to set the internal variables based on this transformation information
parentVariableSpace - the parent variable space to use during TransMeta construction
prompter - the changed/replace listener or null if there is none
Throws:
KettleXMLException

readSharedObjects

public SharedObjects readSharedObjects()
                                throws KettleException
Throws:
KettleException

getTransHopSteps

public List<StepMeta> getTransHopSteps(boolean all)
Gives you an List of all the steps that are at least used in one active hop. These steps will be used to execute the transformation. The others will not be executed. Update 3.0 : we also add those steps that are not linked to another hop, but have at least one remote input or output step defined.

Parameters:
all - Set to true if you want to get ALL the steps from the transformation.
Returns:
A ArrayList of steps

getName

public String getName()
Get the name of the transformation

Specified by:
getName in interface EngineMetaInterface
Specified by:
getName in interface RepositoryElementInterface
Specified by:
getName in interface RepositoryObjectInterface
Returns:
The name of the transformation

setName

public void setName(String newName)
Set the name of the transformation.

Specified by:
setName in interface RepositoryElementInterface
Parameters:
newName - The new name of the transformation

nameFromFilename

public void nameFromFilename()
Builds a name - if no name is set, yet - from the filename

Specified by:
nameFromFilename in interface EngineMetaInterface

getFilename

public String getFilename()
Get the filename (if any) of the transformation

Specified by:
getFilename in interface EngineMetaInterface
Specified by:
getFilename in interface LoggingObjectInterface
Returns:
The filename of the transformation.

setFilename

public void setFilename(String fname)
Set the filename of the transformation

Specified by:
setFilename in interface EngineMetaInterface
Parameters:
fname - The new filename of the transformation.

isStepUsedInTransHops

public boolean isStepUsedInTransHops(StepMeta stepMeta)
Determines if a step has been used in a hop or not.

Parameters:
stepMeta - The step queried.
Returns:
True if a step is used in a hop (active or not), false if this is not the case.

setChanged

public void setChanged(boolean ch)
Sets the changed parameter of the transformation.

Specified by:
setChanged in interface ChangedFlagInterface
Overrides:
setChanged in class ChangedFlag
Parameters:
ch - True if you want to mark the transformation as changed, false if not.

clearChanged

public void clearChanged()
Clears the different changed flags of the transformation.

Specified by:
clearChanged in interface ChangedFlagInterface
Specified by:
clearChanged in interface EngineMetaInterface
Overrides:
clearChanged in class ChangedFlag

clearChangedDatabases

public void clearChangedDatabases()
Clears the different changed flags of the transformation.


haveConnectionsChanged

public boolean haveConnectionsChanged()
Description copied from interface: HasDatabasesInterface
Checks whether or not the connections have changed.

Specified by:
haveConnectionsChanged in interface HasDatabasesInterface
Returns:
True if the connections have been changed.

haveStepsChanged

public boolean haveStepsChanged()
Checks whether or not the steps have changed.

Returns:
True if the connections have been changed.

haveHopsChanged

public boolean haveHopsChanged()
Checks whether or not any of the hops have been changed.

Returns:
True if a hop has been changed.

haveNotesChanged

public boolean haveNotesChanged()
Checks whether or not any of the notes have been changed.

Returns:
True if the notes have been changed.

havePartitionSchemasChanged

public boolean havePartitionSchemasChanged()
Checks whether or not any of the partitioning schemas have been changed.

Returns:
True if the partitioning schemas have been changed.

haveClusterSchemasChanged

public boolean haveClusterSchemasChanged()
Checks whether or not any of the clustering schemas have been changed.

Returns:
True if the clustering schemas have been changed.

hasChanged

public boolean hasChanged()
Checks whether or not the transformation has changed.

Specified by:
hasChanged in interface ChangedFlagInterface
Overrides:
hasChanged in class ChangedFlag
Returns:
True if the transformation has changed.

hasLoop

public boolean hasLoop(StepMeta stepMeta)
See if there are any loops in the transformation, starting at the indicated step. This works by looking at all the previous steps. If you keep going backward and find the step, there is a loop. Both the informational and the normal steps need to be checked for loops!

Parameters:
stepMeta - The step position to start looking
Returns:
True if a loop has been found, false if no loop is found.

selectAll

public void selectAll()
Mark all steps in the transformation as selected.


unselectAll

public void unselectAll()
Clear the selection of all steps.


getSelectedStepLocations

public Point[] getSelectedStepLocations()
Get an array of all the selected step and note locations

Returns:
The selected step and notes locations.

getSelectedNoteLocations

public Point[] getSelectedNoteLocations()
Get an array of all the selected step and note locations

Returns:
The selected step and notes locations.

getSelectedSteps

public List<StepMeta> getSelectedSteps()
Returns:
A list of all the selected steps.

getSelectedNotes

public List<NotePadMeta> getSelectedNotes()
Get an array of all the selected notes

Returns:
An array of all the selected notes.

getSelectedStepNames

public String[] getSelectedStepNames()
Get an array of all the selected step names

Returns:
An array of all the selected step names.

getStepIndexes

public int[] getStepIndexes(List<StepMeta> steps)
Get an array of the locations of an array of steps

Parameters:
steps - An array of steps
Returns:
an array of the locations of an array of steps

getNoteIndexes

public int[] getNoteIndexes(List<NotePadMeta> notes)
Get an array of the locations of an array of notes

Parameters:
notes - An array of notes
Returns:
an array of the locations of an array of notes

getMaxUndo

public int getMaxUndo()
Get the maximum number of undo operations possible

Specified by:
getMaxUndo in interface UndoInterface
Returns:
The maximum number of undo operations that are allowed.

setMaxUndo

public void setMaxUndo(int mu)
Sets the maximum number of undo operations that are allowed.

Specified by:
setMaxUndo in interface UndoInterface
Parameters:
mu - The maximum number of undo operations that are allowed.

addUndo

public void addUndo(Object[] from,
                    Object[] to,
                    int[] pos,
                    Point[] prev,
                    Point[] curr,
                    int type_of_change,
                    boolean nextAlso)
Add an undo operation to the undo list

Specified by:
addUndo in interface UndoInterface
Parameters:
from - array of objects representing the old state
to - array of objectes representing the new state
pos - An array of object locations
prev - An array of points representing the old positions
curr - An array of points representing the new positions
type_of_change - The type of change that's being done to the transformation.
nextAlso - indicates that the next undo operation needs to follow this one.

previousUndo

public TransAction previousUndo()
Get the previous undo operation and change the undo pointer

Specified by:
previousUndo in interface UndoInterface
Returns:
The undo transaction to be performed.

viewThisUndo

public TransAction viewThisUndo()
View current undo, don't change undo position

Specified by:
viewThisUndo in interface UndoInterface
Returns:
The current undo transaction

viewPreviousUndo

public TransAction viewPreviousUndo()
View previous undo, don't change undo position

Specified by:
viewPreviousUndo in interface UndoInterface
Returns:
The previous undo transaction

nextUndo

public TransAction nextUndo()
Get the next undo transaction on the list. Change the undo pointer.

Specified by:
nextUndo in interface UndoInterface
Returns:
The next undo transaction (for redo)

viewNextUndo

public TransAction viewNextUndo()
Get the next undo transaction on the list.

Specified by:
viewNextUndo in interface UndoInterface
Returns:
The next undo transaction (for redo)

getMaximum

public Point getMaximum()
Get the maximum size of the canvas by calculating the maximum location of a step

Returns:
Maximum coordinate of a step in the transformation + (100,100) for safety.

getMinimum

public Point getMinimum()
Get the minimum point on the canvas of a transformation

Returns:
Minimum coordinate of a step in the transformation

getStepNames

public String[] getStepNames()
Get the names of all the steps.

Returns:
An array of step names.

getStepsArray

public StepMeta[] getStepsArray()
Get all the steps in an array.

Returns:
An array of all the steps in the transformation.

findPrevious

public boolean findPrevious(StepMeta startStep,
                            StepMeta stepToFind)
Look in the transformation and see if we can find a step in a previous location starting somewhere.

Parameters:
startStep - The starting step
stepToFind - The step to look for backward in the transformation
Returns:
true if we can find the step in an earlier location in the transformation.

sortSteps

public void sortSteps()
Put the steps in alphabetical order.


sortHops

public void sortHops()

sortStepsNatural

public Map<StepMeta,Map<StepMeta,Boolean>> sortStepsNatural()
Put the steps in a more natural order: from start to finish. For the moment, we ignore splits and joins. Splits and joins can't be listed sequentially in any case!

Returns:
a map containing all the previous steps per step

sortHopsNatural

public void sortHopsNatural()
Sort the hops in a natural way: from beginning to end


analyseImpact

public void analyseImpact(List<DatabaseImpact> impact,
                          ProgressMonitorListener monitor)
                   throws KettleStepException
This procedure determines the impact of the different steps in a transformation on databases, tables and field.

Parameters:
impact - An ArrayList of DatabaseImpact objects.
Throws:
KettleStepException

getAlternativeStepname

public String getAlternativeStepname(String stepname)
Proposes an alternative stepname when the original already exists...

Parameters:
stepname - The stepname to find an alternative for..
Returns:
The alternative stepname.

getSQLStatements

public List<SQLStatement> getSQLStatements()
                                    throws KettleStepException
Builds a list of all the SQL statements that this transformation needs in order to work properly.

Returns:
An ArrayList of SQLStatement objects.
Throws:
KettleStepException

getSQLStatements

public List<SQLStatement> getSQLStatements(ProgressMonitorListener monitor)
                                    throws KettleStepException
Builds a list of all the SQL statements that this transformation needs in order to work properly.

Returns:
An ArrayList of SQLStatement objects.
Throws:
KettleStepException

getSQLStatementsString

public String getSQLStatementsString()
                              throws KettleStepException
Get the SQL statements, needed to run this transformation, as one String.

Returns:
the SQL statements needed to run this transformation.
Throws:
KettleStepException

checkSteps

public void checkSteps(List<CheckResultInterface> remarks,
                       boolean only_selected,
                       ProgressMonitorListener monitor)
Checks all the steps and fills a List of (CheckResult) remarks.

Parameters:
remarks - The remarks list to add to.
only_selected - Check only the selected steps.
monitor - The progress monitor to use, null if not used

getResultRows

public List<RowMetaAndData> getResultRows()
Returns:
Returns the resultRows.

setResultRows

public void setResultRows(List<RowMetaAndData> resultRows)
Parameters:
resultRows - The resultRows to set.

getRepositoryDirectory

public RepositoryDirectoryInterface getRepositoryDirectory()
Specified by:
getRepositoryDirectory in interface EngineMetaInterface
Specified by:
getRepositoryDirectory in interface LoggingObjectInterface
Specified by:
getRepositoryDirectory in interface RepositoryElementInterface
Returns:
Returns the directory.

setRepositoryDirectory

public void setRepositoryDirectory(RepositoryDirectoryInterface directory)
Specified by:
setRepositoryDirectory in interface RepositoryElementInterface
Parameters:
directory - The directory to set.

getPathAndName

public String getPathAndName()
Returns:
The directory path plus the name of the transformation

getArguments

public String[] getArguments()
Returns:
Returns the arguments.

setArguments

public void setArguments(String[] arguments)
Parameters:
arguments - The arguments to set.

getCounters

public Hashtable<String,Counter> getCounters()
Returns:
Returns the counters.

setCounters

public void setCounters(Hashtable<String,Counter> counters)
Parameters:
counters - The counters to set.

getDependencies

public List<TransDependency> getDependencies()
Returns:
Returns the dependencies.

setDependencies

public void setDependencies(List<TransDependency> dependencies)
Parameters:
dependencies - The dependencies to set.

getMaxDateConnection

public DatabaseMeta getMaxDateConnection()
Returns:
Returns the maxDateConnection.

setMaxDateConnection

public void setMaxDateConnection(DatabaseMeta maxDateConnection)
Parameters:
maxDateConnection - The maxDateConnection to set.

getMaxDateDifference

public double getMaxDateDifference()
Returns:
Returns the maxDateDifference.

setMaxDateDifference

public void setMaxDateDifference(double maxDateDifference)
Parameters:
maxDateDifference - The maxDateDifference to set.

getMaxDateField

public String getMaxDateField()
Returns:
Returns the maxDateField.

setMaxDateField

public void setMaxDateField(String maxDateField)
Parameters:
maxDateField - The maxDateField to set.

getMaxDateOffset

public double getMaxDateOffset()
Returns:
Returns the maxDateOffset.

setMaxDateOffset

public void setMaxDateOffset(double maxDateOffset)
Parameters:
maxDateOffset - The maxDateOffset to set.

getMaxDateTable

public String getMaxDateTable()
Returns:
Returns the maxDateTable.

setMaxDateTable

public void setMaxDateTable(String maxDateTable)
Parameters:
maxDateTable - The maxDateTable to set.

getSizeRowset

public int getSizeRowset()
Returns:
Returns the sizeRowset.

setSizeRowset

public void setSizeRowset(int sizeRowset)
Parameters:
sizeRowset - The sizeRowset to set.

getDbCache

public DBCache getDbCache()
Returns:
Returns the dbCache.

setDbCache

public void setDbCache(DBCache dbCache)
Parameters:
dbCache - The dbCache to set.

getCreatedDate

public Date getCreatedDate()
Specified by:
getCreatedDate in interface EngineMetaInterface
Returns:
Returns the createdDate.

setCreatedDate

public void setCreatedDate(Date createdDate)
Specified by:
setCreatedDate in interface EngineMetaInterface
Parameters:
createdDate - The createdDate to set.

setCreatedUser

public void setCreatedUser(String createdUser)
Specified by:
setCreatedUser in interface EngineMetaInterface
Parameters:
createdUser - The createdUser to set.

getCreatedUser

public String getCreatedUser()
Specified by:
getCreatedUser in interface EngineMetaInterface
Returns:
Returns the createdUser.

setModifiedDate

public void setModifiedDate(Date modifiedDate)
Specified by:
setModifiedDate in interface EngineMetaInterface
Parameters:
modifiedDate - The modifiedDate to set.

getModifiedDate

public Date getModifiedDate()
Specified by:
getModifiedDate in interface EngineMetaInterface
Returns:
Returns the modifiedDate.

setModifiedUser

public void setModifiedUser(String modifiedUser)
Specified by:
setModifiedUser in interface EngineMetaInterface
Parameters:
modifiedUser - The modifiedUser to set.

getModifiedUser

public String getModifiedUser()
Specified by:
getModifiedUser in interface EngineMetaInterface
Returns:
Returns the modifiedUser.

getDescription

public String getDescription()
Get the description of the transformation

Specified by:
getDescription in interface RepositoryElementInterface
Returns:
The description of the transformation

setDescription

public void setDescription(String n)
Set the description of the transformation.

Specified by:
setDescription in interface RepositoryElementInterface
Parameters:
n - The new description of the transformation

setExtendedDescription

public void setExtendedDescription(String n)
Set the extended description of the transformation.

Parameters:
n - The new extended description of the transformation

getExtendedDescription

public String getExtendedDescription()
Get the extended description of the transformation

Returns:
The extended description of the transformation

getTransversion

public String getTransversion()
Get the version of the transformation

Returns:
The version of the transformation

setTransversion

public void setTransversion(String n)
Set the version of the transformation.

Parameters:
n - The new version description of the transformation

setTransstatus

public void setTransstatus(int n)
Set the status of the transformation.

Parameters:
n - The new status description of the transformation

getTransstatus

public int getTransstatus()
Get the status of the transformation

Returns:
The status of the transformation

toString

public String toString()
Overrides:
toString in class Object
Returns:
the textual representation of the transformation: it's name. If the name has not been set, the classname is returned.

cancelQueries

public void cancelQueries()
                   throws KettleDatabaseException
Cancel queries opened for checking & fieldprediction

Throws:
KettleDatabaseException

getUsedArguments

public Map<String,String> getUsedArguments(String[] arguments)
Get the arguments used by this transformation.

Parameters:
arguments -
Returns:
A row with the used arguments in it.

getSleepTimeEmpty

public int getSleepTimeEmpty()
Returns:
Sleep time waiting when buffer is empty, in nano-seconds

getSleepTimeFull

public int getSleepTimeFull()
Returns:
Sleep time waiting when buffer is full, in nano-seconds

setSleepTimeEmpty

public void setSleepTimeEmpty(int sleepTimeEmpty)
Parameters:
sleepTimeEmpty - The sleepTimeEmpty to set.

setSleepTimeFull

public void setSleepTimeFull(int sleepTimeFull)
Parameters:
sleepTimeFull - The sleepTimeFull to set.

isDatabaseConnectionUsed

public boolean isDatabaseConnectionUsed(DatabaseMeta databaseMeta)
This method asks all steps in the transformation whether or not the specified database connection is used. The connection is used in the transformation if any of the steps uses it or if it is being used to log to.

Parameters:
databaseMeta - The connection to check
Returns:
true if the connection is used in this transformation.

getStringList

public List<StringSearchResult> getStringList(boolean searchSteps,
                                              boolean searchDatabases,
                                              boolean searchNotes,
                                              boolean includePasswords)
Get a list of all the strings used in this transformation.

Returns:
A list of StringSearchResult with strings used in the

getStringList

public List<StringSearchResult> getStringList(boolean searchSteps,
                                              boolean searchDatabases,
                                              boolean searchNotes)

getUsedVariables

public List<String> getUsedVariables()

getPreviousResult

public Result getPreviousResult()
Returns:
Returns the previousResult.

setPreviousResult

public void setPreviousResult(Result previousResult)
Parameters:
previousResult - The previousResult to set.

getResultFiles

public List<ResultFile> getResultFiles()
Returns:
Returns the resultFiles.

setResultFiles

public void setResultFiles(List<ResultFile> resultFiles)
Parameters:
resultFiles - The resultFiles to set.

getPartitionSchemas

public List<PartitionSchema> getPartitionSchemas()
Returns:
the partitionSchemas

setPartitionSchemas

public void setPartitionSchemas(List<PartitionSchema> partitionSchemas)
Parameters:
partitionSchemas - the partitionSchemas to set

getPartitionSchemasNames

public String[] getPartitionSchemasNames()
Returns:
the available partition schema names.

isFeedbackShown

public boolean isFeedbackShown()
Returns:
the feedbackShown

setFeedbackShown

public void setFeedbackShown(boolean feedbackShown)
Parameters:
feedbackShown - the feedbackShown to set

getFeedbackSize

public int getFeedbackSize()
Returns:
the feedbackSize

setFeedbackSize

public void setFeedbackSize(int feedbackSize)
Parameters:
feedbackSize - the feedbackSize to set

isUsingUniqueConnections

public boolean isUsingUniqueConnections()
Returns:
the usingUniqueConnections

setUsingUniqueConnections

public void setUsingUniqueConnections(boolean usingUniqueConnections)
Parameters:
usingUniqueConnections - the usingUniqueConnections to set

getClusterSchemas

public List<ClusterSchema> getClusterSchemas()

setClusterSchemas

public void setClusterSchemas(List<ClusterSchema> clusterSchemas)

getClusterSchemaNames

public String[] getClusterSchemaNames()
Returns:
The slave server strings from this cluster schema

findPartitionSchema

public PartitionSchema findPartitionSchema(String name)
Find a partition schema using its name.

Parameters:
name - The name of the partition schema to look for.
Returns:
the partition with the specified name of null if nothing was found

findClusterSchema

public ClusterSchema findClusterSchema(String name)
Find a clustering schema using its name

Parameters:
name - The name of the clustering schema to look for.
Returns:
the cluster schema with the specified name of null if nothing was found

addOrReplacePartitionSchema

public void addOrReplacePartitionSchema(PartitionSchema partitionSchema)
Add a new partition schema to the transformation if that didn't exist yet. Otherwise, replace it.

Parameters:
partitionSchema - The partition schema to be added.

addOrReplaceSlaveServer

public void addOrReplaceSlaveServer(SlaveServer slaveServer)
Add a new slave server to the transformation if that didn't exist yet. Otherwise, replace it.

Parameters:
slaveServer - The slave server to be added.

addOrReplaceClusterSchema

public void addOrReplaceClusterSchema(ClusterSchema clusterSchema)
Add a new cluster schema to the transformation if that didn't exist yet. Otherwise, replace it.

Parameters:
clusterSchema - The cluster schema to be added.

getSharedObjectsFile

public String getSharedObjectsFile()

setSharedObjectsFile

public void setSharedObjectsFile(String sharedObjectsFile)

saveSharedObjects

public void saveSharedObjects()
                       throws KettleException
Specified by:
saveSharedObjects in interface EngineMetaInterface
Throws:
KettleException

isUsingThreadPriorityManagment

public boolean isUsingThreadPriorityManagment()
Returns:
the usingThreadPriorityManagment

setUsingThreadPriorityManagment

public void setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
Parameters:
usingThreadPriorityManagment - the usingThreadPriorityManagment to set

findSlaveServer

public SlaveServer findSlaveServer(String serverString)

getSlaveServerNames

public String[] getSlaveServerNames()

getSlaveServers

public List<SlaveServer> getSlaveServers()
Specified by:
getSlaveServers in interface HasSlaveServersInterface
Returns:
the slaveServers

setSlaveServers

public void setSlaveServers(List<SlaveServer> slaveServers)
Parameters:
slaveServers - the slaveServers to set

checkRowMixingStatically

public void checkRowMixingStatically(StepMeta stepMeta,
                                     ProgressMonitorListener monitor)
                              throws KettleRowException
Check a step to see if there are no multiple steps to read from. If so, check to see if the receiving rows are all the same in layout. We only want to ONLY use the DBCache for this to prevent GUI stalls.

Parameters:
stepMeta - the step to check
Throws:
KettleRowException - in case we detect a row mixing violation

setInternalKettleVariables

public void setInternalKettleVariables()
Specified by:
setInternalKettleVariables in interface EngineMetaInterface

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.

findMappingInputStep

public StepMeta findMappingInputStep(String stepname)
                              throws KettleStepException
Throws:
KettleStepException

findMappingOutputStep

public StepMeta findMappingOutputStep(String stepname)
                               throws KettleStepException
Throws:
KettleStepException

getResourceDependencies

public List<ResourceReference> getResourceDependencies()

exportResources

public String exportResources(VariableSpace space,
                              Map<String,ResourceDefinition> definitions,
                              ResourceNamingInterface resourceNamingInterface,
                              Repository repository)
                       throws KettleException
Description copied from interface: ResourceExportInterface
Exports the object to a flat-file system, adding content with filename keys to a set of definitions. The supplied resource naming interface allows the object to name appropriately without worrying about those parts of the implementation specific details.

Specified by:
exportResources in interface ResourceExportInterface
Parameters:
space - The variable space to resolve (environment) variables with.
definitions - The map containing the filenames and content
resourceNamingInterface - The resource naming interface allows the object to name appropriately
repository - the repository object to load from
Returns:
The filename for this object. (also contained in the definitions map)
Throws:
KettleException - in case something goes wrong during the export

getSlaveStepCopyPartitionDistribution

public SlaveStepCopyPartitionDistribution getSlaveStepCopyPartitionDistribution()
Returns:
the slaveStepCopyPartitionDistribution

setSlaveStepCopyPartitionDistribution

public void setSlaveStepCopyPartitionDistribution(SlaveStepCopyPartitionDistribution slaveStepCopyPartitionDistribution)
Parameters:
slaveStepCopyPartitionDistribution - the slaveStepCopyPartitionDistribution to set

findFirstUsedClusterSchema

public ClusterSchema findFirstUsedClusterSchema()

isSlaveTransformation

public boolean isSlaveTransformation()

setSlaveTransformation

public void setSlaveTransformation(boolean slaveTransformation)

getRepository

public Repository getRepository()
Returns:
the repository

setRepository

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

isCapturingStepPerformanceSnapShots

public boolean isCapturingStepPerformanceSnapShots()
Returns:
the capturingStepPerformanceSnapShots

setCapturingStepPerformanceSnapShots

public void setCapturingStepPerformanceSnapShots(boolean capturingStepPerformanceSnapShots)
Parameters:
capturingStepPerformanceSnapShots - the capturingStepPerformanceSnapShots to set

getStepPerformanceCapturingDelay

public long getStepPerformanceCapturingDelay()
Returns:
the stepPerformanceCapturingDelay

setStepPerformanceCapturingDelay

public void setStepPerformanceCapturingDelay(long stepPerformanceCapturingDelay)
Parameters:
stepPerformanceCapturingDelay - the stepPerformanceCapturingDelay to set

getStepPerformanceCapturingSizeLimit

public String getStepPerformanceCapturingSizeLimit()
Returns:
the stepPerformanceCapturingSizeLimit

setStepPerformanceCapturingSizeLimit

public void setStepPerformanceCapturingSizeLimit(String stepPerformanceCapturingSizeLimit)
Parameters:
stepPerformanceCapturingSizeLimit - the stepPerformanceCapturingSizeLimit to set

getSharedObjects

public SharedObjects getSharedObjects()
Returns:
the sharedObjects

setSharedObjects

public void setSharedObjects(SharedObjects sharedObjects)
Parameters:
sharedObjects - the sharedObjects to set

clearCaches

public void clearCaches()

addNameChangedListener

public void addNameChangedListener(NameChangedListener listener)

removeNameChangedListener

public void removeNameChangedListener(NameChangedListener listener)

addFilenameChangedListener

public void addFilenameChangedListener(FilenameChangedListener listener)

removeFilenameChangedListener

public void removeFilenameChangedListener(FilenameChangedListener listener)

activateParameters

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

Specified by:
activateParameters in interface NamedParams

addParameterDefinition

public void addParameterDefinition(String key,
                                   String defaultValue,
                                   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.
defaultValue - default value.
description - Description of the parameter.
Throws:
DuplicateParamException - Upon duplicate parameter definitions

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.

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.

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

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.

getRepositoryElementType

public RepositoryObjectType getRepositoryElementType()
Specified by:
getRepositoryElementType in interface RepositoryElementInterface

setObjectRevision

public void setObjectRevision(ObjectRevision objectRevision)
Specified by:
setObjectRevision in interface RepositoryElementInterface

getObjectRevision

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

getLogChannel

public LogChannelInterface getLogChannel()

getLogChannelId

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

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

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

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)

getTransLogTable

public TransLogTable getTransLogTable()
Returns:
the transLogTable

setTransLogTable

public void setTransLogTable(TransLogTable transLogTable)
Parameters:
transLogTable - the transLogTable to set

getDatabaseNames

public String[] getDatabaseNames()

getPerformanceLogTable

public PerformanceLogTable getPerformanceLogTable()
Returns:
the performanceLogTable

setPerformanceLogTable

public void setPerformanceLogTable(PerformanceLogTable performanceLogTable)
Parameters:
performanceLogTable - the performanceLogTable to set

getChannelLogTable

public ChannelLogTable getChannelLogTable()
Returns:
the channelLogTable

setChannelLogTable

public void setChannelLogTable(ChannelLogTable channelLogTable)
Parameters:
channelLogTable - the channelLogTable to set

getStepLogTable

public StepLogTable getStepLogTable()
Returns:
the stepLogTable

setStepLogTable

public void setStepLogTable(StepLogTable stepLogTable)
Parameters:
stepLogTable - the stepLogTable to set

getLogTables

public List<LogTableInterface> getLogTables()

getTransformationType

public TransMeta.TransformationType getTransformationType()
Returns:
the transformationType

setTransformationType

public void setTransformationType(TransMeta.TransformationType transformationType)
Parameters:
transformationType - the transformationType to set

canSave

public boolean canSave()
Specified by:
canSave in interface EngineMetaInterface

getContainerObjectId

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

setCarteObjectId

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

writeXML

public void writeXML(String filename)
              throws KettleXMLException
Utility method to write the XML of this transformation to a file, mostly for testing purposes.

Parameters:
filename - The filename to save to
Throws:
KettleXMLException - in case something goes wrong.

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.

hasRepositoryReferences

public boolean hasRepositoryReferences()

lookupRepositoryReferences

public void lookupRepositoryReferences(Repository repository)
                                throws KettleException
Look up the references after import

Parameters:
repository - the repository to reference.
Throws:
KettleException