Class SearchQueryBackedResource

java.lang.Object
com.atlassian.jira.gadgets.system.AbstractResource
com.atlassian.jira.gadgets.system.SearchQueryBackedResource
Direct Known Subclasses:
AverageAgeChartResource, BubbleChartResource, 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
  • Field Details

  • Constructor Details

  • Method Details

    • 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
    • validateSize

      protected void validateSize(Collection<ValidationError> errors, int width, int height)
    • 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.