Class DefaultShoppingTravelCartService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.order.impl.DefaultAbstractOrderService<CartModel,CartEntryModel>
de.hybris.platform.order.impl.DefaultCartService
de.hybris.platform.travelservices.order.impl.DefaultTravelCartService
de.hybris.platform.shoppingservices.services.impl.DefaultShoppingTravelCartService
- All Implemented Interfaces:
de.hybris.platform.order.AbstractOrderService<CartModel,,CartEntryModel> de.hybris.platform.order.CartService,ShoppingTravelCartService,TravelCartService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
DefaultPROSTravelCartService
public class DefaultShoppingTravelCartService
extends DefaultTravelCartService
implements ShoppingTravelCartService
The type Default shopping travel cart service.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.travelservices.order.impl.DefaultTravelCartService
FIRST_ORDER_ENTRY_IDFields inherited from class de.hybris.platform.order.impl.DefaultCartService
SESSION_CART_PARAMETER_NAMEFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeFee(CartModel cartModel, TravellerData traveller) Adds a change fee to the cart for a specific traveller.voidaddEvenExchangeFee(CartModel cartModel, TravellerModel traveller) Adds an even exchange fee to the cart.doublecancelSolution(CartModel cartModel, RepricingRequestData repricingRequestData, ShoppingRepricingResponseMessage repricerResponseMessage) This method deletes a specific solution from the cart for all the associated passengers.Retrieves current destination transport facility from items that are in the cartget SearchResponseServiceprotected ShoppingTransportOfferingServiceGets the shopping transport offering serviceprotected booleanisCartValid(String departureLocation, String arrivalLocation, String departureDate, String returnDate, CartModel cartModel, AbstractOrderEntryModel outboundEntry) Is cart valid boolean.voidremoveOrderEntriesBySolutionId(Integer solutionId, CartModel cartModel, List<String> passengerIds) Removes the order entries having the specific solution Id or the same transport offering for that solution.voidsetSearchResponseService(SearchResponseService searchResponseService) set SearchResponseServicevoidsetShoppingTransportOfferingService(ShoppingTransportOfferingService shoppingTransportOfferingService) Sets the shopping transport offering servicevoidValidate cart.Methods inherited from class de.hybris.platform.travelservices.order.impl.DefaultTravelCartService
addTravellersToCart, calculateTotalExtras, cancelPartialOrder, cancelPartialOrder, cancelTraveller, cancelTravellerInternal, cloneAccommodationOrderEntryGroup, cloneAccommodationOrderEntryInfo, cloneSelectedAccommodation, cloneTraveller, cloneTravellers, cloneTravelOrderEntryInfo, cloneTravelOrderEntryInfoAttributes, createCartFromOrder, createCartFromOrder, deleteCurrentCart, forceCurrencyToOriginalOrderCurrency, generateOrderEntryId, getAvailableStock, getBaseStoreService, getBookingService, getCloneAbstractOrderStrategy, getCommerceCartCalculationStrategy, getCommonI18NService, getCustomerAccountService, getEntriesTotal, getEntryForId, getEnumerationService, getFareProductEntries, getGlobalDiscountCalculationStrategyMap, getGlobalDiscountForEntryType, getNextBundleNumberToUse, getOrder, getOrderCodeGenerator, getOriginalOrderEntry, getPassengerTypeService, getPaymentOptionCreationStrategies, getPaymentOptions, getPaymentOptions, getPaymentOptionsCreationStrategyMap, getSessionCart, getStoreSessionService, getTaxCompensationStrategy, getTimeService, getTransportTotalByEntries, getTravelCartDao, getTravelCommercePriceService, getTravelCommerceStockService, getTravellerService, getUserService, isAmendmentCart, isNetPricedEntry, populateOriginalOrderEntry, removeBookedSeatForTraveller, removeDeliveryAddress, removeTravellerFromCart, resetPaymentInfo, setAdditionalSecurity, setBaseStoreService, setBookingService, setCloneAbstractOrderStrategy, setCommerceCartCalculationStrategy, setCommonI18NService, setCustomerAccountService, setEnumerationService, setGlobalDiscountCalculationStrategyMap, setOrderCodeGenerator, setPassengerTypeService, setPaymentOptionCreationStrategies, setPaymentOptionsCreationStrategyMap, setStoreSessionService, setTaxCompensationStrategy, setTimeService, setTravelCartDao, setTravelCommercePriceService, setTravelCommerceStockService, setTravellerService, setUserService, updateBundleEntriesWithBundleNumber, validateCartMethods inherited from class de.hybris.platform.order.impl.DefaultCartService
addToCart, appendToCart, calculateCart, changeCurrentCartUser, changeSessionCartCurrency, clone, createCartFromQuote, getCreateCartFromQuoteStrategy, getNextEntryNumber, hasCart, hasSessionCart, internalGetSessionCart, postProcessClonedEntries, removeSessionCart, setAddToCartStrategy, setCartFactory, setCreateCartFromQuoteStrategy, setOrderCalculation, setSessionCart, updateQuantities, updateQuantitiesMethods inherited from class de.hybris.platform.order.impl.DefaultAbstractOrderService
addAllGlobalDiscountValues, addAllTotalTaxValues, addEntryAtPosition, addGlobalDiscountValue, addNewEntry, addNewEntry, addNewEntry, addTotalTaxValue, getAbstractOrderEntryService, getAbstractOrderEntryTypeService, getCollidingEntry, getEntriesForNumber, getEntriesForProduct, getEntryForNumber, getEntryTypeCode, getGlobalDiscountValue, getOrderDao, getSaveAbstractOrderStrategy, removeGlobalDiscountValue, removeTotalTaxValue, saveOrder, setAbstractOrderEntryService, setAbstractOrderEntryTypeService, setOrderDao, setSaveAbstractOrderStrategyMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.order.AbstractOrderService
addAllGlobalDiscountValues, addAllTotalTaxValues, addGlobalDiscountValue, addNewEntry, addNewEntry, addNewEntry, addTotalTaxValue, clone, getEntriesForNumber, getEntriesForProduct, getEntryForNumber, getGlobalDiscountValue, removeGlobalDiscountValue, removeTotalTaxValue, saveOrderMethods inherited from interface de.hybris.platform.order.CartService
addToCart, appendToCart, calculateCart, changeCurrentCartUser, changeSessionCartCurrency, createCartFromQuote, getSessionCart, hasCart, hasSessionCart, removeSessionCart, setSessionCart, updateQuantities, updateQuantitiesMethods inherited from interface de.hybris.platform.travelservices.order.TravelCartService
addTravellersToCart, cancelPartialOrder, cancelPartialOrder, cancelTraveller, createCartFromOrder, createCartFromOrder, deleteCurrentCart, generateOrderEntryId, getAvailableStock, getEntriesTotal, getEntryForId, getFareProductEntries, getGlobalDiscountForEntryType, getNextBundleNumberToUse, getPaymentOptions, getPaymentOptions, getTransportTotalByEntries, isAmendmentCart, isNetPricedEntry, removeDeliveryAddress, removeTravellerFromCart, setAdditionalSecurity, updateBundleEntriesWithBundleNumber, validateCart
-
Constructor Details
-
DefaultShoppingTravelCartService
public DefaultShoppingTravelCartService()
-
-
Method Details
-
validateCart
public void validateCart() throws de.hybris.platform.order.InvalidCartExceptionValidate cart.- Specified by:
validateCartin interfaceShoppingTravelCartService- Throws:
de.hybris.platform.order.InvalidCartException- the invalid cart exception
-
isCartValid
protected boolean isCartValid(String departureLocation, String arrivalLocation, String departureDate, String returnDate, CartModel cartModel, AbstractOrderEntryModel outboundEntry) Description copied from class:DefaultTravelCartServiceIs cart valid boolean.- Overrides:
isCartValidin classDefaultTravelCartService- Parameters:
departureLocation- the departure locationarrivalLocation- the arrival locationdepartureDate- the departure datereturnDate- the return datecartModel- the cart modeloutboundEntry- the outbound entry- Returns:
- the boolean
-
getCurrentDestination
Retrieves current destination transport facility from items that are in the cart- Specified by:
getCurrentDestinationin interfaceTravelCartService- Overrides:
getCurrentDestinationin classDefaultTravelCartService- Returns:
- current destination
-
cancelSolution
public double cancelSolution(CartModel cartModel, RepricingRequestData repricingRequestData, ShoppingRepricingResponseMessage repricerResponseMessage) throws CancelFlightException, de.hybris.platform.order.exceptions.CalculationException Description copied from interface:ShoppingTravelCartServiceThis method deletes a specific solution from the cart for all the associated passengers.- Specified by:
cancelSolutionin interfaceShoppingTravelCartService- Parameters:
cartModel- the cartModelrepricingRequestData- the solution IdrepricerResponseMessage- the repricer response message- Returns:
- the total amount to refund
- Throws:
CancelFlightExceptionde.hybris.platform.order.exceptions.CalculationException
-
removeOrderEntriesBySolutionId
public void removeOrderEntriesBySolutionId(Integer solutionId, CartModel cartModel, List<String> passengerIds) throws CancelFlightException Description copied from interface:ShoppingTravelCartServiceRemoves the order entries having the specific solution Id or the same transport offering for that solution.- Specified by:
removeOrderEntriesBySolutionIdin interfaceShoppingTravelCartService- Parameters:
solutionId- the solution IdcartModel- the cart modelpassengerIds- the list of passengers- Throws:
CancelFlightException
-
addChangeFee
Description copied from interface:ShoppingTravelCartServiceAdds a change fee to the cart for a specific traveller.- Specified by:
addChangeFeein interfaceShoppingTravelCartService- Parameters:
cartModel- the cart modeltraveller- the traveller- Throws:
ChangeFlightException- thrown when an error occurs during the addition of the changeFee product in the cart.
-
addEvenExchangeFee
public void addEvenExchangeFee(CartModel cartModel, TravellerModel traveller) throws ChangeFlightException Description copied from interface:ShoppingTravelCartServiceAdds an even exchange fee to the cart.- Specified by:
addEvenExchangeFeein interfaceShoppingTravelCartService- Parameters:
cartModel- the cart modeltraveller- the traveller- Throws:
ChangeFlightException- thrown when an error occurs during the addition of the EvenExchangeFee product in the cart.
-
getSearchResponseService
get SearchResponseService- Returns:
- SearchResponseService search response service
-
setSearchResponseService
set SearchResponseService- Parameters:
searchResponseService- the search response service
-
getShoppingTransportOfferingService
Gets the shopping transport offering service- Returns:
- the shopping transport offering service
-
setShoppingTransportOfferingService
public void setShoppingTransportOfferingService(ShoppingTransportOfferingService shoppingTransportOfferingService) Sets the shopping transport offering service- Parameters:
shoppingTransportOfferingService- the shopping transport offering service
-