public class InvalidateCacheOnOrgunitChangedObserver extends AbstractLogEnabled implements Observer, Serviceable
Observer for observing OrgUnit validation, unpublishing, deletion or moving
(with event ObservationConstants.EVENT_CONTENT_MODIFIED, which will lead to sometimes invalidating cache whereas it is not necessary)
in order to invalidate cache on front-office.| Modifier and Type | Field and Description |
|---|---|
protected CacheInvalidationPolicy |
_cachePolicy
Cache invalidation policy
|
protected OdfPageHandler |
_odfPageHandler
The ODF page handler.
|
protected SiteManager |
_siteManager
The site manager.
|
MAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
InvalidateCacheOnOrgunitChangedObserver() |
| Modifier and Type | Method and Description |
|---|---|
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager serviceManager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected SiteManager _siteManager
protected OdfPageHandler _odfPageHandler
protected CacheInvalidationPolicy _cachePolicy
public InvalidateCacheOnOrgunitChangedObserver()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic boolean supports(Event event)
Observerpublic int getPriority(Event event)
ObservergetPriority in interface Observerevent - the event.public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observerobserve in interface Observerevent - 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.