Package de.hybris.platform.storelocator
Class GeocodingJob
java.lang.Object
de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<CronJobModel>
de.hybris.platform.storelocator.GeocodingJob
- All Implemented Interfaces:
JobPerformable<CronJobModel>
Job that takes a batch of POS entries that need geocoding and performs it using geoServiceWrapper
-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildErrorMessage(PointOfServiceModel pos, DistanceUnawareLocation location, GeoServiceWrapperException geoServiceWrapperException) protected GeoWebServiceWrapperprotected PointOfServiceDaobooleanChecks whether the execution is implemented abortable.perform(CronJobModel cronJob) The execution body for aServicelayerJob.protected booleanwait for the defined internal delayvoidsetGeoServiceWrapper(GeoWebServiceWrapper geoServiceWrapper) voidsetPointOfServiceDao(PointOfServiceDao pointOfServiceDao) protected voidcalculates and stores the GPS information for the given point of serviceprotected Optional<GeocodeAddressesCronJobModel>validateCronJob(CronJobModel cronJob) Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
Constructor Details
-
GeocodingJob
public GeocodingJob()
-
-
Method Details
-
perform
Description copied from interface:JobPerformableThe 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:
performin interfaceJobPerformable<CronJobModel>- Specified by:
performin classAbstractJobPerformable<CronJobModel>- Parameters:
cronJob- the related CronJob in whose context the execution will be performed.- Returns:
- a
PerformResultthat indicates whether theexecutionwas successfully executed or not and has finished or not.
-
processInternalDelay
wait for the defined internal delay -
storeDistanceUnawareLocation
calculates and stores the GPS information for the given point of service -
validateCronJob
-
buildErrorMessage
protected String buildErrorMessage(PointOfServiceModel pos, DistanceUnawareLocation location, GeoServiceWrapperException geoServiceWrapperException) -
isAbortable
public boolean isAbortable()Description copied from interface:JobPerformableChecks whether the execution is implemented abortable.- Specified by:
isAbortablein interfaceJobPerformable<CronJobModel>- Overrides:
isAbortablein classAbstractJobPerformable<CronJobModel>- Returns:
- true if the execution can be aborted
-
getPointOfServiceDao
-
setPointOfServiceDao
- Parameters:
pointOfServiceDao- the pointOfServiceDao to set
-
getGeoServiceWrapper
-
setGeoServiceWrapper
- Parameters:
geoServiceWrapper- the geoServiceWrapper to set
-