Package com.atlassian.confluence.upgrade
Class AbstractUpgradeTask
java.lang.Object
com.atlassian.confluence.upgrade.AbstractUpgradeTask
- All Implemented Interfaces:
BackupSupport
,UpgradeTask
,UpgradeTaskInfo
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
AbstractConstraintCreationUpgradeTask
,AbstractDeferredRunUpgradeTask
,AbstractUserMappingUpgradeTask
,BandanaKeyUniqueConstraintUpgradeTask
,DatabaseValidationQueryMigrationUpgradeTask
,DbTrueFalseTypeFixUpgradeTask
,DecoratorLangMacroReplacementUpgradeTask
,DeleteTemporaryAttachmentUploadsUpgradeTask
,DenormalisedContentPermissionsTriggersUpgradeTask
,DenormalisedContentPermissionsUpgradeTask
,DenormalisedContentStatusUpgradeTask
,DenormalisedPermissionsTriggersUpgradeTask
,DenormalisedSpacePermissionsUpgradeTask
,EmbeddedCrowdAddGroupExternalIdUpgradeTask
,LabelUniqueIndexUpgradeTask
,MigrateScheduledJobCacheUpgradeTask
,MigrateTrashDateUpgradeTask
,NoopSplitIndexUpgradeTask
,NullModificationDateDraftUpgradeTask
,RenameTempDirPropertyUpgradeTask
,ReplaceC3p0ConnectionPoolWithHikariCPUpgradeTask
,ResetJournalStateUpgradeTask
,SecureLocalConfigSecretsUpgradeTask
,SecureMailServerSecretUpgradeTask
,SecureSharedConfigSecretsUpgradeTask
,SplitIndexUpgradeTask
,SynchronyPidFileRemovalUpgradeTask
,TurnFastPermissionsOnByDefaultUpgradeTask
,UserDirectoryPasswordEncryptionUpgradeTask
public abstract class AbstractUpgradeTask
extends Object
implements UpgradeTask, BackupSupport, org.springframework.beans.factory.BeanNameAware
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAllErrors
(Collection<UpgradeError> errors) protected void
addError
(UpgradeError error) protected void
Return any errors that occur.getName()
The human-readable name of the upgrade taskA short (<50 chars) description of the upgrade actionboolean
void
setBeanName
(String name) void
setBuildNumber
(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.BackupSupport
breaksBackwardCompatibility, runOnSpaceImport
Methods inherited from interface com.atlassian.confluence.upgrade.UpgradeTask
doUpgrade
-
Constructor Details
-
AbstractUpgradeTask
public AbstractUpgradeTask()
-
-
Method Details
-
getShortDescription
Description copied from interface:UpgradeTaskInfo
A short (<50 chars) description of the upgrade action- Specified by:
getShortDescription
in interfaceUpgradeTaskInfo
-
addError
-
addError
-
addAllErrors
-
getErrors
Description copied from interface:UpgradeTask
Return any errors that occur. Each entry is anUpgradeError
.- Specified by:
getErrors
in interfaceUpgradeTask
- Returns:
- a collection of
UpgradeError
objects, sometimes null.
-
setBuildNumber
-
getBuildNumber
- Specified by:
getBuildNumber
in interfaceUpgradeTaskInfo
- Returns:
- The build number that this upgrade is applicable to
-
validate
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.
- Specified by:
validate
in interfaceUpgradeTask
- Throws:
Exception
-
getConstraint
- Specified by:
getConstraint
in interfaceUpgradeTask
- Returns:
- the constraint that must be passed for this task to be run.
-
setBeanName
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
-
getName
Description copied from interface:UpgradeTaskInfo
The human-readable name of the upgrade task- Specified by:
getName
in interfaceUpgradeTaskInfo
-
isDatabaseUpgrade
public boolean isDatabaseUpgrade()- Specified by:
isDatabaseUpgrade
in interfaceUpgradeTaskInfo
-