Class DefaultSearchRequestViewBodyWriterUtil
java.lang.Object
com.atlassian.jira.issue.views.util.DefaultSearchRequestViewBodyWriterUtil
- All Implemented Interfaces:
SearchRequestViewBodyWriterUtil
public class DefaultSearchRequestViewBodyWriterUtil
extends Object
implements SearchRequestViewBodyWriterUtil
A simple class to centralize the body writes for search request view implementations.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSearchRequestViewBodyWriterUtil(JiraAuthenticationContext authenticationContext, SearchService searchService) -
Method Summary
Modifier and TypeMethodDescriptionsearchAndSortIssues(SearchRequest searchRequest, PagerFilter pagerFilter) Searches and returns issueslongsearchCount(SearchRequest searchRequest) Returns the search countvoidwriteBody(Writer writer, AbstractIssueView issueView, SearchRequest searchRequest, SingleIssueWriter singleIssueWriter, PagerFilter pagerFilter) Writes the body of a sinlge issue.voidwriteTableBody(Writer writer, IssueTableWriter issueTableWriter, SearchRequest searchRequest, PagerFilter pagerFilter) Writes the body of a single issue in a table view (i.e.: Printable or Excel).
-
Constructor Details
-
DefaultSearchRequestViewBodyWriterUtil
public DefaultSearchRequestViewBodyWriterUtil(JiraAuthenticationContext authenticationContext, SearchService searchService)
-
-
Method Details
-
writeBody
public void writeBody(Writer writer, AbstractIssueView issueView, SearchRequest searchRequest, SingleIssueWriter singleIssueWriter, PagerFilter pagerFilter) throws IOException, SearchException Description copied from interface:SearchRequestViewBodyWriterUtilWrites 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 theSingleIssueWriterinterface specifying how a single Issue should be written to the display. It uses the details provided by theAbstractIssueViewto write the response.- Specified by:
writeBodyin interfaceSearchRequestViewBodyWriterUtil- 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.- Throws:
IOException- if things are seriously wrongSearchException- if there is something wrong with the SearchRequest
-
writeTableBody
public void writeTableBody(Writer writer, IssueTableWriter issueTableWriter, SearchRequest searchRequest, PagerFilter pagerFilter) throws IOException, SearchException Description copied from interface:SearchRequestViewBodyWriterUtilWrites 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 theIssueTableWriterinterface specifying how a single Issue should be written to the display.- Specified by:
writeTableBodyin interfaceSearchRequestViewBodyWriterUtil- 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.- Throws:
IOException- if things are seriously wrongSearchException- if there is something wrong with the SearchRequest
-
searchAndSortIssues
public List<Issue> searchAndSortIssues(SearchRequest searchRequest, PagerFilter pagerFilter) throws SearchException Description copied from interface:SearchRequestViewBodyWriterUtilSearches and returns issues- Specified by:
searchAndSortIssuesin interfaceSearchRequestViewBodyWriterUtil- Parameters:
searchRequest- that defines the issues to be viewed.pagerFilter- Used to limit the number of issues being written- Throws:
SearchException- if there is something wrong with the SearchRequest
-
searchCount
Description copied from interface:SearchRequestViewBodyWriterUtilReturns the search count- Specified by:
searchCountin interfaceSearchRequestViewBodyWriterUtil- Parameters:
searchRequest- The original searchRequest that defines the issues to be viewed.- Returns:
- the search count
- Throws:
SearchException- if there is something wrong with the SearchRequest
-