com.atlassian.jira.plugin.searchrequestview
Class AbstractSearchRequestView

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

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:
SearchRequestView

Field Summary
protected  SearchRequestViewModuleDescriptor descriptor
           
 
Constructor Summary
AbstractSearchRequestView()
           
 
Method Summary
 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)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

descriptor

protected SearchRequestViewModuleDescriptor descriptor
Constructor Detail

AbstractSearchRequestView

public AbstractSearchRequestView()
Method Detail

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.

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

writeSearchResults

public abstract void writeSearchResults(SearchRequest searchRequest,
                                        SearchRequestParams searchRequestParams,
                                        Writer writer)
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.


Copyright © 2002-2009 Atlassian. All Rights Reserved.