public interface NotificationDao extends BambooObjectDao
Modifier and Type | Method and Description |
---|---|
void |
deleteNotification(NotificationRule rule)
Used to remove a notification from db.
|
@NotNull List<UsersNotification> |
getNotificationRulesForRecipients(@NotNull String recipientType,
@NotNull Collection<String> recipients)
Retrieve all notification rules of a specific type matching the given list of recipient values.
|
@NotNull List<UsersNotification> |
getNotificationRulesForRecipientType(String recipientType)
Deprecated.
since 8.1: The method is not applicable anymore. The previous use cases were replaced with more
specific queries (look at getWatcherNotificationRulesForRecipientUsername).
|
@Nullable NotificationSet |
getNotificationSetForId(long notificationSetId)
Retrieve notification set belonging to a specific id.
|
@NotNull List<NotificationSet> |
getNotificationSetsForType(NotificationSet.NotificationSetType type)
Retrieve notification sets belonging to a specific type.
|
@NotNull List<UsersNotification> |
getWatcherNotificationRulesForRecipientUsername(@NotNull String recipientUsername)
Retrieve all watcher recipient type notification rules for a given recipient username.
|
void |
saveNotificationRule(NotificationRule newRule)
Save new/existing notification rule
|
void |
saveNotificationSet(@NotNull NotificationSet notificationSet)
Save new/existing notification set.
|
findById
void deleteNotification(NotificationRule rule)
rule
- Complete NotificationRule Objectvoid saveNotificationRule(NotificationRule newRule)
newRule
- New or Existing NotificationRule Objectvoid saveNotificationSet(@NotNull @NotNull NotificationSet notificationSet)
notificationSet
- New or existing notification set. Must be an instance of EntityObject
.IllegalArgumentException
- If the given notification set is not an instance of EntityObject
@NotNull @NotNull List<UsersNotification> getNotificationRulesForRecipients(@NotNull @NotNull String recipientType, @NotNull @NotNull Collection<String> recipients)
recipientType
- the key of the recipient type to search forrecipients
- a list of values to match (eg email addresses, usernames etc)@Deprecated @NotNull @NotNull List<UsersNotification> getNotificationRulesForRecipientType(String recipientType)
recipientType
- @NotNull @NotNull List<UsersNotification> getWatcherNotificationRulesForRecipientUsername(@NotNull @NotNull String recipientUsername)
recipientUsername
- Username value to match@NotNull @NotNull List<NotificationSet> getNotificationSetsForType(NotificationSet.NotificationSetType type)
type
- to be retrieved@Nullable @Nullable NotificationSet getNotificationSetForId(long notificationSetId)
notificationSetId
- of the searched entityCopyright © 2024 Atlassian Software Systems Pty Ltd. All rights reserved.