Class ProductSaveTask

java.lang.Object
org.variantsync.boosting.product.ProductSaveTask
All Implemented Interfaces:
Runnable

public class ProductSaveTask extends Object implements Runnable
A class representing a task to save a product to a file. This class implements the Runnable interface to be executed as a thread.
  • Constructor Details

    • ProductSaveTask

      public ProductSaveTask(Variant variant, String folderName, int id)
      Constructor for ProductSaveTask.
      Parameters:
      variant - The product to be saved.
      folderName - The name of the folder where the product will be saved.
      id - The unique identifier of the product.
  • Method Details

    • run

      public void run()
      Saves the product to a file. Creates directories if they do not exist and writes the product object to a file.
      Specified by:
      run in interface Runnable
    • resetProcessedCount

      public static void resetProcessedCount()
      Reset the processed count to zero.