Class DefaultCustomerCouponService
java.lang.Object
de.hybris.platform.couponservices.services.impl.DefaultCouponService
de.hybris.platform.customercouponservices.impl.DefaultCustomerCouponService
- All Implemented Interfaces:
CouponService,CustomerCouponService
public class DefaultCustomerCouponService
extends DefaultCouponService
implements CustomerCouponService
Default implementation of
CustomerCouponService-
Field Summary
Fields inherited from class de.hybris.platform.couponservices.services.impl.DefaultCouponService
COUPON_CODE, ORDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassignCouponToCustomer(String couponCode, CustomerModel customer) Assigns the customer coupon to the current customerintCounts the number of products and categories mapped with promotion source rulegetAssignableCustomerCoupons(CustomerModel customer, String text) Gets assignable customer couponsgetAssignedCustomerCouponsForCustomer(CustomerModel customer, String text) Gets assigned customer couponsprotected CategoryServiceprotected CommonI18NServiceGets customer coupon codes by promotion source ruleprotected CouponDaoprotected CouponNotificationDaoGets coupon notifications for the customerbooleangetCouponNotificationStatus(String couponCode) Gets coupon notification status by coupon codeprotected CouponRedemptionDaoprotected CustomerCouponDaogetCustomerCouponForCode(String couponCode) Gets customer coupon models by coupon codegetCustomerCouponsForCustomer(CustomerModel customer, PageableData pageableData) Gets paginated customer coupon models for the customer by pageableDataGets effective customer coupons of the customergetExclPromotionSourceRulesForCategory(String categoryCode) Gets excluded promotion source rules by categorygetExclPromotionSourceRulesForProduct(String productCode) Gets excluded promotion source rules by product codeprotected LanguageDaogetPaginatedCouponsForCustomer(CustomerModel customer, SearchPageData searchPageData) Gets paginated customer coupon data by searchPageDataprotected PromotionsDaogetPromotionSourceRuleForCouponCode(String couponCode) Gets promotion source rule by coupon codegetPromotionSourceRulesForCategory(String categoryCode) Gets promotion source rules by categorygetPromotionSourceRulesForProduct(String productCode) Gets promotion source rules by product codeGets promotionSourceRule for categories of productprotected UserServicegetValidCustomerCouponByCode(String couponCode) Gets valid customer coupon models by coupon codevoidremoveCouponForCustomer(String couponCode, CustomerModel customer) Removes customer coupon for the customervoidremoveCouponNotificationByCode(String couponCode) Removes customer coupon notificationsaveCouponNotification(String couponCode) Saves customer coupon notificationvoidsetCategoryService(CategoryService categoryService) voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetCouponDao(CouponDao couponDao) voidsetCouponNotificationDao(CouponNotificationDao couponNotificationDao) voidsetCouponRedemptionDao(CouponRedemptionDao couponRedemptionDao) voidsetCustomerCouponDao(CustomerCouponDao customerCouponDao) voidsetLanguageDao(LanguageDao languageDao) voidsetPromotionsDao(PromotionsDao promotionsDao) voidsetUserService(UserService userService) protected BooleanvalidateCouponDate(Date startDate, Date endDate, Date now) Methods inherited from class de.hybris.platform.couponservices.services.impl.DefaultCouponService
assertCouponCodeInOrder, checkMatch, clearCouponCode, containsCouponCode, getBaseSiteService, getCalculationService, getCouponCodeGenerationService, getCouponForCode, getCouponManagementService, getModelService, getPromotionGroups, getPromotionsService, getValidatedCouponForCode, recalculateOrder, redeemCoupon, redeemCoupon, redeemCouponCode, releaseCouponCode, removeCouponAndTriggerCalculation, setBaseSiteService, setCalculationService, setCouponCodeGenerationService, setCouponManagementService, setModelService, setPromotionsService, validateCouponCode, verifyCouponCodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.couponservices.services.CouponService
getCouponForCode, getValidatedCouponForCode, redeemCoupon, redeemCoupon, releaseCouponCode, validateCouponCode, verifyCouponCode
-
Constructor Details
-
DefaultCustomerCouponService
public DefaultCustomerCouponService()
-
-
Method Details
-
getCustomerCouponsForCustomer
public SearchPageData<CustomerCouponModel> getCustomerCouponsForCustomer(CustomerModel customer, PageableData pageableData) Description copied from interface:CustomerCouponServiceGets paginated customer coupon models for the customer by pageableData- Specified by:
getCustomerCouponsForCustomerin interfaceCustomerCouponService- Parameters:
customer- the customer modelpageableData- the data used for pagination- Returns:
- the paginated customer coupon models
-
getValidCustomerCouponByCode
Description copied from interface:CustomerCouponServiceGets valid customer coupon models by coupon code- Specified by:
getValidCustomerCouponByCodein interfaceCustomerCouponService- Parameters:
couponCode- the coupon code- Returns:
- the optional of CustomerCouponModel
-
validateCouponDate
-
assignCouponToCustomer
Description copied from interface:CustomerCouponServiceAssigns the customer coupon to the current customer- Specified by:
assignCouponToCustomerin interfaceCustomerCouponService- Parameters:
couponCode- the coupon codecustomer- the customer model
-
getPromotionSourceRuleForCouponCode
Description copied from interface:CustomerCouponServiceGets promotion source rule by coupon code- Specified by:
getPromotionSourceRuleForCouponCodein interfaceCustomerCouponService- Parameters:
couponCode- the coupon code- Returns:
- the list of PromotionSourceRuleModel
-
getPromotionSourceRulesForProduct
Description copied from interface:CustomerCouponServiceGets promotion source rules by product code- Specified by:
getPromotionSourceRulesForProductin interfaceCustomerCouponService- Parameters:
productCode- the product code- Returns:
- the list of PromotionSourceRuleModel
-
getExclPromotionSourceRulesForProduct
Description copied from interface:CustomerCouponServiceGets excluded promotion source rules by product code- Specified by:
getExclPromotionSourceRulesForProductin interfaceCustomerCouponService- Parameters:
productCode- the product code- Returns:
- the list of PromotionSourceRuleModel
-
getPromotionSourceRulesForCategory
Description copied from interface:CustomerCouponServiceGets promotion source rules by category- Specified by:
getPromotionSourceRulesForCategoryin interfaceCustomerCouponService- Parameters:
categoryCode- the category code- Returns:
- the list of PromotionSourceRuleModel
-
getExclPromotionSourceRulesForCategory
Description copied from interface:CustomerCouponServiceGets excluded promotion source rules by category- Specified by:
getExclPromotionSourceRulesForCategoryin interfaceCustomerCouponService- Parameters:
categoryCode- the category code- Returns:
- the list of PromotionSourceRuleModel
-
getCouponCodeForPromotionSourceRule
Description copied from interface:CustomerCouponServiceGets customer coupon codes by promotion source rule- Specified by:
getCouponCodeForPromotionSourceRulein interfaceCustomerCouponService- Parameters:
code- the promotion source rule code- Returns:
- the list of customer coupon codes
-
countProductOrCategoryForPromotionSourceRule
Description copied from interface:CustomerCouponServiceCounts the number of products and categories mapped with promotion source rule- Specified by:
countProductOrCategoryForPromotionSourceRulein interfaceCustomerCouponService- Parameters:
code- the promotion source rule code- Returns:
- the total number of products and categories mapped with promotion source rule
-
saveCouponNotification
Description copied from interface:CustomerCouponServiceSaves customer coupon notification- Specified by:
saveCouponNotificationin interfaceCustomerCouponService- Parameters:
couponCode- the coupon code- Returns:
- the optional of CouponNotificationModel
-
removeCouponNotificationByCode
Description copied from interface:CustomerCouponServiceRemoves customer coupon notification- Specified by:
removeCouponNotificationByCodein interfaceCustomerCouponService- Parameters:
couponCode- the coupon code
-
getCouponNotificationStatus
Description copied from interface:CustomerCouponServiceGets coupon notification status by coupon code- Specified by:
getCouponNotificationStatusin interfaceCustomerCouponService- Parameters:
couponCode- the coupon code- Returns:
- true if the current customer has subscribed to the coupon notification and false otherwise
-
removeCouponForCustomer
Description copied from interface:CustomerCouponServiceRemoves customer coupon for the customer- Specified by:
removeCouponForCustomerin interfaceCustomerCouponService- Parameters:
couponCode- the coupon codecustomer- the customer model
-
getCustomerCouponForCode
Description copied from interface:CustomerCouponServiceGets customer coupon models by coupon code- Specified by:
getCustomerCouponForCodein interfaceCustomerCouponService- Parameters:
couponCode- the coupon code- Returns:
- the optional of CustomerCouponModel, single and multi coupon will return null
-
getCouponNotificationsForCustomer
Description copied from interface:CustomerCouponServiceGets coupon notifications for the customer- Specified by:
getCouponNotificationsForCustomerin interfaceCustomerCouponService- Parameters:
customer- the customer model- Returns:
- the list of CouponNotificationModel
-
getEffectiveCustomerCouponsForCustomer
Description copied from interface:CustomerCouponServiceGets effective customer coupons of the customer- Specified by:
getEffectiveCustomerCouponsForCustomerin interfaceCustomerCouponService- Parameters:
customer- the customer model- Returns:
- the list of CustomerCouponModel
-
getAssignableCustomerCoupons
Description copied from interface:CustomerCouponServiceGets assignable customer coupons- Specified by:
getAssignableCustomerCouponsin interfaceCustomerCouponService- Parameters:
customer- the customer modeltext- the text used for searching assignable customer coupons- Returns:
- the list of CustomerCouponModel
-
getAssignedCustomerCouponsForCustomer
public List<CustomerCouponModel> getAssignedCustomerCouponsForCustomer(CustomerModel customer, String text) Description copied from interface:CustomerCouponServiceGets assigned customer coupons- Specified by:
getAssignedCustomerCouponsForCustomerin interfaceCustomerCouponService- Parameters:
customer- the customer modeltext- the text used for searching assigned customer coupons- Returns:
- the list of CustomerCouponModel
-
getPaginatedCouponsForCustomer
public SearchPageData<CustomerCouponModel> getPaginatedCouponsForCustomer(CustomerModel customer, SearchPageData searchPageData) Description copied from interface:CustomerCouponServiceGets paginated customer coupon data by searchPageData- Specified by:
getPaginatedCouponsForCustomerin interfaceCustomerCouponService- Parameters:
customer- the customer modelsearchPageData- the data used for pagination- Returns:
- the paginated customer coupon models
-
getPromotionSourcesRuleForProductCategories
public List<PromotionSourceRuleModel> getPromotionSourcesRuleForProductCategories(ProductModel product) Description copied from interface:CustomerCouponServiceGets promotionSourceRule for categories of product- Specified by:
getPromotionSourcesRuleForProductCategoriesin interfaceCustomerCouponService- Parameters:
product- the product model- Returns:
- the list of PromotionSourceRuleModel
-
getCouponRedemptionDao
-
setCouponRedemptionDao
-
getCustomerCouponDao
-
setCustomerCouponDao
-
getUserService
-
setUserService
-
getPromotionsDao
-
setPromotionsDao
-
getLanguageDao
-
setLanguageDao
-
getCouponDao
-
setCouponDao
-
getCouponNotificationDao
-
setCouponNotificationDao
-
getCommonI18NService
-
setCommonI18NService
-
getCategoryService
-
setCategoryService
-