Notification Recipient Module

Available:

Bamboo 2.2 and later

On this page:

Description

The Notification Recipient module allows you to create a custom recipient. A recipient is responsible for evaluating the methods of delivery and destinations of the notification. They do this by generating the appropriate Notification Transports. A Recipient can also take in configuration information from the user

As a user can configure any Recipient with any Notification Type you need to ensure your recipient will behave when it doesn't have the required contextual information as sometimes a particular Recipient won't really apply (e.g. a committer recipient when there is no build).

Notification Transport

Notification Transports are responsible for actually sending the notification. They set up the appropriate protocols, retrieve the content from the Notification object and fire off the resulting message through appropriate channels. The recipient is responsible for populating these with the appropriate information, e.g the email address or the IM address). There are three types of transports in bamboo currently: Multipart Email, Text Email and Instance Message.

You can find more information on the various Notification components on the Building a Notification Plugin page.

Interface

Notification Recipients must implement the com.atlassian.bamboo.notification.NotificationRecipient interface. There is an abstract class com.atlassian.bamboo.notification.recipients.AbstractNotificationRecipient which you can extend that implements some of these methods for you with default values.

Sample Module Descriptor

<notificationRecipient key="recipient.user" name="User Recipient" 
                       class="com.atlassian.bamboo.notification.recipients.UserRecipient" weight="10">
    <description>User</description>
    <resource type="freemarker" name="edit" location="templates/plugins/notifications/userRecipientEdit.ftl"/>
  </notificationRecipient>
Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport