Package de.hybris.platform.jobs
Class DynamicMaintenanceJobPerformable
- java.lang.Object
-
- de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<CronJobModel>
-
- de.hybris.platform.jobs.AbstractMaintenanceJobPerformable
-
- de.hybris.platform.jobs.DynamicMaintenanceJobPerformable
-
- All Implemented Interfaces:
JobPerformable<CronJobModel>,TypeAwareJobPerformable,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class DynamicMaintenanceJobPerformable extends AbstractMaintenanceJobPerformable implements org.springframework.context.ApplicationContextAware
Executes the beanshell code from theDynamicMaintenanceCleanupJobModel
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService
-
-
Constructor Summary
Constructors Constructor Description DynamicMaintenanceJobPerformable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlexibleSearchQuerygetFetchQuery(CronJobModel cronJob)The beanshell field from the job model is readed and executed.java.lang.StringgetType()Must return an existing subtype ofServicelayerJobModelas String.voidprocess(java.util.List<ItemModel> elements, CronJobModel cronJob)If no beanshell code for the cleanup part is provided, the default behaviour is: iterate through the list and call on each model modelService.remove(model)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)-
Methods inherited from class de.hybris.platform.jobs.AbstractMaintenanceJobPerformable
perform, setAbortOnError, setModelResolver, setPageSize
-
Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isAbortable, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.servicelayer.cronjob.TypeAwareJobPerformable
createDefaultJob
-
-
-
-
Method Detail
-
getFetchQuery
public FlexibleSearchQuery getFetchQuery(CronJobModel cronJob)
The beanshell field from the job model is readed and executed. This code *must* return a FlexibleSearchQuery onject.- Specified by:
getFetchQueryin classAbstractMaintenanceJobPerformable- See Also:
MaintenanceCleanupStrategy.createFetchQuery(CronJobModel)
-
process
public void process(java.util.List<ItemModel> elements, CronJobModel cronJob)
If no beanshell code for the cleanup part is provided, the default behaviour is: iterate through the list and call on each model modelService.remove(model)- Specified by:
processin classAbstractMaintenanceJobPerformable- See Also:
MaintenanceCleanupStrategy.process(List)
-
getType
public java.lang.String getType()
Description copied from interface:TypeAwareJobPerformableMust return an existing subtype ofServicelayerJobModelas String.- Specified by:
getTypein interfaceTypeAwareJobPerformable- Overrides:
getTypein classAbstractMaintenanceJobPerformable
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
-