Interface NotificationRecipient
-
- All Superinterfaces:
BambooPluginModule
,Comparable
- All Known Subinterfaces:
DeploymentResultAwareNotificationRecipient
,UserRecipient
- All Known Implementing Classes:
AbstractNotificationRecipient
,CommitterRecipient
,EmailRecipient
,GroupRecipient
,ImRecipient
,ResponsibleRecipient
,UserRecipientImpl
,WatcherRecipient
,WebhookRecipient
public interface NotificationRecipient extends BambooPluginModule, Comparable
Representation of a recipient of notifications. Knows how to evaluate the mediums the recipient is to retrieve.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
NotificationRecipient.RequiresEvent
Extension interface if the recipient requires extra data.static interface
NotificationRecipient.RequiresPlan
Extension interface if the recipient requires extra data.static interface
NotificationRecipient.RequiresResultSummary
Extension interface if the recipient requires extra data.static class
NotificationRecipient.Scope
static interface
NotificationRecipient.UserRecipientExpandable
Indicates that the recipient is actually expandable into one or many user recipients.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull String
getDescription()
Returns generic string description of this notification type@NotNull String
getEditHtml()
Returns the html to be displayed on the edit screen (to input data into notification type)@NotNull String
getKey()
returns full key for this condition object@Nullable com.atlassian.plugin.web.descriptors.WeightedDescriptor
getModuleDescriptor()
returns the moduleDescriptor for this plugin object if it exists.@NotNull String
getRecipientConfig()
Retrieve string representation of data - if none exists return empty stringdefault @NotNull Set<NotificationRecipient.Scope>
getScopes()
@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 notificationvoid
init(@NotNull com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
initialises the notification type plugin object with its module descriptorvoid
init(@Nullable String configurationData)
Initialise recipient with string based representation of its configuration datavoid
populate(@NotNull Map<String,String[]> params)
takes the map of config data from action and extracts the parameters it needs@NotNull ErrorCollection
validate(@NotNull Map<String,String[]> params)
Validate the data user provided.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
getTransports
@NotNull @NotNull List<NotificationTransport> getTransports()
Evaluates the appropriate mediums for sending notifications for this recipient, returning a list of appropriate transports.
-
init
void init(@NotNull @NotNull com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
initialises the notification type plugin object with its module descriptor- Parameters:
moduleDescriptor
- for this plugin object
-
init
void init(@Nullable @Nullable String configurationData)
Initialise recipient with string based representation of its configuration data
-
getRecipientConfig
@NotNull @NotNull String getRecipientConfig()
Retrieve string representation of data - if none exists return empty string
-
getDescription
@NotNull @NotNull String getDescription()
Returns generic string description of this notification type- Returns:
- string description - can not be null
-
getKey
@NotNull @NotNull String getKey()
returns full key for this condition object- Returns:
- string key (as in plugin definition), can not be null
-
populate
void populate(@NotNull @NotNull Map<String,String[]> params)
takes the map of config data from action and extracts the parameters it needs- Parameters:
params
- map of key (String), value (String []) pairs from action
-
validate
@NotNull @NotNull ErrorCollection validate(@NotNull @NotNull Map<String,String[]> params)
Validate the data user provided.- Parameters:
params
- map of key (String), value (String []) pairs from action- Returns:
- error collection of any errors to be reported back to the user
-
getEditHtml
@NotNull @NotNull String getEditHtml()
Returns the html to be displayed on the edit screen (to input data into notification type)- Returns:
- String of html
-
getViewHtml
@NotNull @NotNull String getViewHtml()
Returns the HTML representing the notification type for the notification- Returns:
- HTML of data for view configuration. If this returns null the description will be used.
-
getModuleDescriptor
@Nullable @Nullable com.atlassian.plugin.web.descriptors.WeightedDescriptor getModuleDescriptor()
returns the moduleDescriptor for this plugin object if it exists.
-
getScopes
@NotNull default @NotNull Set<NotificationRecipient.Scope> getScopes()
- Returns:
- The scopes of the notification recipient, e.g. "system" or "chain" or "deployment" or empty.
-
-