|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.commons.upgrade.UpgradeProductPlugin
public abstract class UpgradeProductPlugin
| Field Summary | |
|---|---|
protected String |
oldProductGroupId
|
protected String |
productGroupId
The plugin's product maven group identifier, by example: org.exoplatform.portal for gatein. |
| Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin |
|---|
desc, name |
| Constructor Summary | |
|---|---|
UpgradeProductPlugin(org.exoplatform.container.xml.InitParams initParams)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin |
|---|
getDescription, getName, setDescription, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String productGroupId
protected String oldProductGroupId
| Constructor Detail |
|---|
public UpgradeProductPlugin(org.exoplatform.container.xml.InitParams initParams)
| Method Detail |
|---|
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 version
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
public abstract void processUpgrade(String oldVersion,
String newVersion)
oldVersion - the old version that is stored in the JCRnewVersion - the new version read from ProductInfo Service
public abstract boolean shouldProceedToUpgrade(String newVersion,
String previousVersion)
previousVersion - The previous version of plugin's productnewVersion - The previous version of plugin's product
public final boolean equals(Object obj)
equals in class Objectpublic final int hashCode()
hashCode in class Objectpublic int compareTo(UpgradeProductPlugin o)
compareTo in interface Comparable<UpgradeProductPlugin>public int getPluginExecutionOrder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||