@PublicApi
public interface SearchHandlerManager
Modifier and Type | Method and Description |
---|---|
Collection<IssueSearcher<?>> |
getAllSearchers()
Return all the active searchers in JIRA.
|
Collection<ClauseHandler> |
getClauseHandler(ApplicationUser user,
String jqlClauseName)
Return a collection of
ClauseHandler s registered against the passed JQL clause
name. |
Collection<ClauseHandler> |
getClauseHandler(String jqlClauseName)
Return a collection of
ClauseHandler s registered against the passed JQL clause
name. |
Collection<String> |
getFieldIds(ApplicationUser searcher,
String jqlClauseName)
Gets the field ids that are associated with the provided jqlClauseName.
|
Collection<String> |
getFieldIds(String jqlClauseName)
Gets the field ids that are associated with the provided jqlClauseName.
|
Collection<ClauseNames> |
getJqlClauseNames(String fieldId)
Get the
ClauseNames associated with the provided field name. |
IssueSearcher<?> |
getSearcher(String id)
Get a searcher by the searchers name.
|
Collection<SearcherGroup> |
getSearcherGroups()
Get all searcher groups.
|
Collection<SearcherGroup> |
getSearcherGroups(SearchContext searchContext)
Deprecated.
Since 6.3.4. The
SearchContext parameter is no longer needed. Use getSearcherGroups() |
Collection<IssueSearcher<?>> |
getSearchers(ApplicationUser searcher,
SearchContext context)
Get searchers that are applicable for a given context.
|
Collection<IssueSearcher<?>> |
getSearchersByClauseName(ApplicationUser user,
String jqlClauseName)
Return a collection of
IssueSearcher s registered against the
passed JQL clause name. |
Collection<IssueSearcher<?>> |
getSearchersByClauseName(ApplicationUser user,
String jqlClauseName,
SearchContext searchContext)
Deprecated.
Since 6.3.3. The
SearchContext parameter is no longer needed. Use #getSearchersByClauseName(com.atlassian.crowd.embedded.api.User, String) . |
Collection<ClauseHandler> |
getVisibleClauseHandlers(ApplicationUser searcher)
Get all the available clause handlers that the searcher can see.
|
Collection<ClauseNames> |
getVisibleJqlClauseNames(ApplicationUser searcher)
Get all the available clause names that the searcher can see.
|
void |
refresh()
Refreshes the
SearchHandlerManager . |
Collection<IssueSearcher<?>> getSearchers(ApplicationUser searcher, SearchContext context)
com.atlassian.jira.issue.search.searchers.IssueSearcher#getSearchRenderer()#isShown(com.atlassian.jira.issue.search.SearchContext)
method.searcher
- performing this action.context
- for the list of searchers. Must not be nullIssueSearcher
Collection<IssueSearcher<?>> getAllSearchers()
@Deprecated Collection<SearcherGroup> getSearcherGroups(SearchContext searchContext)
SearchContext
parameter is no longer needed. Use getSearcherGroups()
IssueSearcher
that are applicable for the context. com.atlassian.jira.issue.search.searchers.IssueSearcher#getSearchRenderer()#isShown(SearchContext)
method. Note
that the SearcherGroup
will still appear even if no IssueSearcher
are shown for the group.searchContext
- for the searcher groups.SearcherGroup
Collection<SearcherGroup> getSearcherGroups()
SearcherGroup
will
still appear even if no IssueSearcher
are shown for the group.SearcherGroup
IssueSearcher<?> getSearcher(String id)
id
- the string identifier returned by com.atlassian.jira.issue.search.searchers.IssueSearcher#getSearchInformation()#getId()
void refresh()
SearchHandlerManager
.@Nonnull Collection<ClauseHandler> getClauseHandler(ApplicationUser user, String jqlClauseName)
ClauseHandler
s registered against the passed JQL clause
name. This will only return the handlers that the user has permission to see as specified by the com.atlassian.jira.jql.permission.ClausePermissionHandler#hasPermissionToUseClause(User)
method. The reason this is returning a collection is that custom fields can have the same JQL clause name and
therefore resolve to multiple clause handlers. This will never be the case for System fields; we don't allow it!user
- that will be used to perform a permission check.jqlClauseName
- the clause name to search for.@Nonnull Collection<ClauseHandler> getClauseHandler(String jqlClauseName)
ClauseHandler
s registered against the passed JQL clause
name. This will return all available handlers, regardless of permissions. The reason this is returning a collection
is that custom fields can have the same JQL clause name and therefore resolve to multiple clause handlers. This
will never be the case for System fields; we don't allow it!jqlClauseName
- the clause name to search for.@Nonnull Collection<ClauseNames> getJqlClauseNames(String fieldId)
ClauseNames
associated with the provided field name.
A collection can be returned because it is possible for multiple clause handlers to register against the same field.
fieldId
- the Field.getId()
.ClauseNames
associated with the provided field name. Empty collection
is returned when the field has no JQL names (i.e. no clause handlers) associated with it.@Nonnull Collection<String> getFieldIds(ApplicationUser searcher, String jqlClauseName)
com.atlassian.jira.jql.permission.ClausePermissionHandler#hasPermissionToUseClause(com.atlassian.crowd.embedded.api.User)
method.searcher
- that will be used to perform a permission check.jqlClauseName
- the clause name to find the field id for.@Nonnull Collection<String> getFieldIds(String jqlClauseName)
jqlClauseName
- the clause name to find the field id for.@Nonnull Collection<ClauseNames> getVisibleJqlClauseNames(ApplicationUser searcher)
searcher
- that will be used to perform a permission check.ClauseNames
visible to the user. Empty collection
is returned when the can see no clauses.@Nonnull Collection<ClauseHandler> getVisibleClauseHandlers(ApplicationUser searcher)
searcher
- that will be used to perform a permission check.ClauseHandler
visible to the user. Empty collection
is returned when the can see no clauses.@Deprecated @Nonnull Collection<IssueSearcher<?>> getSearchersByClauseName(ApplicationUser user, String jqlClauseName, SearchContext searchContext)
SearchContext
parameter is no longer needed. Use #getSearchersByClauseName(com.atlassian.crowd.embedded.api.User, String)
.IssueSearcher
s registered against the
passed JQL clause name. This will only return the IssueSearchers that the user has permission to see as specified
by the com.atlassian.jira.issue.search.searchers.renderer.SearchRenderer#isShown(User, com.atlassian.jira.issue.search.SearchContext)
method.user
- that will be used to perform a permission check.jqlClauseName
- the clause name to search for.searchContext
- the search context under which the searchers must be shown@Nonnull Collection<IssueSearcher<?>> getSearchersByClauseName(ApplicationUser user, String jqlClauseName)
IssueSearcher
s registered against the
passed JQL clause name. This will only return the IssueSearchers that the user has permission to see as specified
by the com.atlassian.jira.issue.search.searchers.renderer.SearchRenderer#isShown(User, com.atlassian.jira.issue.search.SearchContext)
method.user
- that will be used to perform a permission check.jqlClauseName
- the clause name to search for.Copyright © 2002-2019 Atlassian. All Rights Reserved.