Package africa.absa.inception.reporting
Interface IReportingService
-
- All Known Implementing Classes:
ReportingService
public interface IReportingServiceThe IReportingService interface defines the functionality provided by a Reporting Service implementation.- Author:
- Marcus Portmann
-
-
Field Summary
Fields Modifier and Type Field Description static StringSYSTEM_USERNAMEThe username used to identify operations performed by the system.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateReportDefinition(ReportDefinition reportDefinition)Create the new report definition.byte[]createReportPDF(String reportDefinitionId, Map<String,Object> parameters)Create the PDF for the report using a connection retrieved from the application data source.byte[]createReportPDF(String reportDefinitionId, Map<String,Object> parameters, Connection connection)Create the PDF for the report.byte[]createReportPDF(String reportDefinitionId, Map<String,Object> parameters, Document document)Create the PDF for the report.voiddeleteReportDefinition(String reportDefinitionId)Delete the existing report definition.StringgetLocalReportFolderPath()Returns the real path to the folder where the local Jasper reports are stored.ReportDefinitiongetReportDefinition(String reportDefinitionId)Retrieve the report definition.StringgetReportDefinitionName(String reportDefinitionId)Retrieve the name of the report definition.List<ReportDefinition>getReportDefinitions()Returns all the report definitions.List<ReportDefinitionSummary>getReportDefinitionSummaries()Returns the summaries for all the report definitions.ReportDefinitionSummarygetReportDefinitionSummary(String reportDefinitionId)Retrieve the summary for the report definition.booleanreportDefinitionExists(String reportDefinitionId)Check whether the report definition exists.voidsetLocalReportFolderPath(String localReportFolderPath)Set the real path to the folder where the local Jasper reports are stored.voidupdateReportDefinition(ReportDefinition reportDefinition)Update the report definition.
-
-
-
Field Detail
-
SYSTEM_USERNAME
static final String SYSTEM_USERNAME
The username used to identify operations performed by the system.- See Also:
- Constant Field Values
-
-
Method Detail
-
createReportDefinition
void createReportDefinition(ReportDefinition reportDefinition) throws InvalidArgumentException, DuplicateReportDefinitionException, ServiceUnavailableException
Create the new report definition.- Parameters:
reportDefinition- the ReportDefinition instance containing the information for the new report definition- Throws:
InvalidArgumentException- if an argument is invalidDuplicateReportDefinitionException- if the report definition already existsServiceUnavailableException- if the report definition could not be created
-
createReportPDF
byte[] createReportPDF(String reportDefinitionId, Map<String,Object> parameters) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Create the PDF for the report using a connection retrieved from the application data source.- Parameters:
reportDefinitionId- the ID for the report definitionparameters- the parameters for the report- Returns:
- the PDF data for the report
- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the report definition could not be created
-
createReportPDF
byte[] createReportPDF(String reportDefinitionId, Map<String,Object> parameters, Connection connection) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Create the PDF for the report.- Parameters:
reportDefinitionId- the ID for the report definitionparameters- the parameters for the reportconnection- the database connection used to retrieve the report data- Returns:
- the PDF data for the report
- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the PDF for the report could not be created
-
createReportPDF
byte[] createReportPDF(String reportDefinitionId, Map<String,Object> parameters, Document document) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Create the PDF for the report.- Parameters:
reportDefinitionId- the ID for the report definitionparameters- the parameters for the reportdocument- the XML document containing the report data- Returns:
- the PDF data for the report
- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the PDF for the report could not be created
-
deleteReportDefinition
void deleteReportDefinition(String reportDefinitionId) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Delete the existing report definition.- Parameters:
reportDefinitionId- the ID for the report definition- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the report definition could not be deleted
-
getLocalReportFolderPath
String getLocalReportFolderPath()
Returns the real path to the folder where the local Jasper reports are stored.- Returns:
- the real path to the folder where the local Jasper reports are stored
-
getReportDefinition
ReportDefinition getReportDefinition(String reportDefinitionId) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Retrieve the report definition.- Parameters:
reportDefinitionId- the ID for the report definition- Returns:
- the report definition
- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the report definition could not be retrieved
-
getReportDefinitionName
String getReportDefinitionName(String reportDefinitionId) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Retrieve the name of the report definition.- Parameters:
reportDefinitionId- the ID for the report definition- Returns:
- the name of the report definition
- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the name of the report definition could not be retrieved
-
getReportDefinitionSummaries
List<ReportDefinitionSummary> getReportDefinitionSummaries() throws ServiceUnavailableException
Returns the summaries for all the report definitions.- Returns:
- the summaries for all the report definitions
- Throws:
ServiceUnavailableException- if the report definition summaries could not be retrieved
-
getReportDefinitionSummary
ReportDefinitionSummary getReportDefinitionSummary(String reportDefinitionId) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Retrieve the summary for the report definition.- Parameters:
reportDefinitionId- the ID for the report definition- Returns:
- the summary for the report definition
- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the report definition summary could not be retrieved
-
getReportDefinitions
List<ReportDefinition> getReportDefinitions() throws ServiceUnavailableException
Returns all the report definitions.- Returns:
- the report definitions
- Throws:
ServiceUnavailableException- if the report definitions could not be retrieved
-
reportDefinitionExists
boolean reportDefinitionExists(String reportDefinitionId) throws InvalidArgumentException, ServiceUnavailableException
Check whether the report definition exists.- Parameters:
reportDefinitionId- the ID for the report definition- Returns:
- true if the report definition exists or false otherwise
- Throws:
InvalidArgumentException- if an argument is invalidServiceUnavailableException- if the check for the existing report definition failed
-
setLocalReportFolderPath
void setLocalReportFolderPath(String localReportFolderPath)
Set the real path to the folder where the local Jasper reports are stored.- Parameters:
localReportFolderPath- the real path to the folder where the local Jasper reports are stored
-
updateReportDefinition
void updateReportDefinition(ReportDefinition reportDefinition) throws InvalidArgumentException, ReportDefinitionNotFoundException, ServiceUnavailableException
Update the report definition.- Parameters:
reportDefinition- the ReportDefinition instance containing the updated information for the report definition- Throws:
InvalidArgumentException- if an argument is invalidReportDefinitionNotFoundException- if the report definition could not be foundServiceUnavailableException- if the report definition could not be updated
-
-