Class DefaultTravelCartFacade

java.lang.Object
de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
de.hybris.platform.travelfacades.order.impl.DefaultTravelCartFacade
All Implemented Interfaces:
de.hybris.platform.commercefacades.order.CartFacade, TravelCartFacade
Direct Known Subclasses:
DefaultShoppingTravelCartFacade, DefaultTransportCartFacade

public class DefaultTravelCartFacade extends de.hybris.platform.commercefacades.order.impl.DefaultCartFacade implements TravelCartFacade
The class is responsible for updating certain properties information like transport offering code specific for a travel bundle in the cart.
  • Field Details

    • MINIMUM_PRODUCT_QUANTITY

      protected static final long MINIMUM_PRODUCT_QUANTITY
      This constant value dictates the quantity of the fare product to be added in the cart.
      See Also:
  • Constructor Details

    • DefaultTravelCartFacade

      public DefaultTravelCartFacade()
  • Method Details

    • addToCart

      public CartModificationData addToCart(String code, long quantity) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      addToCart in interface de.hybris.platform.commercefacades.order.CartFacade
      Overrides:
      addToCart in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addPropertiesToCartEntry

      public void addPropertiesToCartEntry(String productCode, int entryNo, List<String> transportOfferingCodes, String travelRouteCode, int originDestinationRefNumber, String travellerCode, Boolean active, AmendStatus amendStatus, String addToCartCriteriaType)
      Description copied from interface: TravelCartFacade
      Add properties to cart entry.
      Specified by:
      addPropertiesToCartEntry in interface TravelCartFacade
      Parameters:
      productCode - the product code
      entryNo - the entry no
      transportOfferingCodes - the transport offering codes
      travelRouteCode - the travel route code
      originDestinationRefNumber - the origin destination ref number
      travellerCode - the traveller code
      active - the active
      amendStatus - the amend status
      addToCartCriteriaType - the add to cart criteria type
    • addPropertiesToCartEntry

      public void addPropertiesToCartEntry(String productCode, int entryNo, Map<String,Object> params)
      Description copied from interface: TravelCartFacade
      Add properties to cart entry.
      Specified by:
      addPropertiesToCartEntry in interface TravelCartFacade
      Parameters:
      productCode - the product code
      entryNo - the entry no
      params - the params
    • addSelectedAccommodationToCart

      public void addSelectedAccommodationToCart(String transportOfferingCode, String travellerCode, String configuredAccommodationUid)
      Description copied from interface: TravelCartFacade
      This method adds a configured accommodation as a selected accommodation to the cart
      Specified by:
      addSelectedAccommodationToCart in interface TravelCartFacade
      Parameters:
      transportOfferingCode - the transport offering code
      travellerCode - the traveller code
      configuredAccommodationUid - the configured accommodation identifier
    • removeSelectedAccommodationFromCart

      public void removeSelectedAccommodationFromCart(String transportOfferingCode, String travellerCode, String configuredAccommodationUid)
      Description copied from interface: TravelCartFacade
      This method removes a selected accommodation from the cart
      Specified by:
      removeSelectedAccommodationFromCart in interface TravelCartFacade
      Parameters:
      transportOfferingCode - the transport offering code
      travellerCode - the traveller code
      configuredAccommodationUid - the configured accommodation identifier
    • populatePropertiesMap

      protected Map<String,Object> populatePropertiesMap(String addToCartCriteriaType, String travelRouteCode, int originDestinationRefNumber, List<String> transportOfferingCodes, List<TravellerModel> travellersList, Boolean active, AmendStatus amendStatus)
      Populate properties map map.
      Parameters:
      addToCartCriteriaType - the add to cart criteria type
      travelRouteCode - the travel route code
      originDestinationRefNumber - the origin destination ref number
      transportOfferingCodes - the transport offering codes
      travellersList - the travellers list
      active - the active
      amendStatus - the amend status
      Returns:
      the map
    • getOrderEntry

      public OrderEntryData getOrderEntry(String productCode, String travelRouteCode, List<String> transportOfferingCodes, String travellerCode, boolean bundleNoCheckRequired)
      Description copied from interface: TravelCartFacade
      Gets order entry.
      Specified by:
      getOrderEntry in interface TravelCartFacade
      Parameters:
      productCode - the product code
      travelRouteCode - the travel route code
      transportOfferingCodes - the transport offering codes
      travellerCode - the traveller code
      bundleNoCheckRequired - the bundle no check required
      Returns:
      OrderEntryData order entry
    • getOrderEntry

      public OrderEntryData getOrderEntry(AbstractOrderModel abstractOrderModel, String productCode, String travelRouteCode, List<String> transportOfferingCodes, String travellerCode, boolean bundleNoCheckRequired)
      Description copied from interface: TravelCartFacade
      Gets order entry from an order.
      Specified by:
      getOrderEntry in interface TravelCartFacade
      Parameters:
      abstractOrderModel - the abstract order model
      productCode - the product code
      travelRouteCode - the travel route code
      transportOfferingCodes - the transport offering codes
      travellerCode - the traveller code
      bundleNoCheckRequired - the bundle no check required
      Returns:
      OrderEntryData order entry
    • isAmendmentCart

      public Boolean isAmendmentCart()
      Description copied from interface: TravelCartFacade
      Checks if the current cart in session is used for amendment
      Specified by:
      isAmendmentCart in interface TravelCartFacade
      Returns:
      true if session cart is used for amendment
    • isAdditionalSecurityActive

      public Boolean isAdditionalSecurityActive()
      Description copied from interface: TravelCartFacade
      Checks if the current cart in session has the additional security active
      Specified by:
      isAdditionalSecurityActive in interface TravelCartFacade
      Returns:
      true if session cart has the additional security active
    • setAdditionalSecurity

      public void setAdditionalSecurity(Boolean additionalSecurity)
      Description copied from interface: TravelCartFacade
      Sets the additional security active on the session cart
      Specified by:
      setAdditionalSecurity in interface TravelCartFacade
      Parameters:
      additionalSecurity - the additionalSecurity value
    • removeDeliveryAddress

      public void removeDeliveryAddress()
      Description copied from interface: TravelCartFacade
      Removes delivery address from a cart which will be then copied over from billing information
      Specified by:
      removeDeliveryAddress in interface TravelCartFacade
    • getOriginalOrderCode

      public String getOriginalOrderCode()
      Description copied from interface: TravelCartFacade
      Gets the original order code from the amendment cart
      Specified by:
      getOriginalOrderCode in interface TravelCartFacade
      Returns:
      original order code
    • applyVoucher

      public void applyVoucher(String voucherCode) throws de.hybris.platform.commercefacades.voucher.exceptions.VoucherOperationException
      Description copied from interface: TravelCartFacade
      Method to add voucher to cart.
      Specified by:
      applyVoucher in interface TravelCartFacade
      Parameters:
      voucherCode - the voucher code
      Throws:
      de.hybris.platform.commercefacades.voucher.exceptions.VoucherOperationException - the voucher operation exception
    • removeVoucher

      public void removeVoucher(String voucherCode) throws de.hybris.platform.commercefacades.voucher.exceptions.VoucherOperationException
      Description copied from interface: TravelCartFacade
      Method to remove voucher from cart.
      Specified by:
      removeVoucher in interface TravelCartFacade
      Parameters:
      voucherCode - the voucher code
      Throws:
      de.hybris.platform.commercefacades.voucher.exceptions.VoucherOperationException - the voucher operation exception
    • recalculateCart

      public void recalculateCart()
      Description copied from interface: TravelCartFacade
      Method re-calculates cart after adding travel specific details to cart entry i.e. price level, route code, traveller details etc.
      Specified by:
      recalculateCart in interface TravelCartFacade
    • 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
      Parameters:
      addBundleToCartRequestData - the add bundle to cart request data
      Returns:
      list of cart modification data
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • addPerLegBundleProductToCart

      protected List<CartModificationData> addPerLegBundleProductToCart(List<AddBundleToCartData> addBundleToCartDataList) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add per leg bundle product to cart list.
      Parameters:
      addBundleToCartDataList - the add bundle to cart data list
      Returns:
      the list
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • addProduct

      protected List<CartModificationData> addProduct(String productId, long quantity, int bundleNo, AddBundleToCartData addBundleToCartData, TravellerData travellerData, PriceLevel priceLevel, Boolean active, AmendStatus amendStatus) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add product list.
      Parameters:
      productId - the product id
      quantity - the quantity
      bundleNo - the bundle no
      addBundleToCartData - the add bundle to cart data
      travellerData - the traveller data
      priceLevel - the price level
      active - the active
      amendStatus - the amend status
      Returns:
      the list
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • getCartCode

      protected String getCartCode(String currentCartCode)
      Returns the code that is assigned to the version ID field in the TravellerModel. In the current session cart does not have any original order it is returning null.
      Parameters:
      currentCartCode - the current cart code
      Returns:
      cart code
    • getTravellerData

      protected TravellerData getTravellerData(String travellerCode)
      Returns the TravellerData corresponding to the given travellerCode taken from the existing cart entries.
      Parameters:
      travellerCode - as the traveller code
      Returns:
      the TravellerData if exists, null otherwise
    • 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
      Parameters:
      productCode - the product code
      transportOfferingCodes - the transport offering codes
      quantity - the quantity to offer
      Returns:
      true if product is available, else false.
    • getQuantityToOffer

      protected Long getQuantityToOffer(ProductModel productModel, List<TransportOfferingModel> transportOfferingModels, Long quantity)
      This method calculates the quantity of a product in offer to compare against the available stock.
      Parameters:
      productModel - the product model
      transportOfferingModels - the transport offering models
      quantity - the quantity
      Returns:
      a Long
    • getProductPriceLevels

      protected Map<String,PriceLevel> getProductPriceLevels(List<AddBundleToCartData> addBundleToCartDataList) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Method to populate price levels for all the products
      Parameters:
      addBundleToCartDataList - the add bundle to cart data list
      Returns:
      product price levels
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - the commerce cart modification exception
    • setAddToCartParametersInContext

      protected void setAddToCartParametersInContext(List<String> transportOfferingCodes, String travelRouteCode, TravellerData travellerData, PriceLevel priceLevel, int originDestinationRefNumber, Boolean active, AmendStatus amendStatus)
      Method to set values in Session Context. These values will be used when the product is added to cart.
      Parameters:
      transportOfferingCodes - the transport offering codes
      travelRouteCode - the travel route code
      travellerData - the traveller data
      priceLevel - the price level
      originDestinationRefNumber - the origin destination ref number
      active - the active
      amendStatus - the amend status
    • getTravellerVersionIdFromCart

      protected String getTravellerVersionIdFromCart()
      Gets traveller version id from cart.
      Returns:
      the traveller version id from cart
    • getCurrentCartCode

      public String getCurrentCartCode()
      Description copied from interface: TravelCartFacade
      Gets the current cart code
      Specified by:
      getCurrentCartCode in interface TravelCartFacade
      Returns:
      current cart code
    • hasCartBeenAmended

      public boolean hasCartBeenAmended()
      Description copied from interface: TravelCartFacade
      Checks if user made any changes during amendment
      Specified by:
      hasCartBeenAmended in interface TravelCartFacade
      Returns:
      true if some changes were made
    • evaluateCart

      public void evaluateCart()
      Description copied from interface: TravelCartFacade
      Method to evaluate cart using rules engine for fees and discounts
      Specified by:
      evaluateCart in interface TravelCartFacade
    • isCurrentCartValid

      public boolean isCurrentCartValid()
      Description copied from interface: TravelCartFacade
      This method will return true if the current cart can be used in booking/amendment flow, false otherwise
      Specified by:
      isCurrentCartValid in interface TravelCartFacade
      Returns:
      the boolean
    • getTotalToPayPrice

      public PriceData getTotalToPayPrice()
      Description copied from interface: TravelCartFacade
      Calculates the value of total to pay or refund for current reservation
      Specified by:
      getTotalToPayPrice in interface TravelCartFacade
      Returns:
      total to pay
    • getTotalToPayPriceAfterChangeDates

      @Deprecated public PriceData getTotalToPayPriceAfterChangeDates()
      Deprecated.
      since version 5.0
      Description copied from interface: TravelCartFacade
      Calculates actual Total to pay amount after change dates
      Specified by:
      getTotalToPayPriceAfterChangeDates in interface TravelCartFacade
      Returns:
      total to pay after change dates
    • getPartialPaymentAmount

      public PriceData getPartialPaymentAmount()
      Description copied from interface: TravelCartFacade
      Calculates partial payment
      Specified by:
      getPartialPaymentAmount in interface TravelCartFacade
      Returns:
      partial payment to pay
    • getBookingTotal

      public PriceData getBookingTotal(String originalOrderCode)
      Description copied from interface: TravelCartFacade
      Returns the total booking amount
      Specified by:
      getBookingTotal in interface TravelCartFacade
      Parameters:
      originalOrderCode - original order code
      Returns:
      booking total
    • getCartTotal

      public PriceData getCartTotal()
      Description copied from interface: TravelCartFacade
      Returns current cart total
      Specified by:
      getCartTotal in interface TravelCartFacade
      Returns:
      cart total
    • getBookingDueAmount

      public PriceData getBookingDueAmount(PriceData totalAmount, PriceData amountPaid)
      Description copied from interface: TravelCartFacade
      Returns amount due for the booking
      Specified by:
      getBookingDueAmount in interface TravelCartFacade
      Parameters:
      totalAmount - total amount
      amountPaid - amount paid
      Returns:
      due amount
    • setOrderEntryType

      public void setOrderEntryType(OrderEntryType type, int entryNumber)
      Description copied from interface: TravelCartFacade
      Assign a specific OrderEntryType to a cart entry
      Specified by:
      setOrderEntryType in interface TravelCartFacade
      Parameters:
      type - the type to set
      entryNumber - the number of the cart entry to update
    • getPaymentOptions

      public List<PaymentOptionData> getPaymentOptions()
      Description copied from interface: TravelCartFacade
      Returns the list of available payment options for the current order
      Specified by:
      getPaymentOptions in interface TravelCartFacade
      Returns:
      payment options
    • getPaymentOptions

      public List<PaymentOptionData> getPaymentOptions(OrderEntryType orderEntryType)
      Description copied from interface: TravelCartFacade
      Returns the list of available payment options for the current order to pay the remaining amount for a given OrderEntryType
      Specified by:
      getPaymentOptions in interface TravelCartFacade
      Parameters:
      orderEntryType - order entry type
      Returns:
      the list of PaymentOptionData
    • deleteCurrentCart

      public void deleteCurrentCart()
      Description copied from interface: TravelCartFacade
      Deletes current cart to avoid processing amendment carts in a normal booking journey
      Specified by:
      deleteCurrentCart in interface TravelCartFacade
    • isValidPaymentOption

      public boolean isValidPaymentOption(List<PaymentTransactionData> transactions)
      Description copied from interface: TravelCartFacade
      Checks if the selected payment options passed as a list of associated transaction is a valid option comparing it with all the available options
      Specified by:
      isValidPaymentOption in interface TravelCartFacade
      Parameters:
      transactions - the transactions
      Returns:
      boolean
    • isSelectedOption

      protected boolean isSelectedOption(List<PaymentTransactionData> optionTransactions, List<PaymentTransactionData> submittedTransactions)
      Is selected option boolean.
      Parameters:
      optionTransactions - the option transactions
      submittedTransactions - the submitted transactions
      Returns:
      the boolean
    • isSameTransaction

      protected boolean isSameTransaction(PaymentTransactionData submittedTransactions, PaymentTransactionData transaction)
      Is same transaction boolean.
      Parameters:
      submittedTransactions - the submitted transactions
      transaction - the transaction
      Returns:
      the boolean
    • getNextBundleNumberToUse

      public Integer getNextBundleNumberToUse()
      Description copied from interface: TravelCartFacade
      Calculates the next bundle number to be used while adding products belonging to bundle to the cart using directly methods requiring it.
      Specified by:
      getNextBundleNumberToUse in interface TravelCartFacade
      Returns:
      the next number to use when manually add bundle products to cart
    • updateBundleEntriesWithBundleNumber

      public void updateBundleEntriesWithBundleNumber(List<Integer> entryNumbers, Integer forcedBundleNumber)
      Description copied from interface: TravelCartFacade
      Updates order entries with the correct incremental bundle number after add to cart
      Specified by:
      updateBundleEntriesWithBundleNumber in interface TravelCartFacade
      Parameters:
      entryNumbers - entry numbers
      forcedBundleNumber - forcedBundleNumber
    • validateCart

      public void validateCart(String departureLocation, String arrivalLocation, String departureDate, String returnDate)
      Description copied from interface: TravelCartFacade
      Validates cart to check if it matches currently selected options. If not, the cart is cleared.
      Specified by:
      validateCart in interface TravelCartFacade
      Parameters:
      departureLocation - departure location
      arrivalLocation - arrival location
      departureDate - departure date
      returnDate - return date
    • cleanUpCartForMinOriginDestinationRefNumber

      public void cleanUpCartForMinOriginDestinationRefNumber(Integer odRefNum)
      Description copied from interface: TravelCartFacade
      Cleans up the cart from bundles. It removes all the entries of type TRANSPORT with originDestinationRefNumber greater than the given odRefNum.
      Specified by:
      cleanUpCartForMinOriginDestinationRefNumber in interface TravelCartFacade
      Parameters:
      odRefNum - as the minimum originDestinationRefNumber
    • removeBoundFromCart

      public void removeBoundFromCart(String boundId)
      Description copied from interface: TravelCartFacade
      Remove the bound from the cart. It removes all the entries of associated to the bound Id
      Specified by:
      removeBoundFromCart in interface TravelCartFacade
      Parameters:
      boundId - as the bound Id
    • removeEntriesForOriginDestinationRefNumber

      public void removeEntriesForOriginDestinationRefNumber(Integer odRefNum)
      Description copied from interface: TravelCartFacade
      Removes all cart entries for specific origin destination ref number.
      Specified by:
      removeEntriesForOriginDestinationRefNumber in interface TravelCartFacade
      Parameters:
      odRefNum - origin destination ref number
    • validateOriginDestinationRefNumbersInCart

      public boolean validateOriginDestinationRefNumbersInCart()
      Description copied from interface: TravelCartFacade
      Validates the abstract order entries in the cart, to check that if n is the max originDestinationRefNumber, there is at least one abstract order entry for each i from 0 to n.
      Specified by:
      validateOriginDestinationRefNumbersInCart in interface TravelCartFacade
      Returns:
      true if the cart contains at least one abstract order entry type for each originDestinationRefNumber, false otherwise.
    • isNetPrice

      public Boolean isNetPrice(AbstractOrderEntryModel entry)
      Description copied from interface: TravelCartFacade
      Return a boolean according with the nature of the first product price retrieved available for cart calculation
      Specified by:
      isNetPrice in interface TravelCartFacade
      Parameters:
      entry - the entry
      Returns:
      true if the product has a net price associated, false otherwise
    • getGlobalDiscountForEntryType

      public BigDecimal getGlobalDiscountForEntryType(AbstractOrderModel abstractOrder, OrderEntryType entryType)
      Description copied from interface: TravelCartFacade
      Return the portio of global discounts relative to the given entry type
      Specified by:
      getGlobalDiscountForEntryType in interface TravelCartFacade
      Parameters:
      abstractOrder - the abstract order
      entryType - the entry type
      Returns:
      global discount for entry type
    • getTotalsForReservation

      public RateData getTotalsForReservation(String originalOrderCode)
      Description copied from interface: TravelCartFacade
      Returns a data representation of totals in an accommodation booking
      Specified by:
      getTotalsForReservation in interface TravelCartFacade
      Parameters:
      originalOrderCode - the original order code
      Returns:
      totals for reservation
    • validateSeatSelection

      public boolean validateSeatSelection()
      Description copied from interface: TravelCartFacade
      Validate seat selection.
      Specified by:
      validateSeatSelection in interface TravelCartFacade
      Returns:
      the boolean
    • populateRateDataFromCart

      protected RateData populateRateDataFromCart(String originalOrderCode)
      Populate rate data from cart rate data.
      Parameters:
      originalOrderCode - the original order code
      Returns:
      the rate data
    • getDiscountsToDisplay

      protected Double getDiscountsToDisplay(AbstractOrderModel abstractOrder)
      Returns the value of applied global discounts, assuming fixed/percentage discounts on carts are the only occurring discounts
      Parameters:
      abstractOrder - the abstract order
      Returns:
      discounts to display
    • getCartCode

      public String getCartCode()
      Description copied from interface: TravelCartFacade
      Gets cart code.
      Specified by:
      getCartCode in interface TravelCartFacade
      Returns:
      cart guid if anonymous user and cart code if logged in user
    • isAnonymousUserCart

      public boolean isAnonymousUserCart(String cartGuid)
      Description copied from interface: TravelCartFacade
      Checks if given card belongs to anonymous user.
      Specified by:
      isAnonymousUserCart in interface TravelCartFacade
      Parameters:
      cartGuid - GUID of the cart.
      Returns:
      true if the cart belongs to anonymous user.
    • assignAnonymousCartToCurrentUser

      public void assignAnonymousCartToCurrentUser(String toCartGuid) throws de.hybris.platform.commerceservices.order.CommerceCartRestorationException
      Description copied from interface: TravelCartFacade
      assign the anonymous cart to the current user
      Specified by:
      assignAnonymousCartToCurrentUser in interface TravelCartFacade
      Parameters:
      toCartGuid - anonymous Cart Guid
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartRestorationException - the commerce cart restoration exception
    • getPaymentOptionList

      public PaymentOptionListData getPaymentOptionList()
      Returns the list of available payment options for the current order.
      Specified by:
      getPaymentOptionList in interface TravelCartFacade
      Returns:
      payment options
    • getCartEntry

      public OrderEntryData getCartEntry(Integer entryId, List<Class> expectedTypes) throws TravelCartEntryException
      Description copied from interface: TravelCartFacade
      Returns an OrderEntryData(containing cart entry details) based on the given cart entry number whith expectedType validation
      Specified by:
      getCartEntry in interface TravelCartFacade
      Parameters:
      entryId - the entry identifier
      expectedTypes - the expected types
      Returns:
      OrderEntryData the order entry data
      Throws:
      TravelCartEntryException - the travel cart entry exception
    • validateCart

      public void validateCart()
      Description copied from interface: TravelCartFacade
      Validate cart for all the necessary information to place the order
      Specified by:
      validateCart in interface TravelCartFacade
    • createCartFromOrder

      public String createCartFromOrder(String orderId) throws InvalidOrderStatusException, InvalidUserException
      Description copied from interface: TravelCartFacade
      Create cart from order id.
      Specified by:
      createCartFromOrder in interface TravelCartFacade
      Parameters:
      orderId - the order id
      Returns:
      the cart id
      Throws:
      InvalidOrderStatusException
      InvalidUserException
    • createCartFromOrderGuid

      public String createCartFromOrderGuid(String orderId)
      Description copied from interface: TravelCartFacade
      Create cart from order guid.
      Specified by:
      createCartFromOrderGuid in interface TravelCartFacade
      Parameters:
      orderId - the order guid
      Returns:
      the cart id
    • removeCart

      public void removeCart() throws TravelCartValidationException, de.hybris.platform.servicelayer.exceptions.ModelRemovalException
      Description copied from interface: TravelCartFacade
      Remove the cart and all the associated objects that would remain orphan in case of deletion.
      Specified by:
      removeCart in interface TravelCartFacade
      Throws:
      TravelCartValidationException - the travel cart validation exception
      de.hybris.platform.servicelayer.exceptions.ModelRemovalException - the model removal exception
    • removeInternalItems

      protected void removeInternalItems(AbstractOrderModel abstractOrderModel)
      Remove internal items.
      Parameters:
      abstractOrderModel - the abstract order model
    • removeTravelOrderEntryInfo

      protected void removeTravelOrderEntryInfo(TravelOrderEntryInfoModel travelOrderEntryInfo)
      Remove travel order entry info.
      Parameters:
      travelOrderEntryInfo - the travel order entry info
    • removeSpecialServiceRequest

      protected void removeSpecialServiceRequest(SpecialRequestDetailModel specialRequestDetail)
      Remove special service request.
      Parameters:
      specialRequestDetail - the special request detail
    • validateOrderForAmendment

      public void validateOrderForAmendment(OrderModel orderModel, boolean isOrderFromGuid)
      Validate that an amend cart can be created from the order.
      Specified by:
      validateOrderForAmendment in interface TravelCartFacade
      Parameters:
      orderModel - the order model
      isOrderFromGuid - is the order guid present
    • getTravellerService

      protected TravellerService getTravellerService()
      Gets traveller service.
      Returns:
      the travellerService
    • setTravellerService

      public void setTravellerService(TravellerService travellerService)
      Sets traveller service.
      Parameters:
      travellerService - the travellerService to set
    • getOrderEntryConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderEntryModel,OrderEntryData> getOrderEntryConverter()
      Overrides:
      getOrderEntryConverter in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Returns:
      the orderEntryConverter
    • setOrderEntryConverter

      public void setOrderEntryConverter(de.hybris.platform.servicelayer.dto.converter.Converter<AbstractOrderEntryModel,OrderEntryData> orderEntryConverter)
      Overrides:
      setOrderEntryConverter in class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
      Parameters:
      orderEntryConverter - the orderEntryConverter to set
    • getTravelRouteService

      protected TravelRouteService getTravelRouteService()
      Gets travel route service.
      Returns:
      the travelRouteService
    • setTravelRouteService

      public void setTravelRouteService(TravelRouteService travelRouteService)
      Sets travel route service.
      Parameters:
      travelRouteService - the travelRouteService to set
    • getTransportOfferingService

      protected TransportOfferingService getTransportOfferingService()
      Gets transport offering service.
      Returns:
      the transportOfferingService
    • setTransportOfferingService

      public void setTransportOfferingService(TransportOfferingService transportOfferingService)
      Sets transport offering service.
      Parameters:
      transportOfferingService - the transportOfferingService to set
    • getTravelCommerceCartService

      protected TravelCommerceCartService getTravelCommerceCartService()
      Gets travel commerce cart service.
      Returns:
      the travelCommerceCartService
    • setTravelCommerceCartService

      public void setTravelCommerceCartService(TravelCommerceCartService travelCommerceCartService)
      Sets travel commerce cart service.
      Parameters:
      travelCommerceCartService - the travelCommerceCartService to set
    • getAccommodationMapService

      protected AccommodationMapService getAccommodationMapService()
      Gets accommodation map service.
      Returns:
      the accommodationMapService
    • setAccommodationMapService

      public void setAccommodationMapService(AccommodationMapService accommodationMapService)
      Sets accommodation map service.
      Parameters:
      accommodationMapService - the accommodationMapService to set
    • getTravelCartService

      protected TravelCartService getTravelCartService()
      Gets travel cart service.
      Returns:
      the travelCartService
    • setTravelCartService

      public void setTravelCartService(TravelCartService travelCartService)
      Sets travel cart service.
      Parameters:
      travelCartService - the travelCartService to set
    • getVoucherFacade

      protected de.hybris.platform.commercefacades.voucher.VoucherFacade getVoucherFacade()
      Gets voucher facade.
      Returns:
      the voucherFacade
    • setVoucherFacade

      public void setVoucherFacade(de.hybris.platform.commercefacades.voucher.VoucherFacade voucherFacade)
      Sets voucher facade.
      Parameters:
      voucherFacade - the voucherFacade to set
    • getTravelPromotionsFacade

      protected TravelPromotionsFacade getTravelPromotionsFacade()
      Gets travel promotions facade.
      Returns:
      the travelPromotionsFacade
    • setTravelPromotionsFacade

      public void setTravelPromotionsFacade(TravelPromotionsFacade travelPromotionsFacade)
      Sets travel promotions facade.
      Parameters:
      travelPromotionsFacade - the travelPromotionsFacade to set
    • getTravellerFacade

      protected TravellerFacade getTravellerFacade()
      Gets traveller facade.
      Returns:
      the travellerFacade
    • setTravellerFacade

      public void setTravellerFacade(TravellerFacade travellerFacade)
      Sets traveller facade.
      Parameters:
      travellerFacade - the travellerFacade to set
    • getTravelCommercePriceFacade

      protected TravelCommercePriceFacade getTravelCommercePriceFacade()
      Gets travel commerce price facade.
      Returns:
      the travelCommercePriceFacade
    • setTravelCommercePriceFacade

      public void setTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade)
      Sets travel commerce price facade.
      Parameters:
      travelCommercePriceFacade - the travelCommercePriceFacade to set
    • getSessionService

      protected de.hybris.platform.servicelayer.session.SessionService getSessionService()
      Gets session service.
      Returns:
      the sessionService
    • setSessionService

      public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService)
      Sets session service.
      Parameters:
      sessionService - the sessionService to set
    • getBookingService

      protected BookingService getBookingService()
      Gets booking service.
      Returns:
      the bookingService
    • setBookingService

      public void setBookingService(BookingService bookingService)
      Sets booking service.
      Parameters:
      bookingService - the bookingService to set
    • getTravelRulesService

      protected TravelRulesService getTravelRulesService()
      Gets travel rules service.
      Returns:
      the travelRulesService
    • setTravelRulesService

      public void setTravelRulesService(TravelRulesService travelRulesService)
      Sets travel rules service.
      Parameters:
      travelRulesService - the travelRulesService to set
    • getPopulateCartEntryPropertyStrategyMap

      protected Map<String,PopulatePropertyMapStrategy> getPopulateCartEntryPropertyStrategyMap()
      Gets populate cart entry property strategy map.
      Returns:
      the populateCartEntryPropertyStrategyMap
    • setPopulateCartEntryPropertyStrategyMap

      public void setPopulateCartEntryPropertyStrategyMap(Map<String,PopulatePropertyMapStrategy> populateCartEntryPropertyStrategyMap)
      Sets populate cart entry property strategy map.
      Parameters:
      populateCartEntryPropertyStrategyMap - the populateCartEntryPropertyStrategyMap to set
    • getCommonI18NService

      protected de.hybris.platform.servicelayer.i18n.CommonI18NService getCommonI18NService()
      Gets common i 18 n service.
      Returns:
      the common i 18 n service
    • setCommonI18NService

      public void setCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService commonI18NService)
      Sets common i 18 n service.
      Parameters:
      commonI18NService - the common i 18 n service
    • getPaymentOptionConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<PaymentOptionInfo,PaymentOptionData> getPaymentOptionConverter()
      Gets payment option converter.
      Returns:
      paymentOptionConverter payment option converter
    • setPaymentOptionConverter

      public void setPaymentOptionConverter(de.hybris.platform.servicelayer.dto.converter.Converter<PaymentOptionInfo,PaymentOptionData> paymentOptionConverter)
      Sets payment option converter.
      Parameters:
      paymentOptionConverter - the paymentOptionConverter to set
    • getBookingFacade

      protected BookingFacade getBookingFacade()
      Gets booking facade.
      Returns:
      the bookingFacade
    • setBookingFacade

      public void setBookingFacade(BookingFacade bookingFacade)
      Sets booking facade.
      Parameters:
      bookingFacade - the bookingFacade to set
    • getBundleCartFacade

      protected de.hybris.platform.configurablebundlefacades.order.BundleCartFacade getBundleCartFacade()
      Gets bundle cart facade.
      Returns:
      the bundleCartFacade
    • setBundleCartFacade

      public void setBundleCartFacade(de.hybris.platform.configurablebundlefacades.order.BundleCartFacade bundleCartFacade)
      Sets bundle cart facade.
      Parameters:
      bundleCartFacade - the bundleCartFacade to set
    • getTravelBundleCommerceCartFacade

      protected TravelBundleCommerceCartFacade getTravelBundleCommerceCartFacade()
      Gets travel bundle commerce cart facade.
      Returns:
      the travelBundleCommerceCartFacade
    • setTravelBundleCommerceCartFacade

      public void setTravelBundleCommerceCartFacade(TravelBundleCommerceCartFacade travelBundleCommerceCartFacade)
      Sets travel bundle commerce cart facade.
      Parameters:
      travelBundleCommerceCartFacade - the travelBundleCommerceCartFacade to set
    • getSelectedAccommodationValidationStrategyList

      protected List<SelectedAccommodationValidationStrategy> getSelectedAccommodationValidationStrategyList()
      Gets selected accommodation validation strategy list.
      Returns:
      the selected accommodation validation strategy list
    • setSelectedAccommodationValidationStrategyList

      public void setSelectedAccommodationValidationStrategyList(List<SelectedAccommodationValidationStrategy> selectedAccommodationValidationStrategyList)
      Sets selected accommodation validation strategy list.
      Parameters:
      selectedAccommodationValidationStrategyList - the selected accommodation validation strategy list
    • getTravelCartValidationStrategyList

      protected List<TravelCartValidationStrategy> getTravelCartValidationStrategyList()
      Gets travel cart validation strategy list.
      Returns:
      the travel cart validation strategy list
    • setTravelCartValidationStrategyList

      public void setTravelCartValidationStrategyList(List<TravelCartValidationStrategy> travelCartValidationStrategyList)
      Sets travel cart validation strategy list.
      Parameters:
      travelCartValidationStrategyList - the travel cart validation strategy list
    • getNotAllowedStatusesForCreateAmendCart

      protected List<OrderStatus> getNotAllowedStatusesForCreateAmendCart()
      Gets not allowed statuses for create amend cart.
      Returns:
      the not allowed statuses for create amend cart
    • setNotAllowedStatusesForCreateAmendCart

      public void setNotAllowedStatusesForCreateAmendCart(List<OrderStatus> notAllowedStatusesForCreateAmendCart)
      Sets not allowed statuses for create amend cart.
      Parameters:
      notAllowedStatusesForCreateAmendCart - the not allowed statuses for create amend cart
    • getCustomerAccountService

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

      public void setCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService)
      Set the customer account service
      Parameters:
      customerAccountService -
    • getBaseStoreService

      protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
      Get base store service
      Returns:
    • setBaseStoreService

      public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService service)
      Set base store service
      Parameters:
      service -