com.atlassian.bamboo.notification
Interface NotificationDao

All Superinterfaces:
BambooObjectDao, bucket.core.persistence.ObjectDao
All Known Implementing Classes:
NotificationHibernateDao

public interface NotificationDao
extends BambooObjectDao


Method Summary
 void deleteNotification(NotificationRule rule)
          Used to remove a notification from db.
 java.util.List<UsersNotification> getNotificationRulesForRecipients(java.lang.String recipientType, java.util.Collection<java.lang.String> recipients)
          Retrieve all notification rules of a specific type matching the given list of recipient values.
 java.util.List<UsersNotification> getNotificationRulesForRecipientType(java.lang.String recipientType)
          Retrieve All notification rules with a specific recipient type (useful for retrieveing watchers and committers)
 java.util.List<NotificationSet> getNotificationSetsForType(NotificationSet.NotificationSetType type)
          Retrieve notification sets belonging to a specific type.
 void saveNotificationRule(NotificationRule newRule)
          Save new/existing notification rule
 
Methods inherited from interface com.atlassian.bamboo.persistence.BambooObjectDao
findById
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

deleteNotification

void deleteNotification(NotificationRule rule)
Used to remove a notification from db. This should cascade to delete associated recipients

Parameters:
rule - Complete NotificationRule Object

saveNotificationRule

void saveNotificationRule(NotificationRule newRule)
Save new/existing notification rule

Parameters:
newRule - New or Existing NotificationRule Object

getNotificationRulesForRecipients

@NotNull
java.util.List<UsersNotification> getNotificationRulesForRecipients(@NotNull
                                                                            java.lang.String recipientType,
                                                                            @NotNull
                                                                            java.util.Collection<java.lang.String> recipients)
Retrieve all notification rules of a specific type matching the given list of recipient values.

Parameters:
recipientType - the key of the recipient type to search for
recipients - a list of values to match (eg email addresses, usernames etc)
Returns:

getNotificationRulesForRecipientType

@NotNull
java.util.List<UsersNotification> getNotificationRulesForRecipientType(java.lang.String recipientType)
Retrieve All notification rules with a specific recipient type (useful for retrieveing watchers and committers)

Parameters:
recipientType -
Returns:

getNotificationSetsForType

@NotNull
java.util.List<NotificationSet> getNotificationSetsForType(NotificationSet.NotificationSetType type)
Retrieve notification sets belonging to a specific type.

Parameters:
type - to be retrieved
Returns:
List of notification sets.


Copyright © 2012 Atlassian. All Rights Reserved.