Package io.meeds.social.cms.listener
Class PageContentBlockIndexingListener
java.lang.Object
io.meeds.social.cms.listener.PageContentBlockIndexingListener
@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 how a page is
represented there (see PageContentIndexingConnector): by one
document per content block backed by a registered
PageContentBlockPlugin currently on its
layout, or — when it carries none — by a bare page document. Whichever
applies is (re)indexed, whatever the other kind left behind is removed.
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. And a page stored outside the Layout addon's services (imported
from a template, saved through the portal API) fires neither: those are
PageSavedIndexingListener's and
SiteTemplateInstantiatedIndexingListener's. This listener only
reconciles a page that still exists and was edited through Layout.
-
Field Details
-
PAGE_UPDATED_EVENT
Broadcast by Layout when a page's content changes.- See Also:
-
PAGE_PERMISSIONS_UPDATED_EVENT
Broadcast by Layout when a page's access permissions change.- See Also:
-
-
Constructor Details
-
PageContentBlockIndexingListener
public PageContentBlockIndexingListener()
-
-
Method Details