|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.upgrade.AbstractUpgradeTask
public abstract class AbstractUpgradeTask
A useful base class for UpgradeTasks. Note that this base class has a default implementation of validate which does nothing. This is a common case but if you do need validation be sure to override it.
Field Summary |
---|
Fields inherited from interface com.atlassian.confluence.upgrade.UpgradeTask |
---|
log |
Constructor Summary | |
---|---|
AbstractUpgradeTask()
|
Method Summary | |
---|---|
protected void |
addAllErrors(java.util.Collection<UpgradeError> errors)
|
protected void |
addError(java.lang.String errorMessage)
|
protected void |
addError(UpgradeError error)
|
java.lang.String |
getBuildNumber()
|
BuildNumberUpgradeConstraint |
getConstraint()
|
java.util.Collection<UpgradeError> |
getErrors()
Return any errors that occur. |
java.lang.String |
getName()
The human-readable name of the upgrade task |
java.lang.String |
getShortDescription()
A short (<50 chars) description of the upgrade action |
boolean |
isDatabaseUpgrade()
|
void |
setBeanName(java.lang.String name)
|
void |
setBuildNumber(java.lang.String buildNumber)
|
void |
validate()
This is only implemented in this abstract base class for the convenience of the large number of older upgrade tasks. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTask |
---|
doUpgrade |
Methods inherited from interface com.atlassian.confluence.upgrade.BackupSupport |
---|
breaksBackwardCompatibility, runOnSpaceImport |
Constructor Detail |
---|
public AbstractUpgradeTask()
Method Detail |
---|
public java.lang.String getShortDescription()
UpgradeTaskInfo
getShortDescription
in interface UpgradeTaskInfo
protected void addError(UpgradeError error)
protected void addError(java.lang.String errorMessage)
protected void addAllErrors(java.util.Collection<UpgradeError> errors)
public java.util.Collection<UpgradeError> getErrors()
UpgradeTask
UpgradeError
.
getErrors
in interface UpgradeTask
UpgradeError
objects, sometimes null.public void setBuildNumber(java.lang.String buildNumber)
public java.lang.String getBuildNumber()
getBuildNumber
in interface UpgradeTaskInfo
public void validate() throws java.lang.Exception
This is only implemented in this abstract base class for the convenience of the large number of older upgrade tasks.
If you are implementing a new UpgradeTask you must give some consideration to implementing validation as well.
validate
in interface UpgradeTask
java.lang.Exception
public BuildNumberUpgradeConstraint getConstraint()
getConstraint
in interface UpgradeTask
public void setBeanName(java.lang.String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public java.lang.String getName()
UpgradeTaskInfo
getName
in interface UpgradeTaskInfo
public boolean isDatabaseUpgrade()
isDatabaseUpgrade
in interface UpgradeTaskInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |