Class DefaultShoppingAccommodationCartFacade

java.lang.Object
de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
de.hybris.platform.travelfacades.order.impl.DefaultAccommodationCartFacade
de.hybris.platform.shoppingfacades.order.impl.DefaultShoppingAccommodationCartFacade
All Implemented Interfaces:
de.hybris.platform.commercefacades.order.CartFacade, AccommodationCartFacade

public class DefaultShoppingAccommodationCartFacade extends DefaultAccommodationCartFacade
Shopping extension of DefaultAccommodationCartFacade class
  • Constructor Details

    • DefaultShoppingAccommodationCartFacade

      public DefaultShoppingAccommodationCartFacade()
  • Method Details

    • addSelectedAccommodationToCart

      public boolean addSelectedAccommodationToCart(String accommodationUid, String transportOfferingCode, String travellerCode, String originDestinationRefNo, String travelRoute)
      Method responsible to add the accommodation to the cart for the traveller based on the following scenarios: 1. If the accommodation(ConfiguredAccommodationModel) is configured in the system. 2. If the accommodation is bookable. 3. if the products of accommodation are referenced by the fare product entry in the cart. 4. if the accommodation is not already booked by other travellers in the transportOffering. 5. If the accommodation is not already added to the cart by other passenger of same cart.
      Specified by:
      addSelectedAccommodationToCart in interface AccommodationCartFacade
      Overrides:
      addSelectedAccommodationToCart in class DefaultAccommodationCartFacade
      Parameters:
      accommodationUid - the accommodation uid
      transportOfferingCode - the transport offering code
      travellerCode - the traveller code
      originDestinationRefNo - the origin destination ref no
      travelRoute - the travel route
      Returns:
      true, if successful
    • removeSelectedAccommodationFromCart

      public boolean removeSelectedAccommodationFromCart(String accommodationUid, String transportOfferingCode, String travellerCode, String travelRoute)
      Removes the selected accommodation from cart.
      Specified by:
      removeSelectedAccommodationFromCart in interface AccommodationCartFacade
      Overrides:
      removeSelectedAccommodationFromCart in class DefaultAccommodationCartFacade
      Parameters:
      accommodationUid - the accommodation uid
      transportOfferingCode - the transport offering code
      travellerCode - the traveller code
      travelRoute - the travel route
      Returns:
      true, if successful
    • addAccommodationToCart

      protected boolean addAccommodationToCart(String productCode, List<String> transportOfferingCodes, String travellerCode, TravellerData traveller, String originDestinationRefNo)
      Add the accommodation to the cart.
      Parameters:
      productCode - the product code
      transportOfferingCodes - the list of transport offering codes
      travellerCode - the traveller code
      traveller - the travellerData
      originDestinationRefNo - the originDestinationReferenceNumber
      Returns:
      true if the accommodation has been added to the cart, otherwise false.
    • updateAccommodationFromCart

      protected boolean updateAccommodationFromCart(OrderEntryData existingOrderEntry)
      Update existing accommodation from cart.
      Parameters:
      existingOrderEntry - the existig order entry
      Returns:
      true if the entry has been updated, otherwise false.