Interface ReportWrapperService
-
- All Known Implementing Classes:
DefaultReportWrapperService
public interface ReportWrapperService
Interface that finds and executes individual reportServices. Always run a report service via this wrapper as the implementation will find the correct service for the reportId and wrap it as necessary.- Author:
- Jonathan Sartin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DeliveryOptions
getDeliveryOptions(java.lang.String userId, java.lang.String reportId)
This method returns the delivery options for the report.java.util.List<ReportFormat>
getFormats(java.lang.String reportId)
This method provides a list of formats supported by the reportReportParameters
getParameters(java.lang.String ReportId)
This method retrieves the runtime parameters taken by the reportjava.lang.Boolean
hasParameters(java.lang.String ReportId)
This method is used to determine whether the report takes any parametersvoid
render(java.lang.String ReportId, java.lang.String location, ReportFormat format, java.io.OutputStream outputStream)
This method renders the report into a given output stream.void
run(ReportParameters parameters, ReportMode mode, DeliveryOptions deliveryOptions, java.lang.String reportId)
This method runs the reportvoid
runAndRender(ReportParameters parameters, ReportMode mode, java.io.OutputStream outputStream)
This method runs the report and renders in into the given output stream with no intermediate steps
-
-
-
Method Detail
-
run
void run(ReportParameters parameters, ReportMode mode, DeliveryOptions deliveryOptions, java.lang.String reportId)
This method runs the report- Parameters:
parameters
- runtime report parametersdeliveryOptions
- delivery options for the reportreportId
- reportId as defined in database-reports.xmlmode
- in which to run the report (ONLINE, BATCH or IMMEDIATE)
-
getDeliveryOptions
DeliveryOptions getDeliveryOptions(java.lang.String userId, java.lang.String reportId)
This method returns the delivery options for the report. Providing a userID will allow the report service to pre-populate the destination address- Parameters:
userId
- aString
object.reportId
- aString
object.- Returns:
- a delivery options object containing information that describes how the report might be delivered.
-
getFormats
java.util.List<ReportFormat> getFormats(java.lang.String reportId)
This method provides a list of formats supported by the report- Parameters:
reportId
- reportId as defined in database-reports.xml- Returns:
- a list of supported formats
-
runAndRender
void runAndRender(ReportParameters parameters, ReportMode mode, java.io.OutputStream outputStream) throws ReportException
This method runs the report and renders in into the given output stream with no intermediate steps- Parameters:
parameters
- runtime report parametersoutputStream
- stream to render the resulting reportmode
- in which to run the report (ONLINE, BATCH or IMMEDIATE)- Throws:
ReportException
-
render
void render(java.lang.String ReportId, java.lang.String location, ReportFormat format, java.io.OutputStream outputStream)
This method renders the report into a given output stream.- Parameters:
ReportId
- reportId as defined in database-reports.xmllocation
- location of the report on diskformat
- format to render the reportoutputStream
- stream to render the resulting report
-
hasParameters
java.lang.Boolean hasParameters(java.lang.String ReportId)
This method is used to determine whether the report takes any parameters- Parameters:
ReportId
- aString
object.- Returns:
- true if the report takes parameters, false if not.
-
getParameters
ReportParameters getParameters(java.lang.String ReportId)
This method retrieves the runtime parameters taken by the report- Parameters:
ReportId
- aString
object.- Returns:
- a ReportParameters object containing the parameters taken by the report
-
-