Interface TravelCommerceCartService

All Superinterfaces:
de.hybris.platform.commerceservices.order.CommerceCartService, de.hybris.platform.subscriptionservices.subscription.SubscriptionCommerceCartService
All Known Implementing Classes:
DefaultShoppingTravelCommerceCartService, DefaultTravelCommerceCartService

public interface TravelCommerceCartService extends de.hybris.platform.subscriptionservices.subscription.SubscriptionCommerceCartService
Overrides the CommerceCartService to handle more than one bundle entry. cart entry is created for each transport offering per passenger
  • Method Details

    • addPropertiesToCartEntry

      void addPropertiesToCartEntry(CartModel masterCartModel, int entryNo, ProductModel product, Map<String,Object> propertiesMap)
      Add properties to cart entry.
      Parameters:
      masterCartModel - the cart model. It must exist and it must be a master cart.
      entryNo - entryNo for cart entry
      product - the product model that will be added to the cart
      propertiesMap - Map containing all the properties to be added to the cart Entry
    • getOrderEntriesForCategory

      List<AbstractOrderEntryModel> getOrderEntriesForCategory(CartModel cartModel, CategoryModel categoryModel, String travelRouteCode, List<String> transportOfferingCodes, String travellerUid)
      Method to retrieve all the cart entries for a specified categoryModel
      Parameters:
      cartModel - as the cartModel
      categoryModel - as the categoryModel to use to retrieve the cart entries
      travelRouteCode - as the travelRoute code
      transportOfferingCodes - as the list of transportOffering codes
      travellerUid - as the Traveller unique id
      Returns:
      list of AbstractOrderEntryModel
    • addSelectedAccommodationToCart

      void addSelectedAccommodationToCart(String transportOfferingCode, String travellerCode, ConfiguredAccommodationModel configuredAccommodation)
      This method adds a configured accommodation as a selected accommodation to the cart
      Parameters:
      transportOfferingCode - the transport offering code
      travellerCode - the traveller code
      configuredAccommodation - the configured accommodation
    • removeSelectedAccommodationFromCart

      void removeSelectedAccommodationFromCart(String transportOfferingCode, String travellerCode, String configuredAccommodationUid)
      This method removes a selected accommodation from the cart
      Parameters:
      transportOfferingCode - the transport offering code
      travellerCode - the traveller code
      configuredAccommodationUid - the configured accommodation Uid
    • removeCartEntriesForMinODRefNumber

      void removeCartEntriesForMinODRefNumber(Integer odRefNum)
      Cleans up the cart from bundles before a new bundle addition. It removes all the entries of type TRANSPORT with originDestinationRefNumber greater than the given odRefNum and the related entry groups.
      Parameters:
      odRefNum - as the minimum originDestinationRefNumber
    • removeCartEntriesForODRefNumber

      void removeCartEntriesForODRefNumber(Integer odRefNum, CartModel cartModel)
      Removes all cart entries matching specified origin destination ref number and the related entry groups.
      Parameters:
      odRefNum - origin destination ref number
      cartModel - cart model
    • setEntryAsCalculatedAndInitializePriceLevel

      void setEntryAsCalculatedAndInitializePriceLevel(Integer entryNumberToUpdate) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Set cart entry as calculated and initialize price level to null.
      Parameters:
      entryNumberToUpdate - the entry number to update
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addAutoPickProductsToCart

      List<CommerceCartModification> addAutoPickProductsToCart(ProductModel productModel, String bundleTemplateId, int bundleEntryGroupNo) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add auto picks products to cart using hybris 6.4 bundle APIs
      Parameters:
      productModel - the product
      bundleTemplateId - the bundle template id
      bundleEntryGroupNo - the bundle entry group number
      Returns:
      a list of commerce cart modification
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • addPerLegBundleProductToCart

      List<CommerceCartModification> addPerLegBundleProductToCart(String bundleTemplateId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Add per leg products to cart using Hybris 6.4 bundle APIs
      Parameters:
      bundleTemplateId - the bundle template id
      Returns:
      a list of commerce cart modification
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • removeCartEntriesForBoundId

      void removeCartEntriesForBoundId(String boundId)
      Cleans up the cart from the boundId. It removes all the entries associated to the boundId and the related entry groups.
      Parameters:
      boundId - the boundId which needs to be removed
    • normalizeEntryNumbers

      void normalizeEntryNumbers(CartModel cartModel)
      Normalize the cart entry numbers
      Parameters:
      cartModel - the cart model
    • updateCartEntryWithTravelDetails

      void updateCartEntryWithTravelDetails(AbstractOrderEntryModel orderEntryModel, PriceLevel priceLevel, List<TransportOfferingModel> transportOfferingModels) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Method to update the cart entry with travel specific values and specific transportOfferings.
      Parameters:
      orderEntryModel - the order entry to update
      priceLevel - the price
      transportOfferingModels - the transport offering
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • removeEntryGroupsFromCart

      void removeEntryGroupsFromCart(CartModel sessionCart, Set<Integer> entryGroupNumbers)
      Remove cart entry group from the cart taking the set of entry group number from the order entries that needs to be removed and looking up for their parent groups.
      Parameters:
      sessionCart - the session cart
      entryGroupNumbers - the entry group numbers