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.LoggerLOG
-
Constructor Summary
Constructors Constructor Description AbstractSlackCompatibleNotificationStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringbuildMessage(List<Argument> args)protected abstract StringdecorateMessageBody(String body)protected abstract StringdecorateMessageSubject(String subject)protected abstract StringformatWebhookErrorResponse(int statusCode, String contents)protected StringgetChannel()protected abstract StringgetChannelPropertyName()protected StringgetIconEmoji()protected abstract StringgetIconEmojiPropertyName()protected StringgetIconUrl()protected abstract StringgetIconUrlPropertyName()protected StringgetUrl()protected abstract StringgetUrlPropertyName()protected StringgetUsername()protected abstract StringgetUsernamePropertyName()protected booleangetUseSystemProxy()protected abstract StringgetUseSystemProxyPropertyName()protected StringgetValue(String switchName)protected StringgetValue(String switchName, String systemPropertyName)protected StringgetValueFromSwitchOrProp(String what, String switchName, String propName)intsend(List<Argument> arguments)sendprotected voidsetArguments(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:
sendin interfaceNotificationStrategy- Parameters:
arguments- aListobject.- 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)
-
-