@PublicApi
public interface WatcherService
Modifier and Type | Interface and Description |
---|---|
static class |
WatcherService.BulkWatchResult
Used to return the result of a Bulk Watch or Bulk Unwatch operation.
|
Modifier and Type | Method and Description |
---|---|
ServiceOutcome<List<ApplicationUser>> |
addWatcher(Issue issue,
ApplicationUser remoteUser,
ApplicationUser 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.
|
WatcherService.BulkWatchResult |
addWatcherToAll(Collection<Issue> issues,
ApplicationUser remoteUser,
ApplicationUser watcher,
Context taskContext)
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 |
canWatchAll(Iterable<Issue> issues,
ApplicationUser applicationUser)
Whether the specified user can watch all the specified issues.
|
ServiceOutcome<Pair<Integer,List<ApplicationUser>>> |
getWatchers(Issue issue,
ApplicationUser 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,
ApplicationUser 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<ApplicationUser>> |
removeWatcher(Issue issue,
ApplicationUser remoteUser,
ApplicationUser 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.
|
WatcherService.BulkWatchResult |
removeWatcherFromAll(Collection<Issue> issues,
ApplicationUser remoteUser,
ApplicationUser watcher,
Context taskContext)
Removes a watcher from all of the supplied issues.
|
boolean isWatchingEnabled()
boolean hasViewWatcherListPermission(Issue issue, ApplicationUser remoteUser)
issue
- an IssueremoteUser
- a UserServiceOutcome<Pair<Integer,List<ApplicationUser>>> getWatchers(Issue issue, ApplicationUser remoteUser) throws WatchingDisabledException
issue
- the Issue to find watchers forremoteUser
- the calling UserWatchingDisabledException
- if watching is currently disabledServiceOutcome<List<ApplicationUser>> addWatcher(Issue issue, ApplicationUser remoteUser, ApplicationUser watcher) throws WatchingDisabledException
issue
- the issue to updateremoteUser
- the remote user on behalf of which the operation is performedwatcher
- the watcher to addWatchingDisabledException
- if watching is currently disabledWatcherService.BulkWatchResult addWatcherToAll(Collection<Issue> issues, ApplicationUser remoteUser, ApplicationUser watcher) throws WatchingDisabledException
If there is partial success, the issues which we can modify will be modified and the ones we cannot will be returned in a BulkWatchResult.
issues
- the list of issues to updateremoteUser
- the remote user on behalf of which the operation is performedwatcher
- the watcher to addWatchingDisabledException
- if watching is currently disabledWatcherService.BulkWatchResult addWatcherToAll(Collection<Issue> issues, ApplicationUser remoteUser, ApplicationUser watcher, Context taskContext) throws WatchingDisabledException
If there is partial success, the issues which we can modify will be modified and the ones we cannot will be returned in a BulkWatchResult.
issues
- the list of issues to updateremoteUser
- the remote user on behalf of which the operation is performedwatcher
- the watcher to addtaskContext
- a context through which progress can be reported backWatchingDisabledException
- if watching is currently disabledServiceOutcome<List<ApplicationUser>> removeWatcher(Issue issue, ApplicationUser remoteUser, ApplicationUser 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 listWatchingDisabledException
- if watching is currently disabledWatcherService.BulkWatchResult removeWatcherFromAll(Collection<Issue> issues, ApplicationUser remoteUser, ApplicationUser watcher) throws WatchingDisabledException
If there is partial success, the issues which we can modify will be modified and the ones we cannot will be returned in a BulkWatchResult.
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 issueWatchingDisabledException
- if watching is currently disabledWatcherService.BulkWatchResult removeWatcherFromAll(Collection<Issue> issues, ApplicationUser remoteUser, ApplicationUser watcher, Context taskContext) throws WatchingDisabledException
If there is partial success, the issues which we can modify will be modified and the ones we cannot will be returned in a BulkWatchResult.
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 issuetaskContext
- a context through which progress can be reported backWatchingDisabledException
- if watching is currently disabledboolean canWatchAll(Iterable<Issue> issues, ApplicationUser applicationUser)
issues
- The list of issues to checkapplicationUser
- The user to execute this check forboolean canUnwatchAll(Iterable<Issue> issues, ApplicationUser applicationUser)
issues
- The list of issues to checkapplicationUser
- The user to execute this check forCopyright © 2002-2021 Atlassian. All Rights Reserved.