Class DefaultSubscriptionCommercePlaceOrderMethodHook
java.lang.Object
de.hybris.platform.subscriptionservices.subscription.impl.DefaultSubscriptionCommercePlaceOrderMethodHook
- All Implemented Interfaces:
CommercePlaceOrderMethodHook
public class DefaultSubscriptionCommercePlaceOrderMethodHook
extends Object
implements CommercePlaceOrderMethodHook
Default implementation for the place order method hooks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterPlaceOrder(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 BaseSiteServiceprotected BaseStoreServiceprotected CalculationServiceprotected CommonI18NServiceprotected ModelServiceprotected OrderServiceprotected PromotionsServicevoidsetBaseSiteService(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)
-
Constructor Details
-
DefaultSubscriptionCommercePlaceOrderMethodHook
public DefaultSubscriptionCommercePlaceOrderMethodHook()
-
-
Method Details
-
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 InvalidCartException Description 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
-
setPaymentInfo
-
setPaymentFromCart
-
setPaymentFromMasterOrder
-
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
-
setOrderService
-
getModelService
-
setModelService
-
getBaseStoreService
-
setBaseStoreService
-
getBaseSiteService
-
setBaseSiteService
-
getPromotionsService
-
setPromotionsService
-
getCommonI18NService
-
setCommonI18NService
-
getCalculationService
-
setCalculationService
-