Interface PageContentBlockPluginService


public interface PageContentBlockPluginService
Registry of PageContentBlockPlugins, one per CMSSetting content type.
  • Method Details

    • addPlugin

      void addPlugin(PageContentBlockPlugin plugin)
      Registers a plugin. Called by each plugin itself on startup, so registration doesn't depend on deployment/initialization order across addons.
      Parameters:
      plugin - the plugin to register
    • getContentTypes

      Set<String> getContentTypes()
      Returns:
      the content types currently backed by a registered plugin.
    • getPlugin

      PageContentBlockPlugin getPlugin(String contentType)
      Parameters:
      contentType - a CMSSetting content type
      Returns:
      the plugin registered for that content type, or null
    • reindexContentBlock

      void reindexContentBlock(String contentType, String settingName)
      Re-indexes the page content block bound by the CMSSetting identified by contentType/settingName — resolves the page and the Elasticsearch document id internally, so a plugin owner (e.g. Notes reacting to its own note-content-changed event) never needs to know Social's index document-id format or depend on its storage classes to trigger a re-index.
      Parameters:
      contentType - a CMSSetting content type
      settingName - the CMSSetting name
    • unindexContentBlock

      void unindexContentBlock(String contentType, String settingName)
      Removes the page content block bound by the CMSSetting identified by contentType/settingName from the search index — for when the plugin's underlying content was deleted while the CMSSetting binding itself is still around. Unlike reindexContentBlock(java.lang.String, java.lang.String), this can't be replaced by just re-indexing: a connector's create() returning null because the content is gone makes the indexing framework silently skip the operation rather than delete the existing document, so a caller that knows the content was actually deleted must ask for the document to be removed explicitly.
      Parameters:
      contentType - a CMSSetting content type
      settingName - the CMSSetting name