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 int
Returns the value for the "broadleaf.dataimport.purge.item-completion-batch-size" configuration property.protected void
processBatchDeletion
(List<String> importIds) protected void
processImportDeletion
(List<String> importIds) protected Integer
processIndividualBatchItemCompletionDeletion
(List<String> itemCompletionIds) protected void
processIndividualBatchItemCompletionDeletion
(List<String> itemCompletionIds, String importId) Deprecated, for removal: This API element is subject to removal in a future version.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
-
getBatchSize
protected int getBatchSize()Returns the value for the "broadleaf.dataimport.purge.item-completion-batch-size" configuration property. If the value is less than 1 or more than 100 return 100 by default. -
processIndividualBatchItemCompletionDeletion
@Deprecated(forRemoval=true) protected void processIndividualBatchItemCompletionDeletion(List<String> itemCompletionIds, String importId) Deprecated, for removal: This API element is subject to removal in a future version. -
processIndividualBatchItemCompletionDeletion
-
processBatchDeletion
-
processImportDeletion
-
processIndividualBatchItemCompletionDeletion(List)