Interface WatchService


public interface WatchService
The interface Watch service.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(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 enabled
    List<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 notification
    boolean
    Return if Mail Digest is enabled
    boolean
    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 project
      user - the user
    • get

      List<com.atlassian.jira.user.ApplicationUser> get(com.atlassian.jira.project.Project project)
      Get watchers for project.
      Parameters:
      project - the project
      Returns:
      the watchers of the project
    • get

      List<com.atlassian.jira.project.Project> get(com.atlassian.jira.user.ApplicationUser user)
      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 user
      project - 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 project
      user - 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