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
,AddMissingOsPropertyIndexUpgradeTask
,AddMissingUnmanagedUniqueConstraintsUpgradeTask
,AuditLoggingSchemaUpgradeTask
,BandanaKeyUniqueConstraintUpgradeTask
,CheckAndFixSQLServerCatalogNameInJDBCConnectionUrlUpgradeTask
,CorrectCsvAttachmentMimeTypeUpgradeTask
,DatabaseValidationQueryMigrationUpgradeTask
,DbTrueFalseTypeFixUpgradeTask
,DeleteTemporaryAttachmentUploadsUpgradeTask
,DenormalisedContentPermissionsTriggersUpgradeTask
,DenormalisedContentPermissionsUpgradeTask
,DenormalisedContentStatusUpgradeTask
,DenormalisedPermissionsTriggersUpgradeTask
,DenormalisedSpacePermissionsUpgradeTask
,DisableBackupJobUpgradeTask
,DropAndRecreateSynchronyEventsIndexUpgradeTask
,DropAndUpdateContentIndexesUpgradeTask
,DropTrackBackAndReferrerTablesUpgradeTask
,EmbeddedCrowdAddGroupExternalIdUpgradeTask
,FixWrongSpaceLinksUpgradeTask
,Hibernate5ConstraintNamesPostSchemaUpgradeTask
,Hibernate5ConstraintNamesPreSchemaUpgradeTask
,MigrateScheduledJobCacheUpgradeTask
,MigrateTrashDateUpgradeTask
,NullModificationDateDraftUpgradeTask
,ReindexAllBlogsUpgradeTask
,RemoveESIndexJournalVerifierUpgradeTask
,RemovePluginLicenseStoragePluginUpgradeTask
,RenameTempDirPropertyUpgradeTask
,ReplaceC3p0ConnectionPoolWithHikariCPUpgradeTask
,ResetJournalStateUpgradeTask
,SplitIndexUpgradeTask
,SynchronyBtfOffUpgradeTask
,SynchronyEvictionEventsPostSchemaUpgradeTask
,SynchronyEvictionEventsPreSchemaUpgradeTask
,SynchronyEvictionPropertiesCleanupUpgradeTask
,SynchronyEvictionSnapshotPreSchemaUpgradeTask
,SynchronyEvictionSnapshotsPostSchemaUpgradeTask
,SynchronyPidFileRemovalUpgradeTask
,UnindexContentTypeUpgradeTask
,UpdateSpacePermissionsIndexUpgradeTask
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 Constructor Description AbstractUpgradeTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAllErrors(Collection<UpgradeError> errors)
protected void
addError(UpgradeError error)
protected void
addError(String errorMessage)
String
getBuildNumber()
BuildNumberUpgradeConstraint
getConstraint()
Collection<UpgradeError>
getErrors()
Return any errors that occur.String
getName()
The human-readable name of the upgrade taskString
getShortDescription()
A short (<50 chars) description of the upgrade actionboolean
isDatabaseUpgrade()
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
-
-
-
-
Method Detail
-
getShortDescription
public String getShortDescription()
Description copied from interface:UpgradeTaskInfo
A short (<50 chars) description of the upgrade action- Specified by:
getShortDescription
in interfaceUpgradeTaskInfo
-
addError
protected void addError(UpgradeError error)
-
addError
protected void addError(String errorMessage)
-
addAllErrors
protected void addAllErrors(Collection<UpgradeError> errors)
-
getErrors
public Collection<UpgradeError> 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
public void setBuildNumber(String buildNumber)
-
getBuildNumber
public String getBuildNumber()
- Specified by:
getBuildNumber
in interfaceUpgradeTaskInfo
- Returns:
- The build number that this upgrade is applicable to
-
validate
public void validate() throws 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.
- Specified by:
validate
in interfaceUpgradeTask
- Throws:
Exception
-
getConstraint
public BuildNumberUpgradeConstraint getConstraint()
- Specified by:
getConstraint
in interfaceUpgradeTask
- Returns:
- the constraint that must be passed for this task to be run.
-
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
-
getName
public String 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
-
-