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 Details

    • DefaultTravelPlaceOrderMethodHook

      public DefaultTravelPlaceOrderMethodHook()
  • Method Details

    • beforePlaceOrder

      public void beforePlaceOrder(CommerceCheckoutParameter parameter) throws de.hybris.platform.order.InvalidCartException
      Specified by:
      beforePlaceOrder in interface de.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:
      afterPlaceOrder in interface de.hybris.platform.commerceservices.order.hook.CommercePlaceOrderMethodHook
      Throws:
      de.hybris.platform.order.InvalidCartException
    • isAmendFlow

      protected boolean isAmendFlow(CartModel cart)
      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:
      beforeSubmitOrder in interface de.hybris.platform.commerceservices.order.hook.CommercePlaceOrderMethodHook
      Throws:
      de.hybris.platform.order.InvalidCartException
    • setBookingJourney

      protected void setBookingJourney(OrderModel orderModel, CartModel cartModel)
      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 model
      cartModel -
    • setDeliveryAddress

      protected void setDeliveryAddress(OrderModel orderModel)
    • calculcateTotalAndTaxes

      protected void calculcateTotalAndTaxes(OrderModel orderModel)
    • 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

      protected TravelCommerceStockService getCommerceStockService()
      Returns:
      the commerceStockService
    • setCommerceStockService

      public void setCommerceStockService(TravelCommerceStockService commerceStockService)
      Parameters:
      commerceStockService - the commerceStockService to set
    • getBookingService

      protected BookingService getBookingService()
      Returns:
      the bookingService
    • setBookingService

      public void setBookingService(BookingService bookingService)
      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

      protected TravelOrderCodeGenerationStrategy 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