Package org.codelibs.fess.helper
Class NotificationHelper
java.lang.Object
org.codelibs.fess.helper.NotificationHelper
Helper class for sending notifications to various platforms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final charLine feed character for message formatting. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsend(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Sends notifications to configured platforms.protected voidsendToGoogleChat(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Sends a notification to Google Chat.protected voidsendToSlack(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Sends a notification to Slack.protected StringtoGoogleChatMessage(org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Converts the discloser to a Google Chat message format.protected StringtoSlackMessage(org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Converts the discloser to a Slack message format.
-
Field Details
-
LF
protected static final char LFLine feed character for message formatting.- See Also:
-
-
Constructor Details
-
NotificationHelper
public NotificationHelper()Default constructor.
-
-
Method Details
-
send
public void send(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Sends notifications to configured platforms.- Parameters:
cardView- the card view for the notificationdiscloser- the mail posting discloser
-
sendToSlack
protected void sendToSlack(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Sends a notification to Slack.- Parameters:
cardView- the card view for the notificationdiscloser- the mail posting discloser
-
toSlackMessage
Converts the discloser to a Slack message format.- Parameters:
discloser- the mail posting discloser- Returns:
- the formatted Slack message
-
sendToGoogleChat
protected void sendToGoogleChat(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Sends a notification to Google Chat.- Parameters:
cardView- the card view for the notificationdiscloser- the mail posting discloser
-
toGoogleChatMessage
protected String toGoogleChatMessage(org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser) Converts the discloser to a Google Chat message format.- Parameters:
discloser- the mail posting discloser- Returns:
- the formatted Google Chat message
-