public class InvalidatePageCacheExplorerObserver extends AbstractLogEnabled implements Observer, Serviceable
Modifier and Type | Field and Description |
---|---|
private static Pattern |
__RESOURCE_PATTERN |
private static Pattern |
__ROOT_SITE_RESOURCE_PATTERN |
private static Set<String> |
__XPATH_ZONEITEM_SERVICE |
private AmetysObjectResolver |
_resolver |
private SiteManager |
_siteManager |
private static Set<String> |
_TYPES |
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
InvalidatePageCacheExplorerObserver() |
Modifier and Type | Method and Description |
---|---|
private void |
doObserve(Site site,
Event event) |
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
protected String |
getSiteName(Event event)
Get the origin of the event.
|
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager manager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
getLogger, setLogger
private static final Set<String> __XPATH_ZONEITEM_SERVICE
private static final Pattern __RESOURCE_PATTERN
private static final Pattern __ROOT_SITE_RESOURCE_PATTERN
private SiteManager _siteManager
private AmetysObjectResolver _resolver
public InvalidatePageCacheExplorerObserver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public int getPriority(Event event)
Observer
getPriority
in interface Observer
event
- the event.public boolean supports(Event event)
Observer
public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observer
observe
in interface Observer
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception
- if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.protected String getSiteName(Event event)
event
- the event.