public final class ValidationFailureSuccess extends Object implements ValidationFailure
ValidationFailure representing success used as internal representation where
null is not suitable.| Modifier and Type | Field and Description |
|---|---|
static ValidationFailureSuccess |
INSTANCE
The singleton instance.
|
private static long |
serialVersionUID |
TYPE_INFORMATION, TYPE_TECHNICAL_ERROR, TYPE_USER_ERROR, TYPE_VALIDATION_FAILURE, TYPE_WARNING| Modifier | Constructor and Description |
|---|---|
private |
ValidationFailureSuccess()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCode()
This method gets the code of this
ValidationFailure. |
String |
getDetails()
This method gets optional details for this message.
|
String |
getMessage()
This method gets the message of the validation failure.
|
String |
getMessage(Locale locale)
|
String |
getSource()
This method gets the (optional)
source of the validation. |
String |
getType()
This method gets the type of this
Message. |
UUID |
getUuid()
This method gets the
UUID of this object. |
private static final long serialVersionUID
public static ValidationFailureSuccess INSTANCE
public String getDetails()
MessagegetDetails in interface Messagenull if no additional details are available.public String getType()
MessageMessage. This should be one of the following options:
ValidationFailure.error caused by the
end-user (e.g. by providing invalid data). Unlike Message.TYPE_VALIDATION_FAILURE this is an actual error that has
been detected after a successful validation.error related to a
technical problem (e.g. programming failure such as NullPointerException or operational error like
ConnectException).public UUID getUuid()
MessageUUID of this object. When the object is created, a UUID is generated. In case
the object is created from another object that already has a UUID, the existing UUID
will be used (e.g. for chained exceptions). UUID will appear in a
stacktrace but NOT
in the message. It will therefore be written to
log-files if the NlsThrowable is logged. If you supply the UUID to
the end-user in an error panel or popup (see Message), he can provide it with the
problem report so an administrator or software developer can easily find the stacktrace in the log-files.getUuid in interface AttributeReadUuidgetUuid in interface MessageUUID if this Message. Will typically only be available if type is
Message.TYPE_TECHNICAL_ERROR or Message.TYPE_USER_ERROR. Will be null if not available.public String getSource()
ValidationFailuresource of the validation. It
describes the origin of the given value. This may be the filename where the value was read from, an XPath
where the value was located in an XML document, etc. It can be used to enrich messages
displayed to end-users. This will help to find the problem easier.getSource in interface MessagegetSource in interface ValidationFailurenull if NOT available.public String getMessage()
ValidationFailureusage the message may also contain the name of the field or
other context information in order to determine the source of the problem.getMessage in interface AttributeReadMessagegetMessage in interface ValidationFailureThrowable.getMessage(),
NlsThrowable,
Messagepublic String getMessage(Locale locale)
ValidationFailuremessage localized for the given Locale. ValidationFailure.getMessage() ignoring the lcoale.getMessage in interface MessagegetMessage in interface ValidationFailurelocale - is the Locale.public String getCode()
ValidationFailureValidationFailure. The code is a stable identifier that
indicates the type of the failure. It can be used for automated testing in order to make the test-cases independent
from the actual message texts so they are maintainable and will not break e.g. if typos are fixed in the messages.getCode in interface AttributeReadMessageCodegetCode in interface ValidationFailureThrowable.getMessage(),
NlsThrowable,
MessageCopyright © 2001–2016 mmm-Team. All rights reserved.