public abstract class UpgradeProductPlugin
extends org.exoplatform.container.component.BaseComponentPlugin
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
asyncUpgradeExecution
True if the upgrade execution should be processed asynchronously
else, it will be executed synchronously
|
protected boolean |
executeOnlyOnce
Determines whether the plugin should be executed once or even version upgrade.
|
static String |
OLD_PRODUCT_GROUP_ID |
protected String |
oldProductGroupId |
static String |
PRODUCT_GROUP_ID |
protected String |
productGroupId
The plugin's product maven group identifier, by example:
org.exoplatform.portal for gatein.
|
protected String |
targetVersion
The target version of this upgrade Plugin.
|
static String |
UPGRADE_COMPLETED_STATUS |
static String |
UPGRADE_PLUGIN_ASYNC |
static String |
UPGRADE_PLUGIN_ENABLE |
static String |
UPGRADE_PLUGIN_EXECUTE_ONCE_PARAMETER |
static String |
UPGRADE_PLUGIN_EXECUTION_ORDER |
static String |
UPGRADE_PLUGIN_TARGET_PARAMETER |
| Constructor and Description |
|---|
UpgradeProductPlugin(org.exoplatform.container.xml.InitParams initParams) |
UpgradeProductPlugin(org.exoplatform.commons.api.settings.SettingService settingService,
org.exoplatform.container.xml.InitParams initParams) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterUpgrade()
Execute some operations synchronously after the execution of processUpgrade
method synchronously or asynchronously
|
void |
beforeUpgrade()
Execute some operations synchronously after the execution of processUpgrade
method synchronously or asynchronously
|
boolean |
equals(Object obj) |
int |
getPluginExecutionOrder() |
String |
getProductGroupId() |
String |
getTargetVersion() |
String |
getValue(String paramName) |
int |
hashCode() |
boolean |
isAsyncUpgradeExecution() |
boolean |
isEnabled()
Determines if the plugin is enabled, this method will be called when adding the plugin to the upgradePlugins list.
|
boolean |
isExecuteOnlyOnce() |
abstract void |
processUpgrade(String oldVersion,
String newVersion)
Proceed to the transparent upgrade, this method will be called if the
Product version has changed, which means, it will be called once the
stored Product Version and the one declared in ProductInfo are different
|
boolean |
shouldProceedToUpgrade(String newVersion,
String previousVersion)
This method is called when a new version has been detected to decide whether proceed to upgrade or not.
|
boolean |
shouldProceedToUpgrade(String newVersion,
String previousGroupVersion,
UpgradePluginExecutionContext previousUpgradePluginExecution)
This method is called when a new version has been detected to decide
whether proceed to upgrade or not.
|
void |
storeValueForPlugin(String paramName,
String paramValue) |
public static final String UPGRADE_COMPLETED_STATUS
public static final String PRODUCT_GROUP_ID
public static final String OLD_PRODUCT_GROUP_ID
public static final String UPGRADE_PLUGIN_ASYNC
public static final String UPGRADE_PLUGIN_TARGET_PARAMETER
public static final String UPGRADE_PLUGIN_EXECUTE_ONCE_PARAMETER
public static final String UPGRADE_PLUGIN_EXECUTION_ORDER
public static final String UPGRADE_PLUGIN_ENABLE
protected String productGroupId
protected String oldProductGroupId
protected String targetVersion
protected boolean asyncUpgradeExecution
protected boolean executeOnlyOnce
public UpgradeProductPlugin(org.exoplatform.commons.api.settings.SettingService settingService,
org.exoplatform.container.xml.InitParams initParams)
public UpgradeProductPlugin(org.exoplatform.container.xml.InitParams initParams)
public String getProductGroupId()
public void beforeUpgrade()
public void afterUpgrade()
public boolean isAsyncUpgradeExecution()
public boolean isExecuteOnlyOnce()
public String getTargetVersion()
public boolean isEnabled()
UpgradeProductService.addUpgradePlugin(UpgradeProductPlugin)public abstract void processUpgrade(String oldVersion, String newVersion)
oldVersion - the old version that is stored in internal datasourcenewVersion - the new version read from ProductInfo Servicepublic boolean shouldProceedToUpgrade(String newVersion, String previousVersion)
previousVersion - The previous version of plugin's productnewVersion - The previous version of plugin's productpublic boolean shouldProceedToUpgrade(String newVersion, String previousGroupVersion, UpgradePluginExecutionContext previousUpgradePluginExecution)
newVersion - The current version of running serverpreviousGroupVersion - The previous version of plugin's product group (social, portal...)
This parameter will be equals to '0' if first time it runs.previousUpgradePluginExecution - The previous version and execution count of plugin (retrieved from last run)
This parameter will be null if first time it runs.public int getPluginExecutionOrder()
Copyright © 2003–2020 eXo Platform SAS. All rights reserved.