Class DefaultPROSTravelCartFacade

java.lang.Object
de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
All Implemented Interfaces:
de.hybris.platform.commercefacades.order.CartFacade, ShoppingTravelCartFacade, TravelCartFacade

public class DefaultPROSTravelCartFacade extends DefaultShoppingTravelCartFacade
The type Default pros travel cart facade.
  • Constructor Details

    • DefaultPROSTravelCartFacade

      public DefaultPROSTravelCartFacade()
  • Method Details

    • addAdditionalBookingInfo

      protected void addAdditionalBookingInfo(List<CartModificationData> bundleModifications, AddBundleToCartRequestData addBundleToCartRequestData)
      Add additional booking info.
      Specified by:
      addAdditionalBookingInfo in class DefaultShoppingTravelCartFacade
      Parameters:
      bundleModifications - the bundle modifications
      addBundleToCartRequestData - the add bundle to cart request data
    • addSolutionToCart

      public List<CartModificationData> addSolutionToCart(AddSolutionRequestData addSolutionRequestData) throws FarePriceException, InvalidSessionCartException, de.hybris.platform.commerceservices.order.CommerceCartModificationException, InternalErrorException, CartNotEmptyException
      Add a solution to the cart. 1) Check if the session has a cart. 2) Do a fare price request in order to validate the solution in the addSolutionRequestData. 3) Create a priceLevelsMap for each product to add to the cart. 4) Create a passengerTypeQuantityMap. 4) For each passenger, create or retrieve the existing traveller, add all the products contained in each flight group for each trip segment.
      Specified by:
      addSolutionToCart in interface ShoppingTravelCartFacade
      Specified by:
      addSolutionToCart in class DefaultShoppingTravelCartFacade
      Parameters:
      addSolutionRequestData - the addSolutionRequestData
      Returns:
      the list of cart modification data
      Throws:
      FarePriceException - to be thrown either when an error occurs during the creation of the farePriceMessage or when an error response is retrieved from the fare price response.
      CommerceBundleCartModificationException - to be thrown when an error occurs during the add to cart.
      InvalidSessionCartException - to be thrown if there is no cart in the session.
      InternalErrorException - to be thrown when an error occurs during the add solution to cart.
      CartNotEmptyException - to be thrown when a cart is not empty.
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • getFareBundleCodeMap

      protected Map<Integer,String> getFareBundleCodeMap(AddSolutionRequestData addSolutionRequestData, List<FlightGroup> solutionFlightGroupList) throws InternalErrorException
      Create fare bundle code map
      Parameters:
      addSolutionRequestData - add solution to cart request
      solutionFlightGroupList - flight group list
      Returns:
      fare bundle code map
      Throws:
      InternalErrorException - the internal error exception
    • getFareBundleTypeMapForChangeSolution

      protected Map<String,BundleTemplateModel> getFareBundleTypeMapForChangeSolution(ChangedTktSolution changedTktSolution, RepricingRequestData repricingRequestData) throws InternalErrorException, ChangeFlightException
      Gets all possible locations. Create fare bundle code map
      Parameters:
      changedTktSolution - the changed tkt solution
      repricingRequestData - the repricing request data
      Returns:
      fare bundle code map for change solution
      Throws:
      InternalErrorException - the internal error exception
      ChangeFlightException - the change flight exception
    • getAllPossibleLocations

      protected List<String> getAllPossibleLocations(String locationCode)
      Gets all possible locations.
      Parameters:
      locationCode - the location code
      Returns:
      all possible locations
    • getFareBucketBrandCodeBundleTemplateMap

      protected Map<Integer,BundleTemplateModel> getFareBucketBrandCodeBundleTemplateMap(List<FlightGroup> solutionFlightGroupList, List<FareBucket> fareBucketList, List<Brand> brandList, Map<Integer,String> fareBundleCodeMap, String apiUser) throws InternalErrorException
      Create a map of fareBucketIds and corresponding bundle template.
      Parameters:
      solutionFlightGroupList - the solution flight group list
      fareBucketList - the fare bucket list
      brandList - the brand list
      fareBundleCodeMap - the fare bundle code map
      apiUser - the api user
      Returns:
      the fare bucket brand code bundle template map
      Throws:
      InternalErrorException - the internal error exception thrown when is not possible to find a bundleTemplate from a fareBucketId/brandId
    • findFareProductBundleTemplate

      protected BundleTemplateModel findFareProductBundleTemplate(String shoppingFareReference, String apiUser, String bundleTypeCode, Map<Integer,String> fareBundleCodeMap, Integer flightId)
      Find a fare product bundle template by bundleType, shopping reference code and api user.
      Parameters:
      shoppingFareReference - the shopping fare reference
      apiUser - the api user
      bundleTypeCode - the bundle type code
      fareBundleCodeMap - the fare bundle code map
      flightId - the flight id
      Returns:
      the bundle template model
    • doFarePrice

      protected SearchResponseWrapper doFarePrice(AddSolutionRequestData addSolutionRequestData) throws FarePriceException, InvalidSessionCartException
      This method call performs a fare price search from an addSolutionToCartData..
      Parameters:
      addSolutionRequestData - the add solution request data
      Returns:
      the search response wrapper
      Throws:
      FarePriceException - the fare price exception
      InvalidSessionCartException - the invalid session cart exception
    • addSolutionForTraveller

      protected void addSolutionForTraveller(TravellerData travellerData, List<FlightGroup> flightGroupList, Map<Integer,BundleTemplateModel> fareBucketBrandCodeBundleTemplateMap, Map<String,PriceLevel> productPriceLevelMap, List<CartModificationData> bundleModifications, AddSolutionRequestData addSolutionRequestData, Integer solutionId, BaggageInfo baggageInfo, BaggageInfoReference baggageInfoReference) throws CommerceBundleCartModificationException, InternalErrorException
      For each flight group of the searchResponse, add a product to the cart for the specific traveller.
      Parameters:
      travellerData - the traveller data
      flightGroupList - the flight group list
      fareBucketBrandCodeBundleTemplateMap - the fare bucket brand code bundle template map
      productPriceLevelMap - the product price level map
      bundleModifications - the bundle modifications
      addSolutionRequestData - the add solution request data
      solutionId - the solution id
      baggageInfo - the baggage info
      baggageInfoReference - the baggage info reference
      Throws:
      CommerceBundleCartModificationException - the commerce bundle cart modification exception
      InternalErrorException - the internal error exception
    • getCarryOns

      protected List<CarryOn> getCarryOns(FlightGroup flightGroup, BaggageInfo baggageInfo, BaggageInfoReference baggageInfoReference)
      Gets carry ons for the selected solution.
      Parameters:
      flightGroup - the flight group
      baggageInfo - the baggage info
      baggageInfoReference - the baggage info reference
      Returns:
      the carry ons
    • isCarryOnIncluded

      protected boolean isCarryOnIncluded(BaggageInfoReferenceCarryOn baggageInfoReferenceCarryOn, List<Integer> flightIds)
      Filter carry ons by flight id.
      Parameters:
      baggageInfoReferenceCarryOn - the baggage info reference carry on
      flightIds - the flight ids
      Returns:
      the boolean
    • getAllowances

      protected List<Allowance> getAllowances(FlightGroup flightGroup, BaggageInfo baggageInfo, BaggageInfoReference baggageInfoReference)
      Gets allowances that matches the allowance id in the solution for flight groups.
      Parameters:
      flightGroup - the flight group
      baggageInfo - the baggage info
      baggageInfoReference - the baggage info reference
      Returns:
      the allowances
    • addAllowancesToCart

      protected CartModificationData addAllowancesToCart(List<Allowance> allowances, Integer bundleEntryGroupNo, Integer solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add allowances to cart. 1. Get the baggage product 2. Allowance products are mapped to pros allowance items using product reference. Gets the allowance item from response and see if a allowance product exists. If found add the product to the cart. 3. Add allowance product to cart
      Parameters:
      allowances - the allowances
      bundleEntryGroupNo - the bundle entry group no
      solutionId - the solution id
      Returns:
      the cart modification data
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • addProduct

      protected List<CartModificationData> addProduct(String productId, long quantity, int bundleNo, List<String> transportOfferingCodes, String bundleTemplateId, TravellerData travellerData, PriceLevel priceLevel, Boolean active, AmendStatus amendStatus, int originDestinationRefNumber, Integer solutionId, List<Allowance> allowancesForFlightGroup, List<CarryOn> carryOnsForFlightGroup) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add a product to the cart.
      Parameters:
      productId - the product id
      quantity - the quantity
      bundleNo - the bundle no
      transportOfferingCodes - the transport offering codes
      bundleTemplateId - the bundle template id
      travellerData - the traveller data
      priceLevel - the price level
      active - the active
      amendStatus - the amend status
      originDestinationRefNumber - the origin destination ref number
      solutionId - the solution id
      allowancesForFlightGroup - the allowances for flight group
      carryOnsForFlightGroup - the carry ons for flight group
      Returns:
      the list
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • addCarryOnAllowancesToCart

      protected List<CartModificationData> addCarryOnAllowancesToCart(List<CarryOn> carryOnsForFlightGroup, Integer bundleEntryGroupNo, Integer solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add carry on allowances to cart. Gets carry on allowances from pros response and add to the cart
      Parameters:
      carryOnsForFlightGroup - the carry ons for flight group
      bundleEntryGroupNo - the bundle entry group no
      solutionId - the solution id
      Returns:
      CartModificationData list
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • getCommerceCartParameter

      protected CommerceCartParameter getCommerceCartParameter(Integer bundleEntryGroupNo, Integer solutionId, Integer quantity, ProductModel productModel)
      Gets commerce cart parameter.
      Parameters:
      bundleEntryGroupNo - the bundle entry group no
      solutionId - the solution id
      quantity - the quantity
      productModel - the product model
      Returns:
      the commerce cart parameter
    • getProductPriceLevelMap

      protected Map<String,PriceLevel> getProductPriceLevelMap(List<FlightGroup> flightGroupList, Map<Integer,BundleTemplateModel> fareBucketBrandCodeBundleTemplateMap) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException, FarePriceException, InternalErrorException
      Method to populate price levels for all the products
      Parameters:
      flightGroupList - the flight group list
      fareBucketBrandCodeBundleTemplateMap - the fare bucket brand code bundle template map
      Returns:
      product price levels
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
      FarePriceException - the fare price exception
      InternalErrorException - the internal error exception
    • getTransportOfferingsFromFlightGroup

      protected List<String> getTransportOfferingsFromFlightGroup(FlightGroup flightGroup) throws InternalErrorException
      Gets transport offerings from a flight group.
      Parameters:
      flightGroup - the flight group
      Returns:
      the transport offerings from flight group
      Throws:
      InternalErrorException - the internal error exception thrown when is not possible to find a transport offering from a flight
    • getProductIdForFlightGroup

      protected String getProductIdForFlightGroup(FlightGroup flightGroup, Map<Integer,BundleTemplateModel> fareBucketBrandCodeBundleTemplateMap) throws InternalErrorException
      Gets product id for a flight group. The productId is retrieved either from a fareBucket id or from a brand id. The product will be unique since the solution provided permits a unique combination of bundleTemplate/fareProduct.
      Parameters:
      flightGroup - the flight group
      fareBucketBrandCodeBundleTemplateMap - the fare bucket brand code bundle template map
      Returns:
      the product id for fligh group
      Throws:
      InternalErrorException - the internal error exception thrown when is not possible to find a bundleTemplate from a fareBucketId/brandId
    • getBundleTemplateForFlightGroup

      protected String getBundleTemplateForFlightGroup(FlightGroup flightGroup, Map<Integer,BundleTemplateModel> fareBucketBrandCodeBundleTemplateMap) throws InternalErrorException
      Gets product id for a flight group. The productId is retrieved either from a fareBucket id or from a brand id.
      Parameters:
      flightGroup - the flight group
      fareBucketBrandCodeBundleTemplateMap - the fare bucket brand code bundle template map
      Returns:
      the product id for fligh group
      Throws:
      InternalErrorException - the internal error exception thrown when a bundleTemplate is not found from a fareBucketId/brandId
    • addPerLegBundleProductToCart

      protected List<CartModificationData> addPerLegBundleProductToCart(List<FlightGroup> flightGroupList, Map<Integer,BundleTemplateModel> fareBucketBrandCodeBundleTemplateMap, int solutionId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException, InternalErrorException
      Add per leg bundle product to cart list.
      Parameters:
      flightGroupList - the flight group list
      fareBucketBrandCodeBundleTemplateMap - the fare bucket brand code bundle template map
      solutionId - the solution id
      Returns:
      the list
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
      InternalErrorException - the internal error exception
    • addAdditionalBookingInfo

      protected void addAdditionalBookingInfo(AddSolutionRequestData addSolutionRequestData, List<CartModificationData> bundleModifications)
      Adds additional booking info to the product. For each bundle modification, if the product is a ShoppingFareProduct entry, gets the traveller type and add the additionalBookingInfo to the travelOrderEntryInfo of the order entry.
      Parameters:
      addSolutionRequestData - the add solution request data
      bundleModifications - the bundle modifications
    • addAdditionalBookingInfoForShoppingFareProduct

      protected void addAdditionalBookingInfoForShoppingFareProduct(String travellerCode, TravelOrderEntryInfoModel travelOrderEntryInfoModel, AddSolutionRequestData addSolutionRequestData)
      Adds additional booking info to the travelOrderEntryInfo of a ShoppingFareProduct. 1) Finds the flight group having the same transport offerings. 2) Find one passenger having the same type in the addSolutionRequestData. 3) Find the selected fare having the same passenger and same transport offerings; 3) set fbc and rbd for each transport offering in the prosAdditionalBookingInfo.
      Parameters:
      travellerCode - the traveller code
      travelOrderEntryInfoModel - the travel order entry info model
      addSolutionRequestData - the add solution request data
    • isProductAvailable

      public boolean isProductAvailable(String productCode, List<String> transportOfferingCodes, Long quantity)
      Description copied from interface: TravelCartFacade
      Returns true if the product is available for the transport offering.
      Specified by:
      isProductAvailable in interface TravelCartFacade
      Overrides:
      isProductAvailable in class DefaultTravelCartFacade
      Parameters:
      productCode - the product code
      transportOfferingCodes - the transport offering codes
      quantity - the quantity to offer
      Returns:
      true if product is available, else false.
    • cancelSolution

      public void cancelSolution(String orderId, RepricingRequestData repricingRequestData) throws CancelFlightException, de.hybris.platform.order.exceptions.CalculationException, InvalidUserException, InvalidOrderStatusException, InternalErrorException, SolutionCancelException
      This method deletes a solution from the order for all the associated passengers. 1) Retrieves the order from the orderId and creates a cart from it. 2) Do a Repricer Request call and check if the operation is allowed or not and save the response to the cart. 3) If the operation is possible, cancel the flights and all the related ancillaries from the cart. 4) Performs a recalculation of the cart and place the amended order.
      Specified by:
      cancelSolution in interface ShoppingTravelCartFacade
      Specified by:
      cancelSolution in class DefaultShoppingTravelCartFacade
      Parameters:
      orderId - the orderId
      repricingRequestData - the repricing request data
      Throws:
      CancelFlightException - thrown when an error occurs during the removal of an order entry or the addition of the ancillaryChangeFee/RefundFee to pay in order to cancel the flights.
      de.hybris.platform.order.exceptions.CalculationException - thrown when an error occurs during the addition of the ancillaryChangeFee/RefundFee to pay in order to cancel the flights or the calculation of the taxes.
      InternalErrorException - thrown when the place order returns with errors.
      InvalidUserException - thrown when the order does not exist or is in invalid state and it is not possible to amend it.
      InvalidOrderStatusException
      SolutionCancelException
    • evaluateSolutionCancel

      public EvaluateCancelSolutionResponseData evaluateSolutionCancel(String orderId, RepricingRequestData repricingRequestData) throws SolutionCancelException
      Description copied from interface: ShoppingTravelCartFacade
      Evaluates the request for a cancellation for the given solution, returning penalties and refunded amounts when possible, an error otherwise
      Parameters:
      orderId - the orderId
      repricingRequestData - the repricing request data
      Returns:
      the evaluate cancel solution response data
      Throws:
      SolutionCancelException - when solution cancel is not possible
    • cancelSolution

      public void cancelSolution(Integer solutionId) throws SolutionCancelException, de.hybris.platform.order.exceptions.CalculationException
      Description copied from interface: ShoppingTravelCartFacade
      This method deletes a specific solution from the current cart for all the associated entries.
      Parameters:
      solutionId - the solutionId
      Throws:
      SolutionCancelException
      de.hybris.platform.order.exceptions.CalculationException
    • getEntriesRelatedToSolutionId

      protected List<AbstractOrderEntryModel> getEntriesRelatedToSolutionId(Integer solutionId, CartModel sessionCart, List<AbstractOrderEntryModel> entriesToBeRemoved)
      Returns all the order entry models that do not have the solutionId but do have same transport offerings and travellers
      Parameters:
      solutionId - the solutionId
      sessionCart - the sessionCart
      entriesToBeRemoved - the entriesToBeRemoved
      Returns:
      List
    • doEvaluateSolutionCancel

      public EvaluateCancelSolutionResponseData doEvaluateSolutionCancel(List<AbstractOrderEntryModel> solutionEntries, OrderModel orderModel, RepricingRequestData repricingRequestData) throws SolutionCancelException
      Evaluate solution cancel request.
      Parameters:
      solutionEntries - the solution entries
      orderModel - the order
      repricingRequestData - the repricing request data
      Returns:
      the cancel solution response data
      Throws:
      SolutionCancelException - in case of errors
    • evaluateFlightChange

      public EvaluateChangeSolutionResponseData evaluateFlightChange(RepricingRequestData repricingRequestData) throws RepricingException, ChangeFlightException
      This method send a repricing request to evaluate the possibility of a change flight operation.
      Specified by:
      evaluateFlightChange in interface ShoppingTravelCartFacade
      Specified by:
      evaluateFlightChange in class DefaultShoppingTravelCartFacade
      Parameters:
      repricingRequestData - the repricing request data
      Returns:
      the repricing response
      Throws:
      RepricingException - thrown when a the change flight operation is not allowed
      ChangeFlightException
    • changeFlightItinerary

      public void changeFlightItinerary(RepricingRequestData repricingRequestData) throws ChangeFlightException, RepricingException, InvalidSessionCartException
      This method changes a flight itinerary in the cart. The change could be 1) a single transport offering for a specific origin destination group; 2) all the transport offerings in a fare product with new ones having same origin/destination; 3) all the transport offerings in a fare products with new ones having different origin/destination. The change itinerary operation is allowed only during an amendment, hence it must be present an original order in the cart. The repricer response message will contain exact one new solution for each passenger. In order to change the itinerary, a repricing request is send and if the operation is allowed, then: 1) remove the original fare products, corresponding to the ones in the segmentToChange section in the repricinRequestData. 2) add the new products in the cart. 3) add changeFee products (if present) for each passenger. 4) recalculate the cart. If something goes wrong, a rollback is performed in order to recover the cart to its original state.
      Specified by:
      changeFlightItinerary in interface ShoppingTravelCartFacade
      Specified by:
      changeFlightItinerary in class DefaultShoppingTravelCartFacade
      Parameters:
      repricingRequestData - the repricing request data
      Throws:
      ChangeFlightException - thrown when an error occurs during the change itinerary operation
      RepricingException - thrown when the repricer request is invalid
      InvalidSessionCartException - thrown when there is no cart in the session
    • validateRequestAgainstCart

      protected void validateRequestAgainstCart(RepricingRequestData repricingRequestData, CartModel cartModel) throws ChangeFlightException
      Validate the request against the cart
      Parameters:
      repricingRequestData - repricing request data
      cartModel - the cart
      Throws:
      ChangeFlightException - the change flight exception
    • validateFlightDates

      protected void validateFlightDates(ChangeSolutionRequestData changeSolutionRequestData) throws ChangeFlightException
      Validate flight departure date in the past. current validation is done against the getDepartureTime which will need to be changed to getUpdatedDepartureTime once there is an integration with departure control system
      Parameters:
      changeSolutionRequestData - the change solution request
      Throws:
      ChangeFlightException - the change flight exception
    • removePassengers

      public void removePassengers(String orderId, RepricingRequestData repricingRequestData) throws RemovePassengerException, InternalErrorException
      Description copied from interface: ShoppingTravelCartFacade
      Remove all entries associated to the list of passengers.
      Specified by:
      removePassengers in interface ShoppingTravelCartFacade
      Specified by:
      removePassengers in class DefaultShoppingTravelCartFacade
      Parameters:
      orderId - the order id
      repricingRequestData - the repricing request data
      Throws:
      RemovePassengerException
      InternalErrorException
    • validateRemovePassenger

      protected void validateRemovePassenger(String orderId, RepricingRequestData repricingRequestData)
      1. Validates if at least one passenger id is provided. 2. Validates if passenger id provided exists in the system. 3. Validates if at least one adult passenger exists after removing the requested passengers.
      Parameters:
      orderId - the order id
      repricingRequestData -
    • changeFlight

      protected List<CartModificationData> changeFlight(OriginDestinationGroupPrice originDestinationGroupPrice, ChangedTktSolution changedSolution, Map<Integer,String> flightToTransportOfferings, TravellerData traveller, RepricingRequestData repricingRequestData, int originDestinationRefNumber, Map<String,BundleTemplateModel> bundleTypeMap) throws ChangeFlightException, de.hybris.platform.commerceservices.order.CommerceCartModificationException
      This method change a flight in the cart with a new one. Retrieves the new transport offerings and the new fare associated to it and add the new fare product to the cart.
      Parameters:
      originDestinationGroupPrice - the origin destination group price
      changedSolution - the changed solution
      flightToTransportOfferings - the flight to transport offerings
      traveller - the traveller
      repricingRequestData - the repricing request data
      originDestinationRefNumber - the origin destination ref number
      bundleTypeMap - the bundle type map
      Returns:
      the list of cart modification data
      Throws:
      ChangeFlightException - the change flight exception
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • populateCarryOns

      protected void populateCarryOns(RepricerBaggageInfo baggageInfo, List<CarryOn> carryOns, List<Integer> flightIds, String shoppingTravellerId)
      Populates the carry ons for the flights corresponding to the given list of flightIds.
      Parameters:
      baggageInfo - the baggage info
      carryOns - the carry ons
      flightIds - the flight ids
      shoppingTravellerId - the shopping traveller id
    • populateAllowances

      protected void populateAllowances(RepricerBaggageInfo baggageInfo, List<Allowance> allowances, List<Integer> flightIds, String shoppingTravellerId)
      Populates the allowances for the flights corresponding to the given list of flightIds.
      Parameters:
      baggageInfo - the baggage info
      allowances - the allowances
      flightIds - the flight ids
      shoppingTravellerId - the shopping traveller id
    • createAllowedPieces

      protected List<AllowedPiece> createAllowedPieces(List<RepricerAllowedPiece> allowedPieces)
      Creates the list of allowed pieces
      Parameters:
      allowedPieces - the allowed pieces
      Returns:
      the list of allowed pieces
    • removeChangedFlight

      protected void removeChangedFlight(RepricingRequestData repricingRequestData, CartModel cartModel) throws ChangeFlightException
      This method removes the order entries corresponding to the given repricingRequestData.solutionId by setting active to false, amend status to changed and quantity to 0.
      Parameters:
      repricingRequestData - the repricing request data
      cartModel - the cartModel
      Throws:
      ChangeFlightException - the change flight exception
    • getTravellerToPaxTktMapping

      protected Map<TravellerData,PaxTkt> getTravellerToPaxTktMapping(List<String> travellerIds, List<PaxTkt> paxTkts) throws ChangeFlightException, InternalErrorException
      Creates the mapping between traveller id and repricer passenger.
      Parameters:
      travellerIds - the list of traveller ids
      paxTkts - the list of repricer passengers
      Returns:
      the mapping between traveller id and repricer passenger
      Throws:
      ChangeFlightException - the change flight exception
      InternalErrorException - the internal error exception
    • getFlightToTransportOfferingMapping

      protected Map<Integer,String> getFlightToTransportOfferingMapping(ChangedTktSolution solution)
      Creates the mapping between flight id and transport offering code
      Parameters:
      solution - the changed solution
      Returns:
      the mapping between flight id and transport offering code
    • addBundleToCart

      public List<CartModificationData> addBundleToCart(AddBundleToCartRequestData addBundleToCartRequestData) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Description copied from interface: TravelCartFacade
      Method to add the fare product including bundled products to cart using bundle implementation introduced with Hybris 6.4
      Specified by:
      addBundleToCart in interface TravelCartFacade
      Overrides:
      addBundleToCart in class DefaultTravelCartFacade
      Parameters:
      addBundleToCartRequestData -
      Returns:
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • evaluateRemovePassenger

      public EvaluateCancelSolutionResponseData evaluateRemovePassenger(String orderId, RepricingRequestData repricingRequestData)
      Description copied from interface: ShoppingTravelCartFacade
      Evaluates the request for a cancellation for the given solution, returning penalties and refunded amounts when possible, an error otherwise
      Parameters:
      orderId - the orderId
      repricingRequestData - the repricing request data
      Returns:
      the evaluate cancel solution response data
    • distinctByKey

      protected static <T> Predicate<T> distinctByKey(Function<? super T,?> keyExtractor)
      Distinct by key predicate.
      Type Parameters:
      T - the type parameter
      Parameters:
      keyExtractor - the key extractor
      Returns:
      the predicate
    • getFarePriceFacade

      protected FarePriceFacade getFarePriceFacade()
      Gets fare price facade.
      Returns:
      the fare price facade
    • setFarePriceFacade

      public void setFarePriceFacade(FarePriceFacade farePriceFacade)
      Sets fare price facade.
      Parameters:
      farePriceFacade - the fare price facade
    • getTransportOfferingFacade

      protected PROSTransportOfferingFacade getTransportOfferingFacade()
      Gets transport offering facade.
      Returns:
      the transport offering facade
    • setTransportOfferingFacade

      public void setTransportOfferingFacade(PROSTransportOfferingFacade transportOfferingFacade)
      Sets transport offering facade.
      Parameters:
      transportOfferingFacade - the transport offering facade
    • getTravelBundleTemplateService

      protected PROSTravelBundleTemplateService getTravelBundleTemplateService()
      Gets travel bundle template service.
      Returns:
      the travel bundle template service
    • setTravelBundleTemplateService

      public void setTravelBundleTemplateService(PROSTravelBundleTemplateService travelBundleTemplateService)
      Sets travel bundle template service.
      Parameters:
      travelBundleTemplateService - the travel bundle template service
    • getProsTransportOfferingService

      protected PROSTransportOfferingService getProsTransportOfferingService()
      Gets pros transport offering service.
      Returns:
      the pros transport offering service
    • setProsTransportOfferingService

      public void setProsTransportOfferingService(PROSTransportOfferingService prosTransportOfferingService)
      Sets pros transport offering service.
      Parameters:
      prosTransportOfferingService - the pros transport offering service
    • getShoppingTravellerFacade

      protected ShoppingTravellerFacade getShoppingTravellerFacade()
      Get the pros traveller facade
      Overrides:
      getShoppingTravellerFacade in class DefaultShoppingTravelCartFacade
      Returns:
      pros traveller facade
    • setShoppingTravellerFacade

      public void setShoppingTravellerFacade(ShoppingTravellerFacade shoppingTravellerFacade)
      Set The pros traveller facade
      Overrides:
      setShoppingTravellerFacade in class DefaultShoppingTravelCartFacade
      Parameters:
      shoppingTravellerFacade - the traveller facade
    • getProsTravelAncillaryService

      protected PROSTravelAncillaryService getProsTravelAncillaryService()
      Gets pros travel ancillary service.
      Returns:
      the pros travel ancillary service
    • setProsTravelAncillaryService

      public void setProsTravelAncillaryService(PROSTravelAncillaryService prosTravelAncillaryService)
      Sets pros travel ancillary service.
      Parameters:
      prosTravelAncillaryService - the pros travel ancillary service
    • getProductReferenceService

      protected de.hybris.platform.catalog.references.ProductReferenceService getProductReferenceService()
      Gets product reference service.
      Returns:
      the product reference service
    • setProductReferenceService

      public void setProductReferenceService(de.hybris.platform.catalog.references.ProductReferenceService productReferenceService)
      Sets product reference service.
      Parameters:
      productReferenceService - the product reference service
    • getRepricerCancelRequestPipelineManager

      protected RepricerRequestCreationPipelineManager getRepricerCancelRequestPipelineManager()
      Gets repricer cancel request pipeline manager.
      Returns:
      the repricer cancel request pipeline manager
    • setRepricerCancelRequestPipelineManager

      public void setRepricerCancelRequestPipelineManager(RepricerRequestCreationPipelineManager repricerCancelRequestPipelineManager)
      Sets repricer cancel request pipeline manager.
      Parameters:
      repricerCancelRequestPipelineManager - the repricer cancel request pipeline manager
    • getShoppingRepricingService

      protected ShoppingRepricingService getShoppingRepricingService()
      Gets shopping repricing service.
      Returns:
      the shopping repricing service
    • setShoppingRepricingService

      public void setShoppingRepricingService(ShoppingRepricingService shoppingRepricingService)
      Sets shopping repricing service.
      Parameters:
      shoppingRepricingService - the shopping repricing service
    • getEvaluateCancelSolutionResponsePipelineManager

      protected EvaluateCancelSolutionResponsePipelineManager getEvaluateCancelSolutionResponsePipelineManager()
      Gets evaluate cancel solution response pipeline manager.
      Returns:
      the evaluate cancel solution response pipeline manager
    • setEvaluateCancelSolutionResponsePipelineManager

      public void setEvaluateCancelSolutionResponsePipelineManager(EvaluateCancelSolutionResponsePipelineManager evaluateCancelSolutionResponsePipelineManager)
      Sets evaluate cancel solution response pipeline manager.
      Parameters:
      evaluateCancelSolutionResponsePipelineManager - the evaluate cancel solution response pipeline manager
    • getRepricerChangeRequestPipelineManager

      protected RepricerRequestCreationPipelineManager getRepricerChangeRequestPipelineManager()
      Gets repricer change request pipeline manager.
      Returns:
      the repricer change request pipeline manager
    • setRepricerChangeRequestPipelineManager

      public void setRepricerChangeRequestPipelineManager(RepricerRequestCreationPipelineManager repricerChangeRequestPipelineManager)
      Sets repricer change request pipeline manager.
      Parameters:
      repricerChangeRequestPipelineManager - the repricer change request pipeline manager
    • getNotAllowedStatusesForConsignmentEntries

      protected List<String> getNotAllowedStatusesForConsignmentEntries()
      Gets not allowed statuses for consignment entries.
      Returns:
      the not allowed statuses for consignment entries
    • setNotAllowedStatusesForConsignmentEntries

      public void setNotAllowedStatusesForConsignmentEntries(List<String> notAllowedStatusesForConsignmentEntries)
      Sets not allowed statuses for consignment entries.
      Parameters:
      notAllowedStatusesForConsignmentEntries - the not allowed statuses for consignment entries
    • getTimeService

      protected de.hybris.platform.servicelayer.time.TimeService getTimeService()
      Get time service
      Returns:
      time service
    • setTimeService

      public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
      Set time service
      Parameters:
      timeService - the time service
    • getEvaluateChangeSolutionResponsePipelineManager

      protected EvaluateChangeSolutionResponsePipelineManager getEvaluateChangeSolutionResponsePipelineManager()
      Gets evaluate change solution response pipeline manager.
      Returns:
      the evaluate change solution response pipeline manager
    • setEvaluateChangeSolutionResponsePipelineManager

      public void setEvaluateChangeSolutionResponsePipelineManager(EvaluateChangeSolutionResponsePipelineManager evaluateChangeSolutionResponsePipelineManager)
      Sets evaluate change solution response pipeline manager.
      Parameters:
      evaluateChangeSolutionResponsePipelineManager - the evaluate change solution response pipeline manager
    • getTravelOrderCodeIdentificationStrategy

      protected TravelOrderCodeIdentificationStrategy getTravelOrderCodeIdentificationStrategy()
      Gets travel order code identification strategy.
      Returns:
      the travel order code identification strategy
    • setTravelOrderCodeIdentificationStrategy

      public void setTravelOrderCodeIdentificationStrategy(TravelOrderCodeIdentificationStrategy travelOrderCodeIdentificationStrategy)
      Sets travel order code identification strategy.
      Parameters:
      travelOrderCodeIdentificationStrategy - the travel order code identification strategy
    • getCalculationService

      protected de.hybris.platform.order.CalculationService getCalculationService()
      Get calculationService
      Returns:
      calculationService
    • setCalculationService

      public void setCalculationService(de.hybris.platform.order.CalculationService calculationService)
      Set calculationService
      Parameters:
      calculationService - the calculationService
    • 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
    • getTravelLocationService

      protected TravelLocationService getTravelLocationService()
      Get travel locations service
      Returns:
      travel location service
    • setTravelLocationService

      public void setTravelLocationService(TravelLocationService travelLocationService)
      Set Travel location service
      Parameters:
      travelLocationService - the travel location service
    • getTransportFacilityService

      protected TransportFacilityService getTransportFacilityService()
      Gets transport facility service.
      Returns:
      the transport facility service
    • setTransportFacilityService

      public void setTransportFacilityService(TransportFacilityService transportFacilityService)
      Sets transport facility service.
      Parameters:
      transportFacilityService - the transport facility service