Class DefaultB2BOrderService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.order.impl.DefaultAbstractOrderService<OrderModel,OrderEntryModel>
de.hybris.platform.order.impl.DefaultOrderService
de.hybris.platform.b2b.services.impl.DefaultB2BOrderService
- All Implemented Interfaces:
B2BOrderService,AbstractOrderService<OrderModel,,OrderEntryModel> OrderService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
Default implementation of the
B2BOrderService- See Also:
- Spring Bean ID:
- b2bOrderService
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOrderFromCart(CartModel cart) Create the order for the givencart.voiddeleteOrder(String code) Modified to and and remove the workflow from the order when the order is deleted.Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.Gets the order with a particularAbstractOrderModel.CODE.getApprovedOrders(UserModel user) Gets the orders with a status ofOrderStatus.APPROVEDfor a user.Deprecated, for removal: This API element is subject to removal in a future version.Since 6.3.protected CreateOrderFromCartStrategyprotected B2BCustomerService<B2BCustomerModel,B2BUnitModel> protected B2BOrderDaoprotected List<QuoteEvaluationStrategy>protected B2BUnitService<B2BUnitModel,B2BCustomerModel> protected BaseDaoprotected CartToOrderCronJobModelDaogetErroredOrders(UserModel user) Gets orders for a user with statusOrderStatus.B2B_PROCESSING_ERRORprotected I18NServicegetOrderByCode(String code) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.doubleGet the amount discounted from the original price.getOrderForCode(String code) Gets the order based on it'sAbstractOrderModel.CODE.Gets the orders which are inOrderStatus.PENDING_APPROVALGets the orders which are inOrderStatus.PENDING_APPROVAL_FROM_MERCHANTDeprecated, for removal: This API element is subject to removal in a future version.Since 6.3.Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.Gets the orders with a status ofOrderStatus.REJECTED_BY_MERCHANTfor a user.getRejectedOrders(UserModel user) Gets the orders with a status ofOrderStatus.REJECTEDfor a user.Deprecated, for removal: This API element is subject to removal in a future version.Since 6.3.Get the CartToOrderCronJob with a particularCronJobModel.CODE.getScheduledOrders(UserModel user) Finds scheduled CartToOrderCronJob's for a given user.protected SearchRestrictionServicedoubleGets the total discount of a line item entry.protected UserServicebooleanChecks for item discounts.protected booleanisB2BContext(AbstractOrderModel order) booleanisQuoteAllowed(AbstractOrderModel source) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.3.voidsetB2bCreateOrderFromCartStrategy(CreateOrderFromCartStrategy b2bCreateOrderFromCartStrategy) voidsetB2bCustomerService(B2BCustomerService<B2BCustomerModel, B2BUnitModel> b2bCustomerService) voidsetB2bOrderDao(B2BOrderDao b2bOrderDao) voidsetB2bQuoteEvaluationStrategies(List<QuoteEvaluationStrategy> b2bQuoteEvaluationStrategies) voidsetB2bUnitService(B2BUnitService<B2BUnitModel, B2BCustomerModel> b2bUnitService) voidsetBaseDao(BaseDao baseDao) voidsetCartToOrderCronJobModelDao(CartToOrderCronJobModelDao cartToOrderCronJobModelDao) voidsetI18nService(I18NService i18nService) voidsetSearchRestrictionService(SearchRestrictionService searchRestrictionService) voidsetUserService(UserService userService) voidsetWorkflowProcessingService(WorkflowProcessingService workflowProcessingService) Methods inherited from class de.hybris.platform.order.impl.DefaultOrderService
addNewEntry, addNewEntry, calculateOrder, clone, placeOrder, setCreateOrderFromCartStrategy, setOrderCalculation, setPlaceOrderStrategy, setSubmitOrderStrategies, submitOrderMethods inherited from class de.hybris.platform.order.impl.DefaultAbstractOrderService
addAllGlobalDiscountValues, addAllTotalTaxValues, addEntryAtPosition, addGlobalDiscountValue, addNewEntry, addTotalTaxValue, getAbstractOrderEntryService, getAbstractOrderEntryTypeService, getCloneAbstractOrderStrategy, getCollidingEntry, getEntriesForNumber, getEntriesForProduct, getEntryForNumber, getEntryTypeCode, getGlobalDiscountValue, getOrderDao, getSaveAbstractOrderStrategy, removeGlobalDiscountValue, removeTotalTaxValue, saveOrder, setAbstractOrderEntryService, setAbstractOrderEntryTypeService, setCloneAbstractOrderStrategy, setOrderDao, setSaveAbstractOrderStrategyMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.order.AbstractOrderService
addAllGlobalDiscountValues, addAllTotalTaxValues, addGlobalDiscountValue, addNewEntry, addTotalTaxValue, clone, getEntriesForNumber, getEntriesForProduct, getEntryForNumber, getGlobalDiscountValue, removeGlobalDiscountValue, removeTotalTaxValue, saveOrderMethods inherited from interface de.hybris.platform.order.OrderService
addNewEntry, addNewEntry, calculateOrder, placeOrder, submitOrder
-
Constructor Details
-
DefaultB2BOrderService
public DefaultB2BOrderService()
-
-
Method Details
-
createOrderFromCart
Description copied from interface:OrderServiceCreate the order for the givencart. This method focuses on creating anOrderModelinstance from the givenCartModelinstance. The order instance remains unsaved and not calculated. This method does nothing with the cart member attributes (addresses, paymentInfo). It also leaves the target cart untouched.If you want to calculate cart or order, use
CalculationService.- Specified by:
createOrderFromCartin interfaceOrderService- Overrides:
createOrderFromCartin classDefaultOrderService- Parameters:
cart- the targetCartModel- Returns:
- a non persisted
OrderModel - Throws:
InvalidCartException- if the cart is invalid according to the usedCartValidator.
-
isB2BContext
-
getRejectedOrders
Description copied from interface:B2BOrderServiceGets the orders with a status ofOrderStatus.REJECTEDfor a user.- Specified by:
getRejectedOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the rejected orders
-
getScheduledOrders
Description copied from interface:B2BOrderServiceFinds scheduled CartToOrderCronJob's for a given user.- Specified by:
getScheduledOrdersin interfaceB2BOrderService- Parameters:
user- A user who had a cart scheduled for replenishment.- Returns:
- A list of cronjobs responsible for replenishment of users cart.
-
findScheduledCartToOrderJob
@Deprecated(since="4.4", forRemoval=true) public CartToOrderCronJobModel findScheduledCartToOrderJob(String code) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetScheduledCartToOrderJobForCode(String)insteadDescription copied from interface:B2BOrderServiceFind scheduled cart to order job.- Specified by:
findScheduledCartToOrderJobin interfaceB2BOrderService- Parameters:
code- the code- Returns:
- the cart to order cron job model
-
getScheduledCartToOrderJobForCode
Description copied from interface:B2BOrderServiceGet the CartToOrderCronJob with a particularCronJobModel.CODE.- Specified by:
getScheduledCartToOrderJobForCodein interfaceB2BOrderService- Parameters:
code- the cron job'sCronJobModel.CODE- Returns:
- the cart to order cron job model
-
getPendingApprovalOrders
Description copied from interface:B2BOrderServiceGets the orders which are inOrderStatus.PENDING_APPROVAL- Specified by:
getPendingApprovalOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the pending approval orders
-
getApprovedOrders
Description copied from interface:B2BOrderServiceGets the orders with a status ofOrderStatus.APPROVEDfor a user.- Specified by:
getApprovedOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the approved orders
-
getOrderByCode
Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetOrderForCode(String)insteadDescription copied from interface:B2BOrderServiceGets the order by code.- Specified by:
getOrderByCodein interfaceB2BOrderService- Parameters:
code- the code- Returns:
- the order by code
-
getAbstractOrderForCode
Description copied from interface:B2BOrderServiceGets the order with a particularAbstractOrderModel.CODE.- Specified by:
getAbstractOrderForCodein interfaceB2BOrderService- Parameters:
code- theAbstractOrderModel.CODEof the order- Returns:
- the order
-
getOrderForCode
Description copied from interface:B2BOrderServiceGets the order based on it'sAbstractOrderModel.CODE.- Specified by:
getOrderForCodein interfaceB2BOrderService- Parameters:
code- the code- Returns:
- the order
-
getErroredOrders
Description copied from interface:B2BOrderServiceGets orders for a user with statusOrderStatus.B2B_PROCESSING_ERROR- Specified by:
getErroredOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- orders that filed to process for any reason
-
getRejectedByMerchantOrders
@Deprecated(since="4.4", forRemoval=true) public List<OrderModel> getRejectedByMerchantOrders(UserModel user) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UsegetRejectedForMerchantOrders(UserModel)insteadDescription copied from interface:B2BOrderServiceGets the orders with a status ofOrderStatus.REJECTED_BY_MERCHANTfor a user.- Specified by:
getRejectedByMerchantOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the merchant rejected orders
-
getRejectedForMerchantOrders
Description copied from interface:B2BOrderServiceGets the orders with a status ofOrderStatus.REJECTED_BY_MERCHANTfor a user.- Specified by:
getRejectedForMerchantOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the merchant rejected orders
-
getPendingApprovalOrdersFromMerchant
Description copied from interface:B2BOrderServiceGets the orders which are inOrderStatus.PENDING_APPROVAL_FROM_MERCHANT- Specified by:
getPendingApprovalOrdersFromMerchantin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the pending approval orders by merchant
-
getRejectedQuoteOrders
@Deprecated(since="6.3", forRemoval=true) public List<OrderModel> getRejectedQuoteOrders(UserModel user) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.3.- Specified by:
getRejectedQuoteOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the rejected orders
-
getApprovedQuoteOrders
@Deprecated(since="6.3", forRemoval=true) public List<OrderModel> getApprovedQuoteOrders(UserModel user) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.3.- Specified by:
getApprovedQuoteOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- the approved orders
-
getPendingQuoteOrders
@Deprecated(since="6.3", forRemoval=true) public List<OrderModel> getPendingQuoteOrders(UserModel user) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.3.- Specified by:
getPendingQuoteOrdersin interfaceB2BOrderService- Parameters:
user- the user- Returns:
- List of orders
-
isQuoteAllowed
Deprecated, for removal: This API element is subject to removal in a future version.Since 6.3.- Specified by:
isQuoteAllowedin interfaceB2BOrderService- Parameters:
source- the order- Returns:
- true if quote is allowed
-
deleteOrder
Modified to and and remove the workflow from the order when the order is deleted.- Specified by:
deleteOrderin interfaceB2BOrderService- Parameters:
code- the order to delete
-
getTotalDiscount
Description copied from interface:B2BOrderServiceGets the total discount of a line item entry.- Specified by:
getTotalDiscountin interfaceB2BOrderService- Parameters:
entry- the entry line item of an order- Returns:
- the total discount
-
hasItemDiscounts
Description copied from interface:B2BOrderServiceChecks for item discounts.- Specified by:
hasItemDiscountsin interfaceB2BOrderService- Parameters:
order- the order- Returns:
- true, if successful
-
getOrderEntryDiscountAmount
Description copied from interface:B2BOrderServiceGet the amount discounted from the original price. For example if the original price is 15 and the discount is 5 off this method will return 10.- Specified by:
getOrderEntryDiscountAmountin interfaceB2BOrderService- Parameters:
entry- AnAbstractOrderEntryModel- Returns:
- The discounted amount of the original price.
-
setB2bOrderDao
-
setBaseDao
-
getI18nService
-
setI18nService
-
setB2bCustomerService
public void setB2bCustomerService(B2BCustomerService<B2BCustomerModel, B2BUnitModel> b2bCustomerService) -
getB2bCreateOrderFromCartStrategy
-
setB2bCreateOrderFromCartStrategy
public void setB2bCreateOrderFromCartStrategy(CreateOrderFromCartStrategy b2bCreateOrderFromCartStrategy) -
getCartToOrderCronJobModelDao
-
setCartToOrderCronJobModelDao
-
getB2bUnitService
-
setB2bUnitService
-
getUserService
-
setUserService
-
getSearchRestrictionService
-
setSearchRestrictionService
-
getBaseDao
-
getB2bOrderDao
-
getB2bCustomerService
-
getB2bQuoteEvaluationStrategies
-
setB2bQuoteEvaluationStrategies
@Autowired public void setB2bQuoteEvaluationStrategies(List<QuoteEvaluationStrategy> b2bQuoteEvaluationStrategies) -
getWorkflowProcessingService
-
setWorkflowProcessingService
-