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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(SearchRequestViewModuleDescriptor moduleDescriptor) A lifecycle method that will be called by the plugin system that gives access to theModuleDescriptor
that controls this plugin.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.void
writeHeaders
(SearchRequest searchRequest, RequestHeaders requestHeaders, SearchRequestParams searchRequestParams) By default we don't care about the user agentabstract void
writeSearchResults
(SearchRequest searchRequest, SearchRequestParams searchRequestParams, Writer writer) Responsible for writing out the searchResults including Headers and Footers of the implementing view type.
-
Field Details
-
descriptor
-
-
Constructor Details
-
AbstractSearchRequestView
public AbstractSearchRequestView()
-
-
Method Details
-
init
Description copied from interface:SearchRequestView
A lifecycle method that will be called by the plugin system that gives access to theModuleDescriptor
that controls this plugin.- Specified by:
init
in interfaceSearchRequestView
- Parameters:
moduleDescriptor
- the controller of this plugin.
-
writeHeaders
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 interfaceSearchRequestView
- Parameters:
searchRequest
- the original search request submitted by the userrequestHeaders
- subset of HttpServletResponse responsible for setting headers onlysearchRequestParams
- 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 interfaceSearchRequestView
- Parameters:
searchRequest
- the original search request submitted by the usersearchRequestParams
- stores a shallow copy of the session and a pagerfilter to determine how many results to displaywriter
- The writer used to stream the response.- Throws:
SearchException
- Exceptions occured while trying to peform a search on theSearchRequest
-