Class PageContentBlockIndexingListener

java.lang.Object
io.meeds.social.cms.listener.PageContentBlockIndexingListener
All Implemented Interfaces:
org.exoplatform.services.listener.ListenerBase<String,String>

@Component public class PageContentBlockIndexingListener extends Object implements org.exoplatform.services.listener.ListenerBase<String,String>
Reacts to Layout's layout.page.updated / layout.page.permissions.updated events to keep the "page" search index in sync with whether a page currently carries a content block backed by any registered PageContentBlockPlugin.

A page that is deleted outright never fires either event — that case is covered separately by PageRemovedIndexingListener, since by the time it would fire, LayoutService.getPage(java.lang.String) can no longer resolve the page. This listener only detects a block detached from a page that still exists.

  • Field Details

    • PAGE_UPDATED_EVENT

      public static final String PAGE_UPDATED_EVENT
      Broadcast by Layout when a page's content changes.
      See Also:
    • PAGE_PERMISSIONS_UPDATED_EVENT

      public static final String PAGE_PERMISSIONS_UPDATED_EVENT
      Broadcast by Layout when a page's access permissions change.
      See Also:
  • Constructor Details

    • PageContentBlockIndexingListener

      public PageContentBlockIndexingListener()
  • Method Details

    • init

      @PostConstruct public void init()
    • onEvent

      public void onEvent(org.exoplatform.services.listener.Event<String,String> event) throws Exception
      Specified by:
      onEvent in interface org.exoplatform.services.listener.ListenerBase<String,String>
      Throws:
      Exception