Class DefaultConsignmentTrackingService
java.lang.Object
de.hybris.platform.consignmenttrackingservices.service.impl.DefaultConsignmentTrackingService
- All Implemented Interfaces:
ConsignmentTrackingService
A default implementation of ConsignmentTrackingService.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet all carrier adaptors.protected BaseSiteServiceprotected Optional<CarrierAdaptor>getCarrierAdaptor(ConsignmentModel consignment) protected Map<String,CarrierAdaptor> protected ConfigurationServiceprotected ConsignmentDaogetConsignmentEvents(ConsignmentModel consignment) used by controller to handle incremental routes from carriergetConsignmentForCode(String orderCode, String consignmentCode) Query a ConsignmentModel for code.getConsignmentsForOrder(String orderCode) Get all consignments under the orderprotected intget default delivery lead time from propertiesprotected URLDeprecated, for removal: This API element is subject to removal in a future version.since 2005.intgetDeliveryLeadTime(ConsignmentModel consignment) provide the lead time of estimation from shipped to arrivalprotected ModelServiceprotected SiteBaseUrlResolutionServicegetTrackingUrlForConsignment(ConsignmentModel consignment) tracking URL is given for display in frontend, if user wants to track package by jumping to carrier's websitebooleanisTrackingIdValid(ConsignmentModel consignment) check if the tracking ID is valid in a carrier providervoidsetBaseSiteService(BaseSiteService baseSiteService) voidsetCarrierAdaptors(Map<String, CarrierAdaptor> carrierAdaptors) voidsetConfigurationService(ConfigurationService configurationService) voidsetConsignmentDao(ConsignmentDao consignmentDao) voidsetModelService(ModelService modelService) voidsetSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService) voidupdateConsignmentStatusForCode(String orderCode, String consignmentCode, ConsignmentStatus status) update consignment status and set arrival date if complete
-
Constructor Details
-
DefaultConsignmentTrackingService
public DefaultConsignmentTrackingService()
-
-
Method Details
-
getTrackingUrlForConsignment
Description copied from interface:ConsignmentTrackingServicetracking URL is given for display in frontend, if user wants to track package by jumping to carrier's website- Specified by:
getTrackingUrlForConsignmentin interfaceConsignmentTrackingService- Parameters:
consignment- the specific consignment- Returns:
- tracking URL
-
isTrackingIdValid
Description copied from interface:ConsignmentTrackingServicecheck if the tracking ID is valid in a carrier provider- Specified by:
isTrackingIdValidin interfaceConsignmentTrackingService- Parameters:
consignment- the specific consignment- Returns:
- true if valid, otherwise false
-
getConsignmentEvents
Description copied from interface:ConsignmentTrackingServiceused by controller to handle incremental routes from carrier- Specified by:
getConsignmentEventsin interfaceConsignmentTrackingService- Parameters:
consignment- the specific consignment- Returns:
- latest consignment events
-
getConsignmentForCode
Description copied from interface:ConsignmentTrackingServiceQuery a ConsignmentModel for code.- Specified by:
getConsignmentForCodein interfaceConsignmentTrackingService- Parameters:
orderCode- the code of this consignment's orderconsignmentCode- code of consignment- Returns:
- a instance of ConsignmentModel
-
getConsignmentsForOrder
Description copied from interface:ConsignmentTrackingServiceGet all consignments under the order- Specified by:
getConsignmentsForOrderin interfaceConsignmentTrackingService- Parameters:
orderCode- the order code- Returns:
- all consignment for the order
-
updateConsignmentStatusForCode
public void updateConsignmentStatusForCode(String orderCode, String consignmentCode, ConsignmentStatus status) Description copied from interface:ConsignmentTrackingServiceupdate consignment status and set arrival date if complete- Specified by:
updateConsignmentStatusForCodein interfaceConsignmentTrackingService- Parameters:
orderCode- the code of this consignment's orderconsignmentCode- the specific consignmentCodestatus- the new status from carrier
-
getDeliveryLeadTime
Description copied from interface:ConsignmentTrackingServiceprovide the lead time of estimation from shipped to arrival- Specified by:
getDeliveryLeadTimein interfaceConsignmentTrackingService- Parameters:
consignment- the specific consignment- Returns:
- days of the lead time
-
getAllCarrierAdaptors
Description copied from interface:ConsignmentTrackingServiceGet all carrier adaptors.- Specified by:
getAllCarrierAdaptorsin interfaceConsignmentTrackingService- Returns:
- map of adaptors.
-
getCarrierAdaptor
-
getDefaultTrackingUrl
Deprecated, for removal: This API element is subject to removal in a future version.since 2005. The mock related configuration should not be in service layer.get default tracking URL from properties- Returns:
- default tracking URL
-
getDefaultDeliveryLeadTime
protected int getDefaultDeliveryLeadTime()get default delivery lead time from properties- Returns:
- default delivery lead time
-
getConfigurationService
-
setConfigurationService
-
getCarrierAdaptors
-
setCarrierAdaptors
-
getConsignmentDao
-
setConsignmentDao
-
getModelService
-
setModelService
-
getSiteBaseUrlResolutionService
-
setSiteBaseUrlResolutionService
public void setSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService) -
getBaseSiteService
-
setBaseSiteService
-