public abstract class UpgradeProductPlugin extends org.exoplatform.container.component.BaseComponentPlugin implements Comparable<UpgradeProductPlugin>
| 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.
|
| Constructor and Description |
|---|
UpgradeProductPlugin(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.
|
int |
compareTo(UpgradeProductPlugin o) |
boolean |
equals(Object obj) |
String |
getOldProductGroupId()
Gets old version what needs to upgrade
|
int |
getPluginExecutionOrder() |
String |
getProductGroupId() |
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.
|
protected String productGroupId
protected String oldProductGroupId
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 compareTo(UpgradeProductPlugin o)
compareTo in interface Comparable<UpgradeProductPlugin>public int getPluginExecutionOrder()
Copyright © 2003–2015 eXo Platform SAS. All rights reserved.