public class ClearODFPageCacheObserver extends AbstractLogEnabled implements Observer, Serviceable, Contextualizable
Modifier and Type | Field and Description |
---|---|
protected Context |
_context
Avalon context
|
protected ODFPageCache |
_odfPageCache
The ODF page cache
|
protected OdfPageHandler |
_odfPageHandler
The ODF root page handler.
|
protected OdfPageResolver |
_odfPageResolver
Odf page resolver
|
protected AmetysObjectResolver |
_resolver
Ametys object resolver
|
protected SiteManager |
_siteManager
Site manager
|
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
ClearODFPageCacheObserver() |
Modifier and Type | Method and Description |
---|---|
protected void |
_clearCache(OrgUnit orgUnit)
Clear the cache when necessary in case of an orgUnit
|
protected void |
_clearCache(Page page)
Clear the cache when necessary in case of a page
|
protected void |
_clearCache(Program program)
Clear the cache when necessary in case of a program
|
protected void |
_clearCache(Site site)
Clear the cache when necessary in case of a site
|
private AmetysObjectIterable<Page> |
_getOdfRootPages() |
void |
contextualize(Context context) |
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 manager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected OdfPageHandler _odfPageHandler
protected ODFPageCache _odfPageCache
protected SiteManager _siteManager
protected OdfPageResolver _odfPageResolver
protected AmetysObjectResolver _resolver
public ClearODFPageCacheObserver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public boolean supports(Event event)
Observer
public int getPriority(Event event)
Observer
getPriority
in interface Observer
event
- the event.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 void _clearCache(Page page)
page
- The pageprotected void _clearCache(Program program)
program
- The programprivate AmetysObjectIterable<Page> _getOdfRootPages()
protected void _clearCache(OrgUnit orgUnit)
orgUnit
- The orgUnitprotected void _clearCache(Site site)
site
- The site