com.bea.alsb.financial.api
Class ValidationAPI

java.lang.Object
  extended by com.bea.alsb.financial.api.ValidationAPI

public final class ValidationAPI
extends Object

Facade API for validation operations.


Method Summary
static XmlErrorsDocument validate(MessageWrapper message, boolean throwOnError)
          Validates the message in the given wrapper.
static XmlErrorsDocument validate(String ruleSetName, MessageWrapper message, boolean throwOnError)
          Validates the message in the given wrapper by applying validation rules that are part of the ruleSetName.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public static XmlErrorsDocument validate(MessageWrapper message,
                                         boolean throwOnError)
                                  throws ValidationException
Validates the message in the given wrapper. If throwOnErroe is true, the errors in the wrapper are reset and populated depending on the result of the validation. If throwOnError is false, this method will throw an exception when the first error is encountered and stop the processing. For more details about the errors cml structure refers to the schemas provided with the facade Jar file.

Parameters:
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.
Returns:
the encountered errors (if any and throwOnError was true.
Throws:
ValidationException

validate

public static XmlErrorsDocument validate(String ruleSetName,
                                         MessageWrapper message,
                                         boolean throwOnError)
                                  throws ValidationException
Validates the message in the given wrapper by applying validation rules that are part of the ruleSetName. If throwOnErroe is true, the errors in the wrapper are reset and populated depending on the result of the validation. If throwOnError is false, this method will throw an exception when the first error is encountered and stop the processing. For more details about the errors cml structure refers to the schemas provided with the facade Jar file.

Parameters:
ruleSetName - name of the validation rule set to be applied for validation
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.
Returns:
the encountered errors (if any and throwOnError was true.
Throws:
ValidationException