com.atlassian.greenhopper.rest
Class AssigneeUserPickerSearchService

java.lang.Object
  extended by com.atlassian.greenhopper.rest.AssigneeUserPickerSearchService

@Service(value="gh-assigneeUserPickerSearchService")
public class AssigneeUserPickerSearchService
extends java.lang.Object

Encapsulates assignee discovery logic. NOTE: This implementation simply fetches the PermissionContext for the current issue/status. The original code was based on the current OperationContext, which would return a different PermissionContext in case of Workflow transitions (in which case the target status and not the current status is used). Whether this has any impact on the assignee field values is unknown to me, but in case of GH we refer to JIRA for workflow transitions so we happily ignore this case. ADDED NOTE: That doesn't work if there's no issue yet because we're just creating one. So now, we support a project parameter as fallback as well. Code is a mix of AssigneeSystemField and DefaultUserPickerSearchService.


Field Summary
static java.lang.String SERVICE
           
 
Constructor Summary
AssigneeUserPickerSearchService()
           
 
Method Summary
 boolean canPerformAjaxSearch(com.atlassian.crowd.embedded.api.User currentUser)
           
 boolean canShowEmailAddresses(com.atlassian.crowd.embedded.api.User currentUser)
           
 java.util.List<com.atlassian.crowd.embedded.api.User> findAssignableUsers(com.atlassian.crowd.embedded.api.User currentUser, com.atlassian.jira.issue.Issue issue, com.atlassian.jira.project.Project project, java.lang.String query)
           
 boolean isUnassignedIssuesEnabled()
          Checks whether unassigned is allowed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE

public static final java.lang.String SERVICE
See Also:
Constant Field Values
Constructor Detail

AssigneeUserPickerSearchService

public AssigneeUserPickerSearchService()
Method Detail

findAssignableUsers

public java.util.List<com.atlassian.crowd.embedded.api.User> findAssignableUsers(com.atlassian.crowd.embedded.api.User currentUser,
                                                                                 com.atlassian.jira.issue.Issue issue,
                                                                                 com.atlassian.jira.project.Project project,
                                                                                 java.lang.String query)

canPerformAjaxSearch

public boolean canPerformAjaxSearch(com.atlassian.crowd.embedded.api.User currentUser)
See Also:
UserPickerSearchService.canPerformAjaxSearch(com.atlassian.jira.bc.JiraServiceContext)

canShowEmailAddresses

public boolean canShowEmailAddresses(com.atlassian.crowd.embedded.api.User currentUser)
See Also:
UserPickerSearchService.canShowEmailAddresses(com.atlassian.jira.bc.JiraServiceContext)

isUnassignedIssuesEnabled

public boolean isUnassignedIssuesEnabled()
Checks whether unassigned is allowed.



Copyright © 2007-2011 Atlassian. All Rights Reserved.