Package io.meeds.notes.upgrade
Class NoteHomePageIndexingUpgradePlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.commons.upgrade.UpgradeProductPlugin
io.meeds.notes.upgrade.NoteHomePageIndexingUpgradePlugin
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public class NoteHomePageIndexingUpgradePlugin
extends org.exoplatform.commons.upgrade.UpgradeProductPlugin
Note book home pages used to be created without broadcasting their creation,
hence they never entered the search index and stayed invisible in the unified
search and in the notes tree filter until they happened to be edited. The
creation is broadcast since then, but the home pages of the note books created
before that stay missing from the index, and the notes indexing connector does
not support a full reindex. This plugin queues them back for indexing.
The execution is guarded by a dedicated setting rather than by the product version, so that every existing instance repairs its index once, whatever version it is upgrading from.
-
Field Summary
Fields inherited from class org.exoplatform.commons.upgrade.UpgradeProductPlugin
asyncUpgradeExecution, executeOnlyOnce, OLD_PRODUCT_GROUP_ID, oldProductGroupId, PRODUCT_GROUP_ID, productGroupId, targetVersion, UPGRADE_COMPLETED_STATUS, UPGRADE_PLUGIN_ASYNC, UPGRADE_PLUGIN_ENABLE, UPGRADE_PLUGIN_EXECUTE_ONCE_PARAMETER, UPGRADE_PLUGIN_EXECUTION_ORDER, UPGRADE_PLUGIN_TARGET_PARAMETERFields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
ConstructorsConstructorDescriptionNoteHomePageIndexingUpgradePlugin(WikiDAO wikiDAO, org.exoplatform.commons.search.index.IndexingService indexingService, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.container.xml.InitParams initParams) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprocessUpgrade(String oldVersion, String newVersion) booleanshouldProceedToUpgrade(String newVersion, String previousGroupVersion, org.exoplatform.commons.upgrade.UpgradePluginExecutionContext upgradePluginExecutionContext) Methods inherited from class org.exoplatform.commons.upgrade.UpgradeProductPlugin
beforeUpgrade, equals, getPluginExecutionOrder, getProductGroupId, getTargetVersion, getValue, hashCode, isAsyncUpgradeExecution, isEnabled, isExecuteOnlyOnce, shouldProceedToUpgrade, storeValueForPluginMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
NoteHomePageIndexingUpgradePlugin
public NoteHomePageIndexingUpgradePlugin(WikiDAO wikiDAO, org.exoplatform.commons.search.index.IndexingService indexingService, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.container.xml.InitParams initParams)
-
-
Method Details
-
shouldProceedToUpgrade
public boolean shouldProceedToUpgrade(String newVersion, String previousGroupVersion, org.exoplatform.commons.upgrade.UpgradePluginExecutionContext upgradePluginExecutionContext) - Overrides:
shouldProceedToUpgradein classorg.exoplatform.commons.upgrade.UpgradeProductPlugin
-
afterUpgrade
public void afterUpgrade()- Overrides:
afterUpgradein classorg.exoplatform.commons.upgrade.UpgradeProductPlugin
-
processUpgrade
- Specified by:
processUpgradein classorg.exoplatform.commons.upgrade.UpgradeProductPlugin
-