Class AndValidator
java.lang.Object
org.pentaho.di.job.entry.validator.AndValidator
- All Implemented Interfaces:
- JobEntryValidator
Boolean ANDs the results of all validators. If one validator fails, 
false is immediately returned. The
 validators list (a List<JobEntryValidator>) should be stored under the KEY_VALIDATORS
 key.- Author:
- mlowery
- 
Field SummaryFieldsFields inherited from interface org.pentaho.di.job.entry.validator.JobEntryValidatorKEY_LEVEL_ON_FAIL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetName()Returns the name of this validator, unique among all validators.static ValidatorContextputValidators(JobEntryValidator... validators) Uses varargs to conveniently add validators to the list of validators consumed byAndValidator.static voidputValidators(ValidatorContext context, JobEntryValidator... validators) Uses varargs to conveniently add validators to the list of validators consumed byAndValidator.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- 
INSTANCE
 
- 
- 
Constructor Details- 
AndValidatorpublic AndValidator()
 
- 
- 
Method Details- 
validatepublic boolean validate(org.pentaho.di.core.CheckResultSourceInterface source, String propertyName, List<org.pentaho.di.core.CheckResultInterface> remarks, ValidatorContext context) Description copied from interface:JobEntryValidatorUsing reflection, the validator fetches the field namedpropertyNamefrom the beansourceand runs the validation putting any messages intoremarks. The return value istrueif the validation passes.- Specified by:
- validatein interface- JobEntryValidator
- Parameters:
- source- bean to validate
- propertyName- property to validate
- remarks- list to which to add messages
- context- any other information needed to perform the validation
- Returns:
- validation result
 
- 
getNameDescription copied from interface:JobEntryValidatorReturns the name of this validator, unique among all validators.- Specified by:
- getNamein interface- JobEntryValidator
- Returns:
- name
 
- 
getKeyValidators
- 
putValidatorsUses varargs to conveniently add validators to the list of validators consumed byAndValidator. This method creates and returns a new context.
- 
putValidatorsUses varargs to conveniently add validators to the list of validators consumed byAndValidator. This method adds to an existing map.- See Also:
 
 
-