com.atlassian.bamboo.notification
Interface NotificationManager

All Known Implementing Classes:
NotificationManagerImpl

public interface NotificationManager

Provide methods to manage notifications.


Method Summary
 NotificationSet cloneNotificationSet(NotificationSet oldSet)
          Clone notification set and rules for use when cloning build
 NotificationRule createNotificationRule(NotificationSet notificationSet, java.lang.String conditionKey, java.lang.String conditionData, java.lang.String recipientString, java.lang.String recipientType)
          Create notification rule and provide required managers.
 java.util.List<NotificationCondition> getAllConditions()
          Deprecated. 
 java.util.List<NotificationRecipient> getAllNotificationRecipients()
          Returns a list of all enabled NotificationRecipient plugin modules
 java.util.List<NotificationType> getAllNotificationTypes()
          Returns a list of all enabled NotificationType plugin modules
 NotificationCondition getConditionFromKey(java.lang.String key)
          Deprecated. 
 NotificationRecipient getNotificationRecipientFromKey(java.lang.String notificationRecipientKey)
          Retrieve a specific NotificationRecipient plugin module based on the given key.
 java.util.Set<NotificationRule> getNotificationRules(Build build)
          Extract notification rules.
 java.util.List<UsersNotification> getNotificationRulesForUser(BambooUser user)
          Retrieves all notification rules associated with a given user searches for notification rules: * assigned to the user * assigned to a group the user belongs to * assigned to the user's email or user's im address * assigned to watchers of a build the user has marked as their favourite
 NotificationType getNotificationTypeFromKey(java.lang.String key)
          Retrieve a specific NotificationType plugin module based on the given key.
 boolean isRecipientUserBase(NotificationRule notificationRule)
          Determines whether or not a notification rule recipient evaluates to a bamboo user and therefore comply with the users notification preference.
 void saveNotificationSet(NotificationSet nSet)
          Saves a notification set without requiring a build.
 

Method Detail

createNotificationRule

NotificationRule createNotificationRule(NotificationSet notificationSet,
                                        java.lang.String conditionKey,
                                        java.lang.String conditionData,
                                        java.lang.String recipientString,
                                        java.lang.String recipientType)
Create notification rule and provide required managers.

Parameters:
notificationSet - - the set the rule will belong to
conditionKey -
conditionData -
recipientString -
recipientType -
Returns:

getNotificationRules

java.util.Set<NotificationRule> getNotificationRules(Build build)
Extract notification rules. Currently this just grabs the set from the build however in future this may change to accomodate non build related rules.

Parameters:
build -
Returns:

cloneNotificationSet

NotificationSet cloneNotificationSet(NotificationSet oldSet)
Clone notification set and rules for use when cloning build

Parameters:
oldSet -
Returns:

getAllConditions

@Deprecated
java.util.List<NotificationCondition> getAllConditions()
Deprecated. 

Returns a list of all enabled NotificationCondition plugin modules. This is deprecated and is only used to keep backward compatability for plugins. Use NotificationType instead.

Returns:

getConditionFromKey

@Deprecated
NotificationCondition getConditionFromKey(java.lang.String key)
Deprecated. 

Retrieve an individual NotificationCondition plugin module based on the given key. This is deprecated and is only used to keep backward compatability for plugins. Use NotificationType instead.

Parameters:
key - - full plugin key for the module to be retrieved
Returns:

getAllNotificationTypes

java.util.List<NotificationType> getAllNotificationTypes()
Returns a list of all enabled NotificationType plugin modules

Returns:

getNotificationTypeFromKey

NotificationType getNotificationTypeFromKey(java.lang.String key)
Retrieve a specific NotificationType plugin module based on the given key.

Parameters:
key -
Returns:

getAllNotificationRecipients

java.util.List<NotificationRecipient> getAllNotificationRecipients()
Returns a list of all enabled NotificationRecipient plugin modules

Returns:

getNotificationRecipientFromKey

NotificationRecipient getNotificationRecipientFromKey(java.lang.String notificationRecipientKey)
Retrieve a specific NotificationRecipient plugin module based on the given key.

Parameters:
key -
Returns:

saveNotificationSet

void saveNotificationSet(NotificationSet nSet)
Saves a notification set without requiring a build.

Parameters:
nSet -

getNotificationRulesForUser

@NotNull
java.util.List<UsersNotification> getNotificationRulesForUser(@NotNull
                                                                      BambooUser user)
Retrieves all notification rules associated with a given user searches for notification rules: * assigned to the user * assigned to a group the user belongs to * assigned to the user's email or user's im address * assigned to watchers of a build the user has marked as their favourite

Parameters:
user -
Returns:

isRecipientUserBase

boolean isRecipientUserBase(NotificationRule notificationRule)
Determines whether or not a notification rule recipient evaluates to a bamboo user and therefore comply with the users notification preference.

Parameters:
notificationRule -
Returns:
true if the recipient evaluates to a use


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.