Class ApplicationBadgePortletCacheListener

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.listener.Listener<Object,Object>
io.meeds.appcenter.listener.ApplicationBadgePortletCacheListener
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin, org.exoplatform.services.listener.ListenerBase<Object,Object>

@Component public class ApplicationBadgePortletCacheListener extends org.exoplatform.services.listener.Listener<Object,Object>
Drops the portlet instance to content id mapping whenever a portlet instance is created, updated or removed.

Without this, an administrator adding a portlet instance and binding an application to it would see no badge until the cache expired on its own — looking like the feature is broken. The TTL stays as the backstop; this listener is what makes the change immediate.

Pure glue: it holds no logic and only delegates the eviction.

  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    onEvent(org.exoplatform.services.listener.Event<Object,Object> event)
     

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.services.listener.ListenerBase

    getName
  • Constructor Details

    • ApplicationBadgePortletCacheListener

      public ApplicationBadgePortletCacheListener()
  • Method Details

    • init

      @PostConstruct public void init()
    • onEvent

      public void onEvent(org.exoplatform.services.listener.Event<Object,Object> event) throws Exception
      Throws:
      Exception