Class RuleValidationResult
java.lang.Object
com.ptc.core.validation.AbstractValidationResult<RuleValidationKey,RuleValidationStatus,RuleFeedbackMessage>
com.ptc.core.businessRules.validation.RuleValidationResult
- All Implemented Interfaces:
ValidationResult,Serializable
public class RuleValidationResult
extends AbstractValidationResult<RuleValidationKey,RuleValidationStatus,RuleFeedbackMessage>
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
Supported API: true
Extendable: true
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRuleValidationResult(RuleValidationKey ruleKey, Object targetObject, RuleValidationStatus status) Creates the RuleValidationResult object.Creates the RuleValidationResult object. -
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedMessage(Locale locale) Produces an output of the validation result as a string.
-
Constructor Details
-
RuleValidationResult
public RuleValidationResult(RuleValidationKey ruleKey, Object targetObject, RuleValidationStatus status) Creates the RuleValidationResult object.
Supported API: true- Parameters:
ruleKey-targetObject-status-
-
RuleValidationResult
Creates the RuleValidationResult object.
Supported API: true- Parameters:
status-
-
-
Method Details
-
getLocalizedMessage
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
-