Interface JobEntryValidator
- All Known Implementing Classes:
AbstractFileValidator,AndValidator,EmailValidator,FileDoesNotExistValidator,FileExistsValidator,IntegerValidator,LongValidator,NotBlankValidator,NotNullValidator
public interface JobEntryValidator
The interface of a job entry validator.
Job entry validators can provide convenience methods for adding information to the validator context. Those methods should following a naming convention: putX where X is the name of the object being adding to the context. An example:
- ValidatorContext putSomeObject(Object someObject)
- void putSomeObject(ValidatorContext context, Object someObject)
- Author:
- mlowery
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the name of this validator, unique among all validators.booleanvalidate(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks, ValidatorContext context) Using reflection, the validator fetches the field namedpropertyNamefrom the beansourceand runs the validation putting any messages intoremarks.
-
Field Details
-
KEY_LEVEL_ON_FAIL
- See Also:
-
-
Method Details
-
validate
boolean validate(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks, ValidatorContext context) Using reflection, the validator fetches the field namedpropertyNamefrom the beansourceand runs the validation putting any messages intoremarks. The return value istrueif the validation passes.- Parameters:
source- bean to validatepropertyName- property to validateremarks- list to which to add messagescontext- any other information needed to perform the validation- Returns:
- validation result
-
getName
String getName()Returns the name of this validator, unique among all validators.- Returns:
- name
-