-
- All Superinterfaces:
Comparable<ValidationMessage>
public interface ValidationMessage extends Comparable<ValidationMessage>
Interface to define basic contract for validation message
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<ValidationMessage>COMPARATOR
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intcompareTo(ValidationMessage msg)static ValidationMessageerror(Control target, String text)Factory method to create a simple error messageSeveritygetSeverity()MessageSeverityControlgetTarget()Message target -Controlwhich message is related to .StringgetText()Message textstatic ValidationMessageinfo(Control target, String text)Factory method to create a simple info messagestatic ValidationMessageok(Control target)Factory method to create a simple ok messagestatic ValidationMessageok(Control target, String text)Factory method to create a simple ok messagestatic ValidationMessagewarning(Control target, String text)Factory method to create a simple warning message
-
-
-
Field Detail
-
COMPARATOR
static final Comparator<ValidationMessage> COMPARATOR
-
-
Method Detail
-
getText
String getText()
Message text- Returns:
- message text
-
getTarget
Control getTarget()
Message target -Controlwhich message is related to .- Returns:
- message target
-
error
static ValidationMessage error(Control target, String text)
Factory method to create a simple error message- Parameters:
target- message targettext- message text- Returns:
- error message
-
warning
static ValidationMessage warning(Control target, String text)
Factory method to create a simple warning message- Parameters:
target- message targettext- message text- Returns:
- warning message
-
info
static ValidationMessage info(Control target, String text)
Factory method to create a simple info message- Parameters:
target- message targettext- message text- Returns:
- info message
-
ok
static ValidationMessage ok(Control target, String text)
Factory method to create a simple ok message- Parameters:
target- message targettext- message text- Returns:
- ok message
-
ok
static ValidationMessage ok(Control target)
Factory method to create a simple ok message- Parameters:
target- message target- Returns:
- ok message
-
compareTo
default int compareTo(ValidationMessage msg)
- Specified by:
compareToin interfaceComparable<ValidationMessage>
-
-