Class DefaultMarketingMessageService<P extends MarketingMessage>

  • All Implemented Interfaces:
    com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>, MarketingMessageService<P>

    public class DefaultMarketingMessageService<P extends MarketingMessage>
    extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
    implements MarketingMessageService<P>
    Author:
    Nathan Moore (nathanmoore).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected MarketingMessageRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()  
      String getRepositoryDomain()  
      org.springframework.data.domain.Page<P> readAllActiveByOfferIds​(Collection<String> offerIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)  
      List<P> readAllActiveByQualifierAndTargetOffersAndRequest​(Set<String> qualifierOfferIds, Set<String> targetOfferIds, ItemMarketingMessageRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds marketing messages for the given offers and locale, filtering such that locationType match any of the given values.
      List<P> readAllActiveByQualifierAndTargetOffersAndRequest​(Set<String> qualifierOfferIds, Set<String> targetOfferIds, MarketingMessageRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds marketing messages for the given offers.
      org.springframework.data.domain.Page<P> readAllByOfferId​(String offerId, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)  
      • Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService

        getRsqlHelper, readAll, readAll, readAll, readAll
      • Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService

        convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort
      • Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

        create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
      • Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

        readAll, readAll, readAll, readAll
    • Constructor Detail

      • DefaultMarketingMessageService

        public DefaultMarketingMessageService​(MarketingMessageRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository,
                                              com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
    • Method Detail

      • readAllByOfferId

        public org.springframework.data.domain.Page<P> readAllByOfferId​(String offerId,
                                                                        @Nullable
                                                                        cz.jirutka.rsql.parser.ast.Node filters,
                                                                        @Nullable
                                                                        org.springframework.data.domain.Pageable pageInfo,
                                                                        @Nullable
                                                                        com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Specified by:
        readAllByOfferId in interface MarketingMessageService<P extends MarketingMessage>
      • readAllActiveByOfferIds

        public org.springframework.data.domain.Page<P> readAllActiveByOfferIds​(Collection<String> offerIds,
                                                                               @Nullable
                                                                               cz.jirutka.rsql.parser.ast.Node filters,
                                                                               @Nullable
                                                                               org.springframework.data.domain.Pageable pageInfo,
                                                                               @Nullable
                                                                               com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Specified by:
        readAllActiveByOfferIds in interface MarketingMessageService<P extends MarketingMessage>
      • readAllActiveByQualifierAndTargetOffersAndRequest

        public List<P> readAllActiveByQualifierAndTargetOffersAndRequest​(Set<String> qualifierOfferIds,
                                                                         Set<String> targetOfferIds,
                                                                         ItemMarketingMessageRequest request,
                                                                         @Nullable
                                                                         com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Description copied from interface: MarketingMessageService
        Finds marketing messages for the given offers and locale, filtering such that locationType match any of the given values.
        Specified by:
        readAllActiveByQualifierAndTargetOffersAndRequest in interface MarketingMessageService<P extends MarketingMessage>
        Parameters:
        qualifierOfferIds - the ids of offers where the messages should be associated with the items that qualify.
        targetOfferIds - the ids of offers where the messages should be associated with the items that are targeted by the offer.
        request - an ItemMarketingMessageRequest containing the parameters by which the results will be filtered
        contextInfo - the context around sandboxing and multitenant state
        Returns:
        the marketing messages matching the given criteria
      • readAllActiveByQualifierAndTargetOffersAndRequest

        public List<P> readAllActiveByQualifierAndTargetOffersAndRequest​(Set<String> qualifierOfferIds,
                                                                         Set<String> targetOfferIds,
                                                                         MarketingMessageRequest request,
                                                                         @Nullable
                                                                         com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Description copied from interface: MarketingMessageService
        Finds marketing messages for the given offers.
        Specified by:
        readAllActiveByQualifierAndTargetOffersAndRequest in interface MarketingMessageService<P extends MarketingMessage>
        Parameters:
        qualifierOfferIds - the ids of offers where the messages should be associated with the items that qualify.
        targetOfferIds - the ids of offers where the messages should be associated with the items that are targeted by the offer.
        request - an MarketingMessageRequest containing the parameters by which the results will be filtered
        contextInfo - the context around sandboxing and multitenant state
        Returns:
        the marketing messages matching the given criteria
      • getRepository

        @NonNull
        protected MarketingMessageRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
        Overrides:
        getRepository in class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends MarketingMessage>