org.pentaho.di.trans.step
Class BaseStepMeta

java.lang.Object
  extended by org.pentaho.di.trans.step.BaseStepMeta
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AbortMeta, AccessInputMeta, AccessOutputMeta, AddSequenceMeta, AddXMLMeta, AggregateRowsMeta, AnalyticQueryMeta, AppendMeta, BlockingStepMeta, CalculatorMeta, CheckSumMeta, CloneRowMeta, ClosureGeneratorMeta, ColumnExistsMeta, CombinationLookupMeta, ConstantMeta, CreditCardValidatorMeta, CsvInputMeta, CubeInputMeta, CubeOutputMeta, DatabaseJoinMeta, DatabaseLookupMeta, DBProcMeta, DelayMeta, DeleteMeta, DenormaliserMeta, DetectEmptyStreamMeta, DetectLastRowMeta, DimensionLookupMeta, DummyTransMeta, DynamicSQLRowMeta, ExcelInputMeta, ExcelOutputMeta, ExecProcessMeta, ExecSQLMeta, ExecSQLRowMeta, FieldSplitterMeta, FileExistsMeta, FilesFromResultMeta, FilesToResultMeta, FilterRowsMeta, FixedInputMeta, FlattenerMeta, FormulaMeta, GetFileNamesMeta, GetFilesRowsCountMeta, GetPreviousRowFieldMeta, GetSubFoldersMeta, GetVariableMeta, GetXMLDataMeta, GPBulkLoaderMeta, GroupByMeta, HTTPMeta, HTTPPOSTMeta, IfNullMeta, InjectorMeta, InsertUpdateMeta, JaninoMeta, JoinRowsMeta, LDAPInputMeta, LDIFInputMeta, LucidDBBulkLoaderMeta, MailMeta, MailValidatorMeta, MappingInputMeta, MappingMeta, MappingOutputMeta, MergeJoinMeta, MergeRowsMeta, MondrianInputMeta, MonetDBBulkLoaderMeta, MySQLBulkLoaderMeta, NormaliserMeta, NullIfMeta, NumberRangeMeta, OraBulkLoaderMeta, ParGzipCsvInputMeta, PGBulkLoaderMeta, ProcessFilesMeta, PropertyInputMeta, PropertyOutputMeta, RandomValueMeta, RegexEvalMeta, ReplaceStringMeta, ReservoirSamplingMeta, RowGeneratorMeta, RowsFromResultMeta, RowsToResultMeta, RssInputMeta, RssOutputMeta, SalesforceInputMeta, SampleRowsMeta, ScriptValuesMetaMod, SelectValuesMeta, SetValueConstantMeta, SetValueFieldMeta, SetVariableMeta, SocketReaderMeta, SocketWriterMeta, SortedMergeMeta, SortRowsMeta, SplitFieldToRowsMeta, SQLFileOutputMeta, StepMetastructureMeta, StreamLookupMeta, StringCutMeta, SwitchCaseMeta, SynchronizeAfterMergeMeta, SystemDataMeta, TableExistsMeta, TableInputMeta, TableOutputMeta, TextFileInputMeta, TextFileOutputMeta, UniqueRowsByHashSetMeta, UniqueRowsMeta, UnivariateStatsMeta, UpdateMeta, ValidatorMeta, ValueMapperMeta, WebServiceMeta, WriteToLogMeta, XBaseInputMeta, XMLInputMeta, XMLInputSaxMeta, XMLJoinMeta, XMLOutputMeta, XsdValidatorMeta, XsltMeta

public class BaseStepMeta
extends Object
implements Cloneable


