public class VoucherManager extends GeneratedVoucherManager
Extension.RestrictedLanguagesProvider, Extension.RightsProviderManager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreatorDEFAULT_INITIAL_ATTRIBUTES| Constructor and Description |
|---|
VoucherManager() |
createDateRestriction, createDateRestriction, createNewCustomerRestriction, createNewCustomerRestriction, createOrderRestriction, createOrderRestriction, createProductCategoryRestriction, createProductCategoryRestriction, createProductQuantityRestriction, createProductQuantityRestriction, createProductRestriction, createProductRestriction, createPromotionVoucher, createPromotionVoucher, createRegularCustomerOrderQuantityRestriction, createRegularCustomerOrderQuantityRestriction, createRegularCustomerOrderTotalRestriction, createRegularCustomerOrderTotalRestriction, createRestriction, createRestriction, createSerialVoucher, createSerialVoucher, createUserRestriction, createUserRestriction, createVoucherInvalidation, createVoucherInvalidation, getDefaultAttributeModes, getNamecheckBeforeItemRemoval, createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, isCreatorDisabled, notifyInitializationEnd, notifyInitializationStart, notifyItemRemoval, onFirstSessionCreation, writeReplaceafterItemCreation, beforeItemCreation, destroy, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, unwrap, unwrap, wrappublic void createEssentialData(Map params, JspContext jspc)
createEssentialData in class Extensionpublic void afterOrderCreation(Order order, Cart cart)
OrderManager.createOrder(AbstractOrder).order - the newly created ordercart - the cart which this order has been created frompublic void afterOrderCreation(SessionContext ctx, Order order, Cart cart)
OrderManager.createOrder(AbstractOrder).ctx - the session contextorder - the newly created ordercart - the cart which this order has been created frompublic Collection getAllVouchers()
Voucherspublic Collection<String> getAppliedVoucherCodes(Cart item)
public Collection<String> getAppliedVoucherCodes(Order order)
public Collection<String> getAppliedVoucherCodes(SessionContext ctx, Order order)
public Collection<String> getAppliedVoucherCodes(SessionContext ctx, Cart item)
public Collection getAppliedVouchers(AbstractOrder anOrder)
anOrder - the given orderVouchers for this orderpublic static VoucherManager getInstance(JaloSession jaloSession)
jaloSession - the Jalo Sessionpublic static VoucherManager getInstance()
public Voucher getVoucher(String voucherCode)
voucherCode - the codeVoucher for the given code. This includes PromotionVoucher and
SerialVoucher.public Collection getPromotionVouchers(String voucherCode)
voucherCode - the codePromotionVoucherspublic Collection getSerialVouchers(String aVoucherCode)
aVoucherCode - the codeSerialVoucherspublic boolean redeemVoucher(String aVoucherCode, Cart aCart) throws JaloPriceFactoryException
Cart the given Voucher will be redeem.
WARNING!
If some methods for checking voucher availability are called before this method, all these methods have to be in
one synchronize block! Suggested synchronization object is cart.
aVoucherCode - code of the VoucheraCart - the cartJaloPriceFactoryExceptionpublic VoucherInvalidation redeemVoucher(String aVoucherCode, Order anOrder)
public void releaseVoucher(String aVoucherCode, Cart aCart) throws JaloPriceFactoryException
JaloPriceFactoryExceptionpublic void releaseVoucher(String aVoucherCode, Order anOrder) throws ConsistencyCheckException
ConsistencyCheckExceptionpublic VoucherInvalidation reserveVoucher(String aVoucherCode, Order anOrder)
Copyright © 2017 SAP SE. All Rights Reserved.