Class PurgeImportJobHandler
java.lang.Object
com.broadleafcommerce.dataimport.service.purge.PurgeImportJobHandler
Purges
Import
, and related Batch
and BatchItemCompletion
records since
these have the opportunity to grow large- Author:
- Chad Harchar (charchar)
-
Constructor Summary
ConstructorDescriptionPurgeImportJobHandler
(ImportService<Import> importService, BatchItemCompletionService<BatchItemCompletion> batchItemCompletionService, BatchService<Batch> batchService, PurgeImportProperties purgeImportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
processBatchDeletion
(List<String> importIds) protected void
processImportDeletion
(List<String> importIds) protected void
processIndividualBatchItemCompletionDeletion
(List<String> itemCompletionIds, String importId) protected void
processItemCompletionDeletion
(List<String> importIds) Delete anyBatchItemCompletion
related to the imports in batchint
Purges import data 1.
-
Constructor Details
-
PurgeImportJobHandler
public PurgeImportJobHandler(ImportService<Import> importService, BatchItemCompletionService<BatchItemCompletion> batchItemCompletionService, BatchService<Batch> batchService, PurgeImportProperties purgeImportProperties)
-
-
Method Details
-
purgeImportData
public int purgeImportData()Purges import data- 1. Find the ids of the imports to purge
- 2. Batch the import ids and delete the following
- 3. Delete any related
BatchItemCompletion
in another batch - 4. Delete any related
Batch
- 5. Delete the owning
Import
- Returns:
- number of imports purged
-
processItemCompletionDeletion
Delete anyBatchItemCompletion
related to the imports in batch- Parameters:
importIds
- ids of imports to delete relatedBatchItemCompletion
-
processIndividualBatchItemCompletionDeletion
-
processBatchDeletion
-
processImportDeletion
-