com.atlassian.jira.issue.search.quicksearch
Class ProjectAwareQuickSearchHandlerImpl

java.lang.Object
  extended by com.atlassian.jira.issue.search.quicksearch.ProjectAwareQuickSearchHandlerImpl
All Implemented Interfaces:
ProjectAwareQuickSearchHandler

public class ProjectAwareQuickSearchHandlerImpl
extends Object
implements ProjectAwareQuickSearchHandler

Looks up the search request for projects already searched for in the context. If there are no projects in the context than returns all projects the current user can browse.

Since:
v3.13

Constructor Summary
ProjectAwareQuickSearchHandlerImpl(ProjectManager projectManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext)
           
 
Method Summary
 void addProject(String projectId, QuickSearchResult searchResult)
          Adds a project to the given search.
 List getProjects(QuickSearchResult searchResult)
          Retrieves project from the search request or returns all projects the current user can browse
 String getSingleProjectIdFromSearch(QuickSearchResult searchResult)
          Retrieves the single project specified in search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectAwareQuickSearchHandlerImpl

public ProjectAwareQuickSearchHandlerImpl(ProjectManager projectManager,
                                          PermissionManager permissionManager,
                                          JiraAuthenticationContext authenticationContext)
Method Detail

getProjects

public List getProjects(QuickSearchResult searchResult)
Retrieves project from the search request or returns all projects the current user can browse

Specified by:
getProjects in interface ProjectAwareQuickSearchHandler
Parameters:
searchResult - search result to look up
Returns:
list of project GenericValue's

getSingleProjectIdFromSearch

public String getSingleProjectIdFromSearch(QuickSearchResult searchResult)
Description copied from interface: ProjectAwareQuickSearchHandler
Retrieves the single project specified in search.

Specified by:
getSingleProjectIdFromSearch in interface ProjectAwareQuickSearchHandler
Parameters:
searchResult - search result to extract the project from
Returns:
the ID of the single project in search. Null if there is no project of more than 1 project

addProject

public void addProject(String projectId,
                       QuickSearchResult searchResult)
Description copied from interface: ProjectAwareQuickSearchHandler
Adds a project to the given search.

Specified by:
addProject in interface ProjectAwareQuickSearchHandler
Parameters:
projectId - project id to add
searchResult - search result to add to


Copyright © 2002-2014 Atlassian. All Rights Reserved.