Class AbstractJobPerformable<T extends CronJobModel>
- java.lang.Object
-
- de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<T>
-
- All Implemented Interfaces:
JobPerformable<T>
- Direct Known Subclasses:
AbstractChangeProcessorJobPerformable
,AbstractIndexerJob
,AbstractMaintenanceJobPerformable
,AbstractNotificationJob
,AbstractRuleEngineJob
,AfterRetentionCleanupJobPerformable
,AggregateRecoImpressionsJob
,B2BAcceleratorCartToOrderJob
,C4CSyncJobPerformable
,CartRemovalJob
,CartToOrderJob
,ChangeDetectionJobPerformable
,CleanUpFraudOrderJob
,CleanUpJobPerformable
,CleanUpProcessTaskLogPerformable
,CleanUpVerificationCode
,CompareCatalogVersionsJobPerformable
,CompositeJobPerformable
,CreateAuditReportJobPerformable
,CxDefaultPersonalizationCalculationJob
,CxUpdateSegmentsJob
,DataLoaderJob
,DataLoaderStopJob
,DataSupplierJobPerformable
,DefaultCisFraudReportJob
,DefaultCisNotifyCustomerInactiveOrdersJob
,DefaultExportDataJobPerformable
,DefaultMerchCategoryExporter
,DefaultUploadDataJobPerformable
,DeleteDocumentFileJobPerformable
,ExcelImportJobPerformable
,ExpiredInterestsCleanUpJob
,GenerateOrgUnitPathsJob
,GeocodingJob
,KymaUpdateConsumedDestinationsJobPerformable
,LDIFGroupImportJobPerformable
,LDIFImportJobPerformable
,MoveMediaJobPerformable
,OldCartRemovalJob
,OldPaymentSubscriptionResultRemovalJob
,OrderCancelRepairJob
,OrderExchangeRepairJob
,OrderScheduleJob
,OrderStatusUpdateCleanerJob
,OrderTemplateToOrderJob
,OutboundSyncCronJobPerformable
,PersistenceCleanUpJob
,ProductExpressUpdateCleanerJob
,QuoteExpiredJobPerformable
,QuoteToExpireSoonJobPerformable
,RemoveCatalogVersionJobPerformable
,RemoveItemsJobPerformable
,ResetMaxOrderQuantityJob
,SapOrderExchangeOmsCancelRepairCronJob
,SapOrderExchangeOmsCancelRepairCronJob
,SapRecommendationCleanupCronJob
,SAPRevenueCloudCustomerImportJob
,SapRevenueCloudProductImportJob
,ScriptingJobPerformable
,SendOfferRecoInteractionJob
,SendRecoClickthroughJob
,SendRecoImpressionsJob
,SessionEventsRemovalJob
,SetMaxOrderQuantityJob
,SiteMapMediaJob
,SolrExtIndexerJob
,SolrQueryStatisticsCollectorJob
,UncollectedOrdersJob
,VendorOrderExportJob
,VendorRatingCalculationJob
,Y2YSyncMasterJobPerformable
public abstract class AbstractJobPerformable<T extends CronJobModel> extends java.lang.Object implements JobPerformable<T>
Abstract implementation ofJobPerformable
interface providingModelService
andSessionService
as a member.
-
-
Field Summary
Fields Modifier and Type Field Description protected FlexibleSearchService
flexibleSearchService
protected ModelService
modelService
protected SessionService
sessionService
-
Constructor Summary
Constructors Constructor Description AbstractJobPerformable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
clearAbortRequestedIfNeeded(T myCronJob)
Checks if givenCronJobModel
has aCronJobModel.REQUESTABORT
flag set true -abort request was send for this cron job.boolean
isAbortable()
Checks whether the execution is implemented abortable.boolean
isPerformable()
Checks whether the execution can be performed at the moment.abstract PerformResult
perform(T cronJob)
The execution body for aServicelayerJob
.void
setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
void
setModelService(ModelService modelService)
void
setSessionService(SessionService sessionService)
-
-
-
Field Detail
-
modelService
protected ModelService modelService
-
sessionService
protected SessionService sessionService
-
flexibleSearchService
protected FlexibleSearchService flexibleSearchService
-
-
Method Detail
-
perform
public abstract PerformResult perform(T cronJob)
Description copied from interface:JobPerformable
The execution body for aServicelayerJob
. 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.- Specified by:
perform
in interfaceJobPerformable<T extends CronJobModel>
- Parameters:
cronJob
- the related CronJob in whose context the execution will be performed.- Returns:
- a
PerformResult
that indicates whether theexecution
was successfully executed or not and has finished or not.
-
isAbortable
public boolean isAbortable()
Description copied from interface:JobPerformable
Checks whether the execution is implemented abortable.- Specified by:
isAbortable
in interfaceJobPerformable<T extends CronJobModel>
- Returns:
- true if the execution can be aborted
-
isPerformable
public boolean isPerformable()
Description copied from interface:JobPerformable
Checks whether the execution can be performed at the moment.- Specified by:
isPerformable
in interfaceJobPerformable<T extends CronJobModel>
- Returns:
- true if the execution is ready
-
setModelService
public void setModelService(ModelService modelService)
-
setSessionService
public void setSessionService(SessionService sessionService)
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
clearAbortRequestedIfNeeded
protected final boolean clearAbortRequestedIfNeeded(T myCronJob)
Checks if givenCronJobModel
has aCronJobModel.REQUESTABORT
flag set true -abort request was send for this cron job. If so then resets this flag to null and returns true. If no abort request abort was send returns false.
-
-