com.atlassian.jira.gadgets.system
Class SearchQueryBackedResource
java.lang.Object
com.atlassian.jira.gadgets.system.AbstractResource
com.atlassian.jira.gadgets.system.SearchQueryBackedResource
- Direct Known Subclasses:
- AverageAgeChartResource, CreatedVsResolvedResource, HeatMapResource, PieChartResource, RecentlyCreatedChartResource, ResolutionTimeResource, StatsResource, TimeSinceChartResource, TwoDimensionalStatsResource
public abstract class SearchQueryBackedResource
- extends AbstractResource
An abstract class used for common search request handling for search request backed resources.
- Since:
- v4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QUERY_STRING
protected static final String QUERY_STRING
- See Also:
- Constant Field Values
chartUtils
protected final ChartUtils chartUtils
authenticationContext
protected final JiraAuthenticationContext authenticationContext
permissionManager
protected final PermissionManager permissionManager
searchService
protected final SearchService searchService
SearchQueryBackedResource
public SearchQueryBackedResource(ChartUtils chartUtils,
JiraAuthenticationContext authenticationContext,
SearchService searchService,
PermissionManager permissionManager,
VelocityRequestContextFactory velocityRequestContextFactory)
getSearchRequestAndValidate
protected SearchRequest getSearchRequestAndValidate(String queryString,
Collection<ValidationError> errors,
Map<String,Object> params)
- Method used for retrieving/building a SearchRequest and validating params.
- Parameters:
queryString
- a String containing a search criteria. Starts with "filter-" for a search request, "project-"
for a project or "jql-" for a jql equest.errors
- a collection of ValidationError
object
containing all validation message keys.params
- a map to populate with with appropriate entities.
- Returns:
- a
SearchRequest
that will restrict the search to the given
criteria
getFilterTitle
protected String getFilterTitle(Map<String,Object> params)
- Get the name to display for the given query.
- Parameters:
params
- The params created during chart generation process.
- Returns:
- For a project, get the project name. For a saved filter, get the name. For a unsaved search, return the
anonymous key.
getFilterUrl
protected String getFilterUrl(Map<String,Object> params)
- Get the url to send people to for this search.
- Parameters:
params
- The params created during chart generation process.
- Returns:
- For a project or filter, send them to the issue navigator. For an unsaved search, return empty string.
Copyright © 2002-2012 Atlassian. All Rights Reserved.