Class DefaultTravelPlaceOrderMethodHook
java.lang.Object
de.hybris.platform.travelservices.order.hook.DefaultTravelPlaceOrderMethodHook
- All Implemented Interfaces:
de.hybris.platform.commerceservices.order.hook.CommercePlaceOrderMethodHook
public class DefaultTravelPlaceOrderMethodHook
extends Object
implements de.hybris.platform.commerceservices.order.hook.CommercePlaceOrderMethodHook
Travel Custom hook to replace default behaviour before and after place order
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) voidbeforePlaceOrder(CommerceCheckoutParameter parameter) voidbeforeSubmitOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) protected voidcalculcateTotalAndTaxes(OrderModel orderModel) protected de.hybris.platform.store.services.BaseStoreServiceprotected BookingServiceprotected de.hybris.platform.order.CalculationServiceprotected TravelCommerceStockServiceprotected de.hybris.platform.servicelayer.config.ConfigurationServiceGets the configurationServiceprotected de.hybris.platform.commerceservices.customer.CustomerAccountServiceprotected de.hybris.platform.enumeration.EnumerationServiceprotected de.hybris.platform.commerceservices.externaltax.ExternalTaxesServiceprotected de.hybris.platform.servicelayer.model.ModelServiceprotected de.hybris.platform.orderhistory.OrderHistoryServiceprotected de.hybris.platform.servicelayer.session.SessionServiceprotected TravelOrderCodeGenerationStrategyprotected booleanisAmendFlow(CartModel cart) Method responsible for checking if the current flow is amendment or new bookingvoidsetBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService) protected voidsetBookingJourney(OrderModel orderModel, CartModel cartModel) Sets the bookingJourneyType in the orderModel.voidsetBookingService(BookingService bookingService) voidsetCalculationService(de.hybris.platform.order.CalculationService calculationService) voidsetCommerceStockService(TravelCommerceStockService commerceStockService) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets the configurationServicevoidsetCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService) protected voidsetDeliveryAddress(OrderModel orderModel) voidsetEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) voidsetExternalTaxesService(de.hybris.platform.commerceservices.externaltax.ExternalTaxesService externalTaxesService) voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) voidsetOrderHistoryService(de.hybris.platform.orderhistory.OrderHistoryService orderHistoryService) voidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) voidsetTravelOrderCodeGenerationStrategy(TravelOrderCodeGenerationStrategy travelOrderCodeGenerationStrategy)
-
Constructor Details
-
DefaultTravelPlaceOrderMethodHook
public DefaultTravelPlaceOrderMethodHook()
-
-
Method Details
-
beforePlaceOrder
public void beforePlaceOrder(CommerceCheckoutParameter parameter) throws de.hybris.platform.order.InvalidCartException - Specified by:
beforePlaceOrderin interfacede.hybris.platform.commerceservices.order.hook.CommercePlaceOrderMethodHook- Throws:
de.hybris.platform.order.InvalidCartException
-
afterPlaceOrder
public void afterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) throws de.hybris.platform.order.InvalidCartException - Specified by:
afterPlaceOrderin interfacede.hybris.platform.commerceservices.order.hook.CommercePlaceOrderMethodHook- Throws:
de.hybris.platform.order.InvalidCartException
-
isAmendFlow
Method responsible for checking if the current flow is amendment or new booking- Parameters:
cart-- Returns:
-
beforeSubmitOrder
public void beforeSubmitOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) throws de.hybris.platform.order.InvalidCartException - Specified by:
beforeSubmitOrderin interfacede.hybris.platform.commerceservices.order.hook.CommercePlaceOrderMethodHook- Throws:
de.hybris.platform.order.InvalidCartException
-
setBookingJourney
Sets the bookingJourneyType in the orderModel. If the originalOrderModel is not null and it has a bookingJourneyType then it is set against the orderModel, otherwise it is taken from the session. If the sessionBookingJourney is not valid, nothing will be set.- Parameters:
orderModel- as the order modelcartModel-
-
setDeliveryAddress
-
calculcateTotalAndTaxes
-
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService()- Returns:
- the modelService
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) - Parameters:
modelService- the modelService to set
-
getCalculationService
protected de.hybris.platform.order.CalculationService getCalculationService()- Returns:
- the calculationService
-
setCalculationService
public void setCalculationService(de.hybris.platform.order.CalculationService calculationService) - Parameters:
calculationService- the calculationService to set
-
getExternalTaxesService
protected de.hybris.platform.commerceservices.externaltax.ExternalTaxesService getExternalTaxesService()- Returns:
- the externalTaxesService
-
setExternalTaxesService
public void setExternalTaxesService(de.hybris.platform.commerceservices.externaltax.ExternalTaxesService externalTaxesService) - Parameters:
externalTaxesService- the externalTaxesService to set
-
getCustomerAccountService
protected de.hybris.platform.commerceservices.customer.CustomerAccountService getCustomerAccountService()- Returns:
- the customerAccountService
-
setCustomerAccountService
public void setCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService) - Parameters:
customerAccountService- the customerAccountService to set
-
getBaseStoreService
protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()- Returns:
- the baseStoreService
-
setBaseStoreService
public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService) - Parameters:
baseStoreService- the baseStoreService to set
-
getOrderHistoryService
protected de.hybris.platform.orderhistory.OrderHistoryService getOrderHistoryService()- Returns:
- the orderHistoryService
-
setOrderHistoryService
public void setOrderHistoryService(de.hybris.platform.orderhistory.OrderHistoryService orderHistoryService) - Parameters:
orderHistoryService- the orderHistoryService to set
-
getCommerceStockService
- Returns:
- the commerceStockService
-
setCommerceStockService
- Parameters:
commerceStockService- the commerceStockService to set
-
getBookingService
- Returns:
- the bookingService
-
setBookingService
- Parameters:
bookingService- the bookingService to set
-
getSessionService
protected de.hybris.platform.servicelayer.session.SessionService getSessionService()- Returns:
- the sessionService
-
setSessionService
public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) - Parameters:
sessionService- the sessionService to set
-
getEnumerationService
protected de.hybris.platform.enumeration.EnumerationService getEnumerationService()- Returns:
- the enumerationService
-
setEnumerationService
public void setEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) - Parameters:
enumerationService- the enumerationService to set
-
getTravelOrderCodeGenerationStrategy
- Returns:
- travelOrderCodeGenerationStrategy
-
setTravelOrderCodeGenerationStrategy
public void setTravelOrderCodeGenerationStrategy(TravelOrderCodeGenerationStrategy travelOrderCodeGenerationStrategy) - Parameters:
travelOrderCodeGenerationStrategy- the travelOrderCodeGenerationStrategy to set
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()Gets the configurationService- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets the configurationService- Parameters:
configurationService- the configurationService
-