Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pentaho.di.job.entry.validator
Class AndValidator

    java.lang.Object
      org.pentaho.di.job.entry.validator.AndValidator

All Implemented Interfaces:
  JobEntryValidator

    public class AndValidator

extends Object
implements 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 Summary
`static AndValidator` | `INSTANCE`

Fields inherited from interface org.pentaho.di.job.entry.validator.JobEntryValidator
`KEY_LEVEL_ON_FAIL`

Constructor Summary
`AndValidator()`

Method Summary
`String` | `getKeyValidators()`
`String` | `getName()` Returns the name of this validator, unique among all validators.
`static ValidatorContext` | `putValidators(JobEntryValidator... validators)` Uses varargs to conveniently add validators to the list of validators consumed by `AndValidator`.
`static void` | `putValidators(ValidatorContext context, JobEntryValidator... validators)` Uses varargs to conveniently add validators to the list of validators consumed by `AndValidator`.
`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 named `propertyName` from the bean `source` and runs the validation putting any messages into `remarks`.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INSTANCE

    public static final AndValidator INSTANCE

Constructor Detail

### AndValidator

    public AndValidator()

Method Detail

### validate

    public boolean validate(org.pentaho.di.core.CheckResultSourceInterface source,
                            String propertyName,
                            List<org.pentaho.di.core.CheckResultInterface> remarks,
                            ValidatorContext context)

  Description copied from interface: `JobEntryValidator`
  Using reflection, the validator fetches the field named `propertyName` from the bean `source` and runs the validation putting any messages into `remarks`. The return value is `true` if the validation passes.

  Specified by:
    `validate` in 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

### getName

    public String getName()

  Description copied from interface: `JobEntryValidator`
  Returns the name of this validator, unique among all validators.

  Specified by:
    `getName` in interface `JobEntryValidator`
  Returns:
    name

### getKeyValidators

    public String getKeyValidators()

### putValidators

    public static ValidatorContext putValidators(JobEntryValidator... validators)

  Uses varargs to conveniently add validators to the list of validators consumed by `AndValidator`. This method creates and returns a new context.

  See Also:
    `putValidators(ValidatorContext, JobEntryValidator[])`

### putValidators

    public static void putValidators(ValidatorContext context,
                                     JobEntryValidator... validators)

  Uses varargs to conveniently add validators to the list of validators consumed by `AndValidator`. This method adds to an existing map.

  See Also:
    `putValidators(JobEntryValidator[])`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD