|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface WatcherService
Watcher-related business logic interface.
Nested Class Summary | |
---|---|
static class |
WatcherService.BulkWatchResult
Used to return the result of a Bulk Watch or Bulk Unwatch operation. |
Method Summary | |
---|---|
ServiceOutcome<List<com.atlassian.crowd.embedded.api.User>> |
addWatcher(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User watcher)
Adds a watcher to an issue's list of watchers, returning the updated list of watchers. |
WatcherService.BulkWatchResult |
addWatcherToAll(Collection<Issue> issues,
ApplicationUser remoteUser,
ApplicationUser watcher)
Adds a watcher to all of the supplied issues. |
boolean |
canUnwatchAll(Iterable<Issue> issues,
ApplicationUser applicationUser)
Whether the specified user can unwatch all the specified issues. |
boolean |
canUnwatchAll(Iterable<Issue> issues,
com.atlassian.crowd.embedded.api.User remoteUser)
Deprecated. since 6.1 use canUnwatchAll(Iterable, com.atlassian.jira.user.ApplicationUser) |
boolean |
canWatchAll(Iterable<Issue> issues,
ApplicationUser applicationUser)
Whether the specified user can watch all the specified issues. |
boolean |
canWatchAll(Iterable<Issue> issues,
com.atlassian.crowd.embedded.api.User remoteUser)
Deprecated. since 6.1 use canWatchAll(Iterable, com.atlassian.jira.user.ApplicationUser) |
ServiceOutcome<Pair<Integer,List<com.atlassian.crowd.embedded.api.User>>> |
getWatchers(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser)
Returns a the total number of watchers for a given issue in the first element of the returned Pair, and the list of visible watchers in the second element of the Pair. |
boolean |
hasViewWatcherListPermission(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser)
Returns a boolean indicating whether the given user is authorised to view an issue's watcher list. |
boolean |
isWatchingEnabled()
Returns a boolean indicating whether watching is enabled in JIRA. |
ServiceOutcome<List<com.atlassian.crowd.embedded.api.User>> |
removeWatcher(Issue issue,
com.atlassian.crowd.embedded.api.User remoteUser,
com.atlassian.crowd.embedded.api.User watcher)
Removes a watcher from an issue's list of watchers, returning the updated list of watchers. |
WatcherService.BulkWatchResult |
removeWatcherFromAll(Collection<Issue> issues,
ApplicationUser remoteUser,
ApplicationUser watcher)
Removes a watcher from all of the supplied issues. |
Method Detail |
---|
boolean isWatchingEnabled()
boolean hasViewWatcherListPermission(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser)
issue
- an IssueremoteUser
- a User
ServiceOutcome<Pair<Integer,List<com.atlassian.crowd.embedded.api.User>>> getWatchers(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser) throws WatchingDisabledException
issue
- the Issue to find watchers forremoteUser
- the calling User
WatchingDisabledException
- if watching is currently disabledServiceOutcome<List<com.atlassian.crowd.embedded.api.User>> addWatcher(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser, com.atlassian.crowd.embedded.api.User watcher) throws WatchingDisabledException
issue
- the issue to updateremoteUser
- the remote user on behalf of whichwatcher
- the watcher to add
WatchingDisabledException
- if watching is currently disabledWatcherService.BulkWatchResult addWatcherToAll(Collection<Issue> issues, ApplicationUser remoteUser, ApplicationUser watcher) throws WatchingDisabledException
issues
- the list of issues to updateremoteUser
- the remote user on behalf of whichwatcher
- the watcher to add
WatchingDisabledException
- if watching is currently disabledServiceOutcome<List<com.atlassian.crowd.embedded.api.User>> removeWatcher(Issue issue, com.atlassian.crowd.embedded.api.User remoteUser, com.atlassian.crowd.embedded.api.User watcher) throws WatchingDisabledException
issue
- the Issue to updateremoteUser
- a User indicating the user on behalf of whom this operation is being performedwatcher
- a User representing the User to remove from the watcher list
WatchingDisabledException
- if watching is currently disabledWatcherService.BulkWatchResult removeWatcherFromAll(Collection<Issue> issues, ApplicationUser remoteUser, ApplicationUser watcher) throws WatchingDisabledException
issues
- the list of Issues to updateremoteUser
- an ApplicationUser indicating the user on behalf of whom this operation is being performedwatcher
- an ApplicationUser representing the user to remove from the watcher list for each issue
WatchingDisabledException
- if watching is currently disabled@Deprecated boolean canWatchAll(Iterable<Issue> issues, com.atlassian.crowd.embedded.api.User remoteUser)
canWatchAll(Iterable, com.atlassian.jira.user.ApplicationUser)
issues
- The list of issues to checkremoteUser
- The user to execute this check for
boolean canWatchAll(Iterable<Issue> issues, ApplicationUser applicationUser)
issues
- The list of issues to checkapplicationUser
- The user to execute this check for
@Deprecated boolean canUnwatchAll(Iterable<Issue> issues, com.atlassian.crowd.embedded.api.User remoteUser)
canUnwatchAll(Iterable, com.atlassian.jira.user.ApplicationUser)
issues
- The list of issues to checkremoteUser
- The user to execute this check for
boolean canUnwatchAll(Iterable<Issue> issues, ApplicationUser applicationUser)
issues
- The list of issues to checkapplicationUser
- The user to execute this check for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |