Class DefaultBatchCompletionService
java.lang.Object
com.broadleafcommerce.dataimport.service.DefaultBatchCompletionService
- All Implemented Interfaces:
BatchCompletionService
- Author:
- Phillip Verheyden (phillipuniverse)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultBatchCompletionService(ImportService<Import> importService, BatchService<Batch> batchService, BatchItemCompletionService<BatchItemCompletion> batchItemCompletionService, IndexNotificationService indexNotificationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected ImportadjustImportCounts(Batch batch) protected voidmarkImportCompleted(String importId) voidreceiveCompletion(com.broadleafcommerce.common.dataimport.messaging.BatchCompletion completion) Receives the completion for a given batch and updates the underlyingBatch,ImportandBatchItemCompletionsbased on the information applied in the completion.protected booleanthereAreDuplicateBatchCompletionRecords(List<com.broadleafcommerce.common.dataimport.messaging.BatchCompletionRecord> completionRecords) protected BatchupdateBatch(com.broadleafcommerce.common.dataimport.messaging.BatchCompletion batch)
-
Constructor Details
-
DefaultBatchCompletionService
public DefaultBatchCompletionService(ImportService<Import> importService, BatchService<Batch> batchService, BatchItemCompletionService<BatchItemCompletion> batchItemCompletionService, IndexNotificationService indexNotificationService)
-
-
Method Details
-
receiveCompletion
public void receiveCompletion(com.broadleafcommerce.common.dataimport.messaging.BatchCompletion completion) Description copied from interface:BatchCompletionServiceReceives the completion for a given batch and updates the underlying
Batch,ImportandBatchItemCompletionsbased on the information applied in the completion.This method is idempotent and should be safe to call multiple times with the same final outcome.
- Specified by:
receiveCompletionin interfaceBatchCompletionService- Parameters:
completion- the received completion
-
adjustImportCounts
-
updateBatch
protected Batch updateBatch(com.broadleafcommerce.common.dataimport.messaging.BatchCompletion batch) -
markImportCompleted
-
thereAreDuplicateBatchCompletionRecords
protected boolean thereAreDuplicateBatchCompletionRecords(List<com.broadleafcommerce.common.dataimport.messaging.BatchCompletionRecord> completionRecords)
-