public class MessageHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MessageHelper.MessageType
Describes a message type set by event type and associate message.
|
Constructor and Description |
---|
MessageHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
prepareHTMLMessageBody(MessageBody messageBody)
Constructs a formatted message body based on provided message body elements content in HTML format.
If any of message body element is empty or missing, it will not appear in the formatted message body text |
static String |
prepareMessageBody(MessageBody messageBody)
Constructs a formatted message body based on provided message body elements content.
If any of message body element is empty or missing, it will not appear in the formatted message body text |
static String |
prepareMessageSubject(int eventType,
String hostName,
String message)
Construct a formatted message based on predefined template:
"Issue Solved"/"Alert Notification" (host name), [message details] |
public static String prepareMessageBody(MessageBody messageBody)
messageBody
- the message body values for populate a formatted message bodypublic static String prepareMessageSubject(int eventType, String hostName, String message)
"Issue Solved"/"Alert Notification" (host name), [message details]
eventType
- determines the prefix of the subjecthostName
- the machine names associated with this eventmessage
- the content of the message to conveypublic static String prepareHTMLMessageBody(MessageBody messageBody)
messageBody
- the message body values for populate a formatted message bodyCopyright © 2012. All Rights Reserved.