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
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.presentation.cache.BroadleafTemplateCacheInvalidationContextprotected org.broadleafcommerce.common.entity.service.EntityInformationServiceprotected org.springframework.core.env.Environmentprotected org.broadleafcommerce.common.resource.service.ResourceBundlingServiceprotected org.broadleafcommerce.common.site.service.SiteServiceprotected ThemeFileServiceprotected org.broadleafcommerce.common.util.StreamingTransactionCapableUtilFields inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
entityManagerFactoryFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface com.broadleafcommerce.jobsevents.service.SystemEventConsumer
DEFAULT_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanHandleEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event) voidconsumeEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event) intgetOrder()protected voidinvalidateCacheForProfile(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 voidinvalidateCacheForSite(ThemeFile themeFile, String siteDiscriminator) Invalidates the cache for a Standard site.Methods inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
getEntityManagerFactory, setEntityManagerFactory
-
Field Details
-
transUtil
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil -
cacheInvalidationContext
protected org.broadleafcommerce.presentation.cache.BroadleafTemplateCacheInvalidationContext cacheInvalidationContext -
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
Invalidates the cache for a Profile site by invalidating the caches for each site that has this profile as it's base profile. -
invalidateCacheForSite
Invalidates the cache for a Standard site. -
getEventType
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Overrides:
getOrderin classcom.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
-