Class DefaultSingleCodeCouponRedemptionStrategy
- java.lang.Object
-
- de.hybris.platform.couponservices.redemption.strategies.impl.DefaultSingleCodeCouponRedemptionStrategy
-
- All Implemented Interfaces:
CouponRedemptionStrategy<SingleCodeCouponModel>
public class DefaultSingleCodeCouponRedemptionStrategy extends java.lang.Object implements CouponRedemptionStrategy<SingleCodeCouponModel>
The strategy provides methods for checking the single code coupon capability of being redeemed.
-
-
Constructor Summary
Constructors Constructor Description DefaultSingleCodeCouponRedemptionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckSingleCodeCouponRedeemable(SingleCodeCouponModel coupon)protected booleancheckSingleCodeCouponRedeemableForUser(SingleCodeCouponModel coupon, UserModel user)protected CouponRedemptionDaogetCouponRedemptionDao()booleanisCouponRedeemable(SingleCodeCouponModel coupon, UserModel user, java.lang.String couponCode)Check the whether coupon meets the conditions required in order to be redeemed.booleanisRedeemable(SingleCodeCouponModel coupon, AbstractOrderModel abstractOrder, java.lang.String couponCode)Check the whether coupon meets the conditions required in order to be redeemed.voidsetCouponRedemptionDao(CouponRedemptionDao couponRedemptionDao)
-
-
-
Method Detail
-
isRedeemable
public boolean isRedeemable(SingleCodeCouponModel coupon, AbstractOrderModel abstractOrder, java.lang.String couponCode)
Description copied from interface:CouponRedemptionStrategyCheck the whether coupon meets the conditions required in order to be redeemed.- Specified by:
isRedeemablein interfaceCouponRedemptionStrategy<SingleCodeCouponModel>- Parameters:
coupon-AbstractCouponModelcoupon to redeemabstractOrder-AbstractOrderModelto redeem couponcouponCode- the coupon code to check- Returns:
- boolean true if coupon could be redeem at cart/order or false if it cannot be redeemed.
-
isCouponRedeemable
public boolean isCouponRedeemable(SingleCodeCouponModel coupon, UserModel user, java.lang.String couponCode)
Description copied from interface:CouponRedemptionStrategyCheck the whether coupon meets the conditions required in order to be redeemed.- Specified by:
isCouponRedeemablein interfaceCouponRedemptionStrategy<SingleCodeCouponModel>- Parameters:
coupon-AbstractCouponModelcoupon to redeemuser-UserModelto redeem couponcouponCode- the coupon code to check- Returns:
- boolean true if coupon could be redeem at cart/order or false if it cannot be redeemed.
-
checkSingleCodeCouponRedeemableForUser
protected boolean checkSingleCodeCouponRedeemableForUser(SingleCodeCouponModel coupon, UserModel user)
-
checkSingleCodeCouponRedeemable
protected boolean checkSingleCodeCouponRedeemable(SingleCodeCouponModel coupon)
-
getCouponRedemptionDao
protected CouponRedemptionDao getCouponRedemptionDao()
-
setCouponRedemptionDao
public void setCouponRedemptionDao(CouponRedemptionDao couponRedemptionDao)
-
-