Class DefaultCronJobHistoryService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.servicelayer.cronjob.impl.DefaultCronJobHistoryService
-
- All Implemented Interfaces:
CronJobHistoryService
,java.io.Serializable
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
public class DefaultCronJobHistoryService extends AbstractBusinessService implements CronJobHistoryService
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description DefaultCronJobHistoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Long
getAverageExecutionTime(UserModel userModel, java.lang.String jobCode, java.util.concurrent.TimeUnit timeUnit)
Returns average execution time based on historical data.java.util.List<CronJobHistoryModel>
getCronJobHistoryBy(UserModel userModel, JobModel jobModel)
Returns cron job history entries triggered by given user for given job.java.util.List<CronJobHistoryModel>
getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate)
Returns cron job history entries triggered by given user for given job type and time range.java.util.List<CronJobHistoryModel>
getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobResult theResult)
Returns cron job history entries triggered by given user for given job type and time range and the cron job's result.java.util.List<CronJobHistoryModel>
getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)
Returns cron job history entries triggered by given user for given job type and time range and the cron job's status.java.util.List<CronJobHistoryModel>
getCronJobHistoryBy(java.lang.String cronJobCode)
java.util.List<CronJobHistoryModel>
getCronJobHistoryBy(java.util.List<java.lang.String> cronJobCodes)
java.util.List<CronJobHistoryModel>
getCronJobHistoryBy(java.util.Set<CronJobHistoryInclude> includes, UserModel userModel, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)
Returns list ofCronJobHistoryModel
where for every include criteria entries matching given user, startDate, finishDate and status are returned.void
setCronJobHistoryDao(CronJobHistoryDao cronJobHistoryDao)
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
getCronJobHistoryBy
public java.util.List<CronJobHistoryModel> getCronJobHistoryBy(java.lang.String cronJobCode)
- Specified by:
getCronJobHistoryBy
in interfaceCronJobHistoryService
- Parameters:
cronJobCode
- given cron job code- Returns:
- matching cron job history entry for given cron job code.
-
getCronJobHistoryBy
public java.util.List<CronJobHistoryModel> getCronJobHistoryBy(java.util.List<java.lang.String> cronJobCodes)
- Specified by:
getCronJobHistoryBy
in interfaceCronJobHistoryService
- Parameters:
cronJobCodes
- given cron job codes- Returns:
- matching cron job history entries for given cron job code.
-
getCronJobHistoryBy
public java.util.List<CronJobHistoryModel> getCronJobHistoryBy(@Nullable UserModel userModel, JobModel jobModel)
Description copied from interface:CronJobHistoryService
Returns cron job history entries triggered by given user for given job.- Specified by:
getCronJobHistoryBy
in interfaceCronJobHistoryService
- Parameters:
userModel
- given user modeljobModel
- given job model- Returns:
- matching cron job history entries
-
getCronJobHistoryBy
public java.util.List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate)
Description copied from interface:CronJobHistoryService
Returns cron job history entries triggered by given user for given job type and time range. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Specified by:
getCronJobHistoryBy
in interfaceCronJobHistoryService
- Parameters:
userModel
- given user modeljobItemType
- given job item type - for limit the results to this type only please use following syntax 'SyncItemJob!'.startDate
- desired time datefinishDate
- desired finish date- Returns:
- matching cron job history entries
-
getCronJobHistoryBy
public java.util.List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)
Description copied from interface:CronJobHistoryService
Returns cron job history entries triggered by given user for given job type and time range and the cron job's status. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Specified by:
getCronJobHistoryBy
in interfaceCronJobHistoryService
- Parameters:
userModel
- given user modeljobItemType
- given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.startDate
- desired time datefinishDate
- desired finish datetheStatus
- desired cron job status- Returns:
- matching cron job history entries
-
getCronJobHistoryBy
public java.util.List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobResult theResult)
Description copied from interface:CronJobHistoryService
Returns cron job history entries triggered by given user for given job type and time range and the cron job's result. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Specified by:
getCronJobHistoryBy
in interfaceCronJobHistoryService
- Parameters:
userModel
- given user modeljobItemType
- given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.startDate
- desired time datefinishDate
- desired finish datetheResult
- desired cron job result- Returns:
- matching cron job history entries
-
getCronJobHistoryBy
public java.util.List<CronJobHistoryModel> getCronJobHistoryBy(java.util.Set<CronJobHistoryInclude> includes, UserModel userModel, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)
Description copied from interface:CronJobHistoryService
Returns list ofCronJobHistoryModel
where for every include criteria entries matching given user, startDate, finishDate and status are returned. Result of all includes in combined into one Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Specified by:
getCronJobHistoryBy
in interfaceCronJobHistoryService
- Parameters:
includes
- set of search criteria which allow to specify cronJob's type code, job's type code and list of job's codes.userModel
- given user modelstartDate
- given start datefinishDate
- given finish datetheStatus
- given cron job's status- Returns:
- a
CronJobHistoryModel
-
getAverageExecutionTime
public java.lang.Long getAverageExecutionTime(UserModel userModel, java.lang.String jobCode, java.util.concurrent.TimeUnit timeUnit)
Description copied from interface:CronJobHistoryService
Returns average execution time based on historical data.- Specified by:
getAverageExecutionTime
in interfaceCronJobHistoryService
- Parameters:
userModel
- given user modeljobCode
- code of job to get data fortimeUnit
- time unit to return- Returns:
- average execution time in given time unit or null if no data is available
-
setCronJobHistoryDao
public void setCronJobHistoryDao(CronJobHistoryDao cronJobHistoryDao)
-
-