public abstract class UpgradeProductPlugin
extends org.exoplatform.container.component.BaseComponentPlugin
| Modifier and Type | Field and Description |
|---|---|
protected String |
oldProductGroupId |
protected String |
productGroupId
The plugin's product maven group identifier, by example: org.exoplatform.portal for gatein.
|
static String |
UPGRADE_COMPLETED_STATUS |
| 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 |
addNodeVersion(javax.jcr.Node nodeToAddVersion,
String versionLabel)
Add node's version with a label.
|
boolean |
equals(Object obj) |
String |
getOldProductGroupId()
Gets old version what needs to upgrade
|
int |
getPluginExecutionOrder() |
String |
getProductGroupId() |
String |
getValue(String paramName) |
int |
hashCode() |
boolean |
isEnabled()
Determines if the plugin is enabled, this method will be called when adding the plugin to the upgradePlugins list.
|
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
Product Version stored in the JCR and the one declared in ProductInfo are
different
|
abstract 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.
|
void |
storeValueForPlugin(String paramName,
String paramValue) |
public static final String UPGRADE_COMPLETED_STATUS
protected String productGroupId
protected String oldProductGroupId
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 String getOldProductGroupId()
public boolean isEnabled()
UpgradeProductService.addUpgradePlugin(UpgradeProductPlugin)public void addNodeVersion(javax.jcr.Node nodeToAddVersion,
String versionLabel)
throws javax.jcr.nodetype.NoSuchNodeTypeException,
javax.jcr.version.VersionException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.lock.LockException,
javax.jcr.AccessDeniedException,
javax.jcr.ItemExistsException,
javax.jcr.InvalidItemStateException,
javax.jcr.ReferentialIntegrityException,
javax.jcr.RepositoryException
nodeToAddVersion - the node that will be versionedversionLabel - the label to apply to the new created versionjavax.jcr.nodetype.NoSuchNodeTypeExceptionjavax.jcr.version.VersionExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.lock.LockExceptionjavax.jcr.AccessDeniedExceptionjavax.jcr.ItemExistsExceptionjavax.jcr.InvalidItemStateExceptionjavax.jcr.ReferentialIntegrityExceptionjavax.jcr.RepositoryExceptionpublic abstract void processUpgrade(String oldVersion, String newVersion)
oldVersion - the old version that is stored in the JCRnewVersion - the new version read from ProductInfo Servicepublic abstract boolean shouldProceedToUpgrade(String newVersion, String previousVersion)
previousVersion - The previous version of plugin's productnewVersion - The previous version of plugin's productpublic int getPluginExecutionOrder()
Copyright © 2003–2017 eXo Platform SAS. All rights reserved.