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 Summary
Modifier and TypeMethodDescriptionaddAutoPickProductsToCart(ProductModel productModel, String bundleTemplateId, int bundleEntryGroupNo) Add auto picks products to cart using hybris 6.4 bundle APIsaddPerLegBundleProductToCart(String bundleTemplateId) Add per leg products to cart using Hybris 6.4 bundle APIsvoidaddPropertiesToCartEntry(CartModel masterCartModel, int entryNo, ProductModel product, Map<String, Object> propertiesMap) Add properties to cart entry.voidaddSelectedAccommodationToCart(String transportOfferingCode, String travellerCode, ConfiguredAccommodationModel configuredAccommodation) This method adds a configured accommodation as a selected accommodation to the cartgetOrderEntriesForCategory(CartModel cartModel, CategoryModel categoryModel, String travelRouteCode, List<String> transportOfferingCodes, String travellerUid) Method to retrieve all the cart entries for a specified categoryModelvoidnormalizeEntryNumbers(CartModel cartModel) Normalize the cart entry numbersvoidremoveCartEntriesForBoundId(String boundId) Cleans up the cart from the boundId.voidremoveCartEntriesForMinODRefNumber(Integer odRefNum) Cleans up the cart from bundles before a new bundle addition.voidremoveCartEntriesForODRefNumber(Integer odRefNum, CartModel cartModel) Removes all cart entries matching specified origin destination ref number and the related entry groups.voidremoveEntryGroupsFromCart(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.voidremoveSelectedAccommodationFromCart(String transportOfferingCode, String travellerCode, String configuredAccommodationUid) This method removes a selected accommodation from the cartvoidsetEntryAsCalculatedAndInitializePriceLevel(Integer entryNumberToUpdate) Set cart entry as calculated and initialize price level to null.voidupdateCartEntryWithTravelDetails(AbstractOrderEntryModel orderEntryModel, PriceLevel priceLevel, List<TransportOfferingModel> transportOfferingModels) Method to update the cart entry with travel specific values and specific transportOfferings.Methods inherited from interface de.hybris.platform.commerceservices.order.CommerceCartService
addToCart, addToCart, addToCart, calculateCart, calculateCart, configureCartEntry, estimateTaxes, estimateTaxes, getCartForCodeAndUser, getCartForGuidAndSite, getCartForGuidAndSiteAndUser, getCartsForSiteAndUser, mergeCarts, recalculateCart, recalculateCart, removeAllEntries, removeAllEntries, removeEntryGroup, removeStaleCarts, removeStaleCarts, restoreCart, restoreCart, split, split, updateCartMetadata, updatePointOfServiceForCartEntry, updatePointOfServiceForCartEntry, updateQuantityForCartEntry, updateQuantityForCartEntry, updateToShippingModeForCartEntry, updateToShippingModeForCartEntry, validateCart, validateCartMethods inherited from interface de.hybris.platform.subscriptionservices.subscription.SubscriptionCommerceCartService
checkMasterCart, checkQuantityToAdd, createChildCartForBillingTime, getBillingFrequenciesForMasterEntry, getChildCartForBillingTime, getMasterCartBillingTimeCode, getMasterCartForCartEntry
-
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 entryproduct- the product model that will be added to the cartpropertiesMap- 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 cartModelcategoryModel- as the categoryModel to use to retrieve the cart entriestravelRouteCode- as the travelRoute codetransportOfferingCodes- as the list of transportOffering codestravellerUid- 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 codetravellerCode- the traveller codeconfiguredAccommodation- 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 codetravellerCode- the traveller codeconfiguredAccommodationUid- the configured accommodation Uid
-
removeCartEntriesForMinODRefNumber
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
Removes all cart entries matching specified origin destination ref number and the related entry groups.- Parameters:
odRefNum- origin destination ref numbercartModel- 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 productbundleTemplateId- the bundle template idbundleEntryGroupNo- 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
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
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 updatepriceLevel- the pricetransportOfferingModels- the transport offering- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
removeEntryGroupsFromCart
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 cartentryGroupNumbers- the entry group numbers
-