Class ProjectAwareQuickSearchHandlerImpl
java.lang.Object
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
ConstructorsConstructorDescriptionProjectAwareQuickSearchHandlerImpl
(ProjectManager projectManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProject
(String projectId, QuickSearchResult searchResult) Adds a project to the given search.getProjects
(QuickSearchResult searchResult) Retrieves project from the search request or returns all projects the current user can browsegetSingleProjectIdFromSearch
(QuickSearchResult searchResult) Retrieves the single project specified in search.
-
Constructor Details
-
ProjectAwareQuickSearchHandlerImpl
public ProjectAwareQuickSearchHandlerImpl(ProjectManager projectManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext)
-
-
Method Details
-
getProjects
Retrieves project from the search request or returns all projects the current user can browse- Specified by:
getProjects
in interfaceProjectAwareQuickSearchHandler
- Parameters:
searchResult
- search result to look up- Returns:
- list of project
GenericValue
's
-
getSingleProjectIdFromSearch
Description copied from interface:ProjectAwareQuickSearchHandler
Retrieves the single project specified in search.- Specified by:
getSingleProjectIdFromSearch
in interfaceProjectAwareQuickSearchHandler
- 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
Description copied from interface:ProjectAwareQuickSearchHandler
Adds a project to the given search.- Specified by:
addProject
in interfaceProjectAwareQuickSearchHandler
- Parameters:
projectId
- project id to addsearchResult
- search result to add to
-