public interface Message extends Serializable, AttributeReadUuid, AttributeReadMessage, AttributeReadMessageCode
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_INFORMATION
The
type for an information. |
static String |
TYPE_TECHNICAL_ERROR
The
type for a technical error. |
static String |
TYPE_USER_ERROR
The
type for a user error. |
static String |
TYPE_VALIDATION_FAILURE
The
type for a validation failure. |
static String |
TYPE_WARNING
The
type for a warning. |
| Modifier and Type | Method and Description |
|---|---|
String |
getDetails()
This method gets optional details for this message.
|
String |
getMessage(Locale locale)
|
String |
getSource()
This method gets the (optional) source of the message.
|
String |
getType()
This method gets the type of this
Message. |
UUID |
getUuid()
This method gets the
UUID of this object. |
getMessagegetCodestatic final String TYPE_TECHNICAL_ERROR
type for a technical error.NlsThrowable.isTechnical(),
Constant Field Valuesstatic final String TYPE_USER_ERROR
type for a user error.NlsThrowable.isForUser(),
Constant Field Valuesstatic final String TYPE_VALIDATION_FAILURE
type for a validation failure.static final String TYPE_WARNING
type for a warning.static final String TYPE_INFORMATION
type for an information.String getSource()
messages displayed to end-users. This will help to find
the problem easier.null if NOT available.String getMessage(Locale locale)
message localized for the given Locale. NLS. On
client side (e.g. for GWT clients) only a single locale may be supported at a time and this method may
behave like AttributeReadMessage.getMessage() ignoring the Locale.locale - is the Locale.String getDetails()
null if no additional details are available.String getType()
Message. This should be one of the following options:
ValidationFailure.error caused by the
end-user (e.g. by providing invalid data). Unlike 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).UUID getUuid()
UUID 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 AttributeReadUuidUUID if this Message. Will typically only be available if type is TYPE_TECHNICAL_ERROR or TYPE_USER_ERROR. Will be null if
not available.Copyright © 2001–2015 mmm-Team. All rights reserved.