com.atlassian.mywork.host.service
Class LocalNotificationServiceImpl
java.lang.Object
com.atlassian.mywork.host.service.LocalNotificationServiceImpl
- All Implemented Interfaces:
- LocalNotificationService, NotificationService
public class LocalNotificationServiceImpl
- extends java.lang.Object
- implements LocalNotificationService
This class provides NotificationService using a local storage.
|
Method Summary |
int |
count(java.lang.String username,
java.lang.String globalId)
|
java.util.concurrent.Future<Notification> |
createOrUpdate(java.lang.String username,
Notification notification)
|
void |
delete(java.lang.String username,
long notificationId)
|
void |
deleteByGlobalId(java.lang.String globalId)
|
void |
deleteByGlobalId(java.lang.String username,
java.lang.String globalId)
|
Notification |
find(java.lang.String username,
long notificationId)
|
java.lang.Iterable<Notification> |
find(java.lang.String username,
java.lang.String globalId)
|
java.lang.Iterable<Notification> |
findAll(java.lang.String user)
|
java.lang.Iterable<Notification> |
findAllAfter(java.lang.String username,
long after,
long before,
int limit)
|
java.lang.Iterable<Notification> |
findAllUnread(java.lang.String user)
|
com.atlassian.cache.Cache |
getCache()
|
int |
getCount(java.lang.String username)
|
Status |
getTaskStatus(java.lang.String username,
Notification notification)
|
void |
invalidateCachedCounts()
|
void |
setLastRead(java.lang.String username,
java.lang.Long notificationId)
|
void |
setRead(java.lang.String username,
java.util.List<java.lang.Long> notificationIds)
|
Task |
setStatus(java.lang.String username,
long notificationId,
Status newStatus)
|
void |
updateMetadata(java.lang.String username,
java.lang.String globalId,
org.codehaus.jackson.node.ObjectNode condition,
org.codehaus.jackson.node.ObjectNode metadata)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalNotificationServiceImpl
public LocalNotificationServiceImpl(NotificationDao notificationDao,
TaskDao taskDao,
UserDao userDao,
com.atlassian.event.api.EventPublisher eventPublisher,
HTMLServiceImpl htmlService,
com.atlassian.cache.CacheFactory cacheFactory,
com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate,
ApplicationLinkIdService applicationLinkHelper)
findAll
public java.lang.Iterable<Notification> findAll(java.lang.String user)
- Specified by:
findAll in interface LocalNotificationService
findAllUnread
public java.lang.Iterable<Notification> findAllUnread(java.lang.String user)
- Specified by:
findAllUnread in interface LocalNotificationService
findAllAfter
public java.lang.Iterable<Notification> findAllAfter(java.lang.String username,
long after,
long before,
int limit)
- Specified by:
findAllAfter in interface LocalNotificationService
find
public Notification find(java.lang.String username,
long notificationId)
- Specified by:
find in interface LocalNotificationService
find
public java.lang.Iterable<Notification> find(java.lang.String username,
java.lang.String globalId)
- Specified by:
find in interface LocalNotificationService
count
public int count(java.lang.String username,
java.lang.String globalId)
- Specified by:
count in interface LocalNotificationService
delete
public void delete(java.lang.String username,
long notificationId)
- Specified by:
delete in interface LocalNotificationService
deleteByGlobalId
public void deleteByGlobalId(java.lang.String username,
java.lang.String globalId)
- Specified by:
deleteByGlobalId in interface LocalNotificationService
deleteByGlobalId
public void deleteByGlobalId(java.lang.String globalId)
- Specified by:
deleteByGlobalId in interface LocalNotificationService
createOrUpdate
public java.util.concurrent.Future<Notification> createOrUpdate(java.lang.String username,
Notification notification)
- Specified by:
createOrUpdate in interface NotificationService
getTaskStatus
public Status getTaskStatus(java.lang.String username,
Notification notification)
setStatus
public Task setStatus(java.lang.String username,
long notificationId,
Status newStatus)
- Specified by:
setStatus in interface LocalNotificationService
setLastRead
public void setLastRead(java.lang.String username,
java.lang.Long notificationId)
- Specified by:
setLastRead in interface LocalNotificationService
setRead
public void setRead(java.lang.String username,
java.util.List<java.lang.Long> notificationIds)
- Specified by:
setRead in interface LocalNotificationService
updateMetadata
public void updateMetadata(java.lang.String username,
java.lang.String globalId,
org.codehaus.jackson.node.ObjectNode condition,
org.codehaus.jackson.node.ObjectNode metadata)
- Specified by:
updateMetadata in interface NotificationService
getCount
public int getCount(java.lang.String username)
- Specified by:
getCount in interface NotificationService
invalidateCachedCounts
public void invalidateCachedCounts()
- Specified by:
invalidateCachedCounts in interface LocalNotificationService
getCache
public com.atlassian.cache.Cache getCache()
Copyright © 2012 Atlassian. All Rights Reserved.