Class AbstractCouponWsFacades<D extends AbstractCouponWsDTO,​M extends AbstractCouponModel>

    • Constructor Detail

      • AbstractCouponWsFacades

        public AbstractCouponWsFacades()
    • Method Detail

      • getCouponWsDTO

        @Cacheable(value="couponWsCache",
                   key="T(de.hybris.platform.webservicescommons.cache.CacheKeyGenerator).generateKey(false,false,\'getCouponWsDTO\',#value)")
        public D getCouponWsDTO​(java.lang.String couponId)
        Description copied from interface: CouponWsFacades
        Given the couponId string, returns the coupon DTO, otherwise throws exception
        Specified by:
        getCouponWsDTO in interface CouponWsFacades<D extends AbstractCouponWsDTO>
        Parameters:
        couponId - a string to be used to find a coupon
        Returns:
        - an instance of coupon DTO
      • createCoupon

        public D createCoupon​(D coupon)
        Description copied from interface: CouponWsFacades
        Creates the coupon, given the coupon data. Throws exception otherwise
        Specified by:
        createCoupon in interface CouponWsFacades<D extends AbstractCouponWsDTO>
        Parameters:
        coupon - - data to create coupon with
        Returns:
        - a new instance of coupon
      • updateCouponStatus

        public void updateCouponStatus​(java.lang.String couponId,
                                       java.lang.Boolean active)
        Description copied from interface: CouponWsFacades
        Updates status of a coupon identified by it couponId
        Specified by:
        updateCouponStatus in interface CouponWsFacades<D extends AbstractCouponWsDTO>
        Parameters:
        couponId - - identifier of a coupon to set status
        active - - coupon status to set
      • assertCouponModelType

        protected abstract void assertCouponModelType​(AbstractCouponModel couponModel,
                                                      java.lang.String couponId)
      • updateCouponModel

        protected abstract M updateCouponModel​(D couponWsDTO)
      • createCouponModel

        protected abstract M createCouponModel​(D couponWsDTO)
      • getCouponPaginatedGenericDao

        protected abstract PaginatedGenericDao<M> getCouponPaginatedGenericDao()
      • getCouponId

        protected abstract java.lang.String getCouponId​(java.lang.String couponCode)
      • convertSearchPageData

        protected <S extends AbstractCouponModelSearchPageData<D> convertSearchPageData​(SearchPageData<S> source)
        Converts the result of SearchPageData
        Type Parameters:
        S - original type of searchPageData's results
        Parameters:
        source - searchPageData containing original results
        Returns:
        converted SearchPageData
      • convertSearchPageData

        protected <S extends AbstractCouponModelSearchPageData<D> convertSearchPageData​(SearchPageData<S> source)
        Converts the result of SearchPageData
        Type Parameters:
        S - original type of searchPageData's results
        Parameters:
        source - searchPageData containing original results
        Returns:
        converted SearchPageData
      • assertCouponNotActive

        protected void assertCouponNotActive​(AbstractCouponModel couponModel,
                                             java.lang.String message)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • getCouponDao

        protected CouponDao getCouponDao()
      • setCouponDao

        public void setCouponDao​(CouponDao couponDao)
      • setCouponWsUtils

        public void setCouponWsUtils​(CouponWsUtils couponWsUtils)
      • setCouponService

        public void setCouponService​(CouponService couponService)
      • getUserService

        protected UserService getUserService()
      • setUserService

        public void setUserService​(UserService userService)