org.pentaho.di.trans.step
Class StepErrorMeta

java.lang.Object
  extended by org.pentaho.di.core.changed.ChangedFlag
      extended by org.pentaho.di.trans.step.StepErrorMeta
All Implemented Interfaces:
Cloneable, ChangedFlagInterface, XMLInterface

public class StepErrorMeta
extends ChangedFlag
implements XMLInterface, Cloneable

This class contains the metadata to handle proper error handling on a step level.

Author:
Matt

Field Summary
static String XML_TAG
           
 
Constructor Summary
StepErrorMeta(VariableSpace variables, Node node, List<StepMeta> steps)
           
StepErrorMeta(VariableSpace space, StepMeta sourceStep)
          Create a new step error handling metadata object
StepErrorMeta(VariableSpace space, StepMeta sourceStep, StepMeta targetStep)
          Create a new step error handling metadata object
StepErrorMeta(VariableSpace space, StepMeta sourceStep, StepMeta targetStep, String nrErrorsValuename, String errorDescriptionsValuename, String errorFieldsValuename, String errorCodesValuename)
          Create a new step error handling metadata object
 
Method Summary
 void addErrorRowData(Object[] row, int startIndex, long nrErrors, String errorDescriptions, String fieldNames, String errorCodes)
           
 StepErrorMeta clone()
           
 String getErrorCodesValuename()
           
 String getErrorDescriptionsValuename()
           
 RowMetaInterface getErrorFields()
           
 String getErrorFieldsValuename()
           
 RowMetaInterface getErrorRowMeta(long nrErrors, String errorDescriptions, String fieldNames, String errorCodes)
           
 String getMaxErrors()
           
 String getMaxPercentErrors()
           
 String getMinPercentRows()
           
 String getNrErrorsValuename()
           
 StepMeta getSourceStep()
           
 StepMeta getTargetStep()
           
 String getXML()
          Describes the Object implementing this interface as XML
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
           
 void setErrorCodesValuename(String errorCodesValuename)
           
 void setErrorDescriptionsValuename(String errorDescriptionsValuename)
           
 void setErrorFieldsValuename(String errorFieldsValuename)
           
 void setMaxErrors(String maxErrors)
           
 void setMaxPercentErrors(String maxPercentErrors)
           
 void setMinPercentRows(String minRowsForPercent)
           
 void setNrErrorsValuename(String nrErrorsValuename)
           
 void setSourceStep(StepMeta sourceStep)
           
 void setTargetStep(StepMeta targetStep)
           
 
Methods inherited from class org.pentaho.di.core.changed.ChangedFlag
addObserver, clearChanged, deleteObserver, hasChanged, notifyObservers, setChanged, setChanged
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_TAG

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

StepErrorMeta

public StepErrorMeta(VariableSpace space,
                     StepMeta sourceStep)
Create a new step error handling metadata object

Parameters:
sourceStep - The source step that can send the error rows

StepErrorMeta

public StepErrorMeta(VariableSpace space,
                     StepMeta sourceStep,
                     StepMeta targetStep)
Create a new step error handling metadata object

Parameters:
sourceStep - The source step that can send the error rows
targetStep - The target step to send the error rows to

StepErrorMeta

public StepErrorMeta(VariableSpace space,
                     StepMeta sourceStep,
                     StepMeta targetStep,
                     String nrErrorsValuename,
                     String errorDescriptionsValuename,
                     String errorFieldsValuename,
                     String errorCodesValuename)
Create a new step error handling metadata object

Parameters:
sourceStep - The source step that can send the error rows
targetStep - The target step to send the error rows to
nrErrorsValuename - the name of the field value to contain the number of errors (null or empty means it's not needed)
errorDescriptionsValuename - the name of the field value to contain the error description(s) (null or empty means it's not needed)
errorFieldsValuename - the name of the field value to contain the fields for which the error(s) occured (null or empty means it's not needed)
errorCodesValuename - the name of the field value to contain the error code(s) (null or empty means it's not needed)

StepErrorMeta

public StepErrorMeta(VariableSpace variables,
                     Node node,
                     List<StepMeta> steps)
Method Detail

clone

public StepErrorMeta clone()
Overrides:
clone in class Object

getXML

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

Specified by:
getXML in interface XMLInterface
Returns:
the XML string for this object

getErrorCodesValuename

public String getErrorCodesValuename()
Returns:
the error codes valuename

setErrorCodesValuename

public void setErrorCodesValuename(String errorCodesValuename)
Parameters:
errorCodesValuename - the error codes valuename to set

getErrorDescriptionsValuename

public String getErrorDescriptionsValuename()
Returns:
the error descriptions valuename

setErrorDescriptionsValuename

public void setErrorDescriptionsValuename(String errorDescriptionsValuename)
Parameters:
errorDescriptionsValuename - the error descriptions valuename to set

getErrorFieldsValuename

public String getErrorFieldsValuename()
Returns:
the error fields valuename

setErrorFieldsValuename

public void setErrorFieldsValuename(String errorFieldsValuename)
Parameters:
errorFieldsValuename - the error fields valuename to set

getNrErrorsValuename

public String getNrErrorsValuename()
Returns:
the nr errors valuename

setNrErrorsValuename

public void setNrErrorsValuename(String nrErrorsValuename)
Parameters:
nrErrorsValuename - the nr errors valuename to set

getTargetStep

public StepMeta getTargetStep()
Returns:
the target step

setTargetStep

public void setTargetStep(StepMeta targetStep)
Parameters:
targetStep - the target step to set

getSourceStep

public StepMeta getSourceStep()
Returns:
The source step can send the error rows

setSourceStep

public void setSourceStep(StepMeta sourceStep)
Parameters:
sourceStep - The source step can send the error rows

isEnabled

public boolean isEnabled()
Returns:
the enabled flag: Is the error handling enabled?

setEnabled

public void setEnabled(boolean enabled)
Parameters:
enabled - the enabled flag to set: Is the error handling enabled?

getErrorFields

public RowMetaInterface getErrorFields()

getErrorRowMeta

public RowMetaInterface getErrorRowMeta(long nrErrors,
                                        String errorDescriptions,
                                        String fieldNames,
                                        String errorCodes)

addErrorRowData

public void addErrorRowData(Object[] row,
                            int startIndex,
                            long nrErrors,
                            String errorDescriptions,
                            String fieldNames,
                            String errorCodes)

getMaxErrors

public String getMaxErrors()
Returns:
the maxErrors

setMaxErrors

public void setMaxErrors(String maxErrors)
Parameters:
maxErrors - the maxErrors to set

getMaxPercentErrors

public String getMaxPercentErrors()
Returns:
the maxPercentErrors

setMaxPercentErrors

public void setMaxPercentErrors(String maxPercentErrors)
Parameters:
maxPercentErrors - the maxPercentErrors to set

getMinPercentRows

public String getMinPercentRows()
Returns:
the minRowsForPercent

setMinPercentRows

public void setMinPercentRows(String minRowsForPercent)
Parameters:
minRowsForPercent - the minRowsForPercent to set