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 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 String
buildMessage(List<Argument> args)
protected abstract String
decorateMessageBody(String body)
protected abstract String
decorateMessageSubject(String subject)
protected abstract String
formatWebhookErrorResponse(int statusCode, String contents)
protected String
getChannel()
protected abstract String
getChannelPropertyName()
protected String
getIconEmoji()
protected abstract String
getIconEmojiPropertyName()
protected String
getIconUrl()
protected abstract String
getIconUrlPropertyName()
protected String
getUrl()
protected abstract String
getUrlPropertyName()
protected String
getUsername()
protected abstract String
getUsernamePropertyName()
protected boolean
getUseSystemProxy()
protected abstract String
getUseSystemProxyPropertyName()
protected String
getValue(String switchName)
protected String
getValue(String switchName, String systemPropertyName)
protected String
getValueFromSwitchOrProp(String what, String switchName, String propName)
int
send(List<Argument> arguments)
sendprotected void
setArguments(List<Argument> arguments)
-
-
-
Method Detail
-
getChannelPropertyName
protected abstract String getChannelPropertyName()
-
getIconEmojiPropertyName
protected abstract String getIconEmojiPropertyName()
-
getIconUrlPropertyName
protected abstract String getIconUrlPropertyName()
-
getUsernamePropertyName
protected abstract String getUsernamePropertyName()
-
getUrlPropertyName
protected abstract String getUrlPropertyName()
-
getUseSystemProxyPropertyName
protected abstract String getUseSystemProxyPropertyName()
-
formatWebhookErrorResponse
protected abstract String formatWebhookErrorResponse(int statusCode, String contents)
-
send
public int send(List<Argument> arguments)
send
- Specified by:
send
in interfaceNotificationStrategy
- Parameters:
arguments
- aList
object.- Returns:
- a int.
-
getUrl
protected String getUrl()
-
getUsername
protected String getUsername()
-
getIconUrl
protected String getIconUrl()
-
getUseSystemProxy
protected boolean getUseSystemProxy()
-
getIconEmoji
protected String getIconEmoji()
-
getChannel
protected String getChannel()
-
getValueFromSwitchOrProp
protected String getValueFromSwitchOrProp(String what, String switchName, String propName)
-
-