Class QueryToProjectMapper
java.lang.Object
com.atlassian.greenhopper.service.query.QueryToProjectMapper
- All Implemented Interfaces:
GreenHopperCache
Resolves JQL Queries to detect which projects fits given JQL
-
Constructor Summary
ConstructorsConstructorDescriptionQueryToProjectMapper
(ProjectContextVisitorProvider projectContextVisitorProvider, com.atlassian.jira.bc.issue.search.SearchService jiraSearchService, CacheFactoryManager cacheFactoryManager, com.atlassian.jira.bc.project.ProjectService projectService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked when all caches in the plugin need to be cleared.getProjectIdsForQuery
(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query, boolean explicit) Set
<com.atlassian.jira.project.Project> getProjectsForQuery
(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query, boolean explicit) Get the projects for a given queryvoid
onProjectDeletedEvent
(com.atlassian.jira.event.ProjectDeletedEvent event)
-
Constructor Details
-
QueryToProjectMapper
@Inject public QueryToProjectMapper(ProjectContextVisitorProvider projectContextVisitorProvider, com.atlassian.jira.bc.issue.search.SearchService jiraSearchService, CacheFactoryManager cacheFactoryManager, com.atlassian.jira.bc.project.ProjectService projectService)
-
-
Method Details
-
getProjectsForQuery
public Set<com.atlassian.jira.project.Project> getProjectsForQuery(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query, boolean explicit) Get the projects for a given query- Parameters:
user
- user which performs checkquery
- the query which will be evaluatedexplicit
- indicates whether only explicitly mentioned projects should be available in the result- Returns:
- a set of projects. An empty set indicates an all projects query
-
getProjectIdsForQuery
-
flushCache
public void flushCache()Description copied from interface:GreenHopperCache
Invoked when all caches in the plugin need to be cleared.- Specified by:
flushCache
in interfaceGreenHopperCache
-
onProjectDeletedEvent
@EventListener public void onProjectDeletedEvent(com.atlassian.jira.event.ProjectDeletedEvent event)
-