Class InvalidateZoneItemCacheOnContentValidationObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.ugc.observation.AbstractContentObserver
-
- org.ametys.plugins.ugc.observation.InvalidateZoneItemCacheOnContentValidationObserver
-
- All Implemented Interfaces:
Observer
,LogEnabled
,Contextualizable
,Serviceable
public class InvalidateZoneItemCacheOnContentValidationObserver extends AbstractContentObserver
Invalidates the ZoneItem containing a Content which has just been validated.
-
-
Field Summary
-
Fields 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 Constructor Description InvalidateZoneItemCacheOnContentValidationObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_internalObserve(Event event, Page rootPage, Content content)
Do the actual work.int
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.boolean
supports(Event event)
Checks if the event is supported.-
Methods inherited from class org.ametys.plugins.ugc.observation.AbstractContentObserver
_getTarget, _getUGCRootPages, _isUGCContent, _removeZoneItemCache, contextualize, observe, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
InvalidateZoneItemCacheOnContentValidationObserver
public InvalidateZoneItemCacheOnContentValidationObserver()
-
-
Method Detail
-
supports
public boolean supports(Event event)
Description copied from interface:Observer
Checks if the event is supported. If true, the observe(Event) method will be called.- Parameters:
event
- the event.- Returns:
true
for observing this event,false
otherwise.
-
getPriority
public int getPriority(Event event)
Description copied from interface:Observer
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Parameters:
event
- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
_internalObserve
protected void _internalObserve(Event event, Page rootPage, Content content)
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.
-
-