Class MyApplicationsPortletInstancePermissionUpgradePlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.commons.upgrade.UpgradeProductPlugin
io.meeds.appcenter.plugin.upgrade.MyApplicationsPortletInstancePermissionUpgradePlugin
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public class MyApplicationsPortletInstancePermissionUpgradePlugin
extends org.exoplatform.commons.upgrade.UpgradeProductPlugin
Opens the Shortcuts portlet instance of an existing database to all users,
as a fresh database gets it from portlet-instances.json, so that whoever may
edit a page can add the portlet to it. Only an instance still holding the
permissions formerly shipped is changed: a value an administrator set is
kept: each instance is read again at its turn, since the run starts once the
server has started and an administrator may change or delete it meanwhile,
which leaves only the time between that read and the save. Where an operator
sets commons.upgrade.proceedIfFirstRun to false, a
platform installed at this version runs it at its first version upgrade
instead, and opens an instance an administrator restricted to exactly the
platform administrators in between. The portlet instance service is a Spring
bean of the layout context, resolved when the plugin runs and after the
server has finished starting: taken in the constructor, the Kernel would
create it while that context is still starting. The plugin is asynchronous:
the wait for the server startup is refused on the startup thread, and the
asynchronous path of the upgrade framework binds the container itself. A
failure is thrown back to the upgrade framework, which records no execution:
the plugin runs again at a startup on a version later than the one it was
upgrading from.
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionMyApplicationsPortletInstancePermissionUpgradePlugin(org.exoplatform.container.xml.InitParams initParams) -
Method Summary
Methods inherited from class org.exoplatform.commons.upgrade.UpgradeProductPlugin
afterUpgrade, beforeUpgrade, equals, getPluginExecutionOrder, getProductGroupId, getTargetVersion, getValue, hashCode, isAsyncUpgradeExecution, isEnabled, isExecuteOnlyOnce, shouldProceedToUpgrade, shouldProceedToUpgrade, storeValueForPluginMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Field Details
-
PORTLET_CONTENT_ID
- See Also:
-
FORMER_PERMISSIONS
-
NEW_PERMISSIONS
-
-
Constructor Details
-
MyApplicationsPortletInstancePermissionUpgradePlugin
public MyApplicationsPortletInstancePermissionUpgradePlugin(org.exoplatform.container.xml.InitParams initParams)
-
-
Method Details
-
processUpgrade
- Specified by:
processUpgradein classorg.exoplatform.commons.upgrade.UpgradeProductPlugin
-