Class AbstractNotificationRecipient
- java.lang.Object
-
- com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient
-
- All Implemented Interfaces:
NotificationRecipient
,BambooPluginModule
,Comparable
- Direct Known Subclasses:
CommitterRecipient
,EmailRecipient
,GroupRecipient
,ImRecipient
,ResponsibleRecipient
,UserRecipientImpl
,WatcherRecipient
,WebhookRecipient
public abstract class AbstractNotificationRecipient extends Object implements NotificationRecipient
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.bamboo.notification.NotificationRecipient
NotificationRecipient.RequiresEvent, NotificationRecipient.RequiresPlan, NotificationRecipient.RequiresResultSummary, NotificationRecipient.Scope, NotificationRecipient.UserRecipientExpandable
-
-
Field Summary
Fields Modifier and Type Field Description protected NotificationRecipientModuleDescriptor
notificationRecipientModuleDescriptor
-
Constructor Summary
Constructors Constructor Description AbstractNotificationRecipient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object o)
@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.protected String
getParam(String key, Map<String,String[]> params)
@NotNull String
getRecipientConfig()
Retrieve string representation of data - if none exists return empty string@Nullable Set<NotificationRecipient.Scope>
getScopes()
protected List<NotificationTransport>
getTransports(Set<UserRecipient> userRecipients)
@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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.notification.NotificationRecipient
getTransports
-
-
-
-
Field Detail
-
notificationRecipientModuleDescriptor
protected NotificationRecipientModuleDescriptor notificationRecipientModuleDescriptor
-
-
Method Detail
-
init
public void init(@NotNull @NotNull com.atlassian.plugin.web.descriptors.WeightedDescriptor moduleDescriptor)
Description copied from interface:NotificationRecipient
initialises the notification type plugin object with its module descriptor- Specified by:
init
in interfaceNotificationRecipient
- Parameters:
moduleDescriptor
- for this plugin object
-
getModuleDescriptor
@Nullable public @Nullable com.atlassian.plugin.web.descriptors.WeightedDescriptor getModuleDescriptor()
Description copied from interface:NotificationRecipient
returns the moduleDescriptor for this plugin object if it exists.- Specified by:
getModuleDescriptor
in interfaceNotificationRecipient
-
getDescription
@NotNull public @NotNull String getDescription()
Description copied from interface:NotificationRecipient
Returns generic string description of this notification type- Specified by:
getDescription
in interfaceNotificationRecipient
- Returns:
- string description - can not be null
-
getKey
@NotNull public @NotNull String getKey()
Description copied from interface:NotificationRecipient
returns full key for this condition object- Specified by:
getKey
in interfaceNotificationRecipient
- Returns:
- string key (as in plugin definition), can not be null
-
init
public void init(@Nullable @Nullable String configurationData)
Description copied from interface:NotificationRecipient
Initialise recipient with string based representation of its configuration data- Specified by:
init
in interfaceNotificationRecipient
-
getRecipientConfig
@NotNull public @NotNull String getRecipientConfig()
Description copied from interface:NotificationRecipient
Retrieve string representation of data - if none exists return empty string- Specified by:
getRecipientConfig
in interfaceNotificationRecipient
-
populate
public void populate(@NotNull @NotNull Map<String,String[]> params)
Description copied from interface:NotificationRecipient
takes the map of config data from action and extracts the parameters it needs- Specified by:
populate
in interfaceNotificationRecipient
- Parameters:
params
- map of key (String), value (String []) pairs from action
-
validate
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull Map<String,String[]> params)
Description copied from interface:NotificationRecipient
Validate the data user provided.- Specified by:
validate
in interfaceNotificationRecipient
- 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 public @NotNull String getEditHtml()
Description copied from interface:NotificationRecipient
Returns the html to be displayed on the edit screen (to input data into notification type)- Specified by:
getEditHtml
in interfaceNotificationRecipient
- Returns:
- String of html
-
getViewHtml
@NotNull public @NotNull String getViewHtml()
Description copied from interface:NotificationRecipient
Returns the HTML representing the notification type for the notification- Specified by:
getViewHtml
in interfaceNotificationRecipient
- Returns:
- HTML of data for view configuration. If this returns null the description will be used.
-
getScopes
@Nullable public @Nullable Set<NotificationRecipient.Scope> getScopes()
- Specified by:
getScopes
in interfaceNotificationRecipient
- Returns:
- The scopes of the notification recipient, e.g. "system" or "chain" or "deployment" or empty.
-
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interfaceComparable
-
getTransports
protected List<NotificationTransport> getTransports(Set<UserRecipient> userRecipients)
-
-