org.pentaho.di.trans.steps.validator
Class KettleValidatorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.pentaho.di.core.exception.KettleException
              extended by org.pentaho.di.core.exception.KettleValueException
                  extended by org.pentaho.di.trans.steps.validator.KettleValidatorException
All Implemented Interfaces:
Serializable

public class KettleValidatorException
extends KettleValueException

See Also:
Serialized Form

Field Summary
static int ERROR_DOES_NOT_END_WITH_STRING
           
static int ERROR_DOES_NOT_START_WITH_STRING
           
static int ERROR_ENDS_WITH_STRING
           
static int ERROR_HIGHER_THAN_ALLOWED_MAXIMUM
           
static int ERROR_LONGER_THAN_MAXIMUM_LENGTH
           
static int ERROR_LOWER_THAN_ALLOWED_MINIMUM
           
static int ERROR_MATCHING_REGULAR_EXPRESSION_EXPECTED
           
static int ERROR_MATCHING_REGULAR_EXPRESSION_NOT_ALLOWED
           
static int ERROR_NON_NUMERIC_DATA
           
static int ERROR_NONE
           
static int ERROR_NULL_VALUE_NOT_ALLOWED
           
static int ERROR_ONLY_NULL_VALUE_ALLOWED
           
static int ERROR_SHORTER_THAN_MINIMUM_LENGTH
           
static int ERROR_STARTS_WITH_STRING
           
static int ERROR_UNEXPECTED_DATA_TYPE
           
static int ERROR_VALUE_NOT_IN_LIST
           
 
Constructor Summary
KettleValidatorException(Validator validator, Validation validatorField, int code, String message, String fieldname)
          Constructs a new Throwable with the specified detail message.
 
Method Summary
 int getCode()
           
 String getCodeDesc()
           
 String getFieldname()
           
 String getMessage()
          get the messages back to it's origin cause.
 Validation getValidatorField()
           
 void setCode(int code)
           
 void setFieldname(String fieldname)
           
 void setValidatorField(Validation validatorField)
           
 
Methods inherited from class org.pentaho.di.core.exception.KettleException
getSuperMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_NONE

public static final int ERROR_NONE
See Also:
Constant Field Values

ERROR_NULL_VALUE_NOT_ALLOWED

public static final int ERROR_NULL_VALUE_NOT_ALLOWED
See Also:
Constant Field Values

ERROR_LONGER_THAN_MAXIMUM_LENGTH

public static final int ERROR_LONGER_THAN_MAXIMUM_LENGTH
See Also:
Constant Field Values

ERROR_SHORTER_THAN_MINIMUM_LENGTH

public static final int ERROR_SHORTER_THAN_MINIMUM_LENGTH
See Also:
Constant Field Values

ERROR_UNEXPECTED_DATA_TYPE

public static final int ERROR_UNEXPECTED_DATA_TYPE
See Also:
Constant Field Values

ERROR_LOWER_THAN_ALLOWED_MINIMUM

public static final int ERROR_LOWER_THAN_ALLOWED_MINIMUM
See Also:
Constant Field Values

ERROR_HIGHER_THAN_ALLOWED_MAXIMUM

public static final int ERROR_HIGHER_THAN_ALLOWED_MAXIMUM
See Also:
Constant Field Values

ERROR_VALUE_NOT_IN_LIST

public static final int ERROR_VALUE_NOT_IN_LIST
See Also:
Constant Field Values

ERROR_NON_NUMERIC_DATA

public static final int ERROR_NON_NUMERIC_DATA
See Also:
Constant Field Values

ERROR_DOES_NOT_START_WITH_STRING

public static final int ERROR_DOES_NOT_START_WITH_STRING
See Also:
Constant Field Values

ERROR_DOES_NOT_END_WITH_STRING

public static final int ERROR_DOES_NOT_END_WITH_STRING
See Also:
Constant Field Values

ERROR_STARTS_WITH_STRING

public static final int ERROR_STARTS_WITH_STRING
See Also:
Constant Field Values

ERROR_ENDS_WITH_STRING

public static final int ERROR_ENDS_WITH_STRING
See Also:
Constant Field Values

ERROR_MATCHING_REGULAR_EXPRESSION_EXPECTED

public static final int ERROR_MATCHING_REGULAR_EXPRESSION_EXPECTED
See Also:
Constant Field Values

ERROR_MATCHING_REGULAR_EXPRESSION_NOT_ALLOWED

public static final int ERROR_MATCHING_REGULAR_EXPRESSION_NOT_ALLOWED
See Also:
Constant Field Values

ERROR_ONLY_NULL_VALUE_ALLOWED

public static final int ERROR_ONLY_NULL_VALUE_ALLOWED
See Also:
Constant Field Values
Constructor Detail

KettleValidatorException

public KettleValidatorException(Validator validator,
                                Validation validatorField,
                                int code,
                                String message,
                                String fieldname)
Constructs a new Throwable with the specified detail message.

Parameters:
Validator - - the instance of Validator that this object will reference use environmenSubsitute invokation. The class is probably where this object is being created.
validatorField - - the Validation in which the failure happened and this exception is to be created for.
code - - the error code, see the static members of this class.
message - - the detail message. The detail message is saved for later retrieval by the getMessage() method.
fieldName - - the name of the field that failed Validation.
Method Detail

getCode

public int getCode()
Returns:
the code

setCode

public void setCode(int code)
Parameters:
code - the code to set

getCodeDesc

public String getCodeDesc()
Returns:
the code in string format

getMessage

public String getMessage()
Description copied from class: KettleException
get the messages back to it's origin cause.

Overrides:
getMessage in class KettleException

getFieldname

public String getFieldname()
Returns:
the fieldname

setFieldname

public void setFieldname(String fieldname)
Parameters:
fieldname - the fieldname to set

getValidatorField

public Validation getValidatorField()
Returns:
the validatorField

setValidatorField

public void setValidatorField(Validation validatorField)
Parameters:
validatorField - the validatorField to set