Class ThemeFileCacheInvalidationConsumer

java.lang.Object
com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
com.broadleafcommerce.theme.service.event.ThemeFileCacheInvalidationConsumer
All Implemented Interfaces:
com.broadleafcommerce.jobsevents.service.EntityManagerFactoryAwareSystemEventConsumer, com.broadleafcommerce.jobsevents.service.SystemEventConsumer, org.springframework.core.Ordered

@Component("blThemeFileCacheInvalidationConsumer") @ConditionalOnTemplating public class ThemeFileCacheInvalidationConsumer extends com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
Author:
Chad Harchar (charchar)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.broadleafcommerce.presentation.cache.BroadleafTemplateCacheInvalidationContext
     
    protected org.broadleafcommerce.common.entity.service.EntityInformationService
     
    protected org.springframework.core.env.Environment
     
    protected org.broadleafcommerce.common.resource.service.ResourceBundlingService
     
    protected org.broadleafcommerce.common.site.service.SiteService
     
     
    protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil
     

    Fields inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer

    entityManagerFactory

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE

    Fields inherited from interface com.broadleafcommerce.jobsevents.service.SystemEventConsumer

    DEFAULT_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    canHandleEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    void
    consumeEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
     
    int
     
    protected void
    invalidateCacheForProfile(ThemeFile themeFile, String siteDiscriminator)
    Invalidates the cache for a Profile site by invalidating the caches for each site that has this profile as it's base profile.
    protected void
    invalidateCacheForSite(ThemeFile themeFile, String siteDiscriminator)
    Invalidates the cache for a Standard site.

    Methods inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer

    getEntityManagerFactory, setEntityManagerFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • transUtil

      protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil
    • cacheInvalidationContext

      protected org.broadleafcommerce.presentation.cache.BroadleafTemplateCacheInvalidationContext cacheInvalidationContext
    • themeFileService

      protected ThemeFileService themeFileService
    • siteService

      protected org.broadleafcommerce.common.site.service.SiteService siteService
    • entityInformationService

      protected org.broadleafcommerce.common.entity.service.EntityInformationService entityInformationService
    • resourceBundlingService

      protected org.broadleafcommerce.common.resource.service.ResourceBundlingService resourceBundlingService
    • environment

      @Autowired protected org.springframework.core.env.Environment environment
  • Constructor Details

    • ThemeFileCacheInvalidationConsumer

      public ThemeFileCacheInvalidationConsumer()
  • Method Details

    • canHandleEvent

      protected boolean canHandleEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • consumeEvent

      public void consumeEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • invalidateCacheForProfile

      protected void invalidateCacheForProfile(ThemeFile themeFile, String siteDiscriminator)
      Invalidates the cache for a Profile site by invalidating the caches for each site that has this profile as it's base profile.
      Parameters:
      themeFile - ThemeFile the theme file to invalidate the cache for
      siteDiscriminator - String the profile id String
    • invalidateCacheForSite

      protected void invalidateCacheForSite(ThemeFile themeFile, String siteDiscriminator)
      Invalidates the cache for a Standard site.
      Parameters:
      themeFile - ThemeFile the theme file to invalidate the cache for
      siteDiscriminator - String the profile id String
    • getEventType

      public String getEventType()
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Overrides:
      getOrder in class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer