Class DefaultShoppingTravelCartFacade
java.lang.Object
de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
de.hybris.platform.travelfacades.order.impl.DefaultTravelCartFacade
de.hybris.platform.shoppingfacades.facades.impl.DefaultShoppingTravelCartFacade
- All Implemented Interfaces:
de.hybris.platform.commercefacades.order.CartFacade,ShoppingTravelCartFacade,TravelCartFacade
- Direct Known Subclasses:
DefaultPROSTravelCartFacade
public abstract class DefaultShoppingTravelCartFacade
extends DefaultTravelCartFacade
implements ShoppingTravelCartFacade
The type Default shopping travel cart facade.
-
Field Summary
Fields inherited from class de.hybris.platform.travelfacades.order.impl.DefaultTravelCartFacade
MINIMUM_PRODUCT_QUANTITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddAdditionalBookingInfo(List<CartModificationData> bundleModifications, AddBundleToCartRequestData addBundleToCartRequestData) Add additional booking info.protected voidaddSearchResponseWrapperToCart(SearchResponseWrapper searchResponseWrapper) Add search response wrapper to cart.abstract List<CartModificationData>addSolutionToCart(AddSolutionRequestData addSolutionRequestData) Add a solution to the cart.Method for adding a product to cart.abstract voidcancelSolution(String orderId, RepricingRequestData repricingRequestData) This method deletes a solution from the order for all the associated passengers.abstract voidchangeFlightItinerary(RepricingRequestData repricingRequestData) Change a flight in the cart.voidMethod to evaluate cart using rules engine for fees and discountsabstract EvaluateChangeSolutionResponseDataevaluateFlightChange(RepricingRequestData repricingRequestData) Evaluates if a change flight operation on the cart is possible, by calling the repricing service.protected List<AddToCartValidationStrategy>Gets add to cart validation strategies.Return the booking journey associated to the current session cart to be used to drive journey specific logics at facade levelprotected SearchResponseServiceGets search response service.protected ShoppingTravellerFacadeGets shopping traveller facade.protected TravelRestrictionServiceGets travel restriction service.abstract voidremovePassengers(String orderId, RepricingRequestData repricingRequestData) Remove all entries associated to the list of passengers.protected voidsetAddToCartParametersInContext(List<String> transportOfferingCodes, String travelRouteCode, TravellerData travellerData, PriceLevel priceLevel, int originDestinationRefNumber, Boolean active, AmendStatus amendStatus) Method to set values in Session Context.voidsetAddToCartValidationStrategies(List<AddToCartValidationStrategy> addToCartValidationStrategies) Sets add to cart validation strategies.voidsetSearchResponseService(SearchResponseService searchResponseService) Sets search response service.voidsetShoppingTravellerFacade(ShoppingTravellerFacade shoppingTravellerFacade) Sets shopping traveller facade.voidsetTravelRestrictionService(TravelRestrictionService travelRestrictionService) Sets travel restriction service.shoppingAddBundleToCart(List<AddBundleToCartRequestData> addBundleToCartRequestDataList, SearchResponseWrapper searchResponseWrapper) shopping add bundle to cart list.Methods inherited from class de.hybris.platform.travelfacades.order.impl.DefaultTravelCartFacade
addBundleToCart, addPerLegBundleProductToCart, addProduct, addPropertiesToCartEntry, addPropertiesToCartEntry, addSelectedAccommodationToCart, addToCart, applyVoucher, assignAnonymousCartToCurrentUser, cleanUpCartForMinOriginDestinationRefNumber, createCartFromOrder, createCartFromOrderGuid, deleteCurrentCart, getAccommodationMapService, getBaseStoreService, getBookingDueAmount, getBookingFacade, getBookingService, getBookingTotal, getBundleCartFacade, getCartCode, getCartCode, getCartEntry, getCartTotal, getCommonI18NService, getCurrentCartCode, getCustomerAccountService, getDiscountsToDisplay, getGlobalDiscountForEntryType, getNextBundleNumberToUse, getNotAllowedStatusesForCreateAmendCart, getOrderEntry, getOrderEntry, getOrderEntryConverter, getOriginalOrderCode, getPartialPaymentAmount, getPaymentOptionConverter, getPaymentOptionList, getPaymentOptions, getPaymentOptions, getPopulateCartEntryPropertyStrategyMap, getProductPriceLevels, getQuantityToOffer, getSelectedAccommodationValidationStrategyList, getSessionService, getTotalsForReservation, getTotalToPayPrice, getTotalToPayPriceAfterChangeDates, getTransportOfferingService, getTravelBundleCommerceCartFacade, getTravelCartService, getTravelCartValidationStrategyList, getTravelCommerceCartService, getTravelCommercePriceFacade, getTravellerData, getTravellerFacade, getTravellerService, getTravellerVersionIdFromCart, getTravelPromotionsFacade, getTravelRouteService, getTravelRulesService, getVoucherFacade, hasCartBeenAmended, isAdditionalSecurityActive, isAmendmentCart, isAnonymousUserCart, isCurrentCartValid, isNetPrice, isProductAvailable, isSameTransaction, isSelectedOption, isValidPaymentOption, populatePropertiesMap, populateRateDataFromCart, recalculateCart, removeBoundFromCart, removeCart, removeDeliveryAddress, removeEntriesForOriginDestinationRefNumber, removeInternalItems, removeSelectedAccommodationFromCart, removeSpecialServiceRequest, removeTravelOrderEntryInfo, removeVoucher, setAccommodationMapService, setAdditionalSecurity, setBaseStoreService, setBookingFacade, setBookingService, setBundleCartFacade, setCommonI18NService, setCustomerAccountService, setNotAllowedStatusesForCreateAmendCart, setOrderEntryConverter, setOrderEntryType, setPaymentOptionConverter, setPopulateCartEntryPropertyStrategyMap, setSelectedAccommodationValidationStrategyList, setSessionService, setTransportOfferingService, setTravelBundleCommerceCartFacade, setTravelCartService, setTravelCartValidationStrategyList, setTravelCommerceCartService, setTravelCommercePriceFacade, setTravellerFacade, setTravellerService, setTravelPromotionsFacade, setTravelRouteService, setTravelRulesService, setVoucherFacade, updateBundleEntriesWithBundleNumber, validateCart, validateCart, validateOrderForAmendment, validateOriginDestinationRefNumbersInCart, validateSeatSelectionMethods inherited from class de.hybris.platform.commercefacades.order.impl.DefaultCartFacade
addToCart, addToCart, configurationInfoToProductConfiguration, configureCartEntry, createCommerceCartParameter, createEmptyCart, deleteGroupedOrderEntriesMultiD, estimateExternalTaxes, filterConfigurationsByConfigurator, getBaseSiteService, getCartConverter, getCartModificationConverter, getCartRestorationConverter, getCartService, getCartsForCurrentUser, getCommerceCartParameterConverter, getCommerceCartService, getCountryConverter, getDeliveryCountries, getDeliveryService, getGroupCartModificationListConverter, getMiniCart, getMiniCartConverter, getModelService, getMostRecentCartGuidForUser, getOrderEntryNumberForMultiD, getPointOfServiceService, getPriceDataFactory, getProductConfigurationMergeStrategies, getProductFacade, getProductService, getSessionCart, getSessionCartGuid, getSessionCartWithEntryOrdering, getUserService, hasEntries, hasEntryGroups, hasSessionCart, mergeOrderEntryWithModelConfiguration, removeEntryGroup, removeSessionCart, removeStaleCarts, restoreAnonymousCartAndMerge, restoreAnonymousCartAndTakeOwnership, restoreCartAndMerge, restoreSavedCart, setBaseSiteService, setCartConverter, setCartModificationConverter, setCartRestorationConverter, setCartService, setCommerceCartParameterConverter, setCommerceCartService, setCountryConverter, setDeliveryService, setGroupCartModificationListConverter, setMiniCartConverter, setModelService, setPointOfServiceService, setPriceDataFactory, setProductConfigurationMergeStrategies, setProductFacade, setProductService, setUserService, updateCartEntry, updateCartEntry, updateCartEntry, updateCartMetadata, validateCartDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.commercefacades.order.CartFacade
addToCart, addToCart, addToCart, estimateExternalTaxes, getCartsForCurrentUser, getDeliveryCountries, getMiniCart, getMostRecentCartGuidForUser, getSessionCart, getSessionCartGuid, getSessionCartWithEntryOrdering, hasEntries, hasSessionCart, removeEntryGroup, removeSessionCart, removeStaleCarts, restoreAnonymousCartAndMerge, restoreAnonymousCartAndTakeOwnership, restoreCartAndMerge, restoreSavedCart, updateCartEntry, updateCartEntry, updateCartEntry, updateCartMetadata, validateCartDataMethods inherited from interface de.hybris.platform.shoppingfacades.facades.ShoppingTravelCartFacade
cancelSolution, doEvaluateSolutionCancel, evaluateRemovePassenger, evaluateSolutionCancelMethods inherited from interface de.hybris.platform.travelfacades.order.TravelCartFacade
addBundleToCart, addPropertiesToCartEntry, addPropertiesToCartEntry, addSelectedAccommodationToCart, applyVoucher, assignAnonymousCartToCurrentUser, cleanUpCartForMinOriginDestinationRefNumber, createCartFromOrder, createCartFromOrderGuid, deleteCurrentCart, getBookingDueAmount, getBookingTotal, getCartCode, getCartEntry, getCartTotal, getCurrentCartCode, getGlobalDiscountForEntryType, getNextBundleNumberToUse, getOrderEntry, getOrderEntry, getOriginalOrderCode, getPartialPaymentAmount, getPaymentOptionList, getPaymentOptions, getPaymentOptions, getTotalsForReservation, getTotalToPayPrice, getTotalToPayPriceAfterChangeDates, hasCartBeenAmended, isAdditionalSecurityActive, isAmendmentCart, isAnonymousUserCart, isCurrentCartValid, isNetPrice, isProductAvailable, isValidPaymentOption, recalculateCart, removeBoundFromCart, removeCart, removeDeliveryAddress, removeEntriesForOriginDestinationRefNumber, removeSelectedAccommodationFromCart, removeVoucher, setAdditionalSecurity, setOrderEntryType, updateBundleEntriesWithBundleNumber, validateCart, validateCart, validateOrderForAmendment, validateOriginDestinationRefNumbersInCart, validateSeatSelection
-
Constructor Details
-
DefaultShoppingTravelCartFacade
public DefaultShoppingTravelCartFacade()
-
-
Method Details
-
addToCart
public CartModificationData addToCart(String code, long quantity, List<String> flights, List<String> passengers) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Description copied from interface:ShoppingTravelCartFacadeMethod for adding a product to cart.- Specified by:
addToCartin interfaceShoppingTravelCartFacade- Parameters:
code- code of product to addquantity- the quantity of the productflights- the flightspassengers- the passengers- Returns:
- the cart modification data that includes a statusCode and the actual quantity added to the cart
- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- if the cart cannot be modified
-
shoppingAddBundleToCart
public List<CartModificationData> shoppingAddBundleToCart(List<AddBundleToCartRequestData> addBundleToCartRequestDataList, SearchResponseWrapper searchResponseWrapper) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException Description copied from interface:ShoppingTravelCartFacadeshopping add bundle to cart list.- Specified by:
shoppingAddBundleToCartin interfaceShoppingTravelCartFacade- Parameters:
addBundleToCartRequestDataList- the add bundle to cart request data listsearchResponseWrapper- the search response wrapper- Returns:
- the list
- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- the commerce cart modification exception
-
getBookingJourneyTypeFromSessionCart
Description copied from interface:ShoppingTravelCartFacadeReturn the booking journey associated to the current session cart to be used to drive journey specific logics at facade level- Specified by:
getBookingJourneyTypeFromSessionCartin interfaceShoppingTravelCartFacade- Returns:
- the
BookingJourneyType
-
addSearchResponseWrapperToCart
Add search response wrapper to cart.- Parameters:
searchResponseWrapper- the search response wrapper
-
addAdditionalBookingInfo
protected abstract void addAdditionalBookingInfo(List<CartModificationData> bundleModifications, AddBundleToCartRequestData addBundleToCartRequestData) Add additional booking info.- Parameters:
bundleModifications- the bundle modificationsaddBundleToCartRequestData- the add bundle to cart request data
-
evaluateCart
public void evaluateCart()Description copied from interface:TravelCartFacadeMethod to evaluate cart using rules engine for fees and discounts- Specified by:
evaluateCartin interfaceTravelCartFacade- Overrides:
evaluateCartin classDefaultTravelCartFacade
-
setAddToCartParametersInContext
protected void setAddToCartParametersInContext(List<String> transportOfferingCodes, String travelRouteCode, TravellerData travellerData, PriceLevel priceLevel, int originDestinationRefNumber, Boolean active, AmendStatus amendStatus) Description copied from class:DefaultTravelCartFacadeMethod to set values in Session Context. These values will be used when the product is added to cart.- Overrides:
setAddToCartParametersInContextin classDefaultTravelCartFacade- Parameters:
transportOfferingCodes- the transport offering codestravelRouteCode- the travel route codetravellerData- the traveller datapriceLevel- the price leveloriginDestinationRefNumber- the origin destination ref numberactive- the activeamendStatus- the amend status
-
addSolutionToCart
public abstract List<CartModificationData> addSolutionToCart(AddSolutionRequestData addSolutionRequestData) throws FarePriceException, InvalidSessionCartException, de.hybris.platform.commerceservices.order.CommerceCartModificationException, InternalErrorException, CartNotEmptyException Add a solution to the cart.- Specified by:
addSolutionToCartin interfaceShoppingTravelCartFacade- 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
-
cancelSolution
public abstract void cancelSolution(String orderId, RepricingRequestData repricingRequestData) throws CancelFlightException, de.hybris.platform.order.exceptions.CalculationException, InternalErrorException, SolutionCancelException This method deletes a solution from the order for all the associated passengers.- Specified by:
cancelSolutionin interfaceShoppingTravelCartFacade- Parameters:
orderId- the orderIdrepricingRequestData- 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.InvalidUserException- thrown when the order does not exist or is in invalid state and it is not possible to amend it.InternalErrorException- thrown when the place order returns with errors.SolutionCancelException
-
evaluateFlightChange
public abstract EvaluateChangeSolutionResponseData evaluateFlightChange(RepricingRequestData repricingRequestData) throws RepricingException, ChangeFlightException Description copied from interface:ShoppingTravelCartFacadeEvaluates if a change flight operation on the cart is possible, by calling the repricing service.- Specified by:
evaluateFlightChangein interfaceShoppingTravelCartFacade- Parameters:
repricingRequestData- the repricingRequestData- Returns:
- the repricing response
- Throws:
RepricingException- thrown when an error response is retrieved from the repricing serviceChangeFlightException
-
changeFlightItinerary
public abstract void changeFlightItinerary(RepricingRequestData repricingRequestData) throws ChangeFlightException, RepricingException, InvalidSessionCartException Description copied from interface:ShoppingTravelCartFacadeChange a flight in the cart.- Specified by:
changeFlightItineraryin interfaceShoppingTravelCartFacade- Parameters:
repricingRequestData- the repricingRequestData- Throws:
ChangeFlightException- the change flight exceptionRepricingException- the repricing exceptionInvalidSessionCartException- the invalid session cart exception
-
removePassengers
public abstract void removePassengers(String orderId, RepricingRequestData repricingRequestData) throws RemovePassengerException, InternalErrorException Description copied from interface:ShoppingTravelCartFacadeRemove all entries associated to the list of passengers.- Specified by:
removePassengersin interfaceShoppingTravelCartFacade- Parameters:
orderId- the order idrepricingRequestData- the repricing request data- Throws:
RemovePassengerExceptionInternalErrorException
-
getSearchResponseService
Gets search response service.- Returns:
- the search response service
-
setSearchResponseService
Sets search response service.- Parameters:
searchResponseService- the search response service
-
getTravelRestrictionService
Gets travel restriction service.- Returns:
- the travel restriction service
-
setTravelRestrictionService
Sets travel restriction service.- Parameters:
travelRestrictionService- the travel restriction service
-
getAddToCartValidationStrategies
Gets add to cart validation strategies.- Returns:
- the add to cart validation strategies
-
setAddToCartValidationStrategies
public void setAddToCartValidationStrategies(List<AddToCartValidationStrategy> addToCartValidationStrategies) Sets add to cart validation strategies.- Parameters:
addToCartValidationStrategies- the add to cart validation strategies
-
getShoppingTravellerFacade
Gets shopping traveller facade.- Returns:
- the shopping traveller facade
-
setShoppingTravellerFacade
Sets shopping traveller facade.- Parameters:
shoppingTravellerFacade- the shopping traveller facade
-