Class ProcessExportRequestListener
- java.lang.Object
-
- com.broadleafcommerce.common.dataexport.messaging.ProcessExportRequestListener
-
public class ProcessExportRequestListener extends Object
A listener that accepts aProcessExportRequest
and performs the export.- Author:
- Samarth Dhruva (samarthd)
-
-
Constructor Summary
Constructors Constructor Description ProcessExportRequestListener(List<ExportDataRouteSupporting> dataRoutes, ExportService<Export> exportService, ExportManager exportManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<ExportDataRouteSupporting>
getDataRoutes()
protected ExportManager
getExportManager()
protected ExportService<Export>
getExportService()
void
startExport(ProcessExportRequest processExportRequest)
Delegates toExportService.setProcessingStatus(String)
andExportManager.processExport(Export)
.
-
-
-
Constructor Detail
-
ProcessExportRequestListener
public ProcessExportRequestListener(@NonNull List<ExportDataRouteSupporting> dataRoutes, @NonNull ExportService<Export> exportService, @NonNull ExportManager exportManager)
-
-
Method Detail
-
startExport
@StreamListener("processExportRequestInput") public void startExport(ProcessExportRequest processExportRequest)
Delegates toExportService.setProcessingStatus(String)
andExportManager.processExport(Export)
.This handler only performs the export if the return value of
ExportService.setProcessingStatus(String)
is not null. This ensures that only the microservice whose export data store has the export will perform it, and the export will only be performed if theExport.status
is valid.- Parameters:
processExportRequest
- the request containing information about the export to perform
-
getDataRoutes
@NonNull protected List<ExportDataRouteSupporting> getDataRoutes()
-
getExportService
@NonNull protected ExportService<Export> getExportService()
-
getExportManager
@NonNull protected ExportManager getExportManager()
-
-