Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods
void
Used to remove a notification from db.
Retrieve all notification rules of a specific type matching the given list of recipient values.
Retrieve notification set belonging to a specific id.
Retrieve notification sets belonging to a specific type.
Retrieve all watcher recipient type notification rules for a given recipient username.
void
Save new/existing notification rule
void
Save new/existing notification set.
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
Method Details
deleteNotification
Used to remove a notification from db.
This should cascade to delete associated recipients
Parameters:
rule
- Complete NotificationRule Object
saveNotificationRule
Save new/existing notification rule
Parameters:
newRule
- New or Existing NotificationRule Object
saveNotificationSet
void saveNotificationSet (@NotNull
@NotNull NotificationSet notificationSet)
Save new/existing notification set.
Parameters:
notificationSet
- New or existing notification set. Must be an instance of EntityObject
.
Throws:
IllegalArgumentException
- If the given notification set is not an instance of EntityObject
getNotificationRulesForRecipients
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:
List of user notifications
getNotificationRulesForRecipientType
Deprecated.
Retrieve All notification rules with a specific recipient type (useful for retrieveing watchers and committers)
Parameters:
recipientType
-
Returns:
List of user notifications
getWatcherNotificationRulesForRecipientUsername
Retrieve all watcher recipient type notification rules for a given recipient username.
Parameters:
recipientUsername
- Username value to match
Returns:
List of user notifications
getNotificationSetsForType
Retrieve notification sets belonging to a specific type.
Parameters:
type
- to be retrieved
Returns:
List of notification sets.
getNotificationSetForId
@Nullable
@Nullable NotificationSet getNotificationSetForId (long notificationSetId)
Retrieve notification set belonging to a specific id.
Parameters:
notificationSetId
- of the searched entity
Returns:
Found notificationSet.