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,DropIncrementalSyncSubscriptionUpgradeTask,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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAllErrors(Collection<UpgradeError> errors) protected voidaddError(UpgradeError error) protected voidReturn any errors that occur.getName()The human-readable name of the upgrade taskA short (<50 chars) description of the upgrade actionbooleanvoidsetBeanName(String name) voidsetBuildNumber(String buildNumber) voidvalidate()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, waitMethods inherited from interface com.atlassian.confluence.upgrade.BackupSupport
breaksBackwardCompatibility, runOnSpaceImportMethods inherited from interface com.atlassian.confluence.upgrade.UpgradeTask
doUpgrade
-
Constructor Details
-
AbstractUpgradeTask
public AbstractUpgradeTask()
-
-
Method Details
-
getShortDescription
Description copied from interface:UpgradeTaskInfoA short (<50 chars) description of the upgrade action- Specified by:
getShortDescriptionin interfaceUpgradeTaskInfo
-
addError
-
addError
-
addAllErrors
-
getErrors
Description copied from interface:UpgradeTaskReturn any errors that occur. Each entry is anUpgradeError.- Specified by:
getErrorsin interfaceUpgradeTask- Returns:
- a collection of
UpgradeErrorobjects, sometimes null.
-
setBuildNumber
-
getBuildNumber
- Specified by:
getBuildNumberin 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:
validatein interfaceUpgradeTask- Throws:
Exception
-
getConstraint
- Specified by:
getConstraintin interfaceUpgradeTask- Returns:
- the constraint that must be passed for this task to be run.
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
getName
Description copied from interface:UpgradeTaskInfoThe human-readable name of the upgrade task- Specified by:
getNamein interfaceUpgradeTaskInfo
-
isDatabaseUpgrade
public boolean isDatabaseUpgrade()- Specified by:
isDatabaseUpgradein interfaceUpgradeTaskInfo
-