public class

DefaultSearchRequestViewBodyWriterUtil

extends Object
implements SearchRequestViewBodyWriterUtil
java.lang.Object
   ↳ com.atlassian.jira.issue.views.util.DefaultSearchRequestViewBodyWriterUtil

Class Overview

A simple class to centralize the body writes for search request view implementations.

Summary

Public Constructors
DefaultSearchRequestViewBodyWriterUtil(SearchProviderFactory searchProviderFactory, IssueFactory issueFactory, JiraAuthenticationContext authenticationContext, SearchProvider searchProvider)
Public Methods
long searchCount(SearchRequest searchRequest)
Returns the search count
void writeBody(Writer writer, AbstractIssueView issueView, SearchRequest searchRequest, SingleIssueWriter singleIssueWriter, PagerFilter pagerFilter)
Writes the body of a sinlge issue.
void writeTableBody(Writer writer, IssueTableWriter issueTableWriter, SearchRequest searchRequest, PagerFilter pagerFilter)
Writes the body of a single issue in a table view (i.e.: Printable or Excel).
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.views.util.SearchRequestViewBodyWriterUtil

Public Constructors

public DefaultSearchRequestViewBodyWriterUtil (SearchProviderFactory searchProviderFactory, IssueFactory issueFactory, JiraAuthenticationContext authenticationContext, SearchProvider searchProvider)

Public Methods

public long searchCount (SearchRequest searchRequest)

Returns the search count

Parameters
searchRequest The original searchRequest that defines the issues to be viewed.
Returns
  • the search count

public void writeBody (Writer writer, AbstractIssueView issueView, SearchRequest searchRequest, SingleIssueWriter singleIssueWriter, PagerFilter pagerFilter)

Writes the body of a sinlge issue. This is used mostly by the issue full content views. It allows the specific SearchRequestViews (i.e.: Excel, Word, etc) to provide a callback class implementing the SingleIssueWriter interface specifying how a single Issue should be written to the display. It uses the details provided by the AbstractIssueView to write the response.

Parameters
writer used to stream the response to.
issueView contains the details of how a single issue should be written (i.e.: HTML for header, body and footer)
searchRequest The original searchRequest that defines the issues to be viewed.
singleIssueWriter Provides a callback method that is defined in the specific SearchRequestViews. It will be invoked to write the issue to the writer.
pagerFilter Used to limit the number of issues being written.

public void writeTableBody (Writer writer, IssueTableWriter issueTableWriter, SearchRequest searchRequest, PagerFilter pagerFilter)

Writes the body of a single issue in a table view (i.e.: Printable or Excel). It allows the specific SearchRequestViews (i.e.: Excel, Word, etc) to provide a callback class implementing the IssueTableWriter interface specifying how a single Issue should be written to the display.

Parameters
writer used to stream the response to.
issueTableWriter Defines how a single issue is displayed in a table view.
searchRequest The original searchRequest that defines the issues to be viewed. be invoked to write the issue to the writer.
pagerFilter Used to limit the number of issues being written.