public interface Validator<R>
| Modifier and Type | Method and Description |
|---|---|
R |
validate(Message message)
Validates a
Message |
R |
validate(Message message,
ValidationExceptionHandler<R> handler)
Validates a
Message using a custom ValidationExceptionHandler. |
R |
validate(String message,
boolean isXML,
String version)
Validates a String representing an encoded message
|
R |
validate(String message,
boolean isXML,
String version,
ValidationExceptionHandler<R> handler)
Validates a String representing an encoded message.
|
R validate(Message message) throws HL7Exception
Messagemessage - message to be validatedtrue if message is validHL7Exception - if an unexpected error occurs while validatingNullPointerException - if the message is nullR validate(String message, boolean isXML, String version) throws HL7Exception
message - message to be validatedisXML - true if message is supposed to be XMLversion - message versiontrue if message is validHL7Exception - if an unexpected error occurs while validatingNullPointerException - if the message is nullR validate(Message message, ValidationExceptionHandler<R> handler) throws HL7Exception
Message using a custom ValidationExceptionHandler. The handler
provides the possibility to react on the outcome of the validation process and its individual
steps, e.g. collecting all validation, issues, aggregating them to a single issue, logging,
throwing exceptions etc.
As the handler usually maintains state, a new instance is required for every validation call.
message - message to be validatedhandler - message validation handlertrue if message is validHL7Exception - if an unexpected error occurs while validatingNullPointerException - if the message or handler is nullR validate(String message, boolean isXML, String version, ValidationExceptionHandler<R> handler) throws HL7Exception
message - message to be validatedisXML - true if message is supposed to be XMLversion - message versionhandler - message validation handlertrue if message is validHL7Exception - if an unexpected error occurs while validatingNullPointerException - if the message or handler is nullCopyright © 2001–2017 University Health Network. All rights reserved.