public class DefaultVoucherService extends AbstractVoucherService implements VoucherService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultVoucherService() |
getAbstractOrder, getCart, getOrder, getProduct, getRestriction, getUser, getVouchergetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplacepublic void afterOrderCreation(OrderModel order, CartModel cart)
VoucherServiceOrderManager.createOrder(de.hybris.platform.jalo.order.AbstractOrder).afterOrderCreation in interface VoucherServiceorder - the newly created ordercart - the cart which this order has been created frompublic boolean createVoucherInvalidation(String voucherCode, OrderModel order)
VoucherServiceVoucherInvalidation after the voucher is redeemed for the ordercreateVoucherInvalidation in interface VoucherServicevoucherCode - voucher code to be redeemedorder - order for which the voucher will be redeemedpublic Collection<VoucherModel> getAllVouchers()
getAllVouchers in interface VoucherServiceVoucherspublic Collection<String> getAppliedVoucherCodes(CartModel cart)
VoucherServicegetAppliedVoucherCodes in interface VoucherServicecart - cart for which the vouchers are appliedpublic Collection<String> getAppliedVoucherCodes(OrderModel order)
getAppliedVoucherCodes in interface VoucherServicepublic Collection<DiscountModel> getAppliedVouchers(AbstractOrderModel order)
getAppliedVouchers in interface VoucherServiceorder - the given orderVouchers for this orderpublic Collection<PromotionVoucherModel> getPromotionVouchers(String voucherCode)
getPromotionVouchers in interface VoucherServicevoucherCode - the codePromotionVoucherspublic Collection<SerialVoucherModel> getSerialVouchers(String voucherCode)
getSerialVouchers in interface VoucherServicevoucherCode - the codeSerialVoucherspublic VoucherModel getVoucher(String voucherCode)
getVoucher in interface VoucherServicevoucherCode - the codeVoucher for the given code. This includes PromotionVoucher and
SerialVoucher.public boolean redeemVoucher(String voucherCode, CartModel cart) throws JaloPriceFactoryException
VoucherServiceredeemVoucher in interface VoucherServicevoucherCode - code of the Vouchercart - the cartJaloPriceFactoryExceptionpublic VoucherInvalidationModel redeemVoucher(String voucherCode, OrderModel order)
redeemVoucher in interface VoucherServicepublic void releaseVoucher(String voucherCode, CartModel cart) throws JaloPriceFactoryException
VoucherServicereleaseVoucher in interface VoucherServicevoucherCode - voucher code to be releasedcart - cart for which the voucher will be releasedJaloPriceFactoryExceptionpublic void releaseVoucher(String voucherCode, OrderModel order) throws ConsistencyCheckException
releaseVoucher in interface VoucherServiceConsistencyCheckExceptionpublic VoucherInvalidationModel reserveVoucher(String voucherCode, OrderModel order)
reserveVoucher in interface VoucherServicepublic void delete(VoucherModel voucher)
delete in interface VoucherServicepublic void save(VoucherModel voucher)
save in interface VoucherServiceCopyright © 2017 SAP SE. All Rights Reserved.