Constructor Summary
BaseStepMeta()
           
 
Method Summary
 void analyseImpact(List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.RowMetaInterface info)
          Each step must be able to report on the impact it has on a database, table field, etc.
 void cancelQueries()
          Call this to cancel trailing database queries (too long running, etc)
 boolean chosesTargetSteps()
           
 Object clone()
           
 boolean excludeFromRowLayoutVerification()
          This method is added to exclude certain steps from layout checking.
 String exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository)
           
 String getDialogClassName()
          This returns the expected name for the dialog that edits a job entry.
 void getFields(org.pentaho.di.core.row.RowMetaInterface inputRowMeta, String name, org.pentaho.di.core.row.RowMetaInterface[] info, StepMeta nextStep, org.pentaho.di.core.variables.VariableSpace space)
           
 long getID()
           
 String[] getInfoSteps()
           
 org.pentaho.di.core.row.RowMetaInterface getRequiredFields()
          Deprecated.  
 org.pentaho.di.core.row.RowMetaInterface getRequiredFields(org.pentaho.di.core.variables.VariableSpace space)
          The natural way of data flow in a transformation is source-to-target.
 List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo)
          Get a list of all the resource dependencies that the step is depending on.
 org.pentaho.di.core.SQLStatement getSQLStatements(TransMeta transMeta, StepMeta stepMeta, org.pentaho.di.core.row.RowMetaInterface prev)
          Standard method to return one or more SQLStatement objects that the step needs in order to work correctly.
 org.pentaho.di.core.row.RowMetaInterface getTableFields()
           
 String[] getTargetSteps()
           
 Map<String,String> getUsedArguments()
          Default a step doesn't use any arguments.
 org.pentaho.di.core.database.DatabaseMeta[] getUsedDatabaseConnections()
          This method returns all the database connections that are used by the step.
 String[] getUsedLibraries()
           
 String getXML()
          Produces the XML string that describes this step's information.
 boolean hasChanged()
           
 void searchInfoAndTargetSteps(List<StepMeta> steps)
           
 void setChanged()
           
 void setChanged(boolean ch)
           
 void setID(long id)
           
 void setInfoSteps(StepMeta[] infoSteps)
           
 void setTargetSteps(StepMeta[] targetSteps)
           
 boolean supportsErrorHandling()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseStepMeta

public BaseStepMeta()
Method Detail

getID

public long getID()

setID

public void setID(long id)

clone

public Object clone()
Overrides:
clone in class Object

setChanged

public void setChanged(boolean ch)

setChanged

public void setChanged()

hasChanged

public boolean hasChanged()

getTableFields

public org.pentaho.di.core.row.RowMetaInterface getTableFields()

searchInfoAndTargetSteps

public void searchInfoAndTargetSteps(List<StepMeta> steps)
Parameters:
steps - optionally search the info step in a list of steps

chosesTargetSteps

public boolean chosesTargetSteps()

getTargetSteps

public String[] getTargetSteps()

getInfoSteps

public String[] getInfoSteps()
Returns:
the informational source steps, if any. Null is the default: none.

setInfoSteps

public void setInfoSteps(StepMeta[] infoSteps)
Parameters:
infoSteps - The info step(s) to set

setTargetSteps

public void setTargetSteps(StepMeta[] targetSteps)
Parameters:
targetSteps - The target step(s) to set

getXML

public String getXML()
              throws org.pentaho.di.core.exception.KettleException
Produces the XML string that describes this step's information.

Returns:
String containing the XML describing this step.
Throws:
org.pentaho.di.core.exception.KettleValueException - in case there is an XML conversion or encoding error
org.pentaho.di.core.exception.KettleException

getFields

public void getFields(org.pentaho.di.core.row.RowMetaInterface inputRowMeta,
                      String name,
                      org.pentaho.di.core.row.RowMetaInterface[] info,
                      StepMeta nextStep,
                      org.pentaho.di.core.variables.VariableSpace space)
               throws org.pentaho.di.core.exception.KettleStepException
Throws:
org.pentaho.di.core.exception.KettleStepException

analyseImpact

public void analyseImpact(List<DatabaseImpact> impact,
                          TransMeta transMeta,
                          StepMeta stepMeta,
                          org.pentaho.di.core.row.RowMetaInterface prev,
                          String[] input,
                          String[] output,
                          org.pentaho.di.core.row.RowMetaInterface info)
                   throws org.pentaho.di.core.exception.KettleStepException
Each step must be able to report on the impact it has on a database, table field, etc.

Parameters:
impact - The list of impacts @see org.pentaho.di.transMeta.DatabaseImpact
transMeta - The transformation information
stepMeta - The step information
prev - The fields entering this step
input - The previous step names
output - The output step names
info - The fields used as information by this step
Throws:
org.pentaho.di.core.exception.KettleStepException

getSQLStatements

public org.pentaho.di.core.SQLStatement getSQLStatements(TransMeta transMeta,
                                                         StepMeta stepMeta,
                                                         org.pentaho.di.core.row.RowMetaInterface prev)
                                                  throws org.pentaho.di.core.exception.KettleStepException
Standard method to return one or more SQLStatement objects that the step needs in order to work correctly. This can mean "create table", "create index" statements but also "alter table ... add/drop/modify" statements.

Parameters:
transMeta - TransInfo object containing the complete transformation
stepMeta - StepMeta object containing the complete step
prev - Row containing meta-data for the input fields (no data)
Returns:
The SQL Statements for this step or null if an error occurred. If nothing has to be done, the SQLStatement.getSQL() == null.
Throws:
org.pentaho.di.core.exception.KettleStepException

cancelQueries

public void cancelQueries()
                   throws org.pentaho.di.core.exception.KettleDatabaseException
Call this to cancel trailing database queries (too long running, etc)

Throws:
org.pentaho.di.core.exception.KettleDatabaseException

getUsedArguments

public Map<String,String> getUsedArguments()
Default a step doesn't use any arguments. Implement this to notify the GUI that a window has to be displayed BEFORE launching a transformation.

Returns:
A row of argument values. (name and optionally a default value)

getRequiredFields

public org.pentaho.di.core.row.RowMetaInterface getRequiredFields()
                                                           throws org.pentaho.di.core.exception.KettleException
Deprecated. 

The natural way of data flow in a transformation is source-to-target. However, this makes mapping to target tables difficult to do. To help out here, we supply information to the transformation meta-data model about which fields are required for a step. This allows us to automate certain tasks like the mapping to pre-defined tables. The Table Output step in this case will output the fields in the target table using this method. This default implementation returns an empty row meaning that no fields are required for this step to operate.

Returns:
the required fields for this steps meta data.
Throws:
org.pentaho.di.core.exception.KettleException - in case the required fields can't be determined

getRequiredFields

public org.pentaho.di.core.row.RowMetaInterface getRequiredFields(org.pentaho.di.core.variables.VariableSpace space)
                                                           throws org.pentaho.di.core.exception.KettleException
The natural way of data flow in a transformation is source-to-target. However, this makes mapping to target tables difficult to do. To help out here, we supply information to the transformation meta-data model about which fields are required for a step. This allows us to automate certain tasks like the mapping to pre-defined tables. The Table Output step in this case will output the fields in the target table using this method. This default implementation returns an empty row meaning that no fields are required for this step to operate.

Parameters:
space - the variable space to use to do variable substitution.
Returns:
the required fields for this steps meta data.
Throws:
org.pentaho.di.core.exception.KettleException - in case the required fields can't be determined

getUsedDatabaseConnections

public org.pentaho.di.core.database.DatabaseMeta[] getUsedDatabaseConnections()
This method returns all the database connections that are used by the step.

Returns:
an array of database connections meta-data. Return an empty array if no connections are used.

getUsedLibraries

public String[] getUsedLibraries()
Returns:
the libraries that this step or plug-in uses.

supportsErrorHandling

public boolean supportsErrorHandling()
Returns:
true if this step supports error "reporting" on rows: the ability to send rows to a certain target step.

excludeFromRowLayoutVerification

public boolean excludeFromRowLayoutVerification()
This method is added to exclude certain steps from layout checking.

Since:
2.5.0

getResourceDependencies

public List<ResourceReference> getResourceDependencies(TransMeta transMeta,
                                                       StepMeta stepInfo)
Get a list of all the resource dependencies that the step is depending on.

Returns:
a list of all the resource dependencies that the step is depending on

exportResources

public String exportResources(org.pentaho.di.core.variables.VariableSpace space,
                              Map<String,ResourceDefinition> definitions,
                              ResourceNamingInterface resourceNamingInterface,
                              Repository repository)
                       throws org.pentaho.di.core.exception.KettleException
Throws:
org.pentaho.di.core.exception.KettleException

getDialogClassName

public String getDialogClassName()
This returns the expected name for the dialog that edits a job entry. The expected name is in the org.pentaho.di.ui tree and has a class name that is the name of the job entry with 'Dialog' added to the end. e.g. if the job entry is org.pentaho.di.job.entries.zipfile.JobEntryZipFile the dialog would be org.pentaho.di.ui.job.entries.zipfile.JobEntryZipFileDialog If the dialog class for a job entry does not match this pattern it should override this method and return the appropriate class name

Returns:
full class name of the dialog