Class RuleValidationResult

All Implemented Interfaces:
ValidationResult, Serializable

A Business RuleValidationResult object contains one validation output per business rule. It should always contain a rule validation key to indicate the business rule that was used to perform the validation. The resulting will also hold a validation status attribute to indicate if the business rule successfully passed the validation or not. The RuleValidationResult will also contain the target object, which links the result to a specific WTReference, and a list of feedback messages which contains text that could optionally be displayed in a report.

Supported API: true

Extendable: true
See Also:
  • Constructor Details

    • RuleValidationResult

      public RuleValidationResult(RuleValidationKey ruleKey, Object targetObject, RuleValidationStatus status)
      Creates the RuleValidationResult object.

      Supported API: true
      Parameters:
      ruleKey -
      targetObject -
      status -
    • RuleValidationResult

      public RuleValidationResult(RuleValidationStatus status)
      Creates the RuleValidationResult object.

      Supported API: true
      Parameters:
      status -
  • Method Details

    • getLocalizedMessage

      public String getLocalizedMessage(Locale locale)
      Produces an output of the validation result as a string. The output is formatted starting with the display identity of the target object that has any feedback messages:

         000001, A.1 Part1
            WARNING : The attribute "Weight" is not set.
            INFO : The attribute "Weight" is greater than 1000.


      Supported API: true
      Parameters:
      locale -
      Returns:
      a string output representation of feedback messages for the target object