Class DefaultOrderCreateAddServiceHandler
java.lang.Object
de.hybris.platform.ndc182shoppingfacades.facades.order.handlers.impl.DefaultOrderCreateAddServiceHandler
- All Implemented Interfaces:
OrderCreateHandler
The default implementation of
OrderCreateHandler to add services to cart.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<AddServiceRequestData>createAddAncillaryRequest(List<NDCOfferData> ndcAlaCarteOffers, IATAOrderCreateRQ orderCreateRQ, CartModel cartModel) Create add ancillary request.protected StringcreateSeatId(SelectedSeatType selectedSeat) Create seat id.protected List<AddServiceRequestData>getAddServiceRequests(List<TravellerModel> travellers, NDCAlaCarteOfferData ndcAlaCarteOffer, SelectedOfferType selectedOffer) Gets add service requests.protected Map<String,AddServiceStrategy> Gets add service strategy map.protected de.hybris.platform.order.CartServiceGets cart service.protected de.hybris.platform.servicelayer.config.ConfigurationServiceGets configuration service.protected NDCShoppingMerchandisingFacadeGets ndc shopping merchandising facade.protected de.hybris.platform.product.ProductServiceGets product service.protected ShoppingTransportCartFacadeGets transport cart facade.protected StringgetTravellerId(List<TravellerModel> travellers, String paxRefID) Gets traveller id.protected List<TravellerModel>getTravellers(CartModel cartModel) Gets travellers from cart.voidhandle(Map<String, List<NDCOfferData>> ndcOfferDataMap, CartModel cartModel, IATAOrderCreateRQ orderCreateRQ) Handler method for creating an orderModel from a list of ndcOfferData.voidsetAddServiceStrategyMap(Map<String, AddServiceStrategy> addServiceStrategyMap) Sets add service strategy map.voidsetCartService(de.hybris.platform.order.CartService cartService) Sets cart service.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.voidsetNdcShoppingMerchandisingFacade(NDCShoppingMerchandisingFacade ndcShoppingMerchandisingFacade) Sets ndc shopping merchandising facade.voidsetProductService(de.hybris.platform.product.ProductService productService) Sets product service.voidsetTransportCartFacade(ShoppingTransportCartFacade transportCartFacade) Sets transport cart facade.
-
Constructor Details
-
DefaultOrderCreateAddServiceHandler
public DefaultOrderCreateAddServiceHandler()
-
-
Method Details
-
handle
public void handle(Map<String, List<NDCOfferData>> ndcOfferDataMap, CartModel cartModel, IATAOrderCreateRQ orderCreateRQ) throws NDCException, MerchandisingRequestExceptionDescription copied from interface:OrderCreateHandlerHandler method for creating an orderModel from a list of ndcOfferData. These offers could be either NDCCarrierOfferData or NDCAlaCarteOfferData.- Specified by:
handlein interfaceOrderCreateHandler- Parameters:
ndcOfferDataMap- the map of NdcOfferData type and list of offers of that type.cartModel- the cart modelorderCreateRQ- the orderCreateRQ- Throws:
NDCException- the ndc exceptionMerchandisingRequestException
-
createAddAncillaryRequest
protected List<AddServiceRequestData> createAddAncillaryRequest(List<NDCOfferData> ndcAlaCarteOffers, IATAOrderCreateRQ orderCreateRQ, CartModel cartModel) throws NDCException Create add ancillary request.- Parameters:
ndcAlaCarteOffers- the ndc ala carte offersorderCreateRQ- the order create rqcartModel- the cart model- Returns:
- list list
- Throws:
NDCException- the ndc exception
-
getAddServiceRequests
protected List<AddServiceRequestData> getAddServiceRequests(List<TravellerModel> travellers, NDCAlaCarteOfferData ndcAlaCarteOffer, SelectedOfferType selectedOffer) Gets add service requests.- Parameters:
travellers- the travellersndcAlaCarteOffer- the ndc ala carte offerselectedOffer- the selected offer- Returns:
- the add service requests
-
createSeatId
Create seat id.- Parameters:
selectedSeat- the selected seat- Returns:
- the string
-
getTravellerId
Gets traveller id.- Parameters:
travellers- the travellerspaxRefID- the pax ref id- Returns:
- the traveller id
-
getTravellers
Gets travellers from cart.- Parameters:
cartModel- the cart model- Returns:
- the traveller id
-
getTransportCartFacade
Gets transport cart facade.- Returns:
- the transport cart facade
-
setTransportCartFacade
Sets transport cart facade.- Parameters:
transportCartFacade- the transport cart facade
-
getProductService
protected de.hybris.platform.product.ProductService getProductService()Gets product service.- Returns:
- the product service
-
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService) Sets product service.- Parameters:
productService- the product service
-
getAddServiceStrategyMap
Gets add service strategy map.- Returns:
- the add service strategy map
-
setAddServiceStrategyMap
Sets add service strategy map.- Parameters:
addServiceStrategyMap- the add service strategy map
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()Gets configuration service.- Returns:
- the configuration service
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.- Parameters:
configurationService- the configuration service
-
getCartService
protected de.hybris.platform.order.CartService getCartService()Gets cart service.- Returns:
- the cart service
-
setCartService
public void setCartService(de.hybris.platform.order.CartService cartService) Sets cart service.- Parameters:
cartService- the cart service
-
getNdcShoppingMerchandisingFacade
Gets ndc shopping merchandising facade.- Returns:
- the ndc shopping merchandising facade
-
setNdcShoppingMerchandisingFacade
public void setNdcShoppingMerchandisingFacade(NDCShoppingMerchandisingFacade ndcShoppingMerchandisingFacade) Sets ndc shopping merchandising facade.- Parameters:
ndcShoppingMerchandisingFacade- the ndc shopping merchandising facade
-