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 JobEntryValidatorUtils

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

    public class JobEntryValidatorUtils

extends Object

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
`static int` | `LEVEL_FAILURE_DEFAULT`

Constructor Summary
`JobEntryValidatorUtils()`

Method Summary
`static 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` | `andValidator()` Returns a AndValidator singleton.
`static EmailValidator` | `emailValidator()` Returns a EmailValidator singleton.
`static FileDoesNotExistValidator` | `fileDoesNotExistValidator()` Returns a FileDoesNotExistValidator singleton.
`static FileExistsValidator` | `fileExistsValidator()` Returns a FileExistsValidator singleton.
`static String` | `getKeyLevelOnFail(String validatorName)`
`static int` | `getLevelOnFail(ValidatorContext context, String validatorName)` Gets the `levelOnFail` type for given `validatorName`.
`static IntegerValidator` | `integerValidator()` Returns a IntegerValidator singleton.
`static LongValidator` | `longValidator()` Returns a LongValidator singleton.
`static NotBlankValidator` | `notBlankValidator()` Returns a NotBlankValidator singleton.
`static NotNullValidator` | `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.

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

Field Detail

### LEVEL_FAILURE_DEFAULT

    public static final int LEVEL_FAILURE_DEFAULT

See Also:
  Constant Field Values

Constructor Detail

### JobEntryValidatorUtils

    public JobEntryValidatorUtils()

Method Detail

### andValidator

    public static AndValidator andValidator()

  Returns a AndValidator singleton.

### notBlankValidator

    public static NotBlankValidator notBlankValidator()

  Returns a NotBlankValidator singleton.

### notNullValidator

    public static NotNullValidator notNullValidator()

  Returns a NotNullValidator singleton.

### fileExistsValidator

    public static FileExistsValidator fileExistsValidator()

  Returns a FileExistsValidator singleton.

### integerValidator

    public static IntegerValidator integerValidator()

  Returns a IntegerValidator singleton.

### longValidator

    public static LongValidator longValidator()

  Returns a LongValidator singleton.

### fileDoesNotExistValidator

    public static FileDoesNotExistValidator fileDoesNotExistValidator()

  Returns a FileDoesNotExistValidator singleton.

### emailValidator

    public static EmailValidator emailValidator()

  Returns a EmailValidator singleton.

### getLevelOnFail

    public static int getLevelOnFail(ValidatorContext context,
                                     String validatorName)

  Gets the `levelOnFail` type for given `validatorName`. If that is not found, returns generic `levelOnFail` type. If that fails, returns `CheckResultInterface.TYPE_RESULT_ERROR`.

### putLevelOnFail

    public static void putLevelOnFail(Map<String,Object> map,
                                      String validatorName,
                                      int levelOnFail)

### putLevelOnFail

    public static void putLevelOnFail(Map<String,Object> map,
                                      int levelOnFail)

### getKeyLevelOnFail

    public static String getKeyLevelOnFail(String validatorName)

### 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

    public static void addFailureRemark(org.pentaho.di.core.CheckResultSourceInterface source,
                                        String propertyName,
                                        String validatorName,
                                        List<org.pentaho.di.core.CheckResultInterface> remarks,
                                        int level)

### addExceptionRemark

    public static void addExceptionRemark(org.pentaho.di.core.CheckResultSourceInterface source,
                                          String propertyName,
                                          String validatorName,
                                          List<org.pentaho.di.core.CheckResultInterface> remarks,
                                          Exception e)

### addGeneralRemark

    public static void addGeneralRemark(org.pentaho.di.core.CheckResultSourceInterface source,
                                        String propertyName,
                                        String validatorName,
                                        List<org.pentaho.di.core.CheckResultInterface> remarks,
                                        String key,
                                        int level)

### addOkRemark

    public static void addOkRemark(org.pentaho.di.core.CheckResultSourceInterface source,
                                   String propertyName,
                                   List<org.pentaho.di.core.CheckResultInterface> remarks)

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