Class TravellerStatusInfoHandler

java.lang.Object
de.hybris.platform.travelfacades.ancillary.search.handlers.impl.TravellerStatusInfoHandler
All Implemented Interfaces:
AncillarySearchHandler

public class TravellerStatusInfoHandler extends Object implements AncillarySearchHandler
Handler to populate travellerStatusInfo for each traveller in the ItineraryData of the OfferResponseData
  • Constructor Details

    • TravellerStatusInfoHandler

      public TravellerStatusInfoHandler()
  • Method Details

    • handle

      public void handle(OfferRequestData offerRequestData, OfferResponseData offerResponseData)
      Description copied from interface: AncillarySearchHandler
      Handle method.
      Specified by:
      handle in interface AncillarySearchHandler
      Parameters:
      offerRequestData - the offer request data
      offerResponseData - the offer response data
    • getTravellerStatusMap

      protected Map<String,TravellerStatus> getTravellerStatusMap(String travellerUid, List<String> transportOfferingCodes, OrderModel orderModel)
      The method creates and returns the travellerStatusMap for a specific traveller, where the key is the transportOfferingCode and the value is the TravellerStatus for that transportOffering.
      Parameters:
      travellerUid - as the Uid of the traveller to use to create the travellerStatusMap
      transportOfferingCodes - as the list of transportOffering codes to be used to create the travellerStatusMap
      orderModel - as the orderModel with the consignments that have to be checked
      Returns:
      a Map<String, TravellerStatus>, where the key is the transportOfferingCode and the value is the TravellerStatus for that transportOffering.
    • getConsignment

      protected ConsignmentModel getConsignment(String travellerUid, String transportOfferingCode, OrderModel orderModel)
      The method returns the consignment corresponding to the traveller and the transportOffering
      Parameters:
      travellerUid - as the Uid of the traveller
      transportOfferingCode - as the code of the transportOffering
      orderModel - as the orderModel
      Returns:
      the consignmentModel of the orderModel, corresponding to the specific traveller and the transportOffering
    • getTravellerStatus

      protected TravellerStatus getTravellerStatus(ConsignmentModel consignment)
      The method evaluate and returns the TravellerStatus based on a specific consignment.
      Parameters:
      consignment - as the consignmentModel used to get the TravellerStatus
      Returns:
      the TravellerStatus that corresponds to the status of the consignment. If the consignment status doesn't correspond to any TravellerStatus, the default return value is TravellerStatus.READY.
    • getTravelCartFacade

      protected TravelCartFacade getTravelCartFacade()
      Returns:
      the travelCartFacade
    • setTravelCartFacade

      public void setTravelCartFacade(TravelCartFacade travelCartFacade)
      Parameters:
      travelCartFacade - the travelCartFacade to set
    • getBaseStoreService

      protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
      Returns:
      the baseStoreService
    • setBaseStoreService

      public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)
      Parameters:
      baseStoreService - the baseStoreService to set
    • getCustomerAccountService

      protected de.hybris.platform.commerceservices.customer.CustomerAccountService getCustomerAccountService()
      Returns:
      the customerAccountService
    • setCustomerAccountService

      public void setCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService)
      Parameters:
      customerAccountService - the customerAccountService to set