Class DefaultImportService

  • All Implemented Interfaces:
    ImportService, java.io.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:
    Serialized Form
    • Constructor Detail

      • DefaultImportService

        public DefaultImportService()
    • Method Detail

      • 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 java.util.stream.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.
      • 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)