public class AdHocReportDownloadHelper extends Object implements AdHocReportDownloadHelperInterface
REPORT_CHARSET
Modifier and Type | Method and Description |
---|---|
RawReportDownloadResponse |
downloadReport(ReportRequest reportRequest)
Downloads a report and returns a ReportDownloadResponse with the results.
|
ReportDownloadResponse |
downloadReport(ReportRequest reportRequest,
DetailedReportDownloadResponseException.Builder exceptionBuilder)
Convenience method that is equivalent to
handleResponse(downloadReport(reportRequest), exceptionBuilder) |
int |
getReportDownloadTimeout()
Returns the reportDownloadTimeout in milliseconds
|
ReportDownloadResponse |
handleResponse(RawReportDownloadResponse rawResponse,
DetailedReportDownloadResponseException.Builder exceptionBuilder)
Handles a raw report response and translates it into a ReportDownloadResponse.
|
void |
setReportDownloadTimeout(int reportDownloadTimeout)
Sets the reportDownloadTimeout (milliseconds).
|
public ReportDownloadResponse downloadReport(ReportRequest reportRequest, DetailedReportDownloadResponseException.Builder exceptionBuilder) throws ReportException, ReportDownloadResponseException
AdHocReportDownloadHelperInterface
handleResponse(downloadReport(reportRequest), exceptionBuilder)
downloadReport
in interface AdHocReportDownloadHelperInterface
reportRequest
- the report request.exceptionBuilder
- the version-specific exception builder a new
ReportDownloadResponse
.ReportException
- if there is an exception while making the HTTP request to the server.ReportDownloadResponseException
- if unable to read the raw response's input stream.public RawReportDownloadResponse downloadReport(ReportRequest reportRequest) throws ReportException
AdHocReportDownloadHelperInterface
downloadReport
in interface AdHocReportDownloadHelperInterface
reportRequest
- the report request.ReportException
- if there is an exception while making the HTTP request to the server.public ReportDownloadResponse handleResponse(RawReportDownloadResponse rawResponse, DetailedReportDownloadResponseException.Builder exceptionBuilder) throws ReportDownloadResponseException
AdHocReportDownloadHelperInterface
handleResponse
in interface AdHocReportDownloadHelperInterface
rawResponse
- the raw response from an API report download request.exceptionBuilder
- the version-specific exception builder.ReportDownloadResponse
.ReportDownloadResponseException
- if unable to read the raw response's input stream.public int getReportDownloadTimeout()
AdHocReportDownloadHelperInterface
getReportDownloadTimeout
in interface AdHocReportDownloadHelperInterface
public void setReportDownloadTimeout(int reportDownloadTimeout)
AdHocReportDownloadHelperInterface
setReportDownloadTimeout
in interface AdHocReportDownloadHelperInterface
Copyright © 2018. All Rights Reserved.