public class Message extends Object implements IMessage
IMessage interface. Objects of this
type can contain general information, warnings, or errors. Whether a message
is either one can be determined by checking the message type ID.TimelineObjectPathMessage,
TreePathMessage| Constructor and Description |
|---|
Message(MessageTypeId id,
String text)
Constructs a new message.
|
Message(MessageTypeId id,
String text,
Date time)
Constructs a new message.
|
Message(MessageTypeId id,
String text,
Object details)
Constructs a new message.
|
Message(MessageTypeId id,
String text,
Object details,
Date time)
Constructs a new message.
|
Message(String text)
Constructs a new information message.
|
Message(String text,
Object details)
Constructs a new error message with some details attached to it.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getMessageDetails()
Returns an object that contains some more details about the message.
|
String |
getMessageText()
Returns the text that will be displayed to the user.
|
Date |
getMessageTime()
Returns the time stamp when the message occured.
|
MessageTypeId |
getMessageTypeId()
Returns the type of the message (information, warning, error).
|
String |
toString() |
public Message(MessageTypeId id, String text, Object details, Date time)
id - a message type identifier used to distinguish between plain
information messages or warning and error messagestext - the message that will be shown to the userdetails - an object storing additional information about the cause of
the messagetime - a message time stampTreePathMessage,
TimelineObjectPathMessagepublic Message(MessageTypeId id, String text, Date time)
id - a message type identifier used to distinguish between plain
information messages or warning and error messagestext - the message that will be shown to the usertime - a message time stampTreePathMessage,
TimelineObjectPathMessagepublic Message(MessageTypeId id, String text, Object details)
id - a message type identifier used to distinguish between plain
information messages or warning and error messagestext - the message that will be shown to the userdetails - an object storing additional information about the cause of
the messageTreePathMessage,
TimelineObjectPathMessagepublic Message(MessageTypeId id, String text)
id - a message type identifier used to distinguish between plain
information messages or warning and error messagestext - the message that will be shown to the userTreePathMessage,
TimelineObjectPathMessagepublic Message(String text, Object details)
text - the message that will be shown to the userdetails - an object storing additional information about the cause of
the messageTreePathMessage,
TimelineObjectPathMessagepublic Message(String text)
text - the message that will be shown to the userTreePathMessage,
TimelineObjectPathMessagepublic MessageTypeId getMessageTypeId()
IMessagegetMessageTypeId in interface IMessagepublic String getMessageText()
IMessagegetMessageText in interface IMessagepublic Object getMessageDetails()
IMessageThrowable. The return type is this
generic in order to support different kinds of detailed information in
the future that can not be foreseen, yet.getMessageDetails in interface IMessagepublic Date getMessageTime()
IMessagegetMessageTime in interface IMessageCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.