Class AbstractSearchRequestView

java.lang.Object
com.atlassian.jira.plugin.searchrequestview.AbstractSearchRequestView
All Implemented Interfaces:
SearchRequestView
Direct Known Subclasses:
AbstractCsvSearchRequestView, AbstractSearchRequestFullContentView, AbstractSearchRequestIssueTableView, SearchRequestChartsView, SearchRequestRecentCommentsView, SearchRequestRSSView, SearchRequestXMLView

@PublicSpi public abstract class AbstractSearchRequestView extends Object implements SearchRequestView
Extendend this abstract class to implement custom SearchRequestViews. By default this class does not produce any custom headers. You only have to implement the writeSearchResults method.
See Also:
  • Field Details

  • Constructor Details

    • AbstractSearchRequestView

      public AbstractSearchRequestView()
  • Method Details

    • init

      public void init(SearchRequestViewModuleDescriptor moduleDescriptor)
      Description copied from interface: SearchRequestView
      A lifecycle method that will be called by the plugin system that gives access to the ModuleDescriptor that controls this plugin.
      Specified by:
      init in interface SearchRequestView
      Parameters:
      moduleDescriptor - the controller of this plugin.
    • writeHeaders

      public void writeHeaders(SearchRequest searchRequest, RequestHeaders requestHeaders)
      A default implementation which sets headers the explicitly tell the browser not to cache the content generated by this SearchRequestView. Override this method if you would like to change this behaviour.
    • writeHeaders

      public void writeHeaders(SearchRequest searchRequest, RequestHeaders requestHeaders, SearchRequestParams searchRequestParams)
      By default we don't care about the user agent
      Specified by:
      writeHeaders in interface SearchRequestView
      Parameters:
      searchRequest - the original search request submitted by the user
      requestHeaders - subset of HttpServletResponse responsible for setting headers only
      searchRequestParams - context about the current search request
    • writeSearchResults

      public abstract void writeSearchResults(SearchRequest searchRequest, SearchRequestParams searchRequestParams, Writer writer) throws SearchException
      Description copied from interface: SearchRequestView
      Responsible for writing out the searchResults including Headers and Footers of the implementing view type.
      Specified by:
      writeSearchResults in interface SearchRequestView
      Parameters:
      searchRequest - the original search request submitted by the user
      searchRequestParams - stores a shallow copy of the session and a pagerfilter to determine how many results to display
      writer - The writer used to stream the response.
      Throws:
      SearchException - Exceptions occured while trying to peform a search on the SearchRequest