Class MarketingServiceImpl

    • Field Detail

      • mongoTemplate

        @Autowired
        private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
      • appContext

        @Autowired
        private org.springframework.context.ApplicationContext appContext
    • Constructor Detail

      • MarketingServiceImpl

        public MarketingServiceImpl()
    • Method Detail

      • searchUserAnalytics

        public java.util.LinkedHashSet<UserAuditSettings> searchUserAnalytics​(java.lang.String requestJson)
        Description copied from interface: MarketingService
        This method does search requests and returns data as list.
        Specified by:
        searchUserAnalytics in interface MarketingService
        Parameters:
        requestJson - search request
        Returns:
        data transport entities as list
      • searchUserAnalyticsPaged

        public org.springframework.data.domain.Page<UserAuditSettings> searchUserAnalyticsPaged​(java.lang.String requestJson)
        Description copied from interface: MarketingService
        This method does search requests and returns data as pages.
        Specified by:
        searchUserAnalyticsPaged in interface MarketingService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • getPaginationAnalyticsData

        public java.util.Deque<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationAnalyticsData​(java.lang.String requestJson)
        Description copied from interface: MarketingService
        This method does calculation for a pages based on the request.
        Specified by:
        getPaginationAnalyticsData in interface MarketingService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • getCustomersReport

        public java.util.List<CustomerReport> getCustomersReport()
        Description copied from interface: MarketingService
        This method is used to generate a report which contains all registered customers
        Specified by:
        getCustomersReport in interface MarketingService
        Returns:
        a list of entities for each customer
      • generateDashlyHash

        public java.lang.String generateDashlyHash()
        Description copied from interface: MarketingService
        This method generates the hash with algorithm HMAC SHA 256 for Dashly Analytics Platform
        Specified by:
        generateDashlyHash in interface MarketingService
        Returns:
        hash calculated by the HMAC SHA 256
      • getSeoMetaData

        public java.util.Map<java.lang.String,​java.lang.Object> getSeoMetaData​(java.lang.String seoUrl,
                                                                                     java.lang.String repositoryName)
        Description copied from interface: MarketingService
        This method does search request for database entity based on seo URL property
        Specified by:
        getSeoMetaData in interface MarketingService
        Parameters:
        seoUrl - this is SEO-url, human-readable value
        repositoryName - repository name from where will be returned data
        Returns:
        map-representation of data
      • getSeoUrl

        public java.lang.String getSeoUrl​(java.lang.String id,
                                          java.lang.String repositoryName)
        Description copied from interface: MarketingService
        This method does search request for seo URL property
        Specified by:
        getSeoUrl in interface MarketingService
        Parameters:
        id - this is entity id
        repositoryName - repository name from where will be returned data
        Returns:
        SEO-url value as a string
      • getSeoUrlAsValue

        public java.util.Map<java.lang.String,​java.lang.Object> getSeoUrlAsValue​(java.lang.String id,
                                                                                       java.lang.String repositoryName)
        Description copied from interface: MarketingService
        This method does search request for seo URL property
        Specified by:
        getSeoUrlAsValue in interface MarketingService
        Parameters:
        id - this is entity id
        repositoryName - repository name from where will be returned data
        Returns:
        map-representation of data
      • getSeoUrlByLang

        public java.lang.String getSeoUrlByLang​(java.lang.String id,
                                                java.lang.String lang,
                                                java.lang.String repositoryName)
        Description copied from interface: MarketingService
        This method does search request for seo URL property
        Specified by:
        getSeoUrlByLang in interface MarketingService
        Parameters:
        id - this is entity id
        lang - iso code for language
        repositoryName - repository name from where will be returned data
        Returns:
        SEO-url value as a string
      • saveSearchRequest

        public boolean saveSearchRequest​(java.lang.String searchTerm)
        Description copied from interface: MarketingService
        Saves the search request with the specified search term.
        Specified by:
        saveSearchRequest in interface MarketingService
        Parameters:
        searchTerm - the search term to be saved
        Returns:
        true if the search request is successfully saved, false otherwise