public class DefaultWatcherManager extends Object implements WatcherManager
Modifier and Type | Field and Description |
---|---|
static String |
ASSOCIATION_TYPE |
Constructor and Description |
---|
DefaultWatcherManager(UserAssociationStore userAssociationStore,
ApplicationProperties applicationProperties,
IssueIndexManager indexManager,
UserManager userManager,
IssueFactory issueFactory,
com.atlassian.event.api.EventPublisher eventPublisher,
IssueManager issueManager) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getCurrentWatcherUsernames(org.ofbiz.core.entity.GenericValue issue)
Retrieve the list of usernames of users watching the given issue
|
List<String> |
getCurrentWatcherUsernames(Issue issue)
Retrieve the list of usernames of users watching the given issue
|
Collection<com.atlassian.crowd.embedded.api.User> |
getCurrentWatchList(Issue issue,
Locale userLocale)
Retrieve collection of users that are currently watching this issue (including the current user)
|
int |
getWatcherCount(Issue issue)
Returns the number of users watching this issue.
|
List<ApplicationUser> |
getWatchers(Issue issue,
Locale userLocale)
Retrieve list of users that are currently watching this issue (including the current user).
|
Collection<String> |
getWatcherUserKeys(Issue issue)
Retrieve list of users that are currently watching this issue (including the current user).
|
boolean |
isWatching(ApplicationUser user,
Issue issue)
Determine whether the current user is already watching the issue or not
|
boolean |
isWatching(com.atlassian.crowd.embedded.api.User user,
org.ofbiz.core.entity.GenericValue issue)
Determine whether the current user is already watching the issue or not
|
boolean |
isWatching(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Determine whether the current user is already watching the issue or not
|
boolean |
isWatchingEnabled() |
void |
removeAllWatchesForUser(ApplicationUser user)
Remove all watches for a given user
|
void |
removeAllWatchesForUser(com.atlassian.crowd.embedded.api.User user)
Remove all watches for a given user
|
void |
startWatching(ApplicationUser user,
Collection<Issue> issues)
Enable watching of a list of issues for the user supplied.
|
void |
startWatching(ApplicationUser user,
Collection<Issue> issues,
Context taskContext)
Enable watching of a list of issues for the user supplied.
|
void |
startWatching(ApplicationUser user,
Issue issue)
Enable watching of a particular issue for the user supplied.
|
void |
startWatching(com.atlassian.crowd.embedded.api.User user,
org.ofbiz.core.entity.GenericValue issueGV)
Enable watching of a particular issue for the user supplied.
|
void |
startWatching(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Enable watching of a particular issue for the user supplied.
|
void |
stopWatching(ApplicationUser user,
Collection<Issue> issues)
Disable watching of a list of issues for the user supplied.
|
void |
stopWatching(ApplicationUser user,
Collection<Issue> issues,
Context taskContext)
Disable watching of a list of issues for the user supplied.
|
void |
stopWatching(ApplicationUser user,
Issue issue)
Disable watching of a particular issue for the user supplied.
|
void |
stopWatching(String username,
org.ofbiz.core.entity.GenericValue issueGV)
Disable watching of a particular issue for the user supplied.
|
void |
stopWatching(com.atlassian.crowd.embedded.api.User user,
org.ofbiz.core.entity.GenericValue issueGV)
Disable watching of a particular issue for the user supplied.
|
void |
stopWatching(com.atlassian.crowd.embedded.api.User user,
Issue issue)
Disable watching of a particular issue for the user supplied.
|
public static final String ASSOCIATION_TYPE
public DefaultWatcherManager(UserAssociationStore userAssociationStore, ApplicationProperties applicationProperties, IssueIndexManager indexManager, UserManager userManager, IssueFactory issueFactory, com.atlassian.event.api.EventPublisher eventPublisher, IssueManager issueManager)
public void startWatching(com.atlassian.crowd.embedded.api.User user, Issue issue)
WatcherManager
startWatching
in interface WatcherManager
user
- user that starts watching the given issueissue
- issue being watchedpublic void startWatching(ApplicationUser user, Issue issue)
WatcherManager
startWatching
in interface WatcherManager
user
- user that starts watching the given issueissue
- issue being watchedpublic void startWatching(ApplicationUser user, Collection<Issue> issues)
WatcherManager
startWatching
in interface WatcherManager
user
- user that starts watching the given issuesissues
- the list of issues to watchpublic void startWatching(ApplicationUser user, Collection<Issue> issues, Context taskContext)
WatcherManager
startWatching
in interface WatcherManager
user
- user that starts watching the given issuesissues
- the list of issues to watchtaskContext
- a context through which progress can be reported backpublic void startWatching(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issueGV)
WatcherManager
startWatching
in interface WatcherManager
user
- user that starts watching the given issueissueGV
- issue being watchedpublic void stopWatching(String username, org.ofbiz.core.entity.GenericValue issueGV)
WatcherManager
stopWatching
in interface WatcherManager
username
- username of the user that stops watching the given issueissueGV
- issue being watchedpublic void stopWatching(com.atlassian.crowd.embedded.api.User user, Issue issue)
WatcherManager
stopWatching
in interface WatcherManager
user
- user that stops watching the given issueissue
- issue being watchedpublic void stopWatching(ApplicationUser user, Issue issue)
WatcherManager
stopWatching
in interface WatcherManager
user
- user that stops watching the given issueissue
- issue being watchedpublic void stopWatching(ApplicationUser user, Collection<Issue> issues)
WatcherManager
stopWatching
in interface WatcherManager
user
- user that stops watching the given issuesissues
- list of issues being watchedpublic void stopWatching(ApplicationUser user, Collection<Issue> issues, Context taskContext)
WatcherManager
stopWatching
in interface WatcherManager
user
- user that stops watching the given issuesissues
- list of issues being watchedtaskContext
- a context through which progress can be reported backpublic void stopWatching(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issueGV)
WatcherManager
stopWatching
in interface WatcherManager
user
- user that stops watching the given issueissueGV
- issue being watchedpublic List<String> getCurrentWatcherUsernames(Issue issue) throws DataAccessException
WatcherManager
getCurrentWatcherUsernames
in interface WatcherManager
issue
- issue being watchedDataAccessException
- if cannot retrieve watcherspublic boolean isWatchingEnabled()
isWatchingEnabled
in interface WatcherManager
public boolean isWatching(com.atlassian.crowd.embedded.api.User user, Issue issue)
WatcherManager
isWatching
in interface WatcherManager
user
- userissue
- issue being watchedpublic boolean isWatching(ApplicationUser user, Issue issue)
WatcherManager
isWatching
in interface WatcherManager
user
- userissue
- issue being watchedpublic boolean isWatching(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue issue)
WatcherManager
isWatching
in interface WatcherManager
user
- userissue
- issue being watchedpublic Collection<com.atlassian.crowd.embedded.api.User> getCurrentWatchList(Issue issue, Locale userLocale)
WatcherManager
getCurrentWatchList
in interface WatcherManager
issue
- issue being watcheduserLocale
- the locale of the user making this call, this is used for sorting the list values.User
spublic List<ApplicationUser> getWatchers(Issue issue, Locale userLocale)
WatcherManager
getWatchers
in interface WatcherManager
issue
- issue being watcheduserLocale
- the locale of the user making this call, this is used for sorting the list values.public int getWatcherCount(Issue issue)
WatcherManager
getWatcherCount
in interface WatcherManager
issue
- issue being watchedpublic Collection<String> getWatcherUserKeys(Issue issue)
WatcherManager
getWatcherUserKeys
in interface WatcherManager
issue
- issue being watchedpublic List<String> getCurrentWatcherUsernames(org.ofbiz.core.entity.GenericValue issue) throws DataAccessException
WatcherManager
getCurrentWatcherUsernames
in interface WatcherManager
issue
- issue being watchedDataAccessException
- if cannot retrieve watcherspublic void removeAllWatchesForUser(com.atlassian.crowd.embedded.api.User user)
WatcherManager
removeAllWatchesForUser
in interface WatcherManager
user
- The user that has most probably been deletedpublic void removeAllWatchesForUser(ApplicationUser user)
WatcherManager
removeAllWatchesForUser
in interface WatcherManager
user
- The user that has most probably been deletedCopyright © 2002-2015 Atlassian. All Rights Reserved.