Class InvalidateCacheOnMemberUpdatedObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.members.observers.AbstractMemberObserver
-
- org.ametys.plugins.workspaces.members.observers.InvalidateCacheOnMemberUpdatedObserver
-
- All Implemented Interfaces:
AsyncObserver
,Observer
,LogEnabled
,Serviceable
public class InvalidateCacheOnMemberUpdatedObserver extends AbstractMemberObserver
Observer
to invalidate cache on front-office of a user content when a member was added or removed from a project
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.workspaces.members.observers.AbstractMemberObserver
_groupManager, _projectManager, _siteManager, _smanager, _userDirectoryHelper
-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description InvalidateCacheOnMemberUpdatedObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_internalObserve(Event event, List<Content> userContents)
Observes the event with access to the user contentsint
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.void
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.plugins.workspaces.members.observers.AbstractMemberObserver
getUserContents, observe, supports
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.core.observation.AsyncObserver
parallelizable
-
-
-
-
Constructor Detail
-
InvalidateCacheOnMemberUpdatedObserver
public InvalidateCacheOnMemberUpdatedObserver()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractMemberObserver
- Throws:
ServiceException
-
getPriority
public int getPriority(Event event)
Description copied from interface:Observer
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Specified by:
getPriority
in interfaceObserver
- Overrides:
getPriority
in classAbstractMemberObserver
- Parameters:
event
- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
_internalObserve
protected void _internalObserve(Event event, List<Content> userContents) throws Exception
Description copied from class:AbstractMemberObserver
Observes the event with access to the user contents- Specified by:
_internalObserve
in classAbstractMemberObserver
- Parameters:
event
- the event.userContents
- the user contents- Throws:
Exception
- if an error occurs.
-
-