From dc935dcd6d414a87399e37b6a068740171df27d5 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Fri, 3 Jul 2009 15:14:23 +0000 Subject: [PATCH] added validation result --- .../ui/validation/ValidationResult.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 org.springframework.context/src/main/java/org/springframework/ui/validation/ValidationResult.java diff --git a/org.springframework.context/src/main/java/org/springframework/ui/validation/ValidationResult.java b/org.springframework.context/src/main/java/org/springframework/ui/validation/ValidationResult.java new file mode 100644 index 00000000000..29255af53cb --- /dev/null +++ b/org.springframework.context/src/main/java/org/springframework/ui/validation/ValidationResult.java @@ -0,0 +1,23 @@ +package org.springframework.ui.validation; + +import org.springframework.ui.alert.Alert; + +public interface ValidationResult { + + /** + * The name of the model property associated with this validation result. + */ + String getProperty(); + + /** + * Indicates if the validation failed. + */ + boolean isFailure(); + + /** + * Gets the alert for this validation result, appropriate for rendering the result to the user. + * An alert describing a successful validation will have info severity. + * An alert describing a failed validation will have either warning or error severity. + */ + Alert getAlert(); +}