Package org.citrusframework.validation
Class DefaultMessageValidator
java.lang.Object
org.citrusframework.validation.AbstractMessageValidator<ValidationContext>
org.citrusframework.validation.DefaultMessageValidator
- All Implemented Interfaces:
MessageValidator<ValidationContext>
- Direct Known Subclasses:
DefaultEmptyMessageValidator,DefaultTextEqualsMessageValidator
Basic control message validator for all message types. Subclasses only have to add
specific logic for message payload validation. This validator is based on a control message.
- Author:
- Christoph Deppisch
-
Field Summary
Fields inherited from interface org.citrusframework.validation.MessageValidator
logger, RESOURCE_PATH, TYPE_RESOLVER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<ValidationContext>Provides class type of most appropriate validation context.booleansupportsMessageType(String messageType, Message message) Checks if this message validator is capable of this message type.Methods inherited from class org.citrusframework.validation.AbstractMessageValidator
findValidationContext, validateMessage, validateMessage
-
Constructor Details
-
DefaultMessageValidator
public DefaultMessageValidator()
-
-
Method Details
-
supportsMessageType
Description copied from interface:MessageValidatorChecks if this message validator is capable of this message type. XML message validators may only apply to this message type while JSON message validator implementations do not and vice versa. This check is called by theMessageValidatorRegistryin order to find a proper message validator for a message.- Parameters:
messageType- the message type representation as String (e.g. xml, json, csv, plaintext).message- the message object- Returns:
- true if this message validator is capable of validating the message type.
-
getRequiredValidationContextType
Description copied from class:AbstractMessageValidatorProvides class type of most appropriate validation context.- Specified by:
getRequiredValidationContextTypein classAbstractMessageValidator<ValidationContext>- Returns:
-