Class DefaultKieModuleCleanupStrategy
- java.lang.Object
-
- de.hybris.platform.ruleengine.cronjob.DefaultKieModuleCleanupStrategy
-
- All Implemented Interfaces:
MaintenanceCleanupStrategy<DroolsKIEModuleMediaModel,CronJobModel>
public class DefaultKieModuleCleanupStrategy extends java.lang.Object implements MaintenanceCleanupStrategy<DroolsKIEModuleMediaModel,CronJobModel>
A Cleanup Job Strategy to search and clean up old serialized KieModules.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLAST_VERSIONS_OF_KIE_MODULES_TO_KEEP
-
Constructor Summary
Constructors Constructor Description DefaultKieModuleCleanupStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlexibleSearchQuerycreateFetchQuery(CronJobModel cronJob)Implement and return aFlexibleSearchQueryobject here which searches for the items to be removed.protected ConfigurationServicegetConfigurationService()protected MediaServicegetMediaService()protected ModelServicegetModelService()protected intgetNumberOfLastVersionsOfKieModuleToKeep(MaintenanceCleanupJobModel maintenanceCleanupJob)voidprocess(java.util.List<DroolsKIEModuleMediaModel> elements)Based on the givenFlexibleSearchQueryofMaintenanceCleanupStrategy.createFetchQuery(CronJobModel)the job pages through the results and with each sublist (contains the concrete instances of the items) of the large result this method is called.voidsetConfigurationService(ConfigurationService configurationService)voidsetMediaService(MediaService mediaService)voidsetModelService(ModelService modelService)
-
-
-
Field Detail
-
LAST_VERSIONS_OF_KIE_MODULES_TO_KEEP
public static final java.lang.String LAST_VERSIONS_OF_KIE_MODULES_TO_KEEP
- See Also:
- Constant Field Values
-
-
Method Detail
-
createFetchQuery
public FlexibleSearchQuery createFetchQuery(CronJobModel cronJob)
Description copied from interface:MaintenanceCleanupStrategyImplement and return aFlexibleSearchQueryobject here which searches for the items to be removed.- Specified by:
createFetchQueryin interfaceMaintenanceCleanupStrategy<DroolsKIEModuleMediaModel,CronJobModel>
-
getNumberOfLastVersionsOfKieModuleToKeep
protected int getNumberOfLastVersionsOfKieModuleToKeep(MaintenanceCleanupJobModel maintenanceCleanupJob)
-
process
public void process(java.util.List<DroolsKIEModuleMediaModel> elements)
Description copied from interface:MaintenanceCleanupStrategyBased on the givenFlexibleSearchQueryofMaintenanceCleanupStrategy.createFetchQuery(CronJobModel)the job pages through the results and with each sublist (contains the concrete instances of the items) of the large result this method is called. Implement here the remove logic for each item element.- Specified by:
processin interfaceMaintenanceCleanupStrategy<DroolsKIEModuleMediaModel,CronJobModel>
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getMediaService
protected MediaService getMediaService()
-
setMediaService
public void setMediaService(MediaService mediaService)
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
-