Class AbstractSurveyCacheObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.cache.AbstractCacheObserver
org.ametys.web.cache.AbstractSiteCacheObserver
org.ametys.plugins.survey.observation.AbstractSurveyCacheObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
- Direct Known Subclasses:
InvalidateCacheOnSurveyAclUpdated
,InvalidateCacheOnSurveyReInitializedObserver
Abstract
Observer
for observing survey changes in order to invalidate cache on front-office.-
Field Summary
Fields inherited from class org.ametys.web.cache.AbstractSiteCacheObserver
_cachePolicy, _repository
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Site
Retrieves the site needed for accessing the front-office.protected void
_internalObserve
(Event event, Site site, javax.jcr.Session liveSession) Observes the event with access to the target site and live workspace.protected abstract Survey
getSurveyFromEvent
(Event event) Get the survey from the Eventvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.web.cache.AbstractSiteCacheObserver
observe
Methods inherited from class org.ametys.web.cache.AbstractCacheObserver
getPriority
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_surveyDAO
The survey DAO
-
-
Constructor Details
-
AbstractSurveyCacheObserver
public AbstractSurveyCacheObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSiteCacheObserver
- Throws:
ServiceException
-
_internalObserve
protected void _internalObserve(Event event, Site site, javax.jcr.Session liveSession) throws Exception Description copied from class:AbstractSiteCacheObserver
Observes the event with access to the target site and live workspace.- Specified by:
_internalObserve
in classAbstractSiteCacheObserver
- Parameters:
event
- the event.site
- the site.liveSession
- the session to the workspace live.- Throws:
Exception
- if an error occurs.
-
_getSite
Description copied from class:AbstractSiteCacheObserver
Retrieves the site needed for accessing the front-office.- Specified by:
_getSite
in classAbstractSiteCacheObserver
- Parameters:
event
- the event.- Returns:
- the site or
null
if not found.
-
getSurveyFromEvent
Get the survey from the Event- Parameters:
event
- the event- Returns:
- the survey
-