Class DefaultBatchCompletionService
java.lang.Object
com.broadleafcommerce.dataimport.service.DefaultBatchCompletionService
- All Implemented Interfaces:
BatchCompletionService
- Author:
- Phillip Verheyden (phillipuniverse)
-
Constructor Summary
ConstructorDescriptionDefaultBatchCompletionService
(ImportService<Import> importService, BatchService<Batch> batchService, BatchItemCompletionService<BatchItemCompletion> batchItemCompletionService, IndexNotificationService indexNotificationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected Import
adjustImportCounts
(Batch batch) protected void
markImportCompleted
(String importId) void
receiveCompletion
(com.broadleafcommerce.common.dataimport.messaging.BatchCompletion completion) Receives the completion for a given batch and updates the underlyingBatch
,Import
andBatchItemCompletions
based on the information applied in the completion.protected boolean
thereAreDuplicateBatchCompletionRecords
(List<com.broadleafcommerce.common.dataimport.messaging.BatchCompletionRecord> completionRecords) protected Batch
updateBatch
(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:BatchCompletionService
Receives the completion for a given batch and updates the underlying
Batch
,Import
andBatchItemCompletions
based 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:
receiveCompletion
in 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)
-