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,Contextualizable,Serviceable
public class InvalidateZoneItemCacheOnMemberModificationObserver extends AbstractContentObserver
Observerto invalidate zone item cache of related members when the skills or keywords have changed
-
-
Field Summary
Fields Modifier and Type Field Description private MemberHelper_memberHelper-
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 Constructor Description InvalidateZoneItemCacheOnMemberModificationObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 neededintgetPriority(Event event)Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.voidservice(ServiceManager smanager)booleansupports(Event event)Checks if the event is supported.-
Methods 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
-
-
-
-
Field Detail
-
_memberHelper
private MemberHelper _memberHelper
-
-
Constructor Detail
-
InvalidateZoneItemCacheOnMemberModificationObserver
public InvalidateZoneItemCacheOnMemberModificationObserver()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractContentObserver- Throws:
ServiceException
-
getPriority
public int getPriority(Event event)
Description copied from interface:ObserverRetrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Parameters:
event- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
supports
public boolean supports(Event event)
Description copied from interface:ObserverChecks if the event is supported. If true, the observe(Event) method will be called.- Parameters:
event- the event.- Returns:
truefor observing this event,falseotherwise.
-
_internalObserve
protected void _internalObserve(Event event, Page rootUsersPage, Content userContent)
Description copied from class:AbstractContentObserverDo the actual work.- Specified by:
_internalObservein classAbstractContentObserver- Parameters:
event- the observation event.rootUsersPage- the page holding the virtual user pagesuserContent- a list containing all impacted user contents.
-
_needCacheInvalidation
protected boolean _needCacheInvalidation(Event event, Content userContent)
Determines if the zoneitem cache invalidation is needed- Parameters:
event- The eventuserContent- the content- Returns:
- true if zoneitem cache invalidation is needed
-
-