Class VariantInitTask

java.lang.Object
org.variantsync.boosting.product.VariantInitTask
All Implemented Interfaces:
Callable<VariantInitTask.InitResult>

public class VariantInitTask extends Object implements Callable<VariantInitTask.InitResult>
A Callable task for initializing a product with the given parameters.
  • Constructor Details

    • VariantInitTask

      public VariantInitTask(int productNumber, VariantPassport passport, ESupportedLanguages targetLanguage)
      Initializes a ProductInitializationTask with the given product number, product passport, and target language.
      Parameters:
      productNumber - the product number to assign to the task
      passport - the product passport containing information about the product
      targetLanguage - the target language for the task
  • Method Details

    • call

      public VariantInitTask.InitResult call() throws Exception
      Parses the sources and creates an InitResult with the created product. This method reads a feature configuration file specified by the configPath parameter, parses the features listed in the file, creates a product AST based on the target language specified, and returns an InitResult object containing the parsed information.
      Specified by:
      call in interface Callable<VariantInitTask.InitResult>
      Returns:
      InitResult - an object containing the parsed information
      Throws:
      Exception - - if an error occurs during parsing or creating the InitResult object