Class DefaultSubscriptionCommercePlaceOrderMethodHook
- java.lang.Object
-
- de.hybris.platform.subscriptionservices.subscription.impl.DefaultSubscriptionCommercePlaceOrderMethodHook
-
- All Implemented Interfaces:
CommercePlaceOrderMethodHook
public class DefaultSubscriptionCommercePlaceOrderMethodHook extends java.lang.Object implements CommercePlaceOrderMethodHook
Default implementation for the place order method hooks.
-
-
Constructor Summary
Constructors Constructor Description DefaultSubscriptionCommercePlaceOrderMethodHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult orderModel)Executed after the place ordervoidbeforePlaceOrder(CommerceCheckoutParameter parameter)Executed before the place ordervoidbeforeSubmitOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result)Executed before the submit orderprotected OrderModelcreateEnrichedOrderFromCart(CartModel masterCart, CartModel cartModel, SalesApplication salesApplication, OrderModel masterOrder)Creates anOrderModelbased on the data of the givencartModeland returns it.protected BaseSiteServicegetBaseSiteService()protected BaseStoreServicegetBaseStoreService()protected CalculationServicegetCalculationService()protected CommonI18NServicegetCommonI18NService()protected ModelServicegetModelService()protected OrderServicegetOrderService()protected PromotionsServicegetPromotionsService()voidsetBaseSiteService(BaseSiteService baseSiteService)voidsetBaseStoreService(BaseStoreService baseStoreService)voidsetCalculationService(CalculationService calculationService)voidsetCommonI18NService(CommonI18NService commonI18NService)protected voidsetDeliveryInfo(CartModel masterCart, CartModel cartModel, OrderModel orderModel)protected voidsetMasterEntryForOrderEntries(OrderModel masterOrder, OrderModel childOrder, CartModel masterCart, CartModel childCart)Sets the references for the masterEntry - childEntries relation for the created orders.voidsetModelService(ModelService modelService)voidsetOrderService(OrderService orderService)protected voidsetPaymentFromCart(CartModel cartModel, OrderModel orderModel)protected voidsetPaymentFromMasterOrder(OrderModel masterOrder, OrderModel orderModel)protected voidsetPaymentInfo(CartModel cartModel, OrderModel masterOrder, OrderModel orderModel)voidsetPromotionsService(PromotionsService promotionsService)
-
-
-
Method Detail
-
afterPlaceOrder
public void afterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult orderModel) throws InvalidCartException
Description copied from interface:CommercePlaceOrderMethodHookExecuted after the place order- Specified by:
afterPlaceOrderin interfaceCommercePlaceOrderMethodHook- Parameters:
parameter- object containing all the information for checkoutorderModel- object containing the order model- Throws:
InvalidCartException
-
beforePlaceOrder
public void beforePlaceOrder(@Nonnull CommerceCheckoutParameter parameter) throws InvalidCartExceptionDescription copied from interface:CommercePlaceOrderMethodHookExecuted before the place order- Specified by:
beforePlaceOrderin interfaceCommercePlaceOrderMethodHook- Parameters:
parameter- object containing all the information for checkout- Throws:
InvalidCartException
-
beforeSubmitOrder
public void beforeSubmitOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) throws InvalidCartException
Description copied from interface:CommercePlaceOrderMethodHookExecuted before the submit order- Specified by:
beforeSubmitOrderin interfaceCommercePlaceOrderMethodHook- Parameters:
parameter- object containing all the information for checkoutresult- object containing the order model- Throws:
InvalidCartException
-
createEnrichedOrderFromCart
protected OrderModel createEnrichedOrderFromCart(CartModel masterCart, CartModel cartModel, SalesApplication salesApplication, OrderModel masterOrder) throws InvalidCartException
Creates anOrderModelbased on the data of the givencartModeland returns it. In case a child order is created from a child cart, the child order is enriched with data of the givenmasterCartwhere necessary.- Throws:
InvalidCartException
-
setDeliveryInfo
protected void setDeliveryInfo(CartModel masterCart, CartModel cartModel, OrderModel orderModel)
-
setPaymentInfo
protected void setPaymentInfo(CartModel cartModel, OrderModel masterOrder, OrderModel orderModel)
-
setPaymentFromCart
protected void setPaymentFromCart(CartModel cartModel, OrderModel orderModel)
-
setPaymentFromMasterOrder
protected void setPaymentFromMasterOrder(OrderModel masterOrder, OrderModel orderModel)
-
setMasterEntryForOrderEntries
protected void setMasterEntryForOrderEntries(OrderModel masterOrder, OrderModel childOrder, CartModel masterCart, CartModel childCart)
Sets the references for the masterEntry - childEntries relation for the created orders.
-
getOrderService
protected OrderService getOrderService()
-
setOrderService
public void setOrderService(OrderService orderService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getBaseStoreService
protected BaseStoreService getBaseStoreService()
-
setBaseStoreService
public void setBaseStoreService(BaseStoreService baseStoreService)
-
getBaseSiteService
protected BaseSiteService getBaseSiteService()
-
setBaseSiteService
public void setBaseSiteService(BaseSiteService baseSiteService)
-
getPromotionsService
protected PromotionsService getPromotionsService()
-
setPromotionsService
public void setPromotionsService(PromotionsService promotionsService)
-
getCommonI18NService
protected CommonI18NService getCommonI18NService()
-
setCommonI18NService
public void setCommonI18NService(CommonI18NService commonI18NService)
-
getCalculationService
protected CalculationService getCalculationService()
-
setCalculationService
public void setCalculationService(CalculationService calculationService)
-
-