Package org.citrusframework.validation
Interface HeaderValidator
public interface HeaderValidator
- Since:
- 2.7.6
- Author:
- Christoph Deppisch
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.slf4j.LoggerLoggerstatic final StringHeader validator resource lookup pathstatic final TypeResolverType resolver to find custom message validators on classpath via resource path lookupstatic final Map<String,HeaderValidator> -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String,HeaderValidator> lookup()Resolves all available validators from resource path lookup.static Optional<HeaderValidator>Resolves validator from resource path lookup with given validator resource name.booleanFilter supported headers by name and value typevoidvalidateHeader(String name, Object received, Object control, TestContext context, HeaderValidationContext validationContext) Validate header values with received value and control value.
-
Field Details
-
logger
static final org.slf4j.Logger loggerLogger -
RESOURCE_PATH
Header validator resource lookup path- See Also:
-
TYPE_RESOLVER
Type resolver to find custom message validators on classpath via resource path lookup -
validators
-
-
Method Details
-
lookup
Resolves all available validators from resource path lookup. Scans classpath for validator meta information and instantiates those validators.- Returns:
-
lookup
Resolves validator from resource path lookup with given validator resource name. Scans classpath for validator meta information with given name and returns instance of validator. Returns optional instead of throwing exception when no validator could be found.- Parameters:
validator-- Returns:
-
supports
Filter supported headers by name and value type- Parameters:
headerName-type-- Returns:
-
validateHeader
void validateHeader(String name, Object received, Object control, TestContext context, HeaderValidationContext validationContext) Validate header values with received value and control value.- Parameters:
name-received-control-context-validationContext-
-