Interface CustomerNotificationSubscriptionService


@PublicApi @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public interface CustomerNotificationSubscriptionService
Service that can be used for Customer Notification subscription operations.
Since:
v3.7.0
  • Method Details

    • isSubscribedCustomerNotifications

      boolean isSubscribedCustomerNotifications(CheckedUser recipient, com.atlassian.jira.issue.Issue issue)
      Given a user and issue, return whether user should be sent new customer notifcations.

      If the user has followed the link returned by getUnsubscribeCustomerNotificationUri(CheckedUser, Issue) then this should return false. Otherwise expected to return true if the user is the reporter or a request participant of the specific issue. It may also return true if user has manually subscribed themselves to receive notifications for this issue.

      This is not a definitive answer, and can be ignored if notification is deemed important enough, but in general if returns false, then should consider this, the will of the recipient to not be notified.

      Parameters:
      recipient - The recipient to check, if should receive customer notifications
      issue - The issue that in context
      Returns:
      a Boolean representing if the user should receive customer notifications for this issue, otherwise
      Throws:
      ServiceDeskServiceException - on error
    • getUnsubscribeCustomerNotificationUri

      URI getUnsubscribeCustomerNotificationUri(CheckedUser recipient, com.atlassian.jira.issue.Issue issue)
      Provides a URL that can be included in any customer email notifications.

      The link will allow customers to instruct the instance that they do not wish to receive further emails in regards to this specific issue

      Parameters:
      recipient - The user who will receive this email, and who then token within URL will be assigned to
      issue - The issue that should URL will instruct to no longer notify if followed
      Returns:
      A valid URI to insert into email templates, otherwise throws a ServiceDeskServiceException
      Throws:
      ServiceDeskServiceException - on error