Package io.meeds.social.cms.service
Interface PageContentBlockPluginService
public interface PageContentBlockPluginService
Registry of
PageContentBlockPlugins, one per CMSSetting
content type.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(PageContentBlockPlugin plugin) Registers a plugin.voidreindexContentBlock(String contentType, String settingName) Re-indexes the page content block bound by theCMSSettingidentified bycontentType/settingName— resolves the page and the Elasticsearch document id internally, so a plugin owner (e.g.voidunindexContentBlock(String contentType, String settingName) Removes the page content block bound by theCMSSettingidentified bycontentType/settingNamefrom the search index — for when the plugin's underlying content was deleted while theCMSSettingbinding itself is still around.
-
Method Details
-
addPlugin
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
- Returns:
- the content types currently backed by a registered plugin.
-
getPlugin
- Parameters:
contentType- aCMSSettingcontent type- Returns:
- the plugin registered for that content type, or
null
-
reindexContentBlock
Re-indexes the page content block bound by theCMSSettingidentified bycontentType/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- aCMSSettingcontent typesettingName- theCMSSettingname
-
unindexContentBlock
Removes the page content block bound by theCMSSettingidentified bycontentType/settingNamefrom the search index — for when the plugin's underlying content was deleted while theCMSSettingbinding itself is still around. UnlikereindexContentBlock(java.lang.String, java.lang.String), this can't be replaced by just re-indexing: a connector'screate()returningnullbecause 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- aCMSSettingcontent typesettingName- theCMSSettingname
-