Class UnifiedUIUpdateATPCOServicesJob
java.lang.Object
de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<UnifiedUIUpdateATPCOServicesCronJobModel>
de.hybris.platform.unifieduibackofficeservices.cronjob.UnifiedUIUpdateATPCOServicesJob
- All Implemented Interfaces:
de.hybris.platform.servicelayer.cronjob.JobPerformable<UnifiedUIUpdateATPCOServicesCronJobModel>
public class UnifiedUIUpdateATPCOServicesJob
extends de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<UnifiedUIUpdateATPCOServicesCronJobModel>
The Unified UI Update ATPCO Services Job.
-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateUpdateATPCOServices(Set<AncillaryProduct> ancillaryProducts, List<ATPCOAncillaryProductModel> atpcoServices, List<ShoppingBaggageProductModel> shoppingBaggageProducts, Set<String> productNotCreatedUpdate, CatalogVersionModel catalogVersion) Updates an atpco service from the corresponding product in the serviceData response.protected AncillaryProductServiceGets merchandising data service.protected de.hybris.platform.catalog.CatalogVersionServiceGets catalog version service.protected de.hybris.platform.servicelayer.config.ConfigurationServiceGets configuration service.protected PROSTravelAncillaryServiceGets pros travel ancillary service.protected TravelProviderServiceGets travel provider service.protected Map<String,UnifiedUICreateUpdateATPCOServiceStrategy> Gets unified uiatpco services strategy map.de.hybris.platform.servicelayer.cronjob.PerformResultperform(UnifiedUIUpdateATPCOServicesCronJobModel unifiedUIUpdateATPCOServicesCronJobModel) This cronjob updates the ATPCO services in the system.protected voidremoveATPCOServices(List<TravelProductModel> atpcoServices) Removes an atpco service from the system by marking it as Unapproved.voidsetAncillaryProductService(AncillaryProductService ancillaryProductService) Sets merchandising data service.voidsetCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) Sets catalog version service.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.voidsetProsTravelAncillaryService(PROSTravelAncillaryService prosTravelAncillaryService) Sets pros travel ancillary service.voidsetTravelProviderService(TravelProviderService travelProviderService) Sets travel provider service.voidsetUnifiedUIATPCOServicesStrategyMap(Map<String, UnifiedUICreateUpdateATPCOServiceStrategy> unifiedUIATPCOServicesStrategyMap) Sets unified uiatpco services strategy map.protected de.hybris.platform.servicelayer.cronjob.PerformResultsynchronizeATPCOServices(Set<AncillaryProduct> ancillaryProducts, List<ATPCOAncillaryProductModel> atpcoServices, List<ShoppingBaggageProductModel> shoppingBaggageProducts, CatalogVersionModel catalogVersion) This method retrieves the ATPCO services from the system and check if they are up to date against the dataService response.Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isAbortable, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
Constructor Details
-
UnifiedUIUpdateATPCOServicesJob
public UnifiedUIUpdateATPCOServicesJob()
-
-
Method Details
-
perform
public de.hybris.platform.servicelayer.cronjob.PerformResult perform(UnifiedUIUpdateATPCOServicesCronJobModel unifiedUIUpdateATPCOServicesCronJobModel) This cronjob updates the ATPCO services in the system. This method retrieves all the ATPCO services from the merchandising configuration API request filtered by Travel Provider code and create/update the services in the system.- Specified by:
performin interfacede.hybris.platform.servicelayer.cronjob.JobPerformable<UnifiedUIUpdateATPCOServicesCronJobModel>- Specified by:
performin classde.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<UnifiedUIUpdateATPCOServicesCronJobModel>- Parameters:
unifiedUIUpdateATPCOServicesCronJobModel- the unifiedUIUpdateATPCOServicesCronJobModel- Returns:
- the PerformResult
-
synchronizeATPCOServices
protected de.hybris.platform.servicelayer.cronjob.PerformResult synchronizeATPCOServices(Set<AncillaryProduct> ancillaryProducts, List<ATPCOAncillaryProductModel> atpcoServices, List<ShoppingBaggageProductModel> shoppingBaggageProducts, CatalogVersionModel catalogVersion) This method retrieves the ATPCO services from the system and check if they are up to date against the dataService response. If a service is present in the response but not in the system, it will be created and saved. If a service is present in the system but not in the merchandising configuration response, it will be removed from the database. -
removeATPCOServices
Removes an atpco service from the system by marking it as Unapproved.- Parameters:
atpcoServices- the atpco services
-
createUpdateATPCOServices
protected void createUpdateATPCOServices(Set<AncillaryProduct> ancillaryProducts, List<ATPCOAncillaryProductModel> atpcoServices, List<ShoppingBaggageProductModel> shoppingBaggageProducts, Set<String> productNotCreatedUpdate, CatalogVersionModel catalogVersion) Updates an atpco service from the corresponding product in the serviceData response.- Parameters:
ancillaryProducts- the ancillary products from the merchandising data serviceatpcoServices- the atpco services from the systemshoppingBaggageProducts- the shopping Baggage Products from the systemproductNotCreatedUpdate- the list of product for which has not been possible create/update the service.catalogVersion- the catalog Version
-
getTravelProviderService
Gets travel provider service.- Returns:
- the travel provider service
-
setTravelProviderService
Sets travel provider service.- Parameters:
travelProviderService- the travel provider service
-
getAncillaryProductService
Gets merchandising data service.- Returns:
- the merchandising data service
-
setAncillaryProductService
Sets merchandising data service.- Parameters:
ancillaryProductService- the merchandising data service
-
getProsTravelAncillaryService
Gets pros travel ancillary service.- Returns:
- the pros travel ancillary service
-
setProsTravelAncillaryService
Sets pros travel ancillary service.- Parameters:
prosTravelAncillaryService- the pros travel ancillary service
-
getCatalogVersionService
protected de.hybris.platform.catalog.CatalogVersionService getCatalogVersionService()Gets catalog version service.- Returns:
- the catalog version service
-
setCatalogVersionService
public void setCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) Sets catalog version service.- Parameters:
catalogVersionService- the catalog version service
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()Gets configuration service.- Returns:
- the configuration service
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.- Parameters:
configurationService- the configuration service
-
getUnifiedUIATPCOServicesStrategyMap
protected Map<String,UnifiedUICreateUpdateATPCOServiceStrategy> getUnifiedUIATPCOServicesStrategyMap()Gets unified uiatpco services strategy map.- Returns:
- the unified uiatpco services strategy map
-
setUnifiedUIATPCOServicesStrategyMap
public void setUnifiedUIATPCOServicesStrategyMap(Map<String, UnifiedUICreateUpdateATPCOServiceStrategy> unifiedUIATPCOServicesStrategyMap) Sets unified uiatpco services strategy map.- Parameters:
unifiedUIATPCOServicesStrategyMap- the unified uiatpco services strategy map
-