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 FlexibleSearchQuery
getFetchQuery(CronJobModel cronJob)
The beanshell field from the job model is readed and executed.java.lang.String
getType()
Must return an existing subtype ofServicelayerJobModel
as String.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)void
setApplicationContext(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:
getFetchQuery
in 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:
process
in classAbstractMaintenanceJobPerformable
- See Also:
MaintenanceCleanupStrategy.process(List)
-
getType
public java.lang.String getType()
Description copied from interface:TypeAwareJobPerformable
Must return an existing subtype ofServicelayerJobModel
as String.- Specified by:
getType
in interfaceTypeAwareJobPerformable
- Overrides:
getType
in classAbstractMaintenanceJobPerformable
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
-