Class DefaultImpExMediaGenerationService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.importcockpit.services.impex.impl.DefaultImpExMediaGenerationService
-
- All Implemented Interfaces:
ImpExMediaGenerationService,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class DefaultImpExMediaGenerationService extends AbstractBusinessService implements ImpExMediaGenerationService
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description DefaultImpExMediaGenerationService()
-
Method Summary
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
getMappingService
protected ImportCockpitMappingService getMappingService()
-
setMappingService
public void setMappingService(ImportCockpitMappingService mappingService)
-
getImportCockpitMediaService
protected ImportCockpitMediaService getImportCockpitMediaService()
-
setImportCockpitMediaService
public void setImportCockpitMediaService(ImportCockpitMediaService importCockpitMediaService)
-
getTransformationService
protected ImpExTransformationService getTransformationService()
-
setTransformationService
public void setTransformationService(ImpExTransformationService transformationService)
-
getHeaderGeneratorOperation
protected HeaderGeneratorOperation getHeaderGeneratorOperation()
-
setHeaderGeneratorOperation
public void setHeaderGeneratorOperation(HeaderGeneratorOperation headerGenOperation)
-
getFileGeneratorOperation
protected FileGeneratorOperation getFileGeneratorOperation()
-
setFileGeneratorOperation
public void setFileGeneratorOperation(FileGeneratorOperation fileGenOperation)
-
generateImportImpExMedia
public ImpExMediaModel generateImportImpExMedia(ImportCockpitCronJobModel cronJobModel)
Description copied from interface:ImpExMediaGenerationServiceCreates the ZIP import package. It generates the impex script file and all the related data files, and packs together their results in the ZIP import package.- Specified by:
generateImportImpExMediain interfaceImpExMediaGenerationService- Returns:
- an
ImpExMediaModelobject, which is to be set as a jobMedia to the cron job.
-
generateImportScriptAsZipEntry
protected void generateImportScriptAsZipEntry(java.util.zip.ZipOutputStream zip, ImportCockpitCronJobModel cronJobModel, MappingModel mappingModel)Creates the impex import script file (importscript.impex) as a ZIP entry. This method calls another method for generating the impex script file data and packs the result is an file entry into the ZIP import package file.- Parameters:
zip- - aZipOutputStreamobject to which theSafeZipEntryobjects will be added.cronJobModel- -ImportCockpitCronJobModelmappingModel- -MappingModel
-
generateImportDataFilesAsZipEntries
protected void generateImportDataFilesAsZipEntries(java.util.zip.ZipOutputStream zip, ImportCockpitCronJobModel cronJobModel, MappingModel mappingModel) throws java.io.IOExceptionGenerates entries (SafeZipEntryobjects) containing CSV data generated by transforming the CSV source data within the specifiedImportCockpitCronJobModelobject AND the mapping data (aMappingModelobject). The generated entries are then added to the specifiedZipOutputStreamobject.- Parameters:
zip- - aZipOutputStreamobject to which theSafeZipEntryobjects will be added.cronJobModel- -ImportCockpitCronJobModelmappingModel- -MappingModel- Throws:
java.io.IOException- - error while writing.
-
-