Interface ValidationMatcher
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ValidationMatcher
General validation matcher interface.- Author:
- Christian Wied
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOGLoggerstatic Map<String,ValidationMatcher>matcherstatic StringRESOURCE_PATHMessage validator resource lookup path
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Map<String,ValidationMatcher>lookup()Resolves all available validators from resource path lookup.voidvalidate(String fieldName, String value, List<String> controlParameters, TestContext context)Method called on validation.
-
-
-
Field Detail
-
LOG
static final org.slf4j.Logger LOG
Logger
-
RESOURCE_PATH
static final String RESOURCE_PATH
Message validator resource lookup path- See Also:
- Constant Field Values
-
matcher
static final Map<String,ValidationMatcher> matcher
-
-
Method Detail
-
lookup
static Map<String,ValidationMatcher> lookup()
Resolves all available validators from resource path lookup. Scans classpath for validator meta information and instantiates those validators.- Returns:
-
validate
void validate(String fieldName, String value, List<String> controlParameters, TestContext context) throws ValidationException
Method called on validation.- Parameters:
fieldName- the fieldName for logging purpose.value- the value to be validated.controlParameters- the control parameters.context-- Throws:
ValidationException- when validation fails
-
-