public class MediaConversionJob extends java.lang.Object implements TaskRunner<TaskModel>
| Constructor and Description |
|---|
MediaConversionJob() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
convert(MediaContainerModel container,
ConversionMediaFormatModel format) |
protected void |
convertAsynchronous(MediaConversionCronJobModel cronJob,
PK containerPk,
java.util.Set<PK> formatPks) |
protected void |
convertSynchronous(MediaConversionCronJobModel cronJob,
PK containerPK,
java.util.Set<PK> formatPks) |
java.lang.String |
getBeanName() |
MediaConversionJobDao |
getDao() |
MediaConversionService |
getMediaConversionService() |
ModelService |
getModelService() |
TaskService |
getTaskService() |
void |
handleError(TaskService tServ,
TaskModel task,
java.lang.Throwable error)
Does nothing except logging the error.
|
boolean |
isAbortable()
Checks whether the execution is implemented abortable.
|
boolean |
isPerformable()
Checks whether the execution can be performed at the moment.
|
PerformResult |
perform(T cronJob)
The execution body for a
ServicelayerJob. |
void |
run(TaskService taskService,
TaskModel task) |
void |
setBeanName(java.lang.String beanName) |
void |
setDao(MediaConversionJobDao dao) |
void |
setMediaConversionService(MediaConversionService service) |
void |
setModelService(ModelService modelService) |
void |
setTaskService(TaskService taskService) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitLoggingCtx, isLoggingSupported, stopLoggingCtxpublic void handleError(TaskService tServ, TaskModel task, java.lang.Throwable error)
handleError in interface TaskRunner<TaskModel>TaskRunner.handleError(TaskService, TaskModel, Throwable)public void run(TaskService taskService, TaskModel task) throws RetryLaterException
run in interface TaskRunner<TaskModel>RetryLaterExceptionpublic boolean isPerformable()
JobPerformableisPerformable in interface JobPerformable<MediaConversionCronJobModel>protected void convertSynchronous(MediaConversionCronJobModel cronJob, PK containerPK, java.util.Set<PK> formatPks)
protected void convertAsynchronous(MediaConversionCronJobModel cronJob, PK containerPk, java.util.Set<PK> formatPks)
protected void convert(MediaContainerModel container, ConversionMediaFormatModel format)
public TaskService getTaskService()
public void setTaskService(TaskService taskService)
public java.lang.String getBeanName()
public void setBeanName(java.lang.String beanName)
public MediaConversionService getMediaConversionService()
public void setMediaConversionService(MediaConversionService service)
public MediaConversionJobDao getDao()
public void setDao(MediaConversionJobDao dao)
dao - the dao to setpublic PerformResult perform(T cronJob)
JobPerformableServicelayerJob. 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.perform in interface JobPerformable<T extends AbstractMediaCronJobModel>cronJob - the related CronJob in whose context the execution will be performed.PerformResult that indicates whether the execution was successfully executed
or not and has finished or not.public boolean isAbortable()
JobPerformableisAbortable in interface JobPerformable<T extends AbstractMediaCronJobModel>public ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.