Package org.bhn.promotion.core.service
Interface PromotionExportService
- All Known Implementing Classes:
VoucherifyPromotionExportService
public interface PromotionExportService
The
PromotionExportService interface defines operations for scheduling and downloading
reports.
This interface provides methods for scheduling, generating, and downloading CSV data based on export ID. Implementations of this interface should handle the business logic related to these operations.
-
Method Summary
Modifier and TypeMethodDescriptioncreateExport(ExportModel exportModel) Creates an export based on the providedExportModel.downloadExport(String exportType, String exportId, String token) Downloads the export data based on the provided export type, export ID, and authorization token.Retrieves the URL for downloading the export associated with the given export ID.
-
Method Details
-
createExport
Creates an export based on the providedExportModel.- Parameters:
exportModel- the export type and sorting parameter name of theExportModelto be retrieved.- Returns:
- a
Filerepresenting the generated export data. If an exception occurs during report generation, it will be logged.
-
getExport
Retrieves the URL for downloading the export associated with the given export ID.- Parameters:
exportId- the ID of the export for which to fetch the report.- Returns:
- a
Stringrepresenting the URL for downloading the export. If an exception occurs during the retrieval of the report, it will throw an appropriate exception.
-
downloadExport
Downloads the export data based on the provided export type, export ID, and authorization token.- Parameters:
exportType- the type of export to download.exportId- the ID of the export to download.token- the authorization token required for downloading the export.- Returns:
- a
Filerepresenting the CSV data based on the specified parameters. If an exception occurs during the download, it will throw an appropriate exception.
-