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

Observer to invalidate zone item cache of related members when the skills or keywords have changed
  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager smanager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Overrides:
      service in class AbstractContentObserver
      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.
      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: Observer
      Checks if the event is supported. If true, the observe(Event) method will be called.
      Parameters:
      event - the event.
      Returns:
      true for observing this event, false otherwise.
    • _internalObserve

      protected void _internalObserve(Event event, Page rootUsersPage, Content userContent)
      Description copied from class: AbstractContentObserver
      Do the actual work.
      Specified by:
      _internalObserve in class AbstractContentObserver
      Parameters:
      event - the observation event.
      rootUsersPage - the page holding the virtual user pages
      userContent - 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 event
      userContent - the content
      Returns:
      true if zoneitem cache invalidation is needed