public interface IValidationResult
Modifier and Type | Method and Description |
---|---|
java.util.List<IValidationMessage> |
getAll()
Gets all validation messages as a unmodifiable list in order of their creation
|
java.util.List<IValidationMessage> |
getErrors()
Gets all validation error messages as a unmodifiable list in order of their creation
|
java.util.List<IValidationMessage> |
getInfoErrors()
Gets all validation info error messages as a unmodifiable list in order of their creation
|
java.util.List<IValidationMessage> |
getInfos()
Gets all validation info messages as a unmodifiable list in order of their creation
|
java.util.List<IValidationMessage> |
getWarnings()
Gets all validation warning messages as a unmodifiable list in order of their creation
|
IValidationMessage |
getWorstFirst()
Gets the first message of the worst MessageType this result has.
|
boolean |
isOk()
Returns true if the result has no messages or only messages with type ok.
|
boolean |
isValid()
Checks if this result is valid.
|
IValidationResult |
withContext(java.lang.String context)
Creates a new validation result based on this result with changing the context of all messages
Remark: This validation result remains unchanged by this operation, so the result must
be assigned explicitly to an variable or constant.
|
IValidationResult |
withError(java.lang.String text)
Creates a new validation result based on this result with adding a error message.
|
IValidationResult |
withError(java.lang.String context,
java.lang.String text)
Creates a new validation result based on this result with adding a error message for a given context.
|
IValidationResult |
withInfo(java.lang.String text)
Creates a new validation result based on this result with adding a info message.
|
IValidationResult |
withInfo(java.lang.String context,
java.lang.String text)
Creates a new validation result based on this result with adding a info message for a given context.
|
IValidationResult |
withInfoError(java.lang.String text)
Creates a new validation result based on this result with adding a info error message.
|
IValidationResult |
withInfoError(java.lang.String context,
java.lang.String text)
Creates a new validation result based on this result with adding a info error message for a given context.
|
IValidationResult |
withMessage(IValidationMessage message)
Creates a new validation result based on this result with adding a new message.
|
IValidationResult |
withResult(IValidationResult result)
Creates a new validation result based on this result with adding all messages of a given validation result
Remark: This validation result remains unchanged by this operation, so the result must
be assigned explicitly to an variable or constant.
|
IValidationResult |
withWarning(java.lang.String text)
Creates a new validation result based on this result with adding a warning message.
|
IValidationResult |
withWarning(java.lang.String context,
java.lang.String text)
Creates a new validation result based on this result with adding a warning message for a given context.
|
java.util.List<IValidationMessage> getAll()
java.util.List<IValidationMessage> getErrors()
java.util.List<IValidationMessage> getInfoErrors()
java.util.List<IValidationMessage> getWarnings()
java.util.List<IValidationMessage> getInfos()
IValidationMessage getWorstFirst()
boolean isValid()
isOk()
Method.
A result may be valid but not ok because it has warnings or infos.boolean isOk()
isValid()
Method.
A result may be valid but not ok because it has warnings or infos.IValidationResult withMessage(IValidationMessage message)
message
- The message to add, must not be nullIValidationResult withError(java.lang.String text)
message
- The text of the message to addIValidationResult withInfoError(java.lang.String text)
message
- The text of the message to addIValidationResult withWarning(java.lang.String text)
message
- The text of the message to addIValidationResult withInfo(java.lang.String text)
message
- The text of the message to addIValidationResult withError(java.lang.String context, java.lang.String text)
context
- The context of the message to add (the other contexts remains unchanged)message
- The text of the message to addIValidationResult withInfoError(java.lang.String context, java.lang.String text)
context
- The context of the message to add (the other contexts remains unchanged)message
- The text of the message to addIValidationResult withWarning(java.lang.String context, java.lang.String text)
context
- The context of the message to add (the other contexts remains unchanged)message
- The text of the message to addIValidationResult withInfo(java.lang.String context, java.lang.String text)
context
- The context of the message to add (the other contexts remains unchanged)message
- The text of the message to addIValidationResult withResult(IValidationResult result)
result
- The result to addIValidationResult withContext(java.lang.String context)
result
- The context to set, may be nullSiehe auch Jowidgets Nutzerhandbuch