Class PurgeImportJobHandler

java.lang.Object
com.broadleafcommerce.dataimport.service.purge.PurgeImportJobHandler

@DataRouteByExample(Import.class) public class PurgeImportJobHandler extends Object
Purges Import, and related Batch and BatchItemCompletion records since these have the opportunity to grow large
Author:
Chad Harchar (charchar)
  • Constructor Details

  • 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

      protected void processItemCompletionDeletion(List<String> importIds)
      Delete any BatchItemCompletion related to the imports in batch
      Parameters:
      importIds - ids of imports to delete related BatchItemCompletion
    • processIndividualBatchItemCompletionDeletion

      protected void processIndividualBatchItemCompletionDeletion(List<String> itemCompletionIds, String importId)
    • processBatchDeletion

      protected void processBatchDeletion(List<String> importIds)
    • processImportDeletion

      protected void processImportDeletion(List<String> importIds)