@Component public final class

ShareServiceImpl

extends Object
implements ShareService
java.lang.Object
   ↳ com.atlassian.jira.plugins.share.ShareServiceImpl

Class Overview

Listens for ShareIssueEvents and sends items to the Mail queue.

Summary

Constants
String NO_PERMISSION_TO_BROWSE_USERS
String NO_USERS_OR_EMAILS_PROVIDED
Public Constructors
@Autowired ShareServiceImpl(I18nHelper i18nHelper, PermissionManager permissionManager, ShareIssueService shareIssueService, ShareSearchRequestService shareSearchRequestService)
Public Methods
void shareIssue(ShareService.ValidateShareIssueResult result)
Given a valid ValidateShareIssueResult this method will send an e-mail to the users and fire a ShareIssueEvent
void shareSearchRequest(ShareService.ValidateShareSearchRequestResult result)
Given a valid ValidateShareIssueResult this method will send an e-mail to the users and fire a ShareJqlEvent or ShareSearchRequestEvent depending on if a saved filter was passed to the validate method.
ShareService.ValidateShareIssueResult validateShareIssue(ApplicationUser remoteUser, ShareBean shareBean, Issue issue)
Confirms that the shareBean param contains either usernames or e-mails and also validates that the user performing this operation has the permission to view other users in this JIRA instance.
ShareService.ValidateShareSearchRequestResult validateShareSearchRequest(ApplicationUser remoteUser, ShareBean shareBean, SearchRequest searchRequest)
Confirms that the shareRequest param contains either usernames or e-mails and also validates that the user performing this operation has the permission to view other users in this JIRA instance.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.plugins.share.ShareService

Constants

public static final String NO_PERMISSION_TO_BROWSE_USERS

Constant Value: "jira-share-plugin.no.permission.to.browse.users"

public static final String NO_USERS_OR_EMAILS_PROVIDED

Constant Value: "jira-share-plugin.no.users.or.emails.provided"

Public Constructors

@Autowired public ShareServiceImpl (I18nHelper i18nHelper, PermissionManager permissionManager, ShareIssueService shareIssueService, ShareSearchRequestService shareSearchRequestService)

Public Methods

public void shareIssue (ShareService.ValidateShareIssueResult result)

Given a valid ValidateShareIssueResult this method will send an e-mail to the users and fire a ShareIssueEvent

Parameters
result a valid validateShareIssueResult.

public void shareSearchRequest (ShareService.ValidateShareSearchRequestResult result)

Given a valid ValidateShareIssueResult this method will send an e-mail to the users and fire a ShareJqlEvent or ShareSearchRequestEvent depending on if a saved filter was passed to the validate method.

Parameters
result a valid validateShareIssueResult.

public ShareService.ValidateShareIssueResult validateShareIssue (ApplicationUser remoteUser, ShareBean shareBean, Issue issue)

Confirms that the shareBean param contains either usernames or e-mails and also validates that the user performing this operation has the permission to view other users in this JIRA instance.

Parameters
remoteUser The user performing the share operation
shareBean Bean containing information about who to share with
issue The issue being shared
Returns
  • A service result

public ShareService.ValidateShareSearchRequestResult validateShareSearchRequest (ApplicationUser remoteUser, ShareBean shareBean, SearchRequest searchRequest)

Confirms that the shareRequest param contains either usernames or e-mails and also validates that the user performing this operation has the permission to view other users in this JIRA instance.

Parameters
remoteUser The user performing the share operation
shareBean Bean containing information about who to share with
searchRequest A saved filter being shared or null if a unsaved JQL search is being shared
Returns
  • A service result