|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.job.entry.validator.JobEntryValidatorUtils
public class JobEntryValidatorUtils
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
.
Field Summary | |
---|---|
static int |
LEVEL_FAILURE_DEFAULT
|
Constructor Summary | |
---|---|
JobEntryValidatorUtils()
|
Method Summary | |
---|---|
static void |
addExceptionRemark(CheckResultSourceInterface source,
String propertyName,
String validatorName,
List<CheckResultInterface> remarks,
Exception e)
|
static void |
addFailureRemark(CheckResultSourceInterface source,
String propertyName,
String validatorName,
List<CheckResultInterface> remarks,
int level)
|
static void |
addGeneralRemark(CheckResultSourceInterface source,
String propertyName,
String validatorName,
List<CheckResultInterface> remarks,
String key,
int level)
|
static void |
addOkRemark(CheckResultSourceInterface source,
String propertyName,
List<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(CheckResultSourceInterface source,
String propertyName,
int levelOnFail,
List<CheckResultInterface> remarks,
String mask)
Fails if a field's value does not match the given mask. |
static boolean |
validateMask(CheckResultSourceInterface source,
String propertyName,
List<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 |
---|
public static final int LEVEL_FAILURE_DEFAULT
Constructor Detail |
---|
public JobEntryValidatorUtils()
Method Detail |
---|
public static AndValidator andValidator()
public static NotBlankValidator notBlankValidator()
public static NotNullValidator notNullValidator()
public static FileExistsValidator fileExistsValidator()
public static IntegerValidator integerValidator()
public static LongValidator longValidator()
public static FileDoesNotExistValidator fileDoesNotExistValidator()
public static EmailValidator emailValidator()
public static int getLevelOnFail(ValidatorContext context, String validatorName)
levelOnFail
type for given validatorName
. If that is not found, returns generic
levelOnFail
type. If that fails, returns CheckResultInterface.TYPE_RESULT_ERROR
.
public static void putLevelOnFail(Map<String,Object> map, String validatorName, int levelOnFail)
public static void putLevelOnFail(Map<String,Object> map, int levelOnFail)
public static String getKeyLevelOnFail(String validatorName)
public static boolean validateMask(CheckResultSourceInterface source, String propertyName, List<CheckResultInterface> remarks, String mask, int levelOnFail)
public static boolean validateMask(CheckResultSourceInterface source, String propertyName, int levelOnFail, List<CheckResultInterface> remarks, String mask)
public static void addFailureRemark(CheckResultSourceInterface source, String propertyName, String validatorName, List<CheckResultInterface> remarks, int level)
public static void addExceptionRemark(CheckResultSourceInterface source, String propertyName, String validatorName, List<CheckResultInterface> remarks, Exception e)
public static void addGeneralRemark(CheckResultSourceInterface source, String propertyName, String validatorName, List<CheckResultInterface> remarks, String key, int level)
public static void addOkRemark(CheckResultSourceInterface source, String propertyName, List<CheckResultInterface> remarks)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |