Class NotificationHelper

java.lang.Object
org.codelibs.fess.helper.NotificationHelper

public class NotificationHelper extends Object
Helper class for sending notifications to various platforms.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final char
    Line feed character for message formatting.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    send(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser)
    Sends notifications to configured platforms.
    protected void
    sendToGoogleChat(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser)
    Sends a notification to Google Chat.
    protected void
    sendToSlack(org.dbflute.mail.CardView cardView, org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser)
    Sends a notification to Slack.
    protected String
    toGoogleChatMessage(org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser)
    Converts the discloser to a Google Chat message format.
    protected String
    toSlackMessage(org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser)
    Converts the discloser to a Slack message format.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LF

      protected static final char LF
      Line 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 notification
      discloser - 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 notification
      discloser - the mail posting discloser
    • toSlackMessage

      protected String toSlackMessage(org.dbflute.mail.send.supplement.SMailPostingDiscloser discloser)
      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 notification
      discloser - 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