public class WebhookRecipient extends AbstractNotificationRecipient
NotificationRecipient.RequiresEvent, NotificationRecipient.RequiresPlan, NotificationRecipient.RequiresResultSummary, NotificationRecipient.Scope, NotificationRecipient.UserRecipientExpandable
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_WEBHOOKS |
static String |
WEBHOOK_FIELD |
static String |
WEBHOOK_NAME |
static String |
WEBHOOK_URL_FIELD |
notificationRecipientModuleDescriptor
Constructor and Description |
---|
WebhookRecipient() |
Modifier and Type | Method and Description |
---|---|
@NotNull String |
getEditHtml()
Returns the html to be displayed on the edit screen (to input data into notification type)
|
@NotNull String |
getRecipientConfig()
Retrieve string representation of data - if none exists return empty string
|
@NotNull List<NotificationTransport> |
getTransports()
Evaluates the appropriate mediums for sending notifications for this recipient,
returning a list of appropriate transports.
|
@NotNull String |
getViewHtml()
Returns the HTML representing the notification type for the notification
|
String |
getWebhookUrl() |
void |
init(@Nullable String configurationData)
Initialise recipient with string based representation of its configuration data
|
void |
populate(@NotNull Map<String,String[]> params)
takes the map of config data from action and extracts the parameters it needs
|
void |
setNotificationFactory(NotificationFactory notificationFactory) |
void |
setTemplateRenderer(TemplateRenderer templateRenderer) |
void |
setTextProvider(com.atlassian.struts.TextProvider textProvider) |
void |
setWebhookTemplateService(WebhookTemplateService webhookTemplateService) |
void |
setWebhookUrl(String webhookUrl) |
@NotNull ErrorCollection |
validate(@NotNull Map<String,String[]> params)
Validate the data user provided.
|
compareTo, getDescription, getKey, getModuleDescriptor, getParam, getScopes, getTransports, init
public static final String WEBHOOK_FIELD
public static final String WEBHOOK_URL_FIELD
public static final String GLOBAL_WEBHOOKS
public static final String WEBHOOK_NAME
@NotNull public @NotNull List<NotificationTransport> getTransports()
NotificationRecipient
public void init(@Nullable @Nullable String configurationData)
NotificationRecipient
init
in interface NotificationRecipient
init
in class AbstractNotificationRecipient
@NotNull public @NotNull String getRecipientConfig()
NotificationRecipient
getRecipientConfig
in interface NotificationRecipient
getRecipientConfig
in class AbstractNotificationRecipient
public void populate(@NotNull @NotNull Map<String,String[]> params)
NotificationRecipient
populate
in interface NotificationRecipient
populate
in class AbstractNotificationRecipient
params
- map of key (String), value (String []) pairs from action@NotNull public @NotNull String getEditHtml()
NotificationRecipient
getEditHtml
in interface NotificationRecipient
getEditHtml
in class AbstractNotificationRecipient
@NotNull public @NotNull String getViewHtml()
NotificationRecipient
getViewHtml
in interface NotificationRecipient
getViewHtml
in class AbstractNotificationRecipient
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull Map<String,String[]> params)
NotificationRecipient
validate
in interface NotificationRecipient
validate
in class AbstractNotificationRecipient
params
- map of key (String), value (String []) pairs from actionpublic void setTemplateRenderer(TemplateRenderer templateRenderer)
public void setNotificationFactory(NotificationFactory notificationFactory)
public void setWebhookTemplateService(WebhookTemplateService webhookTemplateService)
public void setTextProvider(com.atlassian.struts.TextProvider textProvider)
public String getWebhookUrl()
public void setWebhookUrl(String webhookUrl)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.