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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addExceptionRemark
(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, String validatorName, List<org.pentaho.di.core.CheckResultInterface> remarks, Exception e) static void
addFailureRemark
(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, String validatorName, List<org.pentaho.di.core.CheckResultInterface> remarks, int level) static void
addGeneralRemark
(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, String validatorName, List<org.pentaho.di.core.CheckResultInterface> remarks, String key, int level) static void
addOkRemark
(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks) static AndValidator
Returns a AndValidator singleton.static EmailValidator
Returns a EmailValidator singleton.static FileDoesNotExistValidator
Returns a FileDoesNotExistValidator singleton.static FileExistsValidator
Returns a FileExistsValidator singleton.static String
getKeyLevelOnFail
(String validatorName) static int
getLevelOnFail
(ValidatorContext context, String validatorName) Gets thelevelOnFail
type for givenvalidatorName
.static IntegerValidator
Returns a IntegerValidator singleton.static LongValidator
Returns a LongValidator singleton.static NotBlankValidator
Returns a NotBlankValidator singleton.static NotNullValidator
Returns a NotNullValidator singleton.static void
putLevelOnFail
(Map<String, Object> map, int levelOnFail) static void
putLevelOnFail
(Map<String, Object> map, String validatorName, int levelOnFail) 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.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.
-
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 thelevelOnFail
type for givenvalidatorName
. If that is not found, returns genericlevelOnFail
type. 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
-