Class PageContainerBackgroundUpgradePlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.commons.upgrade.UpgradeProductPlugin
io.meeds.layout.plugin.upgrade.PageContainerBackgroundUpgradePlugin
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin
public class PageContainerBackgroundUpgradePlugin
extends org.exoplatform.commons.upgrade.UpgradeProductPlugin
Removes a background color from the top-level containers of named pages,
only where the stored color equals the one given in parameter, ignoring
case. A page container color is painted over the page background set in
Branding and Theme, so a color shipped by default on a page hides that
branding setting. A stored color equal to the parameter cannot be told apart
from the shipped one and is removed whoever set it; any other color is kept,
and nested containers are not read. A page that changes is saved whole
through
LayoutService, which updates its existing containers and
windows in place, keeping their ids.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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
ConstructorsConstructorDescriptionPageContainerBackgroundUpgradePlugin(org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.portal.mop.service.LayoutService layoutService, org.exoplatform.container.xml.InitParams initParams) -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessUpgrade(String oldVersion, String newVersion) booleanshouldProceedToUpgrade(String newVersion, String previousVersion) booleanupgradePage(org.exoplatform.portal.mop.page.PageKey pageKey) Methods inherited from class org.exoplatform.commons.upgrade.UpgradeProductPlugin
afterUpgrade, beforeUpgrade, equals, getPluginExecutionOrder, getProductGroupId, getTargetVersion, getValue, hashCode, isAsyncUpgradeExecution, isEnabled, isExecuteOnlyOnce, shouldProceedToUpgrade, storeValueForPluginMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Field Details
-
SITE_TYPE_PARAM
- See Also:
-
SITE_NAME_PARAM
- See Also:
-
PAGE_NAMES_PARAM
- See Also:
-
BACKGROUND_COLOR_PARAM
- See Also:
-
ENABLED_PARAM
- See Also:
-
-
Constructor Details
-
PageContainerBackgroundUpgradePlugin
public PageContainerBackgroundUpgradePlugin(org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.portal.mop.service.LayoutService layoutService, org.exoplatform.container.xml.InitParams initParams)
-
-
Method Details
-
shouldProceedToUpgrade
-
processUpgrade
-
upgradePage
public boolean upgradePage(org.exoplatform.portal.mop.page.PageKey pageKey) - Parameters:
pageKey- the page to upgrade- Returns:
- true when the page was saved without its container background color
-