Package org.opennms.netmgt.notifd
Class AbstractSlackCompatibleNotificationStrategy
- java.lang.Object
-
- org.opennms.netmgt.notifd.AbstractSlackCompatibleNotificationStrategy
-
- All Implemented Interfaces:
NotificationStrategy
- Direct Known Subclasses:
MattermostNotificationStrategy
,SlackNotificationStrategy
public abstract class AbstractSlackCompatibleNotificationStrategy extends java.lang.Object implements NotificationStrategy
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description AbstractSlackCompatibleNotificationStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
buildMessage(java.util.List<Argument> args)
protected abstract java.lang.String
decorateMessageBody(java.lang.String body)
protected abstract java.lang.String
decorateMessageSubject(java.lang.String subject)
protected abstract java.lang.String
formatWebhookErrorResponse(int statusCode, java.lang.String contents)
protected java.lang.String
getChannel()
protected abstract java.lang.String
getChannelPropertyName()
protected java.lang.String
getIconEmoji()
protected abstract java.lang.String
getIconEmojiPropertyName()
protected java.lang.String
getIconUrl()
protected abstract java.lang.String
getIconUrlPropertyName()
protected java.lang.String
getUrl()
protected abstract java.lang.String
getUrlPropertyName()
protected java.lang.String
getUsername()
protected abstract java.lang.String
getUsernamePropertyName()
protected boolean
getUseSystemProxy()
protected abstract java.lang.String
getUseSystemProxyPropertyName()
protected java.lang.String
getValue(java.lang.String switchName)
protected java.lang.String
getValue(java.lang.String switchName, java.lang.String systemPropertyName)
protected java.lang.String
getValueFromSwitchOrProp(java.lang.String what, java.lang.String switchName, java.lang.String propName)
int
send(java.util.List<Argument> arguments)
sendprotected void
setArguments(java.util.List<Argument> arguments)
-
-
-
Method Detail
-
getChannelPropertyName
protected abstract java.lang.String getChannelPropertyName()
-
getIconEmojiPropertyName
protected abstract java.lang.String getIconEmojiPropertyName()
-
getIconUrlPropertyName
protected abstract java.lang.String getIconUrlPropertyName()
-
getUsernamePropertyName
protected abstract java.lang.String getUsernamePropertyName()
-
getUrlPropertyName
protected abstract java.lang.String getUrlPropertyName()
-
getUseSystemProxyPropertyName
protected abstract java.lang.String getUseSystemProxyPropertyName()
-
decorateMessageBody
protected abstract java.lang.String decorateMessageBody(java.lang.String body)
-
decorateMessageSubject
protected abstract java.lang.String decorateMessageSubject(java.lang.String subject)
-
formatWebhookErrorResponse
protected abstract java.lang.String formatWebhookErrorResponse(int statusCode, java.lang.String contents)
-
setArguments
protected void setArguments(java.util.List<Argument> arguments)
-
send
public int send(java.util.List<Argument> arguments)
send
- Specified by:
send
in interfaceNotificationStrategy
- Parameters:
arguments
- aList
object.- Returns:
- a int.
-
getUrl
protected java.lang.String getUrl()
-
getUsername
protected java.lang.String getUsername()
-
getIconUrl
protected java.lang.String getIconUrl()
-
getUseSystemProxy
protected boolean getUseSystemProxy()
-
getIconEmoji
protected java.lang.String getIconEmoji()
-
getChannel
protected java.lang.String getChannel()
-
getValueFromSwitchOrProp
protected java.lang.String getValueFromSwitchOrProp(java.lang.String what, java.lang.String switchName, java.lang.String propName)
-
buildMessage
protected java.lang.String buildMessage(java.util.List<Argument> args)
-
getValue
protected java.lang.String getValue(java.lang.String switchName)
-
getValue
protected java.lang.String getValue(java.lang.String switchName, java.lang.String systemPropertyName)
-
-