@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<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.
|
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 |
canUnwatchAll(Iterable<Issue> issues,
com.atlassian.crowd.embedded.api.User remoteUser)
Deprecated.
|
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.
|
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.
|
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, com.atlassian.crowd.embedded.api.User remoteUser)
issue
- an IssueremoteUser
- a UserServiceOutcome<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 UserWatchingDisabledException
- 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 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<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 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 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 forboolean 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 forboolean canUnwatchAll(Iterable<Issue> issues, ApplicationUser applicationUser)
issues
- The list of issues to checkapplicationUser
- The user to execute this check forCopyright © 2002-2015 Atlassian. All Rights Reserved.
View cookie preferences