public class DefaultCronJobMediaDataHandler extends DefaultMediaDataHandler
DefaultMediaDataHandler to allow an import of files directly from an set zip media and to export
medias directly to an zip media.| Constructor and Description |
|---|
DefaultCronJobMediaDataHandler()
Empty constructor for generic instantiation.
|
DefaultCronJobMediaDataHandler(ImpExExportCronJob cronJob)
Constructs an instance of this class with the given CronJob.
|
DefaultCronJobMediaDataHandler(ImpExImportCronJob cronJob)
Constructs an instance of this class with the given CronJob.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
java.lang.String |
exportData(Media media)
Uses the ZipOutputStream from the ImpExExportCronjob to put the media's rawdata into it.
|
void |
importData(Media destMedia,
java.lang.String path) |
protected java.io.File |
unzipMediasMedia(Media sourceMedia,
java.lang.String normalizedLocation)
Extracts the given media to a temporary directory.
|
isAbsolutePath, isExplodedJarBasedPath, isJarBasedPath, isURLBasedPath, isZipBasedPath, normalize, setLegacyModepublic DefaultCronJobMediaDataHandler()
public DefaultCronJobMediaDataHandler(ImpExImportCronJob cronJob)
importData(Media, String) to import files from it. If the zip media is null, the
import methods of DefaultMediaDataHandler are used.cronJob - cronjob holding a resource media optionalpublic DefaultCronJobMediaDataHandler(ImpExExportCronJob cronJob)
exportData(Media) to put the Media's rawdata in it. If the ZipOutputStream is null, no
raw-data will be exportedcronJob - cronjob holding the export zip mediapublic void importData(Media destMedia, java.lang.String path) throws ImpExException
importData in interface MediaDataHandlerimportData in class DefaultMediaDataHandlerImpExExceptionpublic java.lang.String exportData(Media media)
exportData in interface MediaDataHandlerexportData in class DefaultMediaDataHandlerMediaDataHandler.exportData(de.hybris.platform.jalo.media.Media)protected java.io.File unzipMediasMedia(Media sourceMedia, java.lang.String normalizedLocation)
sourceMedia - media containing the source zip file and which will be extractednormalizedLocation - location within given zip from where the extraction will be performedpublic void cleanUp()
cleanUp in interface MediaDataHandlercleanUp in class DefaultMediaDataHandlerCopyright © 2018 SAP SE. All Rights Reserved.