public class DefaultCsPromotionService extends AbstractBusinessService implements CsPromotionService
CsPromotionService interface. This service is auto-wired with the hybris
PromotionsService if the spring bean is defined. This implementation then uses reflection to expose the
functionality of the promotions service.AbstractService.SerializableDTO| Modifier and Type | Field and Description |
|---|---|
protected static Class |
ORDER_PROMOTION_MODEL_CLASS |
protected static Class |
PROMOTION_ORDER_ENTRY_CONSUMED_MODEL_CLASS |
protected static Class |
PROMOTION_PRODUCT_MODEL_CLASS |
protected static Class |
PROMOTION_RESULT_MODEL_CLASS |
modelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCsPromotionService() |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplaceprotected static final Class PROMOTION_ORDER_ENTRY_CONSUMED_MODEL_CLASS
protected static final Class PROMOTION_RESULT_MODEL_CLASS
protected static final Class PROMOTION_PRODUCT_MODEL_CLASS
protected static final Class ORDER_PROMOTION_MODEL_CLASS
public void setPromotionsService(Object promotionsService)
public BaseSiteService getBaseSiteService()
public void setBaseSiteService(BaseSiteService baseSiteService)
protected WrappedPromotionsService getPromotionsService()
protected WrappedPromotionGroupModel getDefaultPromotionGroup()
public boolean isPromotionServiceAvailable()
CsPromotionServiceisPromotionServiceAvailable in interface CsPromotionServicepublic List<WrappedPromotionModel> getProductPromotions(ProductModel product, boolean evaluateRestrictions, Date currentTime)
CsPromotionServicegetProductPromotions in interface CsPromotionServiceproduct - The product to checkevaluateRestrictions - Flag to enable checking of promotion restrictions (set to true if you don't know)currentTime - The effective time to evaluate the promotions (can be null for current time)protected boolean listContains(List<WrappedPromotionModel> list, WrappedPromotionModel item)
public AbstractItemModelReflectionWrapper unwrapPromotionTypedObject(TypedObject item)
CsPromotionServiceunwrapPromotionTypedObject in interface CsPromotionServiceitem - The TypedObject to unwrappublic List<TypedObject> wrapInTypedObjects(List<? extends AbstractItemModelReflectionWrapper> lines)
CsPromotionServicewrapInTypedObjects in interface CsPromotionServicelines - The list of wrappers to convertprotected List<CartLineItem> getPromotionResultConsumedEntries(List<WrappedPromotionResultModel> promotionResults)
protected List<CartLineItem> getWrappedOrderEntriesAndPotentialPromotionResults(List<WrappedWrappedOrderEntry> wrappedOrderEntries)
public List<CartLineItem> getOrderCombinedPromotionsAndEntries(AbstractOrderModel cart)
CsPromotionServicegetOrderCombinedPromotionsAndEntries in interface CsPromotionServicecart - The orderpublic List<WrappedPromotionResultModel> getAppliedPromotionResults(AbstractOrderModel cart, boolean includeOrderPromotions, boolean includeProductPromotions)
CsPromotionServicegetAppliedPromotionResults in interface CsPromotionServicecart - The orderincludeOrderPromotions - Set to true to include order promotionsincludeProductPromotions - Set to true to include product promotionspublic List<WrappedPromotionResultModel> getPotentialOrderPromotionResults(AbstractOrderModel cart)
CsPromotionServicegetPotentialOrderPromotionResults in interface CsPromotionServicecart - The orderCopyright © 2017 SAP SE. All Rights Reserved.