-
- 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 int
compareTo(ValidationMessage msg)
static ValidationMessage
error(Control target, String text)
Factory method to create a simple error messageSeverity
getSeverity()
MessageSeverity
Control
getTarget()
Message target -Control
which message is related to .String
getText()
Message textstatic ValidationMessage
info(Control target, String text)
Factory method to create a simple info messagestatic ValidationMessage
ok(Control target)
Factory method to create a simple ok messagestatic ValidationMessage
ok(Control target, String text)
Factory method to create a simple ok messagestatic ValidationMessage
warning(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 -Control
which 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:
compareTo
in interfaceComparable<ValidationMessage>
-
-