Class MediaConversionJob
java.lang.Object
de.hybris.platform.mediaconversion.job.MediaConversionJob
- All Implemented Interfaces:
JobPerformable<MediaConversionCronJobModel>,TaskRunner<TaskModel>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
public class MediaConversionJob
extends Object
implements org.springframework.beans.factory.BeanNameAware, TaskRunner<TaskModel>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconvert(MediaContainerModel container, ConversionMediaFormatModel format) protected voidconvertAsynchronous(MediaConversionCronJobModel cronJob, PK containerPk, Set<PK> formatPks) protected voidconvertSynchronous(MediaConversionCronJobModel cronJob, PK containerPK, Set<PK> formatPks) getDao()voidhandleError(TaskService tServ, TaskModel task, Throwable error) Does nothing except logging the error.booleanChecks whether the execution is implemented abortable.booleanChecks whether the execution can be performed at the moment.perform(MediaConversionCronJobModel cronJob) The execution body for aServicelayerJob.voidrun(TaskService taskService, TaskModel task) voidsetBeanName(String beanName) voidvoidvoidsetModelService(ModelService modelService) voidsetTaskService(TaskService taskService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.task.TaskRunner
initLoggingCtx, isLoggingSupported, stopLoggingCtx
-
Constructor Details
-
MediaConversionJob
public MediaConversionJob()
-
-
Method Details
-
handleError
Does nothing except logging the error.- Specified by:
handleErrorin interfaceTaskRunner<TaskModel>- See Also:
-
run
- Specified by:
runin interfaceTaskRunner<TaskModel>- Throws:
RetryLaterException
-
isPerformable
public boolean isPerformable()Description copied from interface:JobPerformableChecks whether the execution can be performed at the moment.- Specified by:
isPerformablein interfaceJobPerformable<MediaConversionCronJobModel>- Returns:
- true if the execution is ready
-
convertSynchronous
protected void convertSynchronous(MediaConversionCronJobModel cronJob, PK containerPK, Set<PK> formatPks) -
convertAsynchronous
protected void convertAsynchronous(MediaConversionCronJobModel cronJob, PK containerPk, Set<PK> formatPks) -
convert
-
getTaskService
-
setTaskService
-
getBeanName
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
getMediaConversionService
-
setMediaConversionService
-
getDao
- Returns:
- the dao
-
setDao
- Parameters:
dao- the dao to set
-
perform
Description copied from interface:JobPerformableThe execution body for aServicelayerJob. Implement here your execution logic. It can be called synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the execution has reached end and if it was successful.- Specified by:
performin interfaceJobPerformable<T extends AbstractMediaCronJobModel>- Parameters:
cronJob- the related CronJob in whose context the execution will be performed.- Returns:
- a
PerformResultthat indicates whether theexecutionwas successfully executed or not and has finished or not.
-
isAbortable
public boolean isAbortable()Description copied from interface:JobPerformableChecks whether the execution is implemented abortable.- Specified by:
isAbortablein interfaceJobPerformable<T extends AbstractMediaCronJobModel>- Returns:
- true if the execution can be aborted
-
getModelService
-
setModelService
-