com.atlassian.jira.plugins.share
Class ShareServiceImpl

java.lang.Object
  extended by com.atlassian.jira.plugins.share.ShareServiceImpl
All Implemented Interfaces:
ShareService

public class ShareServiceImpl
extends Object
implements ShareService

Listens for ShareIssueEvents and sends items to the Mail queue.

Since:
v5.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.plugins.share.ShareService
ShareService.ValidateShareIssueResult, ShareService.ValidateShareResult, ShareService.ValidateShareSearchRequestResult
 
Constructor Summary
ShareServiceImpl(com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper.BeanFactory beanFactory, UserUtil userUtil, PermissionManager permissionManager, MailService mailService, ShareManager shareManager)
           
 
Method Summary
 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(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.User 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShareServiceImpl

public ShareServiceImpl(com.atlassian.event.api.EventPublisher eventPublisher,
                        I18nHelper.BeanFactory beanFactory,
                        UserUtil userUtil,
                        PermissionManager permissionManager,
                        MailService mailService,
                        ShareManager shareManager)
Method Detail

validateShareIssue

public ShareService.ValidateShareIssueResult validateShareIssue(com.atlassian.crowd.embedded.api.User remoteUser,
                                                                ShareBean shareBean,
                                                                Issue issue)
Description copied from interface: ShareService
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.

Specified by:
validateShareIssue in interface ShareService
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

shareIssue

public void shareIssue(ShareService.ValidateShareIssueResult result)
Description copied from interface: ShareService
Given a valid ValidateShareIssueResult this method will send an e-mail to the users and fire a ShareIssueEvent

Specified by:
shareIssue in interface ShareService
Parameters:
result - a valid validateShareIssueResult.

validateShareSearchRequest

public ShareService.ValidateShareSearchRequestResult validateShareSearchRequest(com.atlassian.crowd.embedded.api.User remoteUser,
                                                                                ShareBean shareBean,
                                                                                SearchRequest searchRequest)
Description copied from interface: ShareService
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.

Specified by:
validateShareSearchRequest in interface ShareService
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

shareSearchRequest

public void shareSearchRequest(ShareService.ValidateShareSearchRequestResult result)
Description copied from interface: ShareService
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.

Specified by:
shareSearchRequest in interface ShareService
Parameters:
result - a valid validateShareIssueResult.


Copyright © 2002-2012 Atlassian. All Rights Reserved.