Interface WatchService
public interface WatchService
The interface Watch service.
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(com.atlassian.jira.project.Project project, com.atlassian.jira.user.ApplicationUser user) Create a watcher.void
delete
(com.atlassian.jira.project.Project project) Delete watchers for a project.void
delete
(com.atlassian.jira.project.Project project, com.atlassian.jira.user.ApplicationUser user) Delete watchers for a project and a user.void
delete
(com.atlassian.jira.user.ApplicationUser user) Delete watchers for a user.void
Flush all mails in the queue only if mail digest is enabledList<com.atlassian.jira.user.ApplicationUser>
get
(com.atlassian.jira.project.Project project) Get watchers for project.List<com.atlassian.jira.project.Project>
get
(com.atlassian.jira.user.ApplicationUser user) Get projects watched by user.Get the las time when sent watch project notificationboolean
Return if Mail Digest is enabledboolean
isWatcher
(com.atlassian.jira.user.ApplicationUser user, com.atlassian.jira.project.Project project) Get if the user is watcher of the project.void
setMailDigest
(boolean enabled) Enable or disable Mail Digest in watch project notification
-
Method Details
-
create
ProjectWatcher create(com.atlassian.jira.project.Project project, com.atlassian.jira.user.ApplicationUser user) Create a watcher.- Parameters:
project
- the projectuser
- the user
-
get
Get watchers for project.- Parameters:
project
- the project- Returns:
- the watchers of the project
-
get
Get projects watched by user.- Returns:
- the projects watched by the user
-
isWatcher
boolean isWatcher(com.atlassian.jira.user.ApplicationUser user, com.atlassian.jira.project.Project project) Get if the user is watcher of the project.- Parameters:
user
- the userproject
- the project- Returns:
- the projects watched by the user
-
delete
void delete(com.atlassian.jira.project.Project project) Delete watchers for a project.- Parameters:
project
- the project
-
delete
void delete(com.atlassian.jira.user.ApplicationUser user) Delete watchers for a user.- Parameters:
user
- the user
-
delete
void delete(com.atlassian.jira.project.Project project, com.atlassian.jira.user.ApplicationUser user) Delete watchers for a project and a user.- Parameters:
project
- the projectuser
- the user
-
hasMailDigest
boolean hasMailDigest()Return if Mail Digest is enabled- Returns:
- true or false
-
setMailDigest
void setMailDigest(boolean enabled) Enable or disable Mail Digest in watch project notification- Parameters:
enabled
- true or false due to active mail digest
-
getLastTimeInMailDigestNotification
LocalDateTime getLastTimeInMailDigestNotification()Get the las time when sent watch project notification- Returns:
- LocalDateTime
-
flushAllMail
void flushAllMail()Flush all mails in the queue only if mail digest is enabled
-