Class JobEntryValidatorUtils
java.lang.Object
org.pentaho.di.job.entry.validator.JobEntryValidatorUtils
Methods in this class are referenced in validator definitions within the validator resources file (e.g.
validator.xml).
Modeled after org.apache.struts.validator.FieldChecks and
org.apache.commons.collections.PredicateUtils.
- Author:
- mlowery
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddExceptionRemark(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, String validatorName, List<org.pentaho.di.core.CheckResultInterface> remarks, Exception e) static voidaddFailureRemark(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, String validatorName, List<org.pentaho.di.core.CheckResultInterface> remarks, int level) static voidaddGeneralRemark(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, String validatorName, List<org.pentaho.di.core.CheckResultInterface> remarks, String key, int level) static voidaddOkRemark(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks) static AndValidatorReturns a AndValidator singleton.static EmailValidatorReturns a EmailValidator singleton.static FileDoesNotExistValidatorReturns a FileDoesNotExistValidator singleton.static FileExistsValidatorReturns a FileExistsValidator singleton.static StringgetKeyLevelOnFail(String validatorName) static intgetLevelOnFail(ValidatorContext context, String validatorName) Gets thelevelOnFailtype for givenvalidatorName.static IntegerValidatorReturns a IntegerValidator singleton.static LongValidatorReturns a LongValidator singleton.static NotBlankValidatorReturns a NotBlankValidator singleton.static NotNullValidatorReturns a NotNullValidator singleton.static voidputLevelOnFail(Map<String, Object> map, int levelOnFail) static voidputLevelOnFail(Map<String, Object> map, String validatorName, int levelOnFail) static booleanvalidateMask(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, int levelOnFail, List<org.pentaho.di.core.CheckResultInterface> remarks, String mask) Fails if a field's value does not match the given mask.static booleanvalidateMask(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks, String mask, int levelOnFail) Fails if a field's value does not match the given mask.
-
Field Details
-
LEVEL_FAILURE_DEFAULT
public static final int LEVEL_FAILURE_DEFAULT- See Also:
-
-
Constructor Details
-
JobEntryValidatorUtils
public JobEntryValidatorUtils()
-
-
Method Details
-
andValidator
Returns a AndValidator singleton. -
notBlankValidator
Returns a NotBlankValidator singleton. -
notNullValidator
Returns a NotNullValidator singleton. -
fileExistsValidator
Returns a FileExistsValidator singleton. -
integerValidator
Returns a IntegerValidator singleton. -
longValidator
Returns a LongValidator singleton. -
fileDoesNotExistValidator
Returns a FileDoesNotExistValidator singleton. -
emailValidator
Returns a EmailValidator singleton. -
getLevelOnFail
Gets thelevelOnFailtype for givenvalidatorName. If that is not found, returns genericlevelOnFailtype. If that fails, returnsCheckResultInterface.TYPE_RESULT_ERROR. -
putLevelOnFail
-
putLevelOnFail
-
getKeyLevelOnFail
-
validateMask
public static boolean validateMask(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks, String mask, int levelOnFail) Fails if a field's value does not match the given mask. -
validateMask
public static boolean validateMask(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, int levelOnFail, List<org.pentaho.di.core.CheckResultInterface> remarks, String mask) Fails if a field's value does not match the given mask. -
addFailureRemark
-
addExceptionRemark
-
addGeneralRemark
-
addOkRemark
-