Class PageRemovedIndexingListener

java.lang.Object
io.meeds.social.cms.listener.PageRemovedIndexingListener
All Implemented Interfaces:
org.exoplatform.services.listener.ListenerBase<Object,org.exoplatform.portal.config.model.Page>

@Component public class PageRemovedIndexingListener extends Object implements org.exoplatform.services.listener.ListenerBase<Object,org.exoplatform.portal.config.model.Page>
Unindexes every content block still indexed under a page that stopped being searchable — the gap PageContentBlockIndexingListener documents it cannot cover, since that listener only reacts to a page that still exists and is still reachable.

Two distinct events lead here, and they are deliberately not conflated by their broadcasters:

  • LayoutService.PAGE_REMOVED — the page's own data is gone.
  • "layout.page.unreachable" — the page still exists but no navigation node leads to it anymore (Layout broadcasts it after deleting the last node pointing to it), so it can't be reached from a search result either.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Broadcast by Layout when a page stops being reachable through any navigation node while still existing — must match io.meeds.layout.service.NavigationLayoutService.PAGE_UNREACHABLE_EVENT (Social doesn't depend on the Layout addon, so the literal is duplicated rather than shared).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

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

    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
  • Field Details

    • PAGE_UNREACHABLE_EVENT

      public static final String PAGE_UNREACHABLE_EVENT
      Broadcast by Layout when a page stops being reachable through any navigation node while still existing — must match io.meeds.layout.service.NavigationLayoutService.PAGE_UNREACHABLE_EVENT (Social doesn't depend on the Layout addon, so the literal is duplicated rather than shared).
      See Also:
  • Constructor Details

    • PageRemovedIndexingListener

      public PageRemovedIndexingListener()
  • Method Details

    • init

      @PostConstruct public void init()
    • onEvent

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