public class DefaultReportWrapperService extends Object implements ReportWrapperService
Constructor and Description |
---|
DefaultReportWrapperService() |
Modifier and Type | Method and Description |
---|---|
DeliveryOptions |
getDeliveryOptions(String reportId,
String userId)
This method returns the delivery options for the report.
|
List<ReportFormat> |
getFormats(String reportId)
This method provides a list of formats supported by the report
|
ReportParameters |
getParameters(String reportId)
This method retrieves the runtime parameters taken by the report
|
Boolean |
hasParameters(String reportId)
This method is used to determine whether the report takes any parameters
|
void |
render(String reportId,
String location,
ReportFormat format,
OutputStream outputStream)
This method renders the report into a given output stream.
|
void |
run(ReportParameters parameters,
ReportMode mode,
DeliveryOptions deliveryOptions,
String reportId)
This method runs the report
|
void |
runAndRender(ReportParameters parameters,
ReportMode mode,
OutputStream outputStream)
This method runs the report and renders in into the given output stream
with no intermediate steps
|
void |
setReportServiceLocator(ReportServiceLocator reportServiceLocator)
setReportServiceLocator
|
void |
setReportStoreService(ReportStoreService reportStoreService)
setReportStoreService
|
boolean |
validate(ReportParameters parameters,
String reportId)
This method validates that the map of report parameters matches the report
parameters accepted by the report.
|
public List<ReportFormat> getFormats(String reportId)
getFormats
in interface ReportWrapperService
reportId
- reportId as defined in database-reports.xmlpublic DeliveryOptions getDeliveryOptions(String reportId, String userId)
getDeliveryOptions
in interface ReportWrapperService
reportId
- a String
object.userId
- a String
object.public ReportParameters getParameters(String reportId)
getParameters
in interface ReportWrapperService
reportId
- a String
object.public Boolean hasParameters(String reportId)
hasParameters
in interface ReportWrapperService
reportId
- a String
object.public void render(String reportId, String location, ReportFormat format, OutputStream outputStream)
render
in interface ReportWrapperService
reportId
- reportId as defined in database-reports.xmllocation
- location of the report on diskformat
- format to render the reportoutputStream
- stream to render the resulting reportpublic void run(ReportParameters parameters, ReportMode mode, DeliveryOptions deliveryOptions, String reportId)
run
in interface ReportWrapperService
parameters
- runtime report parametersmode
- in which to run the report (ONLINE, BATCH or IMMEDIATE)deliveryOptions
- delivery options for the reportreportId
- reportId as defined in database-reports.xmlpublic boolean validate(ReportParameters parameters, String reportId)
validate
in interface ReportWrapperService
parameters
- runtime report parametersreportId
- reportId as defined in database-reports.xmlpublic void setReportServiceLocator(ReportServiceLocator reportServiceLocator)
setReportServiceLocator
reportServiceLocator
- a ReportServiceLocator
object.public void setReportStoreService(ReportStoreService reportStoreService)
setReportStoreService
reportStoreService
- a ReportStoreService
object.public void runAndRender(ReportParameters parameters, ReportMode mode, OutputStream outputStream) throws ReportException
runAndRender
in interface ReportWrapperService
parameters
- runtime report parametersmode
- in which to run the report (ONLINE, BATCH or IMMEDIATE)outputStream
- stream to render the resulting reportReportException
Copyright © 2017. All rights reserved.