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.default booleanvalidate(org.pentaho.di.core.bowl.Bowl bowl, 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.default booleanvalidate(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks, ValidatorContext context) Deprecated.use the version with the Bowl
-
Field Details
-
KEY_LEVEL_ON_FAIL
- See Also:
-
-
Method Details
-
validate
@Deprecated default boolean validate(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks, ValidatorContext context) Deprecated.use the version with the BowlUsing 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
-
validate
default boolean validate(org.pentaho.di.core.bowl.Bowl bowl, 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
-