Class DefaultImportService

All Implemented Interfaces:
ImportService, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

public class DefaultImportService extends AbstractBusinessService implements ImportService
Default implementation of import service.
Since:
4.0
See Also:
  • Constructor Details

    • DefaultImportService

      public DefaultImportService()
  • Method Details

    • importData

      public ImportResult importData(ImpExResource script)
      Description copied from interface: ImportService
      Imports platform data using given impex import script. Default parameters are set as when creating an empty ImportConfig, so execution will be synchronous for example. Returns a result object where status and problem info can be accessed from.
      Specified by:
      importData in interface ImportService
      Parameters:
      script - import script
      Returns:
      result of import
    • importData

      public ImportResult importData(ImportConfig config)
      Description copied from interface: ImportService
      Imports platform data. The import is configured by given configuration object. Please pay attention for the defaults of parameters not explicitly configured. For example the import will be executed synchronous if not reconfigured. Returns a result object where status and problem info can be accessed from. If executed asynchronous the resulting status of import can only be accessed if ImportResult.isFinished() returns true.
      Specified by:
      importData in interface ImportService
      Parameters:
      config - export configuration
      Returns:
      result of export
    • collectImportErrors

      public Stream<? extends ImpExError> collectImportErrors(ImportResult result)
      Description copied from interface: ImportService
      Allows to collect import error objects built from import result dump.
      Specified by:
      collectImportErrors in interface ImportService
      Parameters:
      result - ImportResult from an import operation
      Returns:
      Stream of ImpExError objects.
    • configureCronJob

      protected void configureCronJob(ImpExImportCronJobModel cronJob, ImportConfig config)
    • importData

      protected void importData(ImpExImportCronJobModel cronJob, boolean synchronous, boolean removeOnSuccess)
    • setCronJobService

      public void setCronJobService(CronJobService cronJobService)
    • setDistributedProcessService

      public void setDistributedProcessService(DistributedProcessService distributedProcessService)
    • setImportDataDumpStrategy

      public void setImportDataDumpStrategy(ImportDataDumpStrategy importDataDumpStrategy)
    • setMediaService

      public void setMediaService(MediaService mediaService)
    • setMimeService

      public void setMimeService(MimeService mimeService)