Class DefaultProductInterestService

    • Constructor Detail

      • DefaultProductInterestService

        public DefaultProductInterestService()
    • Method Detail

      • getProductInterest

        public java.util.Optional<ProductInterestModel> getProductInterest​(ProductModel productModel,
                                                                           CustomerModel customerModel,
                                                                           NotificationType notificationType,
                                                                           BaseStoreModel baseStore,
                                                                           BaseSiteModel baseSite)
        Description copied from interface: ProductInterestService
        This method is used to find the ProductInterestModel by productModel, customerModel, notificationType, baseStore,baseSite.
        Specified by:
        getProductInterest in interface ProductInterestService
        Parameters:
        productModel - the product of the ProductInterest
        customerModel - the customer of the ProductInterest
        notificationType - the notificationType of the ProductInterest
        baseStore - the baseStore of the ProductInterest
        baseSite - the baseSite of the ProductInterest
        Returns:
        ProductInterestModel if found and an empty Optional otherwise
      • getProductInterests

        public java.util.List<ProductInterestModel> getProductInterests​(CustomerModel customerModel,
                                                                        BaseStoreModel baseStore,
                                                                        BaseSiteModel baseSite)
        Description copied from interface: ProductInterestService
        This method is used to find the expired and effective ProductInterestModels by productModel, customerModel, notificationType, baseStore,baseSite.
        Specified by:
        getProductInterests in interface ProductInterestService
        Parameters:
        customerModel - the customer of the ProductInterest
        baseStore - the baseStore of the ProductInterest
        baseSite - the baseSite of the ProductInterest
        Returns:
        ProductInterestModel if found and an empty Optional otherwise
      • removeAllProductInterests

        public void removeAllProductInterests​(java.lang.String productCode)
        Description copied from interface: ProductInterestService
        This method will remove the interest for the current customer by product.
        Specified by:
        removeAllProductInterests in interface ProductInterestService
        Parameters:
        productCode - the code of the product
      • fillProductModelMap

        protected void fillProductModelMap​(java.util.Map<ProductModel,​java.util.Map<NotificationType,​java.util.Date>> productModelMap,
                                           java.lang.String productPk,
                                           java.util.Map<java.lang.String,​java.lang.String> interestCreationMap)
      • buildInterestMap

        protected java.util.Map<NotificationType,​java.util.Date> buildInterestMap​(java.util.Map<java.lang.String,​java.lang.String> interestCreationMap)
        build interest data as a linked map
        Parameters:
        interestCreationMap -
        Returns:
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • setProductInterestDao

        public void setProductInterestDao​(ProductInterestDao productInterestDao)
      • getUserService

        protected UserService getUserService()
      • setUserService

        public void setUserService​(UserService userService)
      • setBaseStoreService

        public void setBaseStoreService​(BaseStoreService baseStoreService)
      • setBaseSiteService

        public void setBaseSiteService​(BaseSiteService baseSiteService)