public final class ValidationAPI
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static XmlErrorsDocument |
validate(MessageWrapper message, boolean throwOnError)
Validates the message in the given wrapper.
|
static XmlErrorsDocument |
validate(java.lang.String ruleSetName, MessageWrapper message, boolean throwOnError)
Validates the message in the given wrapper by applying validation rules that are part of the ruleSetName.
|
public static XmlErrorsDocument validate(MessageWrapper message, boolean throwOnError) throws ValidationException
message
- the wrapper containing the message to validate.throwOnError
- true
to throw upon encountering the first error, false
to keep validating and collect as many errors as possible before eventually having to abort.throwOnError
was true
.ValidationException
public static XmlErrorsDocument validate(java.lang.String ruleSetName, MessageWrapper message, boolean throwOnError) throws ValidationException
ruleSetName
- name of the validation rule set to be applied for validationmessage
- the wrapper containing the message to validate.throwOnError
- true
to throw upon encountering the first error, false
to keep validating and collect as many errors as possible before eventually having to abort.throwOnError
was true
.ValidationException