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
ConstructorsConstructorDescriptionPurgeImportJobHandler(ImportService<Import> importService, BatchItemCompletionService<BatchItemCompletion> batchItemCompletionService, BatchService<Batch> batchService, PurgeImportProperties purgeImportProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocessBatchDeletion(List<String> importIds) protected voidprocessImportDeletion(List<String> importIds) protected voidprocessIndividualBatchItemCompletionDeletion(List<String> itemCompletionIds, String importId) protected voidprocessItemCompletionDeletion(List<String> importIds) Delete anyBatchItemCompletionrelated to the imports in batchintPurges 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
BatchItemCompletionin another batch - 4. Delete any related
Batch - 5. Delete the owning
Import
- Returns:
- number of imports purged
-
processItemCompletionDeletion
Delete anyBatchItemCompletionrelated to the imports in batch- Parameters:
importIds- ids of imports to delete relatedBatchItemCompletion
-
processIndividualBatchItemCompletionDeletion
-
processBatchDeletion
-
processImportDeletion
-