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
,
TimelineObjectPathMessage
public 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
,
TimelineObjectPathMessage
public 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
,
TimelineObjectPathMessage
public 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
,
TimelineObjectPathMessage
public 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
,
TimelineObjectPathMessage
public Message(String text)
text
- the message that will be shown to the userTreePathMessage
,
TimelineObjectPathMessage
public MessageTypeId getMessageTypeId()
IMessage
getMessageTypeId
in interface IMessage
public String getMessageText()
IMessage
getMessageText
in interface IMessage
public Object getMessageDetails()
IMessage
Throwable
. 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 IMessage
public Date getMessageTime()
IMessage
getMessageTime
in interface IMessage
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.