Class InvalidateZoneItemCacheOnMemberModificationObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.userdirectory.observation.AbstractContentObserver
org.ametys.plugins.workspaces.members.observers.InvalidateZoneItemCacheOnMemberModificationObserver
- All Implemented Interfaces:
Observer
,LogEnabled
,Prioritizable
,Supporter<Event>
,Contextualizable
,Serviceable
Observer
to invalidate zone item cache of related members when the skills or keywords have changed-
Field Summary
Fields inherited from class org.ametys.plugins.userdirectory.observation.AbstractContentObserver
_cocoonContext, _contentTypeHelper, _context, _organisationChartPageResolver, _resolver, _userDirectoryPageResolver, _zoneItemCache
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_internalObserve
(Event event, Page rootUsersPage, Content userContent) Do the actual work.protected boolean
_needCacheInvalidation
(Event event, Content userContent) Determines if the zoneitem cache invalidation is neededint
Get the priority for the component.void
service
(ServiceManager smanager) boolean
Check if an element is supportedMethods inherited from class org.ametys.plugins.userdirectory.observation.AbstractContentObserver
_getOrgUnitRootPages, _getTarget, _getUserRootPages, _isOrgUnitContent, _isUserContent, _removeZoneItemCache, contextualize, observe
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
InvalidateZoneItemCacheOnMemberModificationObserver
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractContentObserver
- Throws:
ServiceException
-
getPriority
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Returns:
- the priority
-
supports
Description copied from interface:Supporter
Check if an element is supported- Parameters:
event
- The element- Returns:
true
if the element is supported,false
otherwise
-
_internalObserve
Description copied from class:AbstractContentObserver
Do the actual work.- Specified by:
_internalObserve
in classAbstractContentObserver
- Parameters:
event
- the observation event.rootUsersPage
- the page holding the virtual user pagesuserContent
- a list containing all impacted user contents.
-
_needCacheInvalidation
Determines if the zoneitem cache invalidation is needed- Parameters:
event
- The eventuserContent
- the content- Returns:
- true if zoneitem cache invalidation is needed
-