@PublicSpi public abstract class

AbstractSearchRequestView

extends Object
implements SearchRequestView
java.lang.Object
   ↳ com.atlassian.jira.plugin.searchrequestview.AbstractSearchRequestView
Known Direct Subclasses
Known Indirect Subclasses

@PublicSpi

This class is designed for plugins to implement.

Clients of @PublicSpi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicSpi as per each product's API policy (clients should refer to each product's API policy for the exact guarantee -- usually binary compatibility is guaranteed at least across minor versions).

Note: @PublicSpi interfaces and classes are specifically designed to be implemented/extended by clients. Hence, the guarantee of binary compatibility is different to that of @PublicApi elements (if an element is both @PublicApi and @PublicSpi, both guarantees apply).

Class Overview

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.

Summary

Fields
protected SearchRequestViewModuleDescriptor descriptor
Public Constructors
AbstractSearchRequestView()
Public Methods
void init(SearchRequestViewModuleDescriptor moduleDescriptor)
A lifecycle method that will be called by the plugin system that gives access to the ModuleDescriptor that controls this plugin.
void writeHeaders(SearchRequest searchRequest, RequestHeaders requestHeaders, SearchRequestParams searchRequestParams)
By default we don't care about the user agent
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.
abstract void writeSearchResults(SearchRequest searchRequest, SearchRequestParams searchRequestParams, Writer writer)
Responsible for writing out the searchResults including Headers and Footers of the implementing view type.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.plugin.searchrequestview.SearchRequestView

Fields

protected SearchRequestViewModuleDescriptor descriptor

Public Constructors

public AbstractSearchRequestView ()

Public Methods

public void init (SearchRequestViewModuleDescriptor moduleDescriptor)

A lifecycle method that will be called by the plugin system that gives access to the ModuleDescriptor that controls this plugin.

Parameters
moduleDescriptor the controller of this plugin.

public void writeHeaders (SearchRequest searchRequest, RequestHeaders requestHeaders, SearchRequestParams searchRequestParams)

By default we don't care about the user agent

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

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.

public abstract void writeSearchResults (SearchRequest searchRequest, SearchRequestParams searchRequestParams, Writer writer)

Responsible for writing out the searchResults including Headers and Footers of the implementing view type.

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.