java.lang.Object | |
↳ | com.atlassian.jira.bc.issue.watcher.DefaultWatcherService |
Implementation of WatcherService.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new DefaultWatcherService with the given dependencies.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a watcher to an issue's list of watchers, returning the updated list of watchers.
| |||||||||||
Adds a watcher to all of the supplied issues.
| |||||||||||
Whether the specified user can unwatch all the specified issues.
| |||||||||||
Whether the specified user can unwatch all the specified issues.
| |||||||||||
Whether the specified user can watch all the specified issues.
| |||||||||||
Whether the specified user can watch all the specified issues.
| |||||||||||
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.
| |||||||||||
Returns true iff the given User has permission to view the watcher list of the issue.
| |||||||||||
Returns true iff watching is enabled.
| |||||||||||
Removes a watcher from an issue's list of watchers, returning the updated list of watchers.
| |||||||||||
Removes a watcher from all of the supplied issues.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true iff the given User has permission to edit the watcher list of the issue.
| |||||||||||
Ensures that the given remoteUser has permission to add or remove the given watcher to/from the issue.
| |||||||||||
Converts the usernames into User objects using the given function.
| |||||||||||
Returns a List containing the users that are currently watching an issue.
| |||||||||||
Returns a pair containing the watcher count and the watcher usernames for a given issue.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a new DefaultWatcherService with the given dependencies.
applicationProperties | an ApplicationProperties |
---|---|
i18n | a I18nBean |
permissionManager | a PermissionManager |
watcherManager | a WatcherManager |
userManager | a UserManager |
Adds a watcher to an issue's list of watchers, returning the updated list of watchers.
issue | the issue to update |
---|---|
remoteUser | the remote user on behalf of which |
watcher | the watcher to add |
WatchingDisabledException |
---|
Adds a watcher to all of the supplied issues.
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 update |
---|---|
remoteUser | the remote user on behalf of which |
watcher | the watcher to add |
WatchingDisabledException |
---|
Whether the specified user can unwatch all the specified issues.
issues | The list of issues to check |
---|---|
remoteUser | The user to execute this check for |
Whether the specified user can unwatch all the specified issues.
issues | The list of issues to check |
---|---|
remoteUser | The user to execute this check for |
Whether the specified user can watch all the specified issues.
issues | The list of issues to check |
---|---|
remoteUser | The user to execute this check for |
Whether the specified user can watch all the specified issues.
issues | The list of issues to check |
---|---|
applicationUser | The user to execute this check for |
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. Note that if the remote user does not have permission to view the list of watchers, it is possible for the number of elements in the returned user list to be less than the returned number of watchers.
issue | the Issue to find watchers for |
---|---|
remoteUser | the calling User |
WatchingDisabledException |
---|
Returns true iff the given User has permission to view the watcher list of the issue.
issue | an Issue |
---|---|
remoteUser | a User |
Returns true iff watching is enabled.
Removes a watcher from an issue's list of watchers, returning the updated list of watchers.
issue | the Issue to update |
---|---|
remoteUser | a User indicating the user on behalf of whom this operation is being performed |
watcher | a User representing the User to remove from the watcher list |
WatchingDisabledException |
---|
Removes a watcher from all of the supplied issues.
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 update |
---|---|
remoteUser | an ApplicationUser indicating the user on behalf of whom this operation is being performed |
watcher | an ApplicationUser representing the user to remove from the watcher list for each issue |
WatchingDisabledException |
---|
Returns true iff the given User has permission to edit the watcher list of the issue.
issue | an Issue |
---|---|
remoteUser | a User |
Ensures that the given remoteUser has permission to add or remove the given watcher to/from the issue. Throws an exception if the user does not have permission.
issue | an Issue |
---|---|
remoteUser | a User representing the caller |
watcher | a User representing the watcher to add or remove |
if the caller does not have permission to manage watchers, or cannot see the issue | |
WatchingDisabledException | if watching is disabled |
DefaultWatcherService.PermissionException |
Converts the usernames into User objects using the given function.
watchers | a Pair of watcher count and watcher usernames |
---|---|
function | a Function used for conversion |
Returns a List containing the users that are currently watching an issue.
issue | the Issue to get the watcher list for |
---|
Returns a pair containing the watcher count and the watcher usernames for a given issue.
issue | the Issue |
---|---|
remoteUser | the calling User |
WatchingDisabledException | if watching is disabled |
---|