Class InvalidateCacheOnContentValidationObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.ugc.observation.AbstractContentObserver
org.ametys.plugins.ugc.observation.InvalidateCacheOnContentValidationObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Prioritizable
,Supporter<Event>
,Contextualizable
,Serviceable
Observer
for observing content validation in order to
invalidate cache on front-office.-
Field Summary
FieldsFields inherited from class org.ametys.plugins.ugc.observation.AbstractContentObserver
_cocoonContext, _contentTypeHelper, _context, _resolver, _ugcPageHandler, _zoneItemCache
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_internalObserve
(Event event, Page rootPage, Content content) Do the actual work.int
Get the priority for the component.void
service
(ServiceManager serviceManager) boolean
Check if an element is supportedMethods inherited from class org.ametys.plugins.ugc.observation.AbstractContentObserver
_getTarget, _getUGCRootPages, _isUGCContent, _removeZoneItemCache, contextualize, observe
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_cachePolicy
Cache invalidation policy
-
-
Constructor Details
-
InvalidateCacheOnContentValidationObserver
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractContentObserver
- Throws:
ServiceException
-
supports
Description copied from interface:Supporter
Check if an element is supported- Parameters:
event
- The element- Returns:
true
if the element is supported,false
otherwise
-
getPriority
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Returns:
- the priority
-
_internalObserve
Description copied from class:AbstractContentObserver
Do the actual work.- Specified by:
_internalObserve
in classAbstractContentObserver
- Parameters:
event
- the observation event.rootPage
- the page holding the UGC content pagescontent
- the UGC content.
-