com.atlassian.mywork.service
Interface NotificationService

All Known Subinterfaces:
LocalNotificationService

public interface NotificationService

Provides services related to notifications.


Method Summary
 java.util.concurrent.Future<Notification> createOrUpdate(java.lang.String username, Notification notification)
          Create a new notification for the given user
 int getCount(java.lang.String username)
          Returns the number of unseen notifications for the given user.
 void updateMetadata(java.lang.String username, java.lang.String globalId, org.codehaus.jackson.node.ObjectNode condition, org.codehaus.jackson.node.ObjectNode metadata)
          Updates a set of notifications with some new metadata.
 

Method Detail

createOrUpdate

java.util.concurrent.Future<Notification> createOrUpdate(java.lang.String username,
                                                         Notification notification)
Create a new notification for the given user

Parameters:
username - username of the user to create the notification for
notification - notification to create
Returns:
Future with the created notification

getCount

int getCount(java.lang.String username)
Returns the number of unseen notifications for the given user.

Parameters:
username - username of the user
Returns:
the number of unseen notifications for the given user

updateMetadata

void updateMetadata(java.lang.String username,
                    java.lang.String globalId,
                    org.codehaus.jackson.node.ObjectNode condition,
                    org.codehaus.jackson.node.ObjectNode metadata)
Updates a set of notifications with some new metadata. This will append to the previous metadata, not overwrite it.

Parameters:
username - of the user
globalId - of the notifications to update
condition - to compare against
metadata - to append


Copyright © 2012 Atlassian. All Rights Reserved.