Package org.pentaho.di.trans.step
Class StepMeta
java.lang.Object
org.pentaho.di.shared.SharedObjectBase
org.pentaho.di.trans.step.StepMeta
- All Implemented Interfaces:
Cloneable
,Comparable<StepMeta>
,BaseMeta
,org.pentaho.di.core.AttributesInterface
,org.pentaho.di.core.CheckResultSourceInterface
,org.pentaho.di.core.gui.GUIPositionInterface
,ResourceExportInterface
,ResourceHolderInterface
,org.pentaho.di.shared.SharedObjectInterface
public class StepMeta
extends org.pentaho.di.shared.SharedObjectBase
implements Cloneable, Comparable<StepMeta>, org.pentaho.di.core.gui.GUIPositionInterface, org.pentaho.di.shared.SharedObjectInterface, org.pentaho.di.core.CheckResultSourceInterface, ResourceExportInterface, ResourceHolderInterface, org.pentaho.di.core.AttributesInterface, BaseMeta
This class contains everything that is needed to define a step.
- Since:
- 27-mei-2003
- Author:
- Matt
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStepMeta()
StepMeta
(String stepid, String stepname, StepMetaInterface stepMetaInterface) StepMeta
(String stepname, StepMetaInterface stepMetaInterface) StepMeta
(org.pentaho.di.repository.ObjectId id_step) StepMeta
(Node stepnode, List<org.pentaho.di.core.database.DatabaseMeta> databases, Map<String, org.pentaho.di.core.Counter> counters) Deprecated.StepMeta
(Node stepnode, List<org.pentaho.di.core.database.DatabaseMeta> databases, org.pentaho.metastore.api.IMetaStore metaStore) Read the step data from XML -
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(List<org.pentaho.di.core.CheckResultInterface> remarks, TransMeta transMeta, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.RowMetaInterface info) void
check
(List<org.pentaho.di.core.CheckResultInterface> remarks, TransMeta transMeta, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.RowMetaInterface info, org.pentaho.di.core.variables.VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) boolean
clone()
int
void
drawStep()
boolean
Two steps are equal if their names are equal.exportResources
(org.pentaho.di.core.variables.VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) exportResources
(org.pentaho.di.core.variables.VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) Exports the object to a flat-file system, adding content with filename keys to a set of definitions.static final StepMeta
Find a step with its name in a given ArrayList of stepsstatic final StepMeta
Find a step with the ID in a given ArrayList of stepsvoid
static StepMeta
getAttribute
(String groupName, String key) getAttributes
(String groupName) int
Get the number of copies to start of a step.Gets the high-level type of resource holder.org.pentaho.di.core.gui.Point
getName()
org.pentaho.di.repository.ObjectId
getResourceDependencies
(TransMeta transMeta) Get a list of all the resource dependencies that the step is depending on.Support for CheckResultSourceInterfacegetXML()
getXML
(boolean includeInterface) boolean
int
hashCode()
boolean
void
hideStep()
boolean
boolean
boolean
boolean
boolean
isDrawn()
See wether or not the step is drawn on the canvas.boolean
See wether or not the step is drawn on the canvas.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSendingErrorRowsToStep
(StepMeta targetStep) boolean
boolean
void
replaceMeta
(StepMeta stepMeta) void
setAttribute
(String groupName, String key, String value) void
setAttributes
(String groupName, Map<String, String> attributes) void
void
void
setChanged
(boolean ch) void
setClusterSchema
(ClusterSchema clusterSchema) void
setClusterSchemaAfterLoading
(List<ClusterSchema> clusterSchemas) Resolves the name of the cluster loaded from XML/Repository to the correct clusterSchema objectvoid
setClusterSchemaName
(String clusterSchemaName) void
setCopies
(int c) Sets the number of parallel copies that this step will be launched with.void
setCopiesString
(String copiesString) void
setDescription
(String description) void
setDistributes
(boolean distributes) void
setDraw
(boolean draw) Sets the draw attribute of the step so that it will be drawn on the canvas.void
setLocation
(int x, int y) void
setLocation
(org.pentaho.di.core.gui.Point loc) void
void
setObjectId
(org.pentaho.di.repository.ObjectId id) void
setParentTransMeta
(TransMeta parentTransMeta) void
setRemoteInputSteps
(List<RemoteStep> remoteInputSteps) void
setRemoteOutputSteps
(List<RemoteStep> remoteOutputSteps) void
setRowDistribution
(RowDistributionInterface rowDistribution) void
setSelected
(boolean sel) void
setStepErrorMeta
(StepErrorMeta stepErrorMeta) void
Set the plugin step id (code)void
setStepMetaInterface
(StepMetaInterface stepMetaInterface) void
setStepPartitioningMeta
(StepPartitioningMeta stepPartitioningMeta) void
setTargetStepPartitioningMeta
(StepPartitioningMeta targetStepPartitioningMeta) void
void
setTerminator
(boolean t) boolean
toString()
Methods inherited from class org.pentaho.di.shared.SharedObjectBase
getChangedDate, isShared, setChangedDate, setShared
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.pentaho.di.shared.SharedObjectInterface
getChangedDate, isShared, setShared
-
Field Details
-
XML_TAG
- See Also:
-
STRING_ID_MAPPING
- See Also:
-
STRING_ID_SINGLE_THREADER
- See Also:
-
STRING_ID_ETL_META_INJECT
- See Also:
-
STRING_ID_JOB_EXECUTOR
- See Also:
-
STRING_ID_MAPPING_INPUT
- See Also:
-
STRING_ID_MAPPING_OUTPUT
- See Also:
-
attributesMap
-
-
Constructor Details
-
StepMeta
- Parameters:
stepid
- The ID of the step: this is derived information, you can also use the constructor without stepid. This constructor will be deprecated soon.stepname
- The name of the new stepstepMetaInterface
- The step metadata interface to use (TextFileInputMeta, etc)
-
StepMeta
- Parameters:
stepname
- The name of the new stepstepMetaInterface
- The step metadata interface to use (TextFileInputMeta, etc)
-
StepMeta
public StepMeta() -
StepMeta
@Deprecated public StepMeta(Node stepnode, List<org.pentaho.di.core.database.DatabaseMeta> databases, Map<String, org.pentaho.di.core.Counter> counters) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettlePluginLoaderExceptionDeprecated.Read the step data from XML- Parameters:
stepnode
- The XML step node.databases
- A list of databasescounters
- A map with all defined counters.- Throws:
org.pentaho.di.core.exception.KettleXMLException
org.pentaho.di.core.exception.KettlePluginLoaderException
-
StepMeta
public StepMeta(Node stepnode, List<org.pentaho.di.core.database.DatabaseMeta> databases, org.pentaho.metastore.api.IMetaStore metaStore) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettlePluginLoaderException Read the step data from XML- Parameters:
stepnode
- The XML step node.databases
- A list of databasesmetaStore
- The IMetaStore.- Throws:
org.pentaho.di.core.exception.KettleXMLException
org.pentaho.di.core.exception.KettlePluginLoaderException
-
StepMeta
public StepMeta(org.pentaho.di.repository.ObjectId id_step)
-
-
Method Details
-
getXML
- Specified by:
getXML
in interfaceorg.pentaho.di.shared.SharedObjectInterface
- Throws:
org.pentaho.di.core.exception.KettleException
-
getXML
- Throws:
org.pentaho.di.core.exception.KettleException
-
setClusterSchemaAfterLoading
Resolves the name of the cluster loaded from XML/Repository to the correct clusterSchema object- Parameters:
clusterSchemas
- The list of clusterSchemas to reference.
-
fromXml
-
getObjectId
public org.pentaho.di.repository.ObjectId getObjectId()- Specified by:
getObjectId
in interfaceorg.pentaho.di.core.CheckResultSourceInterface
- Specified by:
getObjectId
in interfaceResourceHolderInterface
- Returns:
- The ID of the holder of the resource
-
setObjectId
public void setObjectId(org.pentaho.di.repository.ObjectId id) -
isDrawn
public boolean isDrawn()See wether or not the step is drawn on the canvas.- Returns:
- True if the step is drawn on the canvas.
-
isDrawStep
public boolean isDrawStep()See wether or not the step is drawn on the canvas. Same as isDrawn(), but needed for findMethod(StepMeta, drawstep) called by StringSearcher.findMetaData(). Otherwise findMethod() returns org.pentaho.di.trans.step.StepMeta.drawStep() instead of isDrawn().- Returns:
- True if the step is drawn on the canvas.
-
setDraw
public void setDraw(boolean draw) Sets the draw attribute of the step so that it will be drawn on the canvas.- Parameters:
draw
- True if you want the step to show itself on the canvas, False if you don't.
-
setCopies
public void setCopies(int c) Sets the number of parallel copies that this step will be launched with.- Parameters:
c
- The number of copies.
-
getCopies
public int getCopies()Get the number of copies to start of a step. This takes into account the partitioning logic.- Returns:
- the number of step copies to start.
-
drawStep
public void drawStep() -
hideStep
public void hideStep() -
equals
Two steps are equal if their names are equal. -
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<StepMeta>
-
hasChanged
public boolean hasChanged() -
setChanged
public void setChanged(boolean ch) -
setChanged
public void setChanged() -
chosesTargetSteps
public boolean chosesTargetSteps() -
clone
-
replaceMeta
-
getStepMetaInterface
-
setStepMetaInterface
-
getStepID
-
getName
- Specified by:
getName
in interfaceorg.pentaho.di.core.CheckResultSourceInterface
- Specified by:
getName
in interfaceResourceHolderInterface
- Specified by:
getName
in interfaceorg.pentaho.di.shared.SharedObjectInterface
- Returns:
- The name of the holder of the resource
-
setName
-
getDescription
- Specified by:
getDescription
in interfaceorg.pentaho.di.core.CheckResultSourceInterface
- Specified by:
getDescription
in interfaceResourceHolderInterface
- Returns:
- The description of the holder of the resource
-
setDescription
-
setSelected
public void setSelected(boolean sel) - Specified by:
setSelected
in interfaceorg.pentaho.di.core.gui.GUIPositionInterface
-
flipSelected
public void flipSelected() -
isSelected
public boolean isSelected()- Specified by:
isSelected
in interfaceorg.pentaho.di.core.gui.GUIPositionInterface
-
setTerminator
public void setTerminator() -
setTerminator
public void setTerminator(boolean t) -
hasTerminator
public boolean hasTerminator() -
setLocation
public void setLocation(int x, int y) - Specified by:
setLocation
in interfaceorg.pentaho.di.core.gui.GUIPositionInterface
-
setLocation
public void setLocation(org.pentaho.di.core.gui.Point loc) - Specified by:
setLocation
in interfaceorg.pentaho.di.core.gui.GUIPositionInterface
-
getLocation
public org.pentaho.di.core.gui.Point getLocation()- Specified by:
getLocation
in interfaceBaseMeta
- Specified by:
getLocation
in interfaceorg.pentaho.di.core.gui.GUIPositionInterface
-
check
@Deprecated public void check(List<org.pentaho.di.core.CheckResultInterface> remarks, TransMeta transMeta, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.RowMetaInterface info) Deprecated.- Parameters:
remarks
-transMeta
-prev
-input
-output
-info
-
-
check
public void check(List<org.pentaho.di.core.CheckResultInterface> remarks, TransMeta transMeta, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.RowMetaInterface info, org.pentaho.di.core.variables.VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) -
toString
-
isPartitioned
public boolean isPartitioned()- Returns:
- true is the step is partitioned
-
isTargetPartitioned
public boolean isTargetPartitioned()- Returns:
- true is the step is partitioned
-
getStepPartitioningMeta
- Returns:
- the stepPartitioningMeta
-
setStepPartitioningMeta
- Parameters:
stepPartitioningMeta
- the stepPartitioningMeta to set
-
getClusterSchema
- Returns:
- the clusterSchema
-
setClusterSchema
- Parameters:
clusterSchema
- the clusterSchema to set
-
isDistributes
public boolean isDistributes()- Returns:
- the distributes
-
setDistributes
public void setDistributes(boolean distributes) - Parameters:
distributes
- the distributes to set
-
getStepErrorMeta
- Returns:
- the StepErrorMeta error handling metadata for this step
-
setStepErrorMeta
- Parameters:
stepErrorMeta
- the error handling metadata for this step
-
findStep
Find a step with the ID in a given ArrayList of steps- Parameters:
steps
- The List of steps to searchid
- The ID of the step- Returns:
- The step if it was found, null if nothing was found
-
findStep
Find a step with its name in a given ArrayList of steps- Parameters:
steps
- The List of steps to searchstepname
- The name of the step- Returns:
- The step if it was found, null if nothing was found
-
supportsErrorHandling
public boolean supportsErrorHandling() -
isDoingErrorHandling
public boolean isDoingErrorHandling()- Returns:
- if error handling is supported for this step, if error handling is defined and a target step is set
-
isSendingErrorRowsToStep
-
getTypeId
Support for CheckResultSourceInterface- Specified by:
getTypeId
in interfaceorg.pentaho.di.core.CheckResultSourceInterface
- Specified by:
getTypeId
in interfaceResourceHolderInterface
- Returns:
- The Type ID of the resource holder. The Type ID is the system-defined type identifier (like TRANS or SORT).
-
isMapping
public boolean isMapping() -
isSingleThreader
public boolean isSingleThreader() -
isEtlMetaInject
public boolean isEtlMetaInject() -
isJobExecutor
public boolean isJobExecutor() -
isMappingInput
public boolean isMappingInput() -
isMappingOutput
public boolean isMappingOutput() -
getResourceDependencies
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
@Deprecated public String exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws org.pentaho.di.core.exception.KettleExceptionDeprecated.- Parameters:
space
-definitions
-resourceNamingInterface
-repository
-- Returns:
- Throws:
org.pentaho.di.core.exception.KettleException
-
exportResources
public String exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws org.pentaho.di.core.exception.KettleExceptionDescription 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 interfaceResourceExportInterface
- Parameters:
space
- The variable space to resolve (environment) variables with.definitions
- The map containing the filenames and contentresourceNamingInterface
- The resource naming interface allows the object to name appropriatelyrepository
- the repository object to load frommetaStore
- the central metastore to load non-kettle specific metadata from- Returns:
- The filename for this object. (also contained in the definitions map)
- Throws:
org.pentaho.di.core.exception.KettleException
- in case something goes wrong during the export
-
getRemoteInputSteps
- Returns:
- the remoteInputSteps
-
setRemoteInputSteps
- Parameters:
remoteInputSteps
- the remoteInputSteps to set
-
getRemoteOutputSteps
- Returns:
- the remoteOutputSteps
-
setRemoteOutputSteps
- Parameters:
remoteOutputSteps
- the remoteOutputSteps to set
-
getTargetStepPartitioningMeta
- Returns:
- the targetStepPartitioningMeta
-
setTargetStepPartitioningMeta
- Parameters:
targetStepPartitioningMeta
- the targetStepPartitioningMeta to set
-
isRepartitioning
public boolean isRepartitioning() -
getHolderType
Description copied from interface:ResourceHolderInterface
Gets the high-level type of resource holder.- Specified by:
getHolderType
in interfaceResourceHolderInterface
- Returns:
- JOBENTRY, STEP, etc.
-
isClustered
public boolean isClustered() -
setStepID
Set the plugin step id (code)- Parameters:
stepid
-
-
setClusterSchemaName
-
setParentTransMeta
-
getParentTransMeta
-
getRowDistribution
-
setRowDistribution
-
getCopiesString
- Returns:
- the copiesString
-
setCopiesString
- Parameters:
copiesString
- the copiesString to set
-
setAttributesMap
- Specified by:
setAttributesMap
in interfaceorg.pentaho.di.core.AttributesInterface
-
getAttributesMap
- Specified by:
getAttributesMap
in interfaceorg.pentaho.di.core.AttributesInterface
-
setAttribute
- Specified by:
setAttribute
in interfaceorg.pentaho.di.core.AttributesInterface
-
setAttributes
- Specified by:
setAttributes
in interfaceorg.pentaho.di.core.AttributesInterface
-
getAttributes
- Specified by:
getAttributes
in interfaceorg.pentaho.di.core.AttributesInterface
-
getAttribute
- Specified by:
getAttribute
in interfaceorg.pentaho.di.core.AttributesInterface
-
isMissing
public boolean isMissing() -
isDeprecated
public boolean isDeprecated() -
getSuggestion
-
StepMeta(Node, List, IMetaStore